A multi-protocol message adaptive conversion method for power distribution automation terminal
Patent Information
- Application Number
- CN202611417408.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-14
- Publication Date
- 2026-10-16
AI Technical Summary
[0004]因此,本发明提供了一种面向配电自动化终端的多规约报文自适应转换方法解决多规约转换中的业务语义失配及规约切换时业务事务易被截断的问题
[0015]The beneficial effects of this invention are as follows: By using a distribution semantic mirror closure model to perform mirror verification of distribution semantic events before and after conversion, and by locating the mismatch conversion position based on semantic closure constraints and correcting the target expression method, semantic reverse verification and directional repair are achieved during the target protocol conversion process, thereby improving the semantic consistency and conversion accuracy of multi-protocol message conversion; By tracing the initiation and response process of business transactions through the distribution business causal chain, and by using the transmission and recovery of virtual business credits to determine the business closure frontier, the timing of protocol switching is determined according to the complete business transaction state, thereby avoiding business interruption and improving the continuity of target protocol switching.
Smart Images

Figure CN122933787A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power distribution communication technology, and in particular to a multi-protocol message adaptive conversion method for power distribution automation terminals. Background Technology
[0002] With the increasing number of distribution automation terminals and the heterogeneous development of communication networks, multiple power communication protocols and industrial communication protocols coexist. Distribution terminals need to perform message identification, service information parsing, and target message conversion between different protocols. Existing multi-protocol conversion methods typically identify the protocol type based on message structure characteristics, then parse the information object according to pre-configured field mapping relationships, and re-encode it into the target protocol message. Some solutions can also switch different protocol processing programs according to link status, thereby achieving basic communication interoperability between different terminals. Existing multi-protocol message conversion technologies still have shortcomings: First, they mainly rely on message structure and field mapping for conversion, lacking closed-loop verification of business semantics before and after conversion. When there are differences in encoding precision and expression methods of different protocols, it is easy to have the problem that the message format is correct but the business semantics are deviated. Second, protocol switching is mostly performed based on the message end position or link idle state, without fully considering the initiation, response and termination process of power distribution business transactions. Protocol switching is prone to occur before the transaction is closed, resulting in loss of business response, abnormal communication order or interruption of business process. Summary of the Invention
[0003] In view of the aforementioned existing problems, the present invention is proposed.
[0004] Therefore, this invention provides a multi-protocol message adaptive conversion method for distribution automation terminals to solve the problems of service semantic mismatch and service transactions being easily truncated during protocol switching in multi-protocol conversion.
[0005] To solve the above-mentioned technical problems, the present invention provides the following technical solution: This invention provides an adaptive multi-protocol message conversion method for distribution automation terminals, comprising: collecting original multi-protocol communication messages from the distribution automation terminal and dividing them into complete frames, then arranging them continuously according to communication direction and reception time to generate a distribution multi-protocol message stream; matching candidate protocols based on the distribution multi-protocol message stream and verifying the closed state of communication behavior to form protocol channel binding data; using the protocol channel binding data to parse the message to be converted and uniformly map the service semantics; connecting distribution semantic events according to the communication order to obtain a distribution semantic event chain; performing target protocol conversion on the distribution semantic event chain to generate candidate target messages and restore them to target semantic events. The distribution semantic mirror closure model is used to verify the closure status of distribution semantic events and target semantic events and trace the mismatch location. The target protocol conversion is adjusted until semantic closure is achieved, generating the first protocol closure data. The distribution semantic event chain is used to trace the initiation and response processes of continuous distribution business transactions and verify the integrity status of business transactions, generating the second business closure data. The target protocol takeover location is determined by combining the first protocol closure data and the second business closure data, forming the target protocol switching data. Based on the target protocol switching data, the target protocol is switched at the closure location of the distribution business transaction, the distribution semantic event to be sent is re-encoded, and the distribution terminal adaptive target message stream is generated.
[0006] As a preferred embodiment of the multi-protocol message adaptive conversion method for distribution automation terminals described in this invention, the specific steps for generating the distribution multi-protocol message stream are as follows: Collect the original multi-protocol communication messages of each communication channel of the power distribution automation terminal, identify the message boundaries according to the byte reception time sequence and divide them into candidate frames to form a multi-protocol candidate frame set; Complete messages are filtered based on the multi-protocol candidate frame set and the continuous frame division relationship is determined. Then, the frames are arranged continuously according to the communication direction and the first byte reception time to generate a power distribution multi-protocol message stream.
[0007] As a preferred embodiment of the multi-protocol message adaptive conversion method for distribution automation terminals described in this invention, the specific steps for forming protocol channel binding data are as follows: Based on the power distribution multi-protocol message stream, complete messages within the same communication channel are continuously parsed using each candidate protocol, and the continuity of state transitions of each candidate protocol is verified by adjacent actual messages. Candidate protocols that cannot continuously explain communication behavior are eliminated, and protocol behavior verification records are obtained. Based on the protocol behavior verification record, the state transition process of communication transactions under each candidate protocol is tracked, the closed state of the communication transaction is verified and the actual protocol of each communication channel is locked, and then the source protocol and target protocol are determined to form protocol channel binding data.
[0008] As a preferred embodiment of the multi-protocol message adaptive conversion method for distribution automation terminals described in this invention, the specific steps for obtaining the distribution semantic event chain are as follows: The protocol channel binding data is used to extract the message to be converted from the power distribution multi-protocol message stream, parse the information object and communication transaction status according to the source protocol, and map the information object to the power distribution object to determine the business stage, thus forming power distribution semantic anchoring data; Based on the distribution semantic anchoring data, the original values of each information object are converted into unified physical quantities and unified event timestamps according to the range and proportional coefficient of the distribution object. At the same time, the position in the message to be converted is retained. Then, the distribution semantic events are connected according to the communication order and the continuous relationship of the business stage to obtain the distribution semantic event chain.
[0009] As a preferred embodiment of the multi-protocol message adaptive conversion method for distribution automation terminals described in this invention, the specific steps of performing target protocol conversion on the distribution semantic event chain, generating candidate target messages, and restoring them to target semantic events are as follows: Based on the power distribution semantic event chain, the target expression method of each power distribution semantic event is determined by the target specification, the physical quantity value is converted into a target specification coded value, and then written into the message structure specified by the target specification according to the business stage and communication order and framed to generate candidate target messages. The candidate target messages are re-parsed according to the target specification to restore the business meaning and physical quantity values of the power distribution object carried by the candidate target messages. Then, they are arranged according to the communication order to obtain the target semantic events.
[0010] As a preferred embodiment of the multi-protocol message adaptive conversion method for distribution automation terminals described in this invention, the specific steps of verifying the closure status of distribution semantic events and target semantic events using a distribution semantic mirror closure model and tracing the mismatch location, adjusting the target protocol conversion until semantic closure is achieved, and generating first protocol closure data are as follows: Based on the source location of the conversion, the distribution semantic events and the target semantic events are mirrored and paired. The semantic closure degree of each mirror location is calculated using the distribution semantic mirror closure model. The mirror locations that do not achieve semantic closure are reversed and transformed into the closure conditions that the target semantic events need to satisfy, generating a semantic closure constraint set. The target representation of each target reduction transformation position is fixed by using a semantic closure constraint set. Then, the fixed relationship of each target reduction transformation position is released in turn and virtual transformation is performed. The target reduction transformation positions that eliminate unclosed states without destroying the closed mirror positions are selected to obtain a list of mismatched transformation positions. Based on the mismatch transformation location list, virtual transformations are performed on the target expression methods supported by each mismatch transformation location in the order of information types specified in the target specification. The first target expression method that can satisfy the semantic closure constraint set is determined as the alternative target expression method, thus forming a target expression correction scheme. The target expression correction scheme is used to replace the original target expression at each mismatch transition position and adjust the candidate target message. Then, the adjusted candidate target message is parsed according to the target specification. The degree of closure recovery at each affected mirror position is calculated using the power distribution semantic mirror closure model. For mirror positions that do not meet the closure recovery requirements, mismatch location and target expression replacement are performed until all mirror positions achieve semantic closure, and the first specification closure data is generated.
[0011] As a preferred embodiment of the multi-protocol message adaptive conversion method for distribution automation terminals described in this invention, the specific steps for generating second service closure data by tracing the initiation and response processes of continuous distribution service transactions according to the distribution semantic event chain and verifying the integrity status of the service transactions are as follows: By using the power distribution semantic event chain to identify the initiation position of each business transaction and tracing the response process along the communication sequence according to the continuous relationship of business stages, power distribution semantic events that can form a continuous causal progression are connected to form a power distribution business causal chain. Based on the causal chain of power distribution business, virtual business credits are assigned to the initiation position of each business transaction, and virtual business credits are transferred as the business stage progresses. When the corresponding business branch reaches the termination stage, the virtual business credits are recovered, resulting in a transaction causal credit flow. The transaction closure degree of each business transaction is calculated using transaction causal credit flow. The position where all virtual business credits are first fully recovered is determined as the transaction closure position. Then, the transaction closure positions are arranged according to the communication order to form a transaction closure sequence. Based on the transaction closure sequence, the business closure range is advanced along the communication order. The position where all business transactions initiated before the current communication position have reached the transaction closure position and there is no unrecovered virtual business credit is determined as the business closure frontier, and the second business closure data is generated.
[0012] As a preferred embodiment of the multi-protocol message adaptive conversion method for distribution automation terminals described in this invention, the specific steps for forming target protocol switching data are as follows: The communication position that achieves semantic closure is read using the first protocol closure data, and the service closure front edge is read using the second service closure data. The position where the communication position that achieves semantic closure and the service closure front edge coincide in the communication order and are located in the complete message interval is determined as the candidate takeover position. Based on the candidate takeover positions, the position that appears first in the communication order is selected as the target protocol takeover position, and the target expression method determined by the first protocol closure data is bound to form the target protocol switching data.
[0013] As a preferred embodiment of the multi-protocol message adaptive conversion method for distribution automation terminals described in this invention, the specific steps for generating the adaptive target message stream for the distribution terminal are as follows: The target specification switching data is used to read the target specification takeover location and target expression method. At the target specification takeover location, the source specification's encoding entry for new distribution semantic events is closed. The distribution semantic events that have not yet been sent are handed over to the target specification for re-encoding and framing according to the communication order to obtain the target specification's verification message. Based on the target expression method determined by reading the first protocol closure data in the target protocol to be verified message, after verifying that the target expression method used in the target protocol to be verified message is consistent, the target protocol to be verified message is continuously sent in the communication order to generate the power distribution terminal adaptive target message stream.
[0014] As a preferred embodiment of the multi-protocol message adaptive conversion method for distribution automation terminals described in this invention, the distribution semantic mirroring closure model includes: The mirror input layer receives distribution semantic events and target semantic events paired according to the conversion source location. Using the distribution semantic events as the reference before conversion, the target semantic events are reverted to the same conversion source location according to the communication order to form a co-position mirror input. The closed mapping layer maps the physical quantity values recovered from the target semantic events in the co-located mirror input to the unified physical quantity scale of the distribution semantic events according to the coded range and coding resolution of the target specification. It also generates mirror closed features based on the business meaning of the distribution object and the retention state of the business stage before and after the conversion. The closed computation layer uses the mirror closure feature to calculate the physical quantity recovery deviation caused by the target reduction transformation, and corrects the physical quantity recovery deviation based on the business meaning while maintaining the state. The corrected deviation degree is then mapped to the semantic closure degree of each mirror position. The output layer is closed, and the semantic closure degree of each mirror position is connected according to the communication order. The mirror positions that have not achieved semantic closure are output to the semantic closure constraint set. After the target expression method is adjusted, the corrected target semantic events are received again using the same transformation source position, and the closure recovery status of each affected mirror position is determined.
[0015] The beneficial effects of this invention are as follows: By using a distribution semantic mirror closure model to perform mirror verification of distribution semantic events before and after conversion, and by locating the mismatch conversion position based on semantic closure constraints and correcting the target expression method, semantic reverse verification and directional repair are achieved during the target protocol conversion process, thereby improving the semantic consistency and conversion accuracy of multi-protocol message conversion; By tracing the initiation and response process of business transactions through the distribution business causal chain, and by using the transmission and recovery of virtual business credits to determine the business closure frontier, the timing of protocol switching is determined according to the complete business transaction state, thereby avoiding business interruption and improving the continuity of target protocol switching. Attached Figure Description
[0016] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 This is a flowchart of a multi-protocol message adaptive conversion method for distribution automation terminals.
[0018] Figure 2 A flowchart for generating multi-protocol message flows in power distribution.
[0019] Figure 3 To obtain the flowchart of the power distribution semantic event chain.
[0020] Figure 4 A flowchart for generating target specification switching data. Detailed Implementation
[0021] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0022] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0023] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.
[0024] Reference Figures 1-4 This is one embodiment of the present invention, which provides a multi-protocol message adaptive conversion method for distribution automation terminals, including the following steps: S1. Collect the original multi-protocol communication messages of the power distribution automation terminal and divide them into complete frames. Then, arrange them continuously according to the communication direction and receiving time to generate a power distribution multi-protocol message stream.
[0025] During normal communication in the distribution automation terminal, the original communication bytes actually sent and received are continuously read from each communication channel. When each communication byte arrives, the byte value, reception time, communication direction and communication channel are recorded. The communication bytes in the same communication channel are continuously saved according to the order of reception time, forming a multi-protocol communication original message that has not yet undergone protocol identification, field parsing and protocol conversion. The multi-protocol communication original message retains the original frame boundary content, communication control content, address content, distribution business data content and message verification content of different communication protocols.
[0026] The original multi-protocol communication messages of each communication channel are read byte by byte according to the order of reception. The possible message start position is determined based on the existing frame start flag of different communication protocols. The remaining communication bytes are read from the message start position, and the possible message end position is determined by combining the message length information or frame end flag. The communication bytes arranged continuously from the message start position to the message end position are divided into candidate frames. For communication byte segments with multiple possible message start positions or message end positions, candidate frames that can form complete boundaries according to the existing message structure are retained. All candidate frames are then summarized according to the communication channel and the byte reception time to form a multi-protocol candidate frame set.
[0027] The start and end positions of each message are checked frame by frame from the multi-protocol candidate frame set. The actual number of communication bytes contained in the candidate frame is checked in conjunction with the message length information. The integrity of the communication bytes in the candidate frame is confirmed by the message verification content. Candidate frames with complete message boundaries, communication byte counts that meet the message length information, and message verification passes are identified as complete messages. The end and start positions of adjacent complete messages are compared according to the byte reception time sequence in the same communication channel to eliminate divisions where communication byte ranges overlap. The continuous frame division relationship is determined based on the sequential position of each complete message in the original multi-protocol communication message. The communication direction and reception time recorded during the acquisition process are retained for each complete message. The reception time of the first communication byte of each complete message is taken as the first byte reception time. The sending and receiving messages are distinguished according to the communication direction. The complete messages in each communication channel are arranged from first to last according to the first byte reception time to maintain the actual communication order of complete messages in different communication directions. All complete messages are then connected continuously according to the arrangement order to generate a distribution multi-protocol message stream.
[0028] S2. Based on the distribution multi-protocol message stream, candidate protocols are matched and the closed state of communication behavior is verified to form protocol channel binding data. The protocol channel binding data is used to parse the message to be converted and uniformly map the service semantics. Distribution semantic events are connected according to the communication order to obtain the distribution semantic event chain.
[0029] Based on the multi-protocol message stream for power distribution, complete messages are collected and arranged continuously according to the communication channel, maintaining the original communication direction and first byte reception time of each complete message. For the same communication channel, the existing message format and field parsing rules of each candidate protocol are adopted. Starting from the first complete message, the frame boundary content, communication control content, address content, power distribution service data content, and message verification content in the complete message are parsed sequentially. The communication behavior state of each complete message is determined based on the parsed communication control content and communication direction. Then, the changes in communication behavior state between adjacent actual messages are compared along the arrangement order of complete messages to check whether the communication behavior represented by the previous complete message can be continued by the next complete message. For example, after initiating communication, the corresponding... After the response and request are confirmed, the corresponding business processing state can be entered. When the candidate protocol can continuously parse adjacent actual messages, and the communication direction, control meaning and communication behavior state of adjacent actual messages can form a continuous state transition, the current verification relationship of the candidate protocol is retained. When a candidate protocol cannot interpret a complete message according to the candidate protocol during continuous parsing, or the communication behavior state formed by adjacent actual messages cannot continue to transition according to the communication process specified by the candidate protocol, the corresponding candidate protocol is identified as a candidate protocol that cannot continuously interpret the communication behavior and is excluded. The complete messages in the power distribution multi-protocol message stream are continuously verified in the same way, and the continuous parsing and state transition continuity of each candidate protocol are summarized to obtain the protocol behavior verification record.
[0030] Based on the protocol behavior verification records, the communication behavior states formed by the complete messages that have been continuously parsed by each candidate protocol and adjacent actual messages are organized according to the communication channel. Starting from the communication behavior state that can represent the initiation of a communication transaction, the communication behavior states are checked sequentially during response, confirmation, and service processing, following the communication sequence of the complete messages. This continues until the communication transaction ends as specified by the candidate protocol. When the same candidate protocol can continuously interpret the complete messages involved in the communication transaction from initiation to end, and the communication direction and communication control content can support the continuous advancement of each communication behavior state according to the state transition relationship specified by the candidate protocol, and the communication transaction can proceed from the initiation state... When a state reaches the end state after the corresponding response process, the corresponding communication transaction is determined as a closed communication transaction. Communication transactions that can be identified within the same communication channel are continuously verified in the same way. Candidate protocols that cannot be closed or whose state transitions cannot be continuously explained are excluded. Candidate protocols that can continuously form closed communication transactions are locked as the actual protocol of the corresponding communication channel. The actual protocol of the communication channel where the message to be converted is located is determined as the source protocol. The actual protocol of the communication channel that the converted message needs to use is determined as the target protocol. The binding relationships between the communication channel, actual protocol, source protocol, and target protocol are organized to form protocol channel binding data.
[0031] The communication channel and source protocol of the message to be converted are determined using protocol channel binding data. Complete messages requiring protocol conversion are selected from the multi-protocol distribution message stream according to the communication channel and communication order. The communication control content, address content, and distribution service data content in the message to be converted are parsed according to the message format specified by the source protocol. The information object to which the distribution service data content belongs is determined based on the address content. The communication transaction state of the message to be converted is determined by combining the communication control content, communication direction, and the existing state transition relationships between adjacent messages to be converted. The distribution service objects represented by the information objects (such as remote signaling, telemetry, and remote control) are searched in the existing point table of the distribution automation terminal based on the address content. The distribution service meaning carried by the information objects is assigned to the corresponding distribution objects, maintaining the communication order of the information objects in the message to be converted. The current business stage of each distribution object is determined based on the initiation, response, confirmation, and termination processes reflected in the communication transaction state. The message to be converted, information objects, distribution objects, communication transaction states, and business stages are associated according to the communication order to form distribution semantic anchoring data.
[0032] By using distribution semantic anchoring data, the original values of information objects, distribution objects, business stages, and communication order in the messages to be converted are read item by item. Based on the range and proportional coefficient recorded in the distribution automation terminal's existing point table for the distribution objects, the original values of the information objects are converted into the physical quantity values actually represented by the distribution objects. This unifies the same type of distribution objects represented by different source protocols using different coding ranges and proportional relationships to the same physical quantity scale. For information objects carrying event timestamps in the messages to be converted, the event timestamps represented by the source protocols are converted to the unified time base used by the distribution automation terminal. For information objects not carrying event timestamps in the messages to be converted, the event timestamp is determined using the reception time of the first byte of the message to be converted. This ensures that each information object has a unified event timestamp that can be compared according to chronological order, while retaining the time of each event. The byte position and communication order of each information object in the message to be converted are determined, and the distribution object, unified physical quantity value, unified event time stamp, service stage, and position in the message to be converted are combined into a distribution semantic event. The distribution semantic events are organized according to the communication order of the distribution semantic events in the message to be converted and the arrangement order of the message to be converted in the distribution multi-protocol message stream. The service stage continuity relationship between adjacent distribution semantic events is checked according to the service stage already determined in the distribution semantic anchoring data. Distribution semantic events that can be continuously advanced in service stages are connected sequentially according to the actual communication order. Distribution semantic events in the same service stage maintain their original sequential relationship according to the unified event time stamp and communication order. Distribution semantic events that can maintain the communication order and service stage continuity relationship are continuously connected to obtain the distribution semantic event chain.
[0033] It should be noted that the business phase continuity relationship refers to the relationship in which the business phases to which adjacent distribution semantic events belong can proceed continuously in the order of business processing from initiation, response, confirmation to completion, without any phase jumps or reverse changes; the distribution semantic event chain is used to organize distribution semantic events according to the communication order and the business phase continuity relationship, so as to realize the continuous expression of different protocol messages from message-level representation to a unified business semantic process, and provide a unified basis for subsequent target protocol conversion, semantic closure verification and business transaction tracking.
[0034] S3. Perform target protocol transformation on the distribution semantic event chain, generate candidate target messages and restore them to target semantic events. Use the distribution semantic mirror closure model to verify the closure status of the distribution semantic events and target semantic events and trace the mismatch location. Adjust the target protocol transformation until semantic closure is achieved, and generate the first protocol closure data. According to the distribution semantic event chain, trace the initiation and response processes of continuous distribution business transactions and verify the integrity status of business transactions, generate the second business closure data, and combine the first protocol closure data and the second business closure data to determine the target protocol takeover location and form the target protocol switching data.
[0035] Based on the distribution semantic event chain, the distribution object, unified physical quantity value, unified event time stamp, and service stage in the distribution semantic event are determined item by item according to the communication order. Combined with the target protocol determined by the protocol channel binding data, a target expression method that can express the same distribution object and service meaning is searched among the information object types and message formats specified in the target protocol. The distribution objects in the distribution semantic event are mapped to information objects that the target protocol can recognize. According to the range, proportional coefficient, and encoding range specified in the target protocol, the unified physical quantity value is converted into an coded value that the target protocol can directly write into the message. Simultaneously, the unified event time stamp is converted into the time representation form specified by the target protocol. Based on the already determined service stage of the distribution semantic event, the target protocol selects... The target specification can represent the communication control content of the corresponding business stage, and arrange the distribution semantic events determined by the target expression method according to the communication order of the distribution semantic events in the distribution semantic event chain. According to the message structure specified by the target specification, the communication control content, address content, distribution business data content with completed numerical conversion, and time representation content are written into the corresponding message positions. The continuous communication bytes are organized according to the message length specified by the target specification, and the frame boundary content and message verification content are supplemented to ensure that the distribution semantic events within the same business stage maintain the original communication order, and the business stage continuity relationship already formed by the distribution semantic event chain is maintained between different business stages. The frames are assembled according to the complete message format specified by the target specification to generate candidate target messages.
[0036] The candidate target messages are re-parsed frame by frame according to the message format specified in the target specification. The complete range of the candidate target messages is determined based on the frame boundary content. Then, the communication control content, address content, distribution service data content, and time representation content are parsed according to the field positions specified in the target specification. The information objects carried by the candidate target messages are determined based on the address content, and the distribution objects represented by the information objects are found using the existing point table of the distribution automation terminal, thereby restoring the service meaning of the distribution objects carried by the candidate target messages. For the distribution service data content, the coded values are reverse-converted according to the range, proportional coefficient, and encoding range specified in the target specification, and the coded values are restored to physical quantity values at the same physical quantity scale as the distribution semantic events. At the same time, the time representation content is restored to the unified event timestamp, and the service stage of the distribution object is determined according to the communication control content and communication direction. The restored service meaning, physical quantity values, unified event timestamp, and service stage of the distribution objects are arranged according to the original communication order of the candidate target messages, while maintaining the positional relationship of each information object in the candidate target messages, to obtain the target semantic events.
[0037] The position of the distribution semantic event in the message to be converted is used as the conversion source position. During the target protocol conversion process, the conversion source position corresponding to the target semantic event is retained. Distribution semantic events and target semantic events are searched one by one according to the same conversion source position, and distribution semantic events and target semantic events from the same position are paired in a mirror relationship. For each mirror position, the unified physical quantity value of the distribution semantic event, the unified physical quantity value recovered from the target semantic event, the minimum physical quantity resolution of the target expression method, the business meaning of the distribution object, and the business stage are read. Before calculating the semantic closure degree, the physical quantity deviation before and after conversion is normalized according to the minimum physical quantity resolution. The business stages of the distribution semantic event and the target semantic event are converted into normalized progress values according to the business stage advancement order of the same business transaction. The business meaning retention status is determined based on the retention status of the business meaning of the distribution object before and after the conversion. The semantic closure model of distribution semantic mirroring is used to determine the semantic closure degree of each mirror position by comprehensively considering the physical quantity recovery deviation, the business meaning retention status, and the business stage normalization progress deviation. When the unified physical quantity value remains consistent, the business meaning of the distribution object remains consistent, and the business stage remains consistent, the corresponding mirror position is determined to have achieved semantic closure. For mirror positions that have not achieved semantic closure, the physical quantity recovery deviation, business meaning change, and business stage deviation are checked in reverse. The original unified physical quantity value, business meaning of the distribution object, and business stage of the distribution semantic event at the corresponding mirror position are used as the closure conditions that the target semantic event needs to be restored and kept consistent. The mirror positions that have not achieved semantic closure and their corresponding closure conditions are summarized according to the conversion source position to generate a semantic closure constraint set.
[0038] The semantic closure degree of each mirror position is calculated using the following expression: ; in, Indicates the first The degree of semantic closure of each mirror position; Indicates the sequence number of the mirror position; Represents the natural exponential function; Indicates the first Unified physical quantity values of power distribution semantic events in each mirror location; Indicates the first The unified physical quantity value recovered from the target semantic event in each mirror location; Indicates the first The minimum physical quantity resolution when each mirror position is expressed in a target manner; Indicates the first The tiny positive numbers corresponding to each mirror position; Indicates the first The business meaning of each mirror location is marked; the mark is 1 if the business meanings are consistent and 0 if they are inconsistent. Indicates the first Normalized progress values of business phases for power distribution semantic events in each mirror location; Indicates the first Normalized progress values of the business phase of the target semantic event in each mirror location.
[0039] It should be noted that, The range of values for is: 0 < ≤1; The closer it is to 1, the closer the semantics are to a closed loop before and after the conversion; A value of 1 indicates that the physical quantities are restored to consistency, the business meaning is maintained, and the business stage position is consistent.
[0040] Furthermore, By reading the first The business stage to which the power distribution semantic event belongs in each mirror location is obtained by normalizing the stage number from 0 to 1 according to the business stage advancement order of the current business transaction. By reading the first The expression is obtained by re-parsering the target semantic event in each mirror position to its business stage and normalizing the stage number from 0 to 1 according to the same business stage advancement order. Before calculation, the expression has been processed by physical quantity resolution normalization and business stage progress normalization to convert the physical quantity deviation and business stage deviation into dimensionless values.
[0041] Furthermore, the construction process of the distribution semantic mirror closure model is as follows: The mirror input layer receives distribution semantic events and target semantic events that form a mirror pairing relationship one by one according to the conversion source location. It uses the position and communication order of the distribution semantic events in the message to be converted as the pre-conversion reference, arranges each distribution semantic event according to its communication order in the distribution semantic event chain, and searches for target semantic events originating from the same position in the message to be converted as each distribution semantic event, based on the conversion source location retained during the target protocol conversion process. It then associates the target semantic events from their arrangement position in the candidate target messages back to the same conversion source location, thus linking the distribution semantic events and target semantic events. Semantic events are matched one-to-one with each other at the same conversion source location. When there are multiple consecutive distribution semantic events and target semantic events at the same conversion source location, they are matched item by item according to the original communication order of the distribution semantic events and the re-parsed communication order of the target semantic events. The business meaning of the distribution object, the unified physical quantity value, the unified event time scale and the business stage of the distribution semantic events and target semantic events are kept unchanged. This allows each conversion source location to retain both the distribution semantic events before conversion and the target semantic events after conversion. All conversion source locations are arranged according to the communication order to form a mirrored input.
[0042] The closed mapping layer reads distribution semantic events and target semantic events from the same conversion source location one by one based on the mirrored input. It determines the coded range and coding resolution specified by the target specification according to the target expression method used in the target semantic event. Then, it performs scale conversion on the physical quantity values recovered from the target semantic event using the range and scaling factor specified by the target specification, ensuring that the recovered physical quantity values are at the same physical quantity scale as the unified physical quantity values of the distribution semantic event. The coding resolution of the target specification is used as the resolution benchmark for physical quantity comparison, and the differences in physical quantities before and after conversion are normalized to obtain the physical quantity recovery deviation. At the same conversion source location... The system compares the business meanings of the distribution objects represented by the distribution semantic events and the target semantic events. When the business meanings of the distribution objects remain consistent, the system determines that the business meanings remain consistent. When the business meanings of the distribution objects change, the system determines that the business meanings remain inconsistent. According to the business stage progression order of the current business transaction, the business stages to which the distribution semantic events and the target semantic events belong are converted into business stage normalized progress values, and the business stage normalized progress values before and after the conversion are compared to obtain the business stage normalized progress deviation. According to the conversion source location, the physical quantity recovery deviation, the business meaning retention state, and the business stage normalized progress deviation are associated to generate a mirror closure feature.
[0043] It should be noted that the mirror closure features include physical quantity recovery deviation, business meaning retention status, and business stage normalization progress deviation, which are used to characterize the degree of retention between distribution semantic events and target semantic events at the same conversion source location in terms of numerical value, business meaning, and business stage.
[0044] The closed-loop computation layer processes mirror closure features one by one according to the source location of the transformation. It uses the physical quantity recovery deviation in the mirror closure features to characterize the degree of difference between the unified physical quantity values before and after the target specification transformation, and makes corrections in conjunction with the business meaning maintenance state. When the business meaning of the distribution object of the distribution semantic event and the target semantic event is consistent, the physical quantity recovery deviation is retained. When the business meaning of the distribution object is inconsistent, the deviation caused by the inconsistency of business meaning is added to the physical quantity recovery deviation. Then, combined with the business stage normalization progress deviation in the mirror closure features, the deviation formed by the physical quantity recovery deviation, the deviation formed by the business meaning maintenance state, and the business stage normalization progress deviation are squared, summed, and squared to obtain the corrected deviation degree. The negative value of the corrected deviation degree is then used for natural exponential mapping, so that the smaller the corrected deviation degree, the higher the semantic closure degree obtained by mapping. When the corrected deviation degree is zero, it means that the unified physical quantity value, the business meaning of the distribution object, and the business stage are all consistent. The semantic closure degree of each mirror position is obtained according to the source location of the transformation.
[0045] The expression for calculating the physical quantity recovery deviation caused by the target reduction transformation is: ; in, Indicates the first The physical quantities at each mirror position are restored to their original positions.
[0046] It should be noted that, ≥0, =0 indicates that the physical quantities before and after the conversion are completely identical; The larger the value, the more significant the deviation in the physical quantity recovery after the target specification is re-analyzed.
[0047] The closed output layer arranges each mirror position according to the communication order of the distribution semantic events in the distribution semantic event chain, and associates the semantic closure degree obtained by the closed calculation layer with the same conversion source position. It checks the semantic closure degree of each mirror position one by one. The mirror positions that have achieved semantic closure maintain their original arrangement relationship. The mirror positions that have not achieved semantic closure are combined with the conversion source position and the aforementioned unified physical quantity value, the business meaning of the distribution object and the closure conditions that the business stage needs to meet, and written into the semantic closure constraint set. After the target expression method is adjusted, the conversion source position involved in the target expression method adjustment is determined as the affected mirror position. The corrected target semantic event is obtained again according to the same conversion source position, and the corrected target semantic event is re-formed with the distribution semantic event of the same conversion source position to form a mirror pairing relationship. The semantic closure degree of each affected mirror position is re-determined according to the same processing process of the closed mapping layer and the closed calculation layer in the distribution semantic mirror closure model. The affected mirror position that has achieved semantic closure after re-determining is determined as closed recovery. The affected mirror position that has not achieved semantic closure after re-determining is determined as unclosed recovery. Thus, the closure recovery status of each affected mirror position is determined.
[0048] The training process of the power distribution semantic mirror closure model is as follows: Distribution semantic events and target semantic events are extracted from historical distribution multi-protocol messages that have been confirmed to have consistent business semantics before and after the conversion, as well as those with semantic mismatch. These are then mirrored and paired according to the conversion source location. The manually verified physical quantity recovery status, distribution object business meaning retention status, and business stage retention status are used as semantic closure references. The mirrored and paired distribution semantic events and target semantic events are processed sequentially through the mirror input layer, closure mapping layer, and closure calculation layer. The physical quantity scale is unified according to the coded range and coding resolution of the target protocol to obtain the physical quantity recovery deviation, business meaning retention status, and business stage normalization progress. The degree of deviation is calculated according to the semantic closure degree calculation method to obtain the semantic closure degree of each mirror position. The semantic closure degree of each mirror position is compared with the semantic closure reference confirmed by manual verification item by item. For mirror positions with inconsistent judgments, the conversion source position pairing relationship, target specification coded range, coding resolution, physical quantity scale conversion relationship and business stage normalization relationship are checked and the corresponding processing relationship is corrected. The semantic closure degree of each mirror position is then recalculated until the semantic closure degree can stably distinguish the mirror positions with consistent semantics before and after conversion and the mirror positions with semantic mismatch, thus obtaining the power distribution semantic mirror closure model.
[0049] Using a set of semantic closure constraints, mirror positions that have not achieved semantic closure are determined based on the source location of the transformation. Each mirror position is then associated with the target protocol transformation position used when forming the target semantic event. While maintaining the current target expression method of each target protocol transformation position, the relationship between the target expression method and the target protocol transformation position is fixed. Following the communication sequence, individual target protocol transformation positions are selected sequentially to release the fixed relationship, while keeping the target expression methods of the remaining target protocol transformation positions unchanged. From the target expression methods supported by the target protocol, target expression methods that can express the same power distribution object's service meaning and service stage are selected one by one. Virtual transformations are performed on the target protocol transformation positions whose fixed relationships have been released, and the message content formed by the virtual transformation is re-parsed according to the target protocol to obtain the target semantic event. Finally, the target semantic event is associated with the power distribution language according to the source location. The semantic events are re-paired, and the semantic closure degree of the relevant mirror positions is re-determined using the power distribution semantic mirror closure model. It is checked whether the mirror positions that have not reached semantic closure in the semantic closure constraint set have been converted to semantic closure, and at the same time, it is checked whether the mirror positions that have reached semantic closure are still semantically closed. When the fixed relationship is removed and the virtual transformation is performed, the unclosed state can be eliminated without causing the closed mirror position to lose semantic closure again, and the corresponding target specification transformation position is retained as the mismatch transformation position. When the fixed relationship is removed and the virtual transformation is performed, the unclosed state cannot be eliminated or the closed mirror position loses semantic closure, and the original target expression of the corresponding target specification transformation position is restored. All target specification transformation positions are verified in the same way, and the mismatch transformation positions obtained by the filtering are summarized according to the communication order to obtain the mismatch transformation position list.
[0050] Based on the mismatch transition location list, the mismatch transition locations that need to be corrected are determined one by one according to the communication order. Combining the service meaning, unified physical quantity value, and service stage of the distribution object associated with the mismatch transition location, target expression methods that can express the same distribution object service meaning and service stage are selected from the information types specified in the target specification. The target expression methods supported by the mismatch transition locations are arranged in the order of the information types specified in the target specification. Keeping the target expression methods of the remaining target specification transition locations unchanged, virtual transitions are performed on each mismatch transition location starting from the first-ranked target expression method. The unified physical quantity value is converted into a target specification-encodeable value according to the selected target expression method, forming the corresponding message content. The message content is re-parsed according to the target specification to obtain the target semantic event. Based on the same transition source location, the target semantic event and the distribution semantic event are re-mirrored and paired. The semantic closure degree of the relevant mirror locations is re-determined using the distribution semantic mirror closure model, and the relevant mirror positions are... The unified physical quantity values, business meanings and business stages of the distribution objects are checked against the closure conditions recorded in the semantic closure constraint set. When the selected target expression method cannot make the mirror position that has not achieved semantic closure satisfy the semantic closure constraint set, or causes the mirror position that originally achieved semantic closure to lose semantic closure, the virtual conversion of the corresponding target expression method ends and the next target expression method is selected in the order of information type to continue the virtual conversion. When the selected target expression method can make the relevant mirror position that has not achieved semantic closure satisfy the semantic closure constraint set and the mirror position that originally achieved semantic closure maintains semantic closure, the target expression method that first satisfies the above conditions in the order of information type is determined as the alternative target expression method for the mismatch conversion position. The alternative target expression methods for each mismatch conversion position in the mismatch conversion position list are determined in the same way, and each mismatch conversion position and the determined alternative target expression method are associated in the order of communication to form a target expression correction scheme.
[0051] According to the target expression correction scheme, the alternative target expression methods associated with each mismatch transition position are read one by one. The original target expression method of the mismatch transition position is replaced with the alternative target expression method determined by the target expression correction scheme, while keeping the target specification transition positions and target expression methods not listed in the mismatch transition position list unchanged. For the replaced mismatch transition positions, the unified physical quantity values in the distribution semantic events are reread according to the alternative target expression methods. The writing position of the distribution service data content in the candidate target message is re-determined according to the information type, communication control content, address content, time representation format and message structure specified by the target specification. The unified physical quantity values are converted into values that can be encoded by the target specification. The affected message length, frame boundary content and message verification content are readjusted according to the changes in the target expression method, so that the adjusted candidate target message maintains the complete message format specified by the target specification, while retaining the original transition source position and communication order of each distribution semantic event. The adjusted candidate target message is re-parsed according to the message format specified by the target specification, and the distribution object service meaning, physical quantity value and unified event of each target semantic event are restored according to the transition source position. The process involves determining the time stamp and business stage of the message, identifying the mismatched transition location where the target expression has been replaced based on the transition source location, and defining the affected mirror location. The re-parsed target semantic events are then paired with distribution semantic events from the same transition source location to form a new mirror pairing relationship. The distribution semantic mirror closure model is used to redetermine the semantic closure degree of the affected mirror location, and the changes in semantic closure degree before and after the target expression adjustment are compared. Affected mirror locations with improved semantic closure degree and meeting the semantic closure constraint set are defined as closure recovery locations, while affected mirror locations that do not meet the semantic closure constraint set are retained as mirror locations to be adjusted. For mirror locations to be adjusted, the mismatched transition location is redefined based on the transition source location, and alternative target expressions are determined from the target expressions supported by the mismatched transition location. Candidate target messages are readjusted, and a new semantic closure degree is determined according to the target specification parsing, mirror pairing, and closure recovery degree verification process until all mirror locations achieve semantic closure. The mirror locations that achieve semantic closure, the final target expression method adopted, and the candidate target messages that meet the semantic closure requirements are associated to generate the first specification closure data.
[0052] It should be noted that the first protocol closure data is used to record the final target expression method adopted during the target protocol conversion process, the mirror position that achieves semantic closure, and the candidate target messages that meet the semantic closure requirements. It represents the semantic maintenance state between the distribution semantic events and the target semantic events after the target protocol conversion, and provides a basis for subsequently determining the target protocol takeover position and verifying the target expression method adopted by the target protocol to be verified messages.
[0053] The degree of closure restoration at each affected mirror location is calculated using the following expression: ; in, Indicates the first The degree of closure recovery at each affected mirror location; Indicates the first The semantic closure of each mirror position after adjustment by the target representation method.
[0054] It should be noted that the affected mirror positions are only the range of mirror positions participating in the second calculation, and do not change the actual mirror positions. The meaning; It always represents the same mirror position number, only the calculation Only those affected by the adjustment of the target expression method are selected. Participate in the calculation.
[0055] Furthermore, this expression is only used for mirror positions that did not originally achieve semantic closure, therefore... <1, there is no problem of the denominator being zero; when When = 0, it indicates that adjusting the target representation method has not improved the current mirror position; when 0 < When <1, it indicates that the mismatch has been partially recovered; when When =1, it means that the corrected mirror position has been completely restored to the semantically closed state.
[0056] The distribution semantic event chain is used to examine the business meaning and business stage of each distribution semantic event in the communication sequence. Distribution semantic events in the initiation stage are identified as the initiation positions of business transactions. Starting from the initiation position of each business transaction, distribution semantic events are examined sequentially along the communication sequence. For distribution semantic events in the response, confirmation, business processing, and termination stages, the business meaning of the distribution object is first compared to see if it can inherit the business content represented by the initiation position. Then, based on the continuity of business stages, it is checked whether the current distribution semantic event can inherit the business stage progression process formed by the previous distribution semantic event. Distribution semantic events that maintain the same business processing flow and whose business stages can be continuously advanced in the direction of initiation to response, confirmation, business processing and termination, and whose communication order does not reverse, are identified as continuously causally advancing distribution semantic events. When there are multiple distribution semantic events that can take over the current business stage after the same initiation position, the distribution semantic events that can continue to advance to the next business stage are retained in sequence according to the communication order, and are continuously tracked until the business stage reaches the end state. The continuously causally advancing distribution semantic events formed from the initiation position of the business transaction are connected in sequence according to the communication order to form a distribution business causal chain.
[0057] It should be noted that the distribution business causal chain is used to connect distribution semantic events in the same business transaction according to the continuous relationship of business stages, so as to realize the continuous tracking of the entire process of the business transaction from initiation to completion, and provide a basis for verifying the integrity of the business transaction and determining the business closure position.
[0058] Based on the causal chain of power distribution services, the initiation position of each business transaction is determined sequentially according to the communication order. A complete set of virtual business credits is allocated at the initiation position of each business transaction, and the virtual business credits are associated with the power distribution semantic events in the corresponding business transactions. The business stage progression process is checked along the power distribution service causal chain. When the current business stage connects only one power distribution semantic event that can be continuously causally advanced, the virtual business credits held by the current business stage are completely transferred to the next business stage. When the current business stage connects multiple power distribution semantic events that can be continuously causally advanced, the virtual business credits held by the current business stage are equally distributed to each business stage according to the number of business branches. The system ensures that the total amount of virtual service credits obtained by each business branch remains consistent with that before allocation. Each business branch continues to transmit the allocated virtual service credits according to the continuity of business stages. When the power distribution semantic event in a business branch progresses to the termination stage specified by the corresponding business transaction, the virtual service credits held by the business branch are recovered and returned to the initiation position of the corresponding business transaction. Business branches that have not yet reached the termination stage continue to retain and transmit virtual service credits. The system records the change process of virtual service credits in each business transaction from the initiation position through business stage transmission, business branch allocation, and recovery at the termination stage, according to the communication sequence, thus obtaining the transaction causal credit flow.
[0059] The transactional causal credit flow is used to track the virtual service credit allocation and virtual service credit recovery amount of each service credit branch in each service transaction according to the communication sequence. The recovered virtual service credit of each service credit branch is aggregated and compared with the virtual service credit allocated to all service credit branches to obtain the overall virtual service credit recovery status of the service transaction. Simultaneously, the recovered virtual service credit of each service credit branch is compared with the allocated virtual service credit to obtain the virtual service credit recovery status of each service credit branch. The overall virtual service credit recovery status of the service transaction and the virtual service credit recovery status of all service credit branches are then combined. The process involves calculating the closure degree of each business transaction at the current communication location; repeatedly determining the closure degree of each business transaction at each communication location along the communication sequence; when all virtual business credits allocated by all business credit branches have been recovered, and the amount of virtual business credit recovered by each business credit branch reaches the amount of virtual business credit allocated, the closure degree of the business transaction reaches a fully closed state, and the communication location where the closure degree of the business transaction first reaches a fully closed state is determined as the transaction closure location; the transaction closure location of each business transaction is determined in the same way, and then the transaction closure locations are arranged from first to last according to the communication order of the transaction closure locations in the power distribution semantic event chain to form a transaction closure sequence.
[0060] The degree of closure of each business transaction is calculated using the following expression: ; in, Indicates the first The degree of closure of each business transaction; Indicates the sequence number of the business transaction; Indicates the first The total number of business credit branches included in each business transaction; This indicates the business credit branch number, used to distinguish different business credit branches formed according to the progress of the business stage within the same business transaction; Represented as the first In the first business transaction The virtual service credits that have been reclaimed by each business credit branch up to the current communication location, 0≤ ≤ ; Indicates the first The first business transaction to the first Virtual business credits allocated to each business credit branch.
[0061] It should be noted that 0≤ ≤1; when When =1, it indicates that all virtual business credits of all business branches have been recovered according to the original allocation, and the business transaction has been closed; when If the value is less than 1, it indicates that there are at least some business branches that have not yet been completed.
[0062] Based on the transaction closure sequence, the transaction closure positions of initiated business transactions are checked one by one from front to back according to the communication order in the power distribution semantic event chain. Business transactions that have appeared at the initiation position before each communication position are included in the business closure scope. The transaction closure sequence of each business transaction included in the business closure scope is checked one by one. When all business transactions have reached the transaction closure position, the virtual business credit recovery status of each business transaction is checked using the transaction causal credit flow. It is confirmed that the virtual business credits allocated by each business credit branch have been recovered and there are no unrecovered virtual business credits that are still being transmitted or retained. The communication position that simultaneously satisfies that all business transactions initiated before the current communication position have reached the transaction closure position and there are no unrecovered virtual business credits is determined as the business closure front edge. The business closure scope continues to advance along the communication order. When a newly initiated business transaction has not yet reached the transaction closure position, the existing business closure front edge remains unchanged until the newly initiated business transaction reaches the transaction closure position and all virtual business credits are recovered. Then the business closure front edge is advanced to a new communication position. The transaction closure positions of the business closure front edge and the business closure scope are recorded according to the communication order to generate the second business closure data.
[0063] It should be noted that the second service closure data is used to record the closure status of each service transaction at the service closure front and within the service closure range, indicating whether all service transactions initiated before the current communication position have been closed, and providing a basis for determining the service integrity of the target protocol takeover position.
[0064] Using the first protocol closure data, the semantic closure status of each mirror position is checked sequentially according to the communication order. Based on the conversion source position preserved in the first protocol closure data, the mirror positions that have achieved semantic closure are restored to the communication positions in the distribution multi-protocol message stream. The communication positions that allow further conversion using the target expression method after all mirror positions have achieved semantic closure are determined as the communication positions that have achieved semantic closure. Using the second service closure data, the service closure front edge is determined according to the same communication order. The communication positions that have achieved semantic closure are compared with the service closure front edge one by one. When the communication position that has achieved semantic closure and the service closure front edge fall at the same communication position, it indicates that the target... Protocol conversion has maintained semantic closure before the current communication position, and all business transactions initiated before the current communication position have reached the transaction closure position and there is no unrecovered virtual business credit. Based on the determined continuous frame division relationship of the distribution multi-protocol message stream, the message boundary of the overlapping communication position is checked. The overlapping communication position located after the message end position of the previous complete message and before the message start position of the next complete message, and not falling within the communication byte range of any complete message, is determined as the complete message interval position. The communication position that simultaneously meets the conditions of semantic closure, overlapping service closure front edge, and complete message interval is determined as the candidate takeover position.
[0065] Based on the communication order of candidate takeover locations in the distribution multi-protocol message stream, all candidate takeover locations are arranged in order from first to last. Each candidate takeover location is checked to see if it is still within a complete message interval and meets the conditions of semantic closure and service closure front edge overlap. The candidate takeover location that first meets the above conditions after arrangement is determined as the target protocol takeover location. The target expression mode that has passed the semantic closure verification and is finally retained is extracted from the first protocol closure data. The target protocol takeover location is bound to the retained target expression mode. The distribution semantic events that need to be converted to the target protocol after the target protocol takeover location are converted using the target expression mode determined by the first protocol closure data. The target protocol takeover location, communication order and target expression mode are associated to form target protocol switching data.
[0066] S4. Based on the target protocol switching data, switch the target protocol at the closing position of the power distribution business transaction, re-encode the power distribution semantic event to be sent, and generate the power distribution terminal adaptive target message stream.
[0067] Using the target protocol switching data, the target protocol takeover position and target representation are read according to the recorded communication order. Based on the target protocol takeover position in the distribution multi-protocol message stream, the position where the source protocol stops encoding is determined. Since the target protocol takeover position is located within a complete message interval, it is confirmed that the complete message formed according to the source protocol before the target protocol takeover position has ended. From the target protocol takeover position, the writing of newly occurring distribution semantic events into new source protocol messages according to the source protocol is stopped, ensuring that the distribution semantic events sent before the target protocol takeover position maintain their original communication state. The distribution semantic events after the target protocol takeover position are checked according to the communication order in the distribution semantic event chain. Distribution semantic events that have not yet formed a complete message are identified as unsent distribution semantic events, maintaining their original distribution object, unified physical quantity value, unified event time stamp, service stage, and communication order. The target protocol switching data is used to determine... The target expression method processes each unsent distribution semantic event item by item. Based on the distribution object and service stage, it determines the information object represented by the target expression method from the information object types specified in the target specification. According to the range, proportional coefficient and encoding range specified in the target specification, it re-converts the unified physical quantity value into the target specification coded value, and converts the unified event timestamp into the time representation form specified in the target specification. Based on the service stage, it determines the communication control content specified in the target specification. According to the original communication order of the unsent distribution semantic events, it writes the communication control content, address content, re-converted distribution service data content and time representation content into the message position specified in the target specification. It organizes continuous communication bytes according to the message length specified in the target specification, supplements frame boundary content and message verification content, and maintains the original communication order and service stage continuity of the distribution semantic events. It then frames the communication bytes re-encoded according to the target specification into a complete message to obtain the target specification verification message.
[0068] According to the target specification, the communication control content, address content, power distribution service data content, and time representation content of the message to be verified are analyzed frame by frame according to the message format specified in the target specification. Based on the address content, the target representation method used by each information object in the target specification to be verified message is determined. Following the communication order retained in the target specification to be verified message, the target representation method used by each information object is checked against the target representation methods that have undergone semantic closure verification and are retained in the first specification closure data. When the information object type, power distribution service data content representation format, and time representation format in the target specification to be verified message are all consistent with the target representation methods determined by the first specification closure data, then... The target expression method used in the target specification to be verified messages is kept consistent. The frame boundary content, message length and message verification content of the target specification to be verified messages are checked to confirm that the target specification to be verified messages have a complete message structure. The target specification to be verified messages are arranged according to the original communication order of the distribution semantic event. The target specification to be verified messages are sent frame by frame according to the actual communication sequence after the target specification takeover position. This ensures that the target specification to be verified messages in different business stages maintain the business stage continuity relationship that has been determined in the distribution semantic event chain. The continuously sent target specification to be verified messages are arranged according to the communication order to generate the distribution terminal adaptive target message stream.
[0069] In summary, this invention achieves semantic reverse verification and directional repair during the target protocol conversion process by: using a distribution semantic mirroring closure model to perform mirror verification of distribution semantic events before and after conversion; and correcting the target expression method after locating the mismatch conversion position based on semantic closure constraints. This improves the semantic consistency and conversion accuracy of multi-protocol message conversion. Furthermore, by tracing the initiation and response process of business transactions through the distribution business causal chain and using the transmission and recovery of virtual business credits to determine the business closure frontier, this invention enables the determination of protocol switching timing according to the complete business transaction state, thereby avoiding business interruption and improving the continuity of target protocol switching.
[0070] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A multi-protocol message adaptive conversion method for distribution automation terminals, characterized in that, include: The original multi-protocol communication messages of the power distribution automation terminal are collected and divided into complete frames. Then, they are arranged continuously according to the communication direction and receiving time to generate a power distribution multi-protocol message stream. Based on the matching of candidate protocols and verification of the closed state of communication behavior in the multi-protocol message stream of power distribution, protocol channel binding data is formed. The protocol channel binding data is used to parse the message to be converted and uniformly map the service semantics. Power distribution semantic events are connected according to the communication order to obtain the power distribution semantic event chain. The distribution semantic event chain is transformed into a target specification, candidate target messages are generated and restored to target semantic events. The distribution semantic mirror closure model is used to verify the closure status of distribution semantic events and target semantic events and trace the mismatch location. The target specification transformation is adjusted until semantic closure is achieved, and the first specification closure data is generated. The process of initiating and responding to continuous power distribution business transactions is traced according to the power distribution semantic event chain, and the integrity status of the business transactions is verified. Second business closure data is generated. The target protocol takeover position is determined by combining the first protocol closure data and the second business closure data, and target protocol switching data is formed. Based on the target protocol switching data, the target protocol is switched at the closing position of the power distribution business transaction, the power distribution semantic event to be sent is re-encoded, and the power distribution terminal adaptive target message stream is generated.
2. The multi-protocol message adaptive conversion method for distribution automation terminals as described in claim 1, characterized in that, The specific steps for generating the multi-protocol distribution message stream are as follows: Collect the original multi-protocol communication messages of each communication channel of the power distribution automation terminal, identify the message boundaries according to the byte reception time sequence and divide them into candidate frames to form a multi-protocol candidate frame set; Complete messages are filtered based on the multi-protocol candidate frame set and the continuous frame division relationship is determined. Then, the frames are arranged continuously according to the communication direction and the first byte reception time to generate a power distribution multi-protocol message stream.
3. The multi-protocol message adaptive conversion method for distribution automation terminals as described in claim 1, characterized in that, The specific steps for forming the protocol channel binding data are as follows: Based on the power distribution multi-protocol message stream, complete messages within the same communication channel are continuously parsed using each candidate protocol, and the continuity of state transitions of each candidate protocol is verified by adjacent actual messages. Candidate protocols that cannot continuously explain communication behavior are eliminated, and protocol behavior verification records are obtained. Based on the protocol behavior verification record, the state transition process of communication transactions under each candidate protocol is tracked, the closed state of the communication transaction is verified and the actual protocol of each communication channel is locked, and then the source protocol and target protocol are determined to form protocol channel binding data.
4. The multi-protocol message adaptive conversion method for distribution automation terminals as described in claim 3, characterized in that, The specific steps for obtaining the power distribution semantic event chain are as follows: The protocol channel binding data is used to extract the message to be converted from the power distribution multi-protocol message stream, parse the information object and communication transaction status according to the source protocol, and map the information object to the power distribution object to determine the business stage, thus forming power distribution semantic anchoring data; Based on the distribution semantic anchoring data, the original values of each information object are converted into unified physical quantities and unified event timestamps according to the range and proportional coefficient of the distribution object. At the same time, the position in the message to be converted is retained. Then, the distribution semantic events are connected according to the communication order and the continuous relationship of the business stage to obtain the distribution semantic event chain.
5. The multi-protocol message adaptive conversion method for distribution automation terminals as described in claim 4, characterized in that, The specific steps for performing target reduction transformation on the power distribution semantic event chain, generating candidate target messages and restoring them to target semantic events are as follows: Based on the power distribution semantic event chain, the target expression method of each power distribution semantic event is determined by the target specification, the physical quantity value is converted into a target specification coded value, and then written into the message structure specified by the target specification according to the business stage and communication order and framed to generate candidate target messages. The candidate target messages are re-parsed according to the target specification to restore the business meaning and physical quantity values of the power distribution object carried by the candidate target messages. Then, they are arranged according to the communication order to obtain the target semantic events.
6. The multi-protocol message adaptive conversion method for distribution automation terminals as described in claim 5, characterized in that, The specific steps for verifying the closure status of distribution semantic events and target semantic events using the distribution semantic mirror closure model and tracing the mismatch location, adjusting the target reduction transformation until semantic closure is achieved, and generating the first reduction closure data are as follows: Based on the source location of the conversion, the distribution semantic events and the target semantic events are mirrored and paired. The semantic closure degree of each mirror location is calculated using the distribution semantic mirror closure model. The mirror locations that have not achieved semantic closure are reversed and transformed into the closure conditions that the target semantic events need to satisfy, generating a set of semantic closure constraints. The target representation of each target reduction transformation position is fixed by using a semantic closure constraint set. Then, the fixed relationship of each target reduction transformation position is released in turn and virtual transformation is performed. The target reduction transformation positions that eliminate unclosed states without destroying the closed mirror positions are selected to obtain a list of mismatched transformation positions. Based on the mismatch transformation location list, virtual transformations are performed on the target expression methods supported by each mismatch transformation location in the order of information types specified in the target specification. The first target expression method that can satisfy the semantic closure constraint set is determined as the alternative target expression method, thus forming a target expression correction scheme. The target expression correction scheme is used to replace the original target expression at each mismatch transition position and adjust the candidate target message. Then, the adjusted candidate target message is parsed according to the target specification. The degree of closure recovery at each affected mirror position is calculated using the power distribution semantic mirror closure model. For mirror positions that do not meet the closure recovery requirements, mismatch location and target expression replacement are performed until all mirror positions achieve semantic closure, and the first specification closure data is generated.
7. The multi-protocol message adaptive conversion method for distribution automation terminals as described in claim 4, characterized in that, The steps for tracing the initiation and response processes of continuous power distribution business transactions based on the power distribution semantic event chain, verifying the integrity of business transactions, and generating second business closure data are as follows: By using the power distribution semantic event chain to identify the initiation position of each business transaction and tracing the response process along the communication sequence according to the continuous relationship of business stages, power distribution semantic events that can form a continuous causal progression are connected to form a power distribution business causal chain. Based on the causal chain of power distribution business, virtual business credits are assigned to the initiation position of each business transaction, and virtual business credits are transferred as the business stage progresses. When the corresponding business branch reaches the termination stage, the virtual business credits are recovered, resulting in a transaction causal credit flow. The transaction closure degree of each business transaction is calculated using transaction causal credit flow. The position where all virtual business credits are first fully recovered is determined as the transaction closure position. Then, the transaction closure positions are arranged according to the communication order to form a transaction closure sequence. Based on the transaction closure sequence, the business closure range is advanced along the communication order. The position where all business transactions initiated before the current communication position have reached the transaction closure position and there is no unrecovered virtual business credit is determined as the business closure frontier, and the second business closure data is generated.
8. The multi-protocol message adaptive conversion method for distribution automation terminals as described in claim 1, characterized in that, The specific steps for generating target specification switching data are as follows: The communication position that achieves semantic closure is read using the first protocol closure data, and the service closure front edge is read using the second service closure data. The position where the communication position that achieves semantic closure and the service closure front edge coincide in the communication order and are located in the complete message interval is determined as the candidate takeover position. Based on the candidate takeover positions, the position that appears first in the communication order is selected as the target protocol takeover position, and the target expression method determined by the first protocol closure data is bound to form the target protocol switching data.
9. The multi-protocol message adaptive conversion method for distribution automation terminals as described in claim 1, characterized in that, The specific steps for generating the adaptive target message stream for the power distribution terminal are as follows: The target specification switching data is used to read the target specification takeover location and target expression method. At the target specification takeover location, the source specification's encoding entry for new distribution semantic events is closed. The distribution semantic events that have not yet been sent are handed over to the target specification for re-encoding and framing according to the communication order to obtain the target specification's verification message. Based on the target expression method determined by reading the first protocol closure data in the target protocol to be verified message, after verifying that the target expression method used in the target protocol to be verified message is consistent, the target protocol to be verified message is continuously sent in the communication order to generate the power distribution terminal adaptive target message stream.
10. The multi-protocol message adaptive conversion method for distribution automation terminals as described in claim 6, characterized in that, The power distribution semantic mirror closure model includes: The mirror input layer receives distribution semantic events and target semantic events paired according to the conversion source location. Using the distribution semantic events as the reference before conversion, the target semantic events are reverted to the same conversion source location according to the communication order to form a co-position mirror input. The closed mapping layer maps the physical quantity values recovered from the target semantic events in the co-located mirror input to the unified physical quantity scale of the distribution semantic events according to the coded range and coding resolution of the target specification. It also generates mirror closed features based on the business meaning of the distribution object and the retention state of the business stage before and after the conversion. The closed computation layer uses the mirror closure feature to calculate the physical quantity recovery deviation caused by the target reduction transformation, and corrects the physical quantity recovery deviation based on the business meaning while maintaining the state. The corrected deviation degree is then mapped to the semantic closure degree of each mirror position. The output layer is closed, and the semantic closure degree of each mirror position is connected according to the communication order. The mirror positions that have not achieved semantic closure are output to the semantic closure constraint set. After the target expression method is adjusted, the corrected target semantic events are received again using the same transformation source position, and the closure recovery status of each affected mirror position is determined.