A Method and System for Verifying Railway Electrical Design Circuits Based on Digital Twins
By constructing a directed graph model of wiring and combining rule detection capabilities and historical probability assessment, the problem of low wiring verification efficiency in railway signaling systems has been solved, achieving efficient and accurate identification of wiring errors and early warning of potential faults, thereby reducing the risk of equipment damage and train accidents.
Patent Information
- Application Number
- CN202611265815.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-20
- Publication Date
- 2026-11-10
- Estimated Expiration
- 2046-08-20
AI Technical Summary
Existing technologies for railway electrical wiring verification are characterized by low efficiency and high error detection rates, leading to increased risks of equipment failure and train accidents.
A railway electrical design circuit verification method based on digital twins is adopted. By acquiring wiring data, a directed graph model of wiring is constructed, and verification is performed according to preset verification rules. The error probability is calculated by combining historical prior probability and rule detection capability, and the wiring error types are automatically identified and distinguished, and potential directed loops and short circuit faults are detected.
It significantly improves the efficiency and coverage of wiring verification, reduces the rate of missed detections, identifies hidden short circuit risks that are difficult to detect manually, and ensures the construction quality and operational safety of the railway electrical system.
Smart Images

Figure CN122797402B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of railway electrical engineering technology, specifically to a method and system for verifying railway electrical design circuits based on digital twins. Background Technology
[0002] Railway signaling systems are core infrastructure ensuring railway traffic safety and operational efficiency, encompassing key equipment such as signals, switch machines, track circuits, relay cabinets, computer interlocking systems, TDCS systems, and centralized signal monitoring systems. With the rapid expansion of the railway network and the continuous increase in the complexity of signaling equipment, the design, construction, and operation and maintenance of signaling systems face increasingly severe challenges.
[0003] Wiring installation is a crucial step in the construction of electrical systems, and its accuracy directly affects the operational safety of signaling equipment and train safety. The number of wirings in conventional stations is extremely large; for example, a signal upgrade project at a fourth-class intermediate station involves approximately 3,247 wirings, while large hub stations may have over 30,000. Currently, wiring verification relies entirely on manual, line-by-line checking, which is extremely labor-intensive and has an error rate as high as approximately 25.8%. Wiring errors can lead to serious consequences such as power supply short circuits to ground, signal logic conflicts, relay malfunctions, and even train accidents.
[0004] It is evident that the wiring solutions in related technologies suffer from low wiring verification efficiency. Summary of the Invention
[0005] This application aims to address the problem of low wiring verification efficiency in related technologies by providing a method and system for verifying railway electrical design circuits based on digital twins.
[0006] To solve the above problems, this application is implemented as follows:
[0007] Firstly, this application provides a method for verifying railway electrical design circuits based on digital twins, including: Acquire wiring data of the electrical system, the wiring data including source terminal information and destination terminal information of each wiring, the source terminal information and the destination terminal information respectively including the equipment identifier, port number and electrical type of their respective equipment; With each terminal as a node, and the direction from the source terminal to the destination terminal of each wiring as the direction of the directed edge, a wiring directed graph model is constructed. According to the preset verification rules, each wiring in the directed graph model of the wiring is verified; For target wiring that fails the verification, the number of preset verification rules that are triggered by the target wiring is counted. Based on the historical prior probability of wiring errors and the detection capability of each preset verification rule, the probability value of the target wiring having an error is calculated. When the probability value exceeds a preset threshold, a first type of alarm information is generated. Based on the wiring directed graph model, it is detected whether there is a directed loop that starts from any terminal, passes through several wirings, and returns to the terminal itself. If it exists, it is determined whether the directed loop belongs to a short circuit fault according to the circuit principle. If so, a second type of alarm information is generated.
[0008] Secondly, this application provides a railway electrical design circuit verification system based on digital twins, comprising: The acquisition module is used to acquire wiring data of the electrical system. The wiring data includes source terminal information and destination terminal information of each wiring. The source terminal information and the destination terminal information respectively include the device identifier, port number and electrical type of their respective equipment. The building module is used to construct a directed graph model of wiring, with each terminal as a node and the direction from the source terminal to the destination terminal of each wiring as the direction of the directed edge. The verification module is used to verify each wiring in the directed wiring graph model according to preset verification rules; The risk assessment module is used to count the number of preset verification rule failures triggered by the target wiring that failed the verification, calculate the probability value of the target wiring having an error based on the historical prior probability of wiring errors and the detection capability of each preset verification rule, and generate a first type of alarm information when the probability value exceeds a preset threshold. The detection module is used to detect, based on the wiring directed graph model, whether there is a directed loop that starts from any terminal, passes through several wirings, and returns to the terminal itself. If it exists, the module determines whether the directed loop is a short circuit fault based on the circuit principle. If so, a second type of alarm information is generated.
[0009] Thirdly, this application provides a terminal device including a processor and a memory, wherein the memory stores a program or instructions executable on the processor, and the program or instructions, when executed by the processor, implement the steps of the method described in the first aspect.
[0010] Fourthly, this application provides a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the steps of the method described in the first aspect.
[0011] Fifthly, this application provides a chip including a processor and a communication interface, the communication interface being coupled to the processor, the processor being used to run programs or instructions to implement the steps of the method described in the first aspect.
[0012] In a sixth aspect, this application provides a computer program product stored in a storage medium, the program product being executed by at least one processor to implement the steps of the method described in the first aspect.
[0013] Compared with the prior art, this application has the following beneficial effects: By acquiring wiring data from the electrical system and constructing a directed graph model of the wiring with terminals as nodes and wiring directions as directed edges, the wiring connection relationships are transformed into a computable standard graph data structure. Based on this, each wiring is verified according to preset verification rules, which can identify various wiring error types. Compared to the traditional manual line-by-line verification method, this significantly improves verification efficiency and coverage completeness. Furthermore, for wiring that fails verification, the posterior error probability is calculated by statistically analyzing the number of failed verification rules triggered by the wiring and combining the historical prior probability of wiring errors with the detection capability of each rule. It achieves a quantitative assessment from "whether it violates regulations" to "how great the risk of violation is," effectively distinguishing between serious errors and minor deviations, and avoiding misjudgments caused by false alarms from a single rule. Furthermore, based on the directed graph model of wiring, it automatically detects whether there are directed loops in the wiring network, and distinguishes between normal feedback loops and short-circuit faults according to circuit principles. It can identify hidden short-circuit risks that are difficult to detect manually, thereby providing early warning of safety hazards during the wiring construction or design review stage, effectively reducing the risk of equipment damage and train accidents caused by wiring errors, and ensuring the construction quality and operational safety of the railway electrical system. Attached Figure Description
[0014] To more clearly illustrate the technical solutions in this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0015] Figure 1 This is a flowchart illustrating a method for verifying railway electrical design circuits based on digital twins, provided in one embodiment of this application. Figure 2 This is a schematic diagram of the structure of a railway electrical design circuit verification system based on digital twin provided in an embodiment of this application; Figure 3 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this application. Detailed Implementation
[0016] The technical solutions of this application will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0017] The terms "first," "second," etc., used in this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products, or apparatuses. Additionally, the use of "and / or" in this application indicates at least one of the connected objects, such as A and / or B and / or C, representing seven possibilities: including A alone, B alone, C alone, and the presence of both A and B, both B and C, both A and C, and the presence of A, B, and C.
[0018] In this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design described as "exemplary" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or designs. Rather, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0019] The following describes the railway electrical design circuit verification method based on digital twins provided in this application.
[0020] See Figure 1 , Figure 1 This is a flowchart illustrating a method for verifying railway electrical design circuits based on digital twins, provided in one embodiment of this application. Figure 1 The circuit verification method for railway electrical design based on digital twins shown can be executed by terminal equipment such as computers.
[0021] like Figure 1 As shown, the railway electrical design circuit verification method based on digital twin provided in this application may include the following steps: Step 101: Obtain wiring data of the electrical system. The wiring data includes source terminal information and destination terminal information of each wiring. The source terminal information and the destination terminal information respectively include the device identifier, port number and electrical type of the device to which they belong.
[0022] In this embodiment, wiring data of the electrical system can be obtained based on the wiring table in the electrical engineering design phase.
[0023] In some embodiments, the wiring table described above records the connection relationships of all wiring in tabular form.
[0024] In some embodiments, each wiring corresponds to one conductor, with its two ends connected to the terminals of two signal devices respectively; and each record in the wiring table contains at least the following fields: Source device identifier, that is, the unique identifier of the device connected at the beginning of the wiring; Source port number, i.e., the port number of the terminal to which the wiring starts; Terminal device identifier, i.e., the unique identifier of the device connected to the wiring termination end; The terminal port number is the port number of the terminal to which the wiring termination is connected. The source end can be understood as the end from which the wiring signal is emitted, i.e., the signal source or power output end; the sink end can be understood as the end from which the wiring signal is received, i.e., the signal load or power input end.
[0025] In some embodiments, the following information can be obtained for the source terminal and the sink terminal respectively: Equipment identifier, which is the unique identifier of the signal equipment to which the terminal belongs, is used to determine which signal equipment the terminal belongs to; The port number, i.e. the specific port number of the terminal on the device to which it belongs, is used to locate the detailed configuration information of the terminal in the device terminal definition table; Electrical type, or the electrical type of the terminal, includes power type, signal type, or ground type, and is used to determine the electrical compatibility between different terminals in subsequent verification.
[0026] In some embodiments, wiring data can also be obtained in the following ways: Extract from structured data in CAD drawings; Export from the electrical properties of the BIM model; Obtained from historical wiring records of the centralized signal monitoring system.
[0027] In some embodiments, before acquiring the wiring data of the electrical system, the method further includes: Each signaling device in the electrical system is assigned a unique configuration code, which includes at least the device type information, model information, station area information, spatial location information, and version information; Using the configuration code as the primary key, device data from multiple data sources are associated and merged to obtain the merged device attribute information; Based on the equipment attribute information, the equipment identifiers involved in the wiring table of the electrical system are replaced with the corresponding configuration codes to obtain the wiring data of the electrical system.
[0028] In this embodiment, by assigning a unique configuration code as a unified identifier to each signal device, device information from different data sources is associated and merged, eliminating the problem of inconsistent device identifiers in multi-source data. Then, the original device identifiers in the wiring table are uniformly replaced with configuration codes, thereby obtaining structured wiring data with standardized device identifiers, providing an accurate and consistent data foundation for subsequent wiring verification.
[0029] In some embodiments, the configuration code, which includes device type information, model information, station area information, spatial location information, and version information, can be defined as a quintuple equation:
[0030] in, This includes equipment type information, such as XHJ-signal machine, ZQJ-switch machine; Model information; Information for the station area; Spatial location information, including mileage Horizontal offset ,elevation ; This is version information.
[0031] During the electrical system design phase, the same signaling equipment may appear under different names or numbers in different data sources. For example, the same signal may be labeled "XHJ-01" in CAD drawings, recorded as "Entry Signal A" in the equipment parameter table, and named "Signal #01" in the BIM model. These different records point to the same physical equipment, but lack a unified identifier, making it impossible to accurately link wiring data across data sources.
[0032] In this application, a standardized, globally unique digital identity is established for each signaling device in the electrical system by assigning a unique configuration code to each device. This allows records of the same device in different data sources to be accurately identified and associated through this code. The code includes device type information, model information, station area information, spatial location information, and version information. It can uniquely identify the device and also quickly obtain the device's basic attributes through the coding structure.
[0033] Because equipment information during the electrical system design phase is typically stored across multiple data sources, including CAD drawings, BIM models, equipment parameter tables, and wiring tables, the attribute information of the same equipment may differ across different data sources. For example, the equipment model in the BIM model may not match the model in the equipment parameter table, or there may be discrepancies in the equipment location coordinates recorded by different data sources.
[0034] In this application, by using configuration encoding as the primary key, device data from multiple data sources is associated and merged, achieving automatic merging of information about the same device across different data sources. Records belonging to the same device in each data source are linked together through configuration encoding to form a complete information view of the device. When the same attribute exhibits different values in different data sources, a unified attribute value is obtained through association and fusion, thereby resolving conflicts and inconsistencies between multi-source data.
[0035] Since the device identifiers recorded in the original wiring table are usually temporary names from the design phase or internal codes of different systems, there may be inconsistencies in naming rules between different wiring tables and different data sources.
[0036] In this application, by replacing the device identifiers in the wiring table with corresponding configuration codes, the device identifiers in the wiring data are transformed from temporary and diverse original names into a unified and standardized configuration coding system. In the wiring data obtained after the replacement, the devices connected to both ends of each wiring are represented by configuration codes. Subsequent verification steps can directly obtain the unified attribute information of the device through the configuration code when processing the wiring data, without having to deal with the correspondence between multiple device names from different data sources. This significantly reduces the data preprocessing complexity of wiring verification and improves the automation level of the verification process.
[0037] In some embodiments, in a fusion scheme that associates and merges device data from multiple data sources, entity recognition and similarity matching can be performed first, followed by attribute fusion and conflict resolution.
[0038] The process of entity recognition and similarity matching can be based on a given device. In the data source Description in Calculate its relationship with the data source Candidate description Overall similarity:
[0039] in, To improve name similarity based on the improved edit distance (Levenshtein distance with custom substitution cost), To achieve positional similarity based on spatial Euclidean distance normalization, Attribute matching degree based on Jaccard coefficient.
[0040] Weighting coefficient The determination of is based on the entropy weight method, assuming The values of each matched sample on the three similarity components form a matrix. , No. Information entropy of each component for:
[0041] in, For the first The matching sample at the th ... The values of each similarity component For the first The matching sample at the th ... The values of each similarity component, and their weights. Dimensions with lower information entropy (i.e., greater data variation) are given higher weights to improve discrimination capabilities.
[0042] For the process of attribute fusion and conflict resolution, especially when the same attribute of the same device has different observations in multiple data sources, the following method is used for fusion.
[0043] First, a credibility attribute value can be assigned to each data source. With the freshness attribute value .
[0044] The reliability of the data source can be determined based on its historical accuracy. For example, BIM models typically have high geometric accuracy, so their data reliability can be set to 0.95; equipment parameter tables derived from equipment manufacturer documents can have a reliability of 0.90; while CAD drawings may be outdated due to multiple modifications, so their reliability can be set to 0.75. (Time freshness attribute value) The freshness can be determined by the interval between the update time of the data source and the current time; the shorter the interval, the higher the freshness. The value ranges from 0 to 1, and the most recently updated data source... Data sources that are close to 1 and have not been updated for a long time Approaching 0.
[0045] Based on this, the overall weight of each data source is calculated according to the credibility attribute value and the time freshness attribute value. , which serves as the weighting coefficient of the observations from this data source in the fusion; In the formula, The time decay coefficient, For data source timestamp, This is the current time.
[0046] Multiple data sources for the same property The observed value is The fusion result is obtained by weighting the data sources according to their respective weights. .
[0047] For categorical attributes, such as device model, if the observations from different data sources are inconsistent, the observation from the data source with the highest overall weight is selected as the fusion result.
[0048] For numerical attributes, such as installation height, if there are deviations between observations from different data sources, but the difference does not exceed a preset threshold... ,Right now If the difference exceeds a preset threshold, a weighted average method will be used for fusion; ,Right now If this occurs, the conflict resolution mechanism is triggered, employing maximum likelihood estimation. To integrate, among which For data source The variance can be estimated from the historical accuracy of the data source.
[0049] Step 102: Using each terminal as a node and the direction from the source terminal to the destination terminal of each wiring as the direction of the directed edge, construct a directed graph model of the wiring.
[0050] In some embodiments, all terminals involved in the wiring of the electrical system can be regarded as nodes, that is, each terminal corresponds to a node in the directed graph model of the wiring, and all terminals constitute the node set of the directed graph model of the wiring. , This represents the total number of terminals.
[0051] The information carried by each node includes at least the device identifier, port number, and electrical type of the device to which the terminal belongs; that is, the information carried by each endpoint includes at least the device identifier, port number, and electrical type of the device to which the terminal belongs.
[0052] In some embodiments, the directed graph model of wiring can be understood as a digital twin of the wiring network of the electrical system. This digital twin constructs a one-to-one mapping of the physical wiring network in digital space, using all terminals involved in all wiring in the electrical system as nodes and the direction from the source end to the destination end of each wiring as directed edges. This digital twin can be dynamically updated as the wiring data of the electrical system changes, providing a computable digital mirror basis for verifying the correctness of the wiring scheme.
[0053] In some embodiments, each wiring can be used as a directed edge connecting two terminals, that is, the wiring has directionality, such as the signal flowing from the source terminal to the sink terminal, so the direction of the directed edge can be the direction of the source terminal to the sink terminal of each wiring.
[0054] For a connection source terminal Heshu Terminal The wiring corresponds to a slave node in the directed graph model of wiring. Pointing to node directed edges All directed edges corresponding to the wiring constitute the directed edge set of the wiring directed graph model. ,and .
[0055] Understandably, in electrical wiring scenarios, there may be situations where multiple wirings connect the same pair of terminals, for example, the same terminal of the same device needs to be connected to multiple load devices. The directed graph model of wiring in this application allows for multiple edges, that is, multiple directed edges in the same direction can exist between the same pair of nodes.
[0056] In some embodiments, the directed graph model of wiring can be represented as follows: , For terminal node set, This is a set of directed edges for wiring. Through this directed graph model of wiring, all wiring connections in the electrical system are transformed into a standardized graph data structure.
[0057] Understandably, after constructing a directed graph model of the wiring harness, subsequent wiring verification and loopback detection can be performed based on this model. In the wiring verification phase, the directed graph model provides the ability to quickly locate the source and destination terminals of any wiring harness, and the ability to quickly query the device attributes associated with each terminal. In the loopback detection phase, the directed graph model provides the complete topology of the wiring network, allowing connectivity analysis, path search, and loop detection methods from graph theory to be directly applied to the topology analysis of the wiring network.
[0058] Step 103: Verify each wiring in the directed wiring graph model according to the preset verification rules.
[0059] In this embodiment, each wiring in the directed graph model is verified according to preset verification rules to identify wirings that may have errors, thus providing a data basis for subsequent probability assessment.
[0060] In some embodiments, the preset verification rules include at least one of the following: Verify whether the port number of the source terminal exists in the terminal definition table of the device to which the source terminal belongs, and whether the electrical type of the source terminal is compatible with the interface type of the device to which the source terminal belongs; Verify whether the port number of the destination terminal exists in the terminal definition table of the device to which the destination terminal belongs, and whether the electrical type of the destination terminal is compatible with the electrical type of the source terminal; Verify whether the electrical properties between the source terminal and the sink terminal match and whether the signal logic relationship conforms to the preset circuit principle.
[0061] In this embodiment, each wiring is comprehensively verified from three dimensions: source validity, destination validity, and consistency between the two ends. Source validity verification ensures that the wiring start end is connected to the correct device port and the electrical type matches. Destination validity verification ensures that the wiring end is connected to the correct device port and is electrically compatible with the source end. Consistency between the two ends ensures that the electrical attributes and signal logic relationships of the entire wiring path meet the design requirements. The three dimensions complement each other and are progressive, which can effectively identify various types of wiring problems such as port misconnection, electrical type mismatch, electrical attribute conflict, and signal logic error, providing accurate verification results for subsequent probability assessment.
[0062] The purpose of source terminal validity verification is to verify the correctness of the wiring source terminal, specifically including: Check if the port number of the source terminal exists in the terminal definition table of the device to which the source terminal belongs; if the port number does not exist in the terminal definition table, it means that the source port number recorded in the wiring table is incorrect; Check whether the electrical type of the source terminal is compatible with the interface type of the device to which the source terminal belongs; if they are not compatible, it means that the terminal may have been incorrectly used to connect to the device. Verify whether the number of connections to the source terminal exceeds its rated load, that is, verify whether the output of the terminal exceeds the preset maximum allowable number of connections, in order to prevent electrical safety risks caused by terminal overload.
[0063] The purpose of validating the validity of the receiving terminal is to verify the correctness of the wiring receiving terminal, specifically including: Check if the port number of the destination terminal exists in the terminal definition table of the device to which the destination terminal belongs; if the port number does not exist in the terminal definition table, it means that the destination port number recorded in the wiring table is incorrect. Check whether the electrical type of the sink terminal is compatible with the electrical type of the source terminal; for example, power type terminals should be connected to power type terminals, signal type terminals should be connected to signal type terminals, and direct connection between power type and ground type terminals is not allowed. Verify whether the number of connections to the terminal exceeds its rated access limit, that is, verify whether the in-line degree of the terminal exceeds the preset maximum allowable access limit, in order to prevent electrical safety risks caused by terminal overload.
[0064] The purpose of end-to-end consistency verification is to verify whether the electrical logic relationship between the source and destination terminals is correct, specifically including: Check whether the electrical properties between the source and destination terminals match. Electrical properties include parameters such as voltage level and current capacity. If the electrical properties between the source and destination terminals do not match, the equipment may not work properly or may cause safety hazards. Check whether the signal logic relationship between the source and sink terminals conforms to the preset circuit principle; for example, the signal source should be connected to the corresponding signal load terminal, and its signal type, signal flow direction, and logic relationship should conform to the circuit principle. Figure 1 Therefore, it is not permitted to connect the signal source end to an incompatible signal load end.
[0065] For each wiring in the directed graph model, if any one of the three checks fails, the wiring is marked as a target wiring that has failed the check and proceeds to the subsequent probability evaluation step; wiring that passes all three checks is marked as having passed the check and does not need to proceed to the next step. The source-end validity check and the destination-end validity check together form the basis for the two-end location of the two-end check, verifying whether both ends of the wiring are correctly connected to the correct ports of their respective devices; the two-end consistency check further verifies whether the electrical logic relationship between the two ends is correct.
[0066] Step 104: For the target wiring that fails the verification, count the number of preset verification rule failures triggered by the target wiring. Based on the historical prior probability of wiring errors and the detection capability of each preset verification rule, calculate the probability value of the target wiring having an error. When the probability value exceeds a preset threshold, generate a first type of alarm information.
[0067] In this embodiment, for target wiring that fails the verification, the probability value of the target wiring having an error is calculated by counting the number of failed verification rules triggered by it, and combining the historical prior probability and the detection capability of each rule. When the probability exceeds a preset threshold, an alarm is generated, realizing a quantitative assessment from "whether it is in violation" to "how great the risk of violation is".
[0068] In some embodiments, calculating the probability value of an error in the target wiring includes: The first event is that the target wiring does indeed have an error, and the second event is that the target wiring fails to trigger a single preset verification rule. The prior probability of the first event, the conditional probability of the second event when the first event occurs, and the conditional probability of the second event when the first event does not occur are determined based on historical statistical data. When the target wiring fails to trigger multiple preset verification rules, the posterior probability of the first event under the condition that the multiple preset verification rules fail simultaneously is calculated, and the posterior probability is used as the probability value that the target wiring has an error.
[0069] In this embodiment, the existence of a wiring error is taken as the first event, and the failure of a single verification rule triggered by the wiring is taken as the second event. Historical statistical data is used to determine the prior probability, the detection capability of each rule for faulty wiring, and the false alarm rate of each rule. When the target wiring fails under the condition of multiple rule failures, its posterior probability is calculated as the probability value of the wiring being faulty. This makes the probability assessment clear in terms of calculability and interpretability, which not only avoids misjudgment caused by false alarms of a single rule, but also improves the accuracy of error identification through joint judgment of multiple rules.
[0070] Since the source-end validity check, destination-end validity check, and end-to-end consistency check each contain multiple independent sub-rules, such as port existence check, electrical type compatibility check, electrical attribute matching check, and signal logic relationship check, each sub-rule can constitute an independent verification judgment. If the wiring fails any of the sub-rules, it is considered that a verification rule has been triggered and failed.
[0071] In some embodiments, the historical prior probability of wiring errors can be obtained. And the ability of each verification rule to detect faulty wiring. and false alarm rate : Historical prior probability It can be determined based on historical statistical data, that is, the proportion of wiring with actual errors in all installed wiring, which can be initially set according to the historical wiring error statistics of similar electrical engineering projects. Detection capabilities , No. The probability that a check rule can detect an error when there is indeed an error in the wiring can be calibrated by simulating a fault injection experiment, that is, testing the actual detection rate of each rule on a wiring sample with known errors. False alarm rate , No. The probability that a verification rule is incorrectly judged when the wiring is actually correct is the probability that the verification rule fails to be triggered when the wiring is actually correct.
[0072] It is understandable that the values of the above parameters can be preset based on historical statistical data and dynamically updated according to verification feedback during actual application.
[0073] When the target wiring fails to trigger multiple verification rules, the posterior probability that the wiring is faulty is calculated according to Bayes' theorem:
[0074] in, This represents the prior probability that the wiring is correct. The posterior probability is the probability that the target wiring has an error.
[0075] In some embodiments, the calculated posterior probability value is compared with a preset threshold. Compare the values. If the posterior probability value exceeds a preset threshold... That is, posterior probability If the wiring is deemed to have a high probability of being faulty, a first-type alarm message is generated, which can then be submitted for manual review.
[0076] In some embodiments, a preset threshold The value of can be adjusted according to the actual needs of the project. Setting it to a higher value will only issue alarms for wiring with a very high probability of error, resulting in a lower false alarm rate but potentially missing some actual errors; if... Setting it to a lower value results in wider alarm coverage and a lower false alarm rate, but may also lead to more false alarms. In practical applications, the false alarm rate and false alarm rate can be balanced according to the safety management requirements of electrical engineering projects. Preferably, The value ranges from 0.7 to 0.9, and more preferably 0.8.
[0077] In some embodiments, the first type of alarm information includes at least the identification information of the target wiring and the specific verification rule information for triggering the failure. The identification information of the target wiring includes the device identifiers, port numbers, and unique numbers of the source and destination terminals connected to the wiring, which are used to accurately locate the position and connection relationship of the problematic wiring in subsequent processing. The specific verification rule information for triggering the failure can provide detailed error clues for manual review.
[0078] Step 105: Based on the wiring directed graph model, detect whether there is a directed loop that starts from any terminal, passes through several wirings, and returns to the terminal itself. If it exists, determine whether the directed loop is a short circuit fault according to the circuit principle. If so, generate a second type of alarm information.
[0079] In this embodiment, it is possible to detect whether there is a directed loop in the wiring network that starts from any terminal, passes through several wirings, and returns to the terminal itself. Based on the circuit principle, it is determined whether the loop is a normal feedback loop or a short circuit fault. If it is determined to be a short circuit fault, a second type of alarm information is generated.
[0080] In some embodiments, detecting whether a directed loop originating from any terminal, passing through several wirings, and returning to that terminal includes: Generate an adjacency matrix based on the described wiring directed graph model; Based on the adjacency matrix, calculate the reachability of each terminal by taking a path that takes no more than the maximum allowed number of steps to return to that terminal. If the reachability of any terminal is true, then it is determined that there is a directed loop at that terminal.
[0081] In this embodiment, by generating an adjacency matrix based on the directed graph model of the wiring network, the topology of the wiring network is transformed into a computable matrix form. Then, based on the adjacency matrix, the reachability of each terminal can be calculated by taking a path that does not exceed the maximum allowed number of steps to return to the terminal itself. If the reachability of any terminal is true, it is determined that there is a directed loop at that terminal. This makes loopback detection clearly computable and operable, and can systematically identify all potential abnormal loops in the wiring network. It avoids the limitation of not being able to exhaustively list all paths when manually checking, and provides complete loop detection results as a basis for subsequent short-circuit fault determination.
[0082] In a directed graph model of wiring, a directed loop is a path that starts from a terminal node, follows the directed edge of the wiring, passes through several wirings, and eventually returns to the terminal itself. Since the directed edge direction in the directed graph model of wiring is from the source terminal to the destination terminal, a loop means that a signal flows out of a terminal, passes through several wirings, and eventually flows back to that terminal.
[0083] In electrical systems, a directed loop does not necessarily correspond to a short-circuit fault. For example, a relay self-holding circuit is a normal feedback loop, and its loop length is usually short and meets the requirements of circuit design principles; however, an abnormal short-circuit loop caused by wiring errors may lead to equipment malfunction or power supply short circuit. Therefore, after detecting a directed loop, it is necessary to further distinguish it in conjunction with circuit principles.
[0084] In some embodiments, the detection of directed loops is based on the adjacency matrix of the directed graph model of the wiring, specifically including the following steps.
[0085] Generate an adjacency matrix based on the node set and directed edge set of the wiring directed graph model. The rows and columns of this matrix correspond to terminal nodes in the directed wiring graph model. If there are slave nodes... Pointing to node If there are directed edges, then the matrix elements ,otherwise The adjacency matrix fully records the connection relationships between all terminals and wirings in the wiring network, and retains the directional information from the source to the destination.
[0086] According to the adjacency matrix Calculate the number of steps taken from each terminal, not exceeding the maximum allowed number of steps. After following the path, can one return to the terminal itself? That is, calculate the reachability matrix. ,like This indicates that from the terminal After traveling through several wiring routes, it can return to its starting point. A directed loop exists at this terminal. The maximum allowed number of steps is... It can be preset according to the actual circuit structure of the electrical system to ensure that the detection range of the effective loop can be covered and infinite loops can be avoided.
[0087] If the reachability of any terminal node is true, it is determined that there is a directed loop at that terminal, and the short-circuit fault determination stage is entered.
[0088] In some embodiments, the second type of alarm information includes at least the terminal node information and wiring path information involved in the directed loop, used to indicate wiring connections with a risk of short circuit fault. The second type of alarm information is independent of the first type of alarm information, respectively identifying alarms triggered due to failure to pass a single verification rule and alarms triggered due to a directed loop being determined to be a short circuit fault. The two types of alarms together constitute the complete output of wiring verification.
[0089] The railway electrical system design circuit verification method based on digital twins provided in this application acquires wiring data from the electrical system and constructs a directed graph model of the wiring with terminals as nodes and wiring directions as directed edges. This transforms the wiring connection relationships into a computable standard graph data structure. Based on this, a systematic and automatic verification of the source-end legality, destination-end legality, and consistency between both ends is performed on each wiring according to preset verification rules. This method can comprehensively identify various wiring error types such as port misconnections, electrical type mismatches, and signal logic conflicts. Compared to the traditional manual line-by-line verification method, it significantly improves verification efficiency and coverage completeness. Furthermore, for wiring that fails verification, the failure of the triggered verification rules is statistically analyzed. By combining the historical prior probability of wiring errors with the detection capabilities of each rule to calculate the posterior error probability, a quantitative assessment is achieved, moving from "whether it is a violation" to "how great the risk of violation is." This effectively distinguishes between serious errors and minor deviations, avoiding misjudgments caused by false alarms from a single rule. Furthermore, based on the directed graph model of wiring, the system automatically detects the existence of directed loops in the wiring network and distinguishes between normal feedback loops and short-circuit faults according to circuit principles. This can identify hidden short-circuit risks that are difficult to detect manually, thereby providing early warnings of safety hazards during wiring construction or design review stages. This effectively reduces the risk of equipment damage and train accidents caused by wiring errors, ensuring the construction quality and operational safety of the railway electrical system.
[0090] Furthermore, in the verification of 3247 wirings in a signal upgrade project at a certain station, the verification time was reduced from 168 hours by manual methods to 2.5 hours, the error rate was reduced from approximately 25.8% to approximately 3.2%, and the verification efficiency was improved by approximately 67 times. It can also identify various error types, such as inconsistent wiring ends, incorrect relay types, abnormal power loop wiring, and signal logic conflicts. Moreover, through loopback detection based on a directed graph model of the wiring, it can effectively identify hidden short-circuit risks that are difficult to detect manually, detecting 8 hidden errors that were not found during manual review, verifying the effectiveness of this method in discovering hidden wiring problems.
[0091] See Figure 2 , Figure 2 This is a schematic diagram of the structure of a railway electrical design circuit verification system based on digital twins, provided in one embodiment of this application. Figure 2 As shown, system 200 includes: The acquisition module 201 is used to acquire wiring data of the electrical system. The wiring data includes source terminal information and destination terminal information of each wiring. The source terminal information and the destination terminal information respectively include the device identifier, port number and electrical type of their respective equipment. Module 202 is used to construct a directed graph model of wiring, with each terminal as a node and the direction from the source terminal to the destination terminal of each wiring as the direction of the directed edge. The verification module 203 is used to verify each wiring in the directed wiring graph model according to preset verification rules; The risk assessment module 204 is used to count the number of preset verification rule failures triggered by the target wiring that failed the verification, calculate the probability value of the target wiring having an error based on the historical prior probability of wiring errors and the detection capability of each preset verification rule, and generate a first type of alarm information when the probability value exceeds a preset threshold. The detection module 205 is used to detect, based on the wiring directed graph model, whether there is a directed loop that starts from any terminal, passes through several wirings, and returns to the terminal itself. If it exists, the module determines whether the directed loop is a short circuit fault based on the circuit principle. If so, the module generates a second type of alarm information.
[0092] Optionally, the preset verification rules include at least one of the following: Verify whether the port number of the source terminal exists in the terminal definition table of the device to which the source terminal belongs, and whether the electrical type of the source terminal is compatible with the interface type of the device to which the source terminal belongs; Verify whether the port number of the destination terminal exists in the terminal definition table of the device to which the destination terminal belongs, and whether the electrical type of the destination terminal is compatible with the electrical type of the source terminal; Verify whether the electrical properties between the source terminal and the sink terminal match and whether the signal logic relationship conforms to the preset circuit principle.
[0093] Optionally, the system 200 further includes: The coding management module is used to assign a unique configuration code to each signaling device in the electrical system. The configuration code includes at least the device type information, model information, station area information, spatial location information, and version information. The data fusion module is used to associate and fuse device data from multiple data sources using the configuration code as the primary key to obtain fused device attribute information. The replacement generation module is used to replace the device identifiers involved in the wiring table of the electrical system with the corresponding configuration codes according to the device attribute information, so as to obtain the wiring data of the electrical system.
[0094] Optionally, the risk assessment module 204 is specifically used for: The first event is that the target wiring does indeed have an error, and the second event is that the target wiring fails to trigger a single preset verification rule. The prior probability of the first event, the conditional probability of the second event when the first event occurs, and the conditional probability of the second event when the first event does not occur are determined based on historical statistical data. When the target wiring fails to trigger multiple preset verification rules, the posterior probability of the first event under the condition that the multiple preset verification rules fail simultaneously is calculated, and the posterior probability is used as the probability value that the target wiring has an error.
[0095] Optionally, the detection module 205 is specifically used for: Generate an adjacency matrix based on the described wiring directed graph model; Based on the adjacency matrix, calculate the reachability of each terminal by taking a path that takes no more than the maximum allowed number of steps to return to that terminal. If the reachability of any terminal is true, then it is determined that there is a directed loop at that terminal.
[0096] The railway electrical design circuit verification system based on digital twin provided in this application can achieve the requirements of this application. Figure 1 The various processes in the method embodiments, and the ways to achieve the same beneficial effects, will not be repeated here to avoid repetition.
[0097] like Figure 3 As shown, this application also provides a terminal device, including a processor 301 and a memory 302. The memory 302 stores a program or instructions that can run on the processor 301. When the program or instructions are executed by the processor 301, they implement the various steps of the above-described embodiment of the railway electrical design circuit verification method based on digital twin, and can achieve the same technical effect. To avoid repetition, they will not be described again here.
[0098] It should be noted that the terminal device in this application can be a terminal or other devices besides a terminal. For example, the terminal device can be a tablet computer, a laptop computer, etc., and this application does not make any specific limitation.
[0099] This application also provides a readable storage medium storing a program or instructions that, when executed by a processor, implement the various processes of the above-described embodiment of the railway electrical design circuit verification method based on digital twins, and achieve the same technical effect. To avoid repetition, these will not be described again here.
[0100] The processor is the processor in the terminal device described in the above embodiments. The readable storage medium includes a computer-readable storage medium, such as a computer read-only memory (Read-Only Memory). Only memory (ROM), random access memory (RAM), magnetic disks or optical disks, etc.
[0101] This application also provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the above-described embodiments of the railway electrical design circuit verification method based on digital twins, and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0102] It should be understood that the chip mentioned in this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.
[0103] This application provides a computer program product, which is stored in a storage medium and executed by at least one processor to implement the various processes of the above-described embodiment of the railway electrical design circuit verification method based on digital twin, and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0104] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
[0105] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as a read-only memory). The device includes a number of instructions in a ROM (random access memory), RAM (magnetic disk), or optical disk to cause a terminal (which may be a computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0106] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
Claims
1. A method for verifying railway electrical design circuits based on digital twins, characterized in that, include: Acquire wiring data of the electrical system, the wiring data including source terminal information and destination terminal information of each wiring, the source terminal information and the destination terminal information respectively including the equipment identifier, port number and electrical type of their respective equipment; With each terminal as a node, and the direction from the source terminal to the destination terminal of each wiring as the direction of the directed edge, a wiring directed graph model is constructed. According to the preset verification rules, each wiring in the directed graph model of the wiring is verified; For target wiring that fails the verification, the number of preset verification rules that are triggered by the target wiring is counted. Based on the historical prior probability of wiring errors and the detection capability of each preset verification rule, the probability value of the target wiring having an error is calculated. When the probability value exceeds a preset threshold, a first type of alarm information is generated. Based on the wiring directed graph model, it is detected whether there is a directed loop that starts from any terminal, passes through several wirings, and returns to the terminal itself. If it exists, it is determined whether the directed loop belongs to a short circuit fault according to the circuit principle. If so, a second type of alarm information is generated. Before acquiring the wiring data of the electrical system, the process also includes: Each signaling device in the electrical system is assigned a unique configuration code, which includes at least equipment type information, model information, station area information, spatial location information, and version information. Using the configuration code as the primary key, equipment data from multiple data sources are correlated and merged to obtain merged equipment attribute information. Based on the equipment attribute information, the equipment identifiers involved in the wiring table of the electrical system are replaced with the corresponding configuration codes to obtain the wiring data of the electrical system. The calculation of the probability value of the target wiring having an error includes: The first event is that the target wiring does indeed have an error, and the second event is that the target wiring fails to trigger a single preset verification rule. The prior probability of the first event, the conditional probability of the second event when the first event occurs, and the conditional probability of the second event when the first event does not occur are determined based on historical statistical data. When the target wiring fails to trigger multiple preset verification rules, the posterior probability of the first event under the condition that the multiple preset verification rules fail simultaneously is calculated, and the posterior probability is used as the probability value that the target wiring has an error. The formula for calculating the posterior probability of the first event under the condition that multiple preset verification rules fail simultaneously is as follows: In the formula, Let be the prior probability of the first event; For the first The detection capability of the verification rule when the first event occurs, i.e. the conditional probability of the second event when the first event occurs; For the first The false alarm rate of the verification rule when the first event has not occurred, i.e. the conditional probability of the second event when the first event has not occurred; This represents the prior probability of correct wiring.
2. The method according to claim 1, characterized in that, The preset verification rules include at least one of the following: Verify whether the port number of the source terminal exists in the terminal definition table of the device to which the source terminal belongs, and whether the electrical type of the source terminal is compatible with the interface type of the device to which the source terminal belongs; Verify whether the port number of the destination terminal exists in the terminal definition table of the device to which the destination terminal belongs, and whether the electrical type of the destination terminal is compatible with the electrical type of the source terminal; Verify whether the electrical properties between the source terminal and the sink terminal match and whether the signal logic relationship conforms to the preset circuit principle.
3. The method according to claim 1 or 2, characterized in that, The detection of whether a directed loop originating from any terminal, passing through several wirings, and returning to that terminal includes: Generate an adjacency matrix based on the described wiring directed graph model; Based on the adjacency matrix, calculate the reachability of each terminal by taking a path that does not exceed the maximum allowed number of steps to return to that terminal. If the reachability of any terminal is true, then it is determined that there is a directed loop at that terminal.
4. A railway electrical system design circuit verification system based on digital twins, characterized in that, include: The acquisition module is used to acquire wiring data of the electrical system. The wiring data includes source terminal information and destination terminal information of each wiring. The source terminal information and the destination terminal information respectively include the device identifier, port number and electrical type of their respective equipment. The building module is used to construct a directed graph model of wiring, with each terminal as a node and the direction from the source terminal to the destination terminal of each wiring as the direction of the directed edge. The verification module is used to verify each wiring in the directed wiring graph model according to preset verification rules; The risk assessment module is used to count the number of preset verification rule failures triggered by the target wiring that failed the verification, calculate the probability value of the target wiring having an error based on the historical prior probability of wiring errors and the detection capability of each preset verification rule, and generate a first type of alarm information when the probability value exceeds a preset threshold. The detection module is used to detect, based on the wiring directed graph model, whether there is a directed loop that starts from any terminal, passes through several wirings and returns to the terminal itself. If it exists, the module determines whether the directed loop is a short circuit fault based on the circuit principle. If so, the module generates a second type of alarm information. The system also includes: The coding management module is used to assign a unique configuration code to each signaling device in the electrical system. The configuration code includes at least the device type information, model information, station area information, spatial location information, and version information. The data fusion module is used to associate and fuse device data from multiple data sources using the configuration code as the primary key to obtain fused device attribute information. The replacement generation module is used to replace the equipment identifiers involved in the wiring table of the electrical system with the corresponding configuration codes according to the equipment attribute information, so as to obtain the wiring data of the electrical system. The risk assessment module is specifically used for: The first event is that the target wiring does indeed have an error, and the second event is that the target wiring fails to trigger a single preset verification rule. The prior probability of the first event, the conditional probability of the second event when the first event occurs, and the conditional probability of the second event when the first event does not occur are determined based on historical statistical data. When the target wiring fails to trigger multiple preset verification rules, the posterior probability of the first event under the condition that the multiple preset verification rules fail simultaneously is calculated, and the posterior probability is used as the probability value that the target wiring has an error. The formula for calculating the posterior probability of the first event under the condition that multiple preset verification rules fail simultaneously is as follows: In the formula, Let be the prior probability of the first event; For the first The detection capability of the verification rule when the first event occurs, i.e. the conditional probability of the second event when the first event occurs; For the first The false alarm rate of the verification rule when the first event has not occurred, i.e. the conditional probability of the second event when the first event has not occurred; This represents the prior probability of correct wiring.
5. The system according to claim 4, characterized in that, The preset verification rules include at least one of the following: Verify whether the port number of the source terminal exists in the terminal definition table of the device to which the source terminal belongs, and whether the electrical type of the source terminal is compatible with the interface type of the device to which the source terminal belongs; Verify whether the port number of the destination terminal exists in the terminal definition table of the device to which the destination terminal belongs, and whether the electrical type of the destination terminal is compatible with the electrical type of the source terminal; Verify whether the electrical properties between the source terminal and the sink terminal match and whether the signal logic relationship conforms to the preset circuit principle.
6. The system according to claim 4 or 5, characterized in that, The detection module is specifically used for: Generate an adjacency matrix based on the described wiring directed graph model; Based on the adjacency matrix, calculate the reachability of each terminal by taking a path that does not exceed the maximum allowed number of steps to return to that terminal. If the reachability of any terminal is true, then it is determined that there is a directed loop at that terminal.
Citation Information
Patent Citations
Secondary circuit anti-error topology checking method based on virtual terminal connection
CN122315659A
Probabilistic diagnosis, in particular for embedded and remote applications
US6691249B1
