A method for checking a driving dispatch command based on a longest common subsequence
By using the longest common subsequence algorithm to group and match train dispatching commands and perform context matching, the problem of identifying and processing multiple related element information in existing technologies is solved, thereby improving the accuracy and efficiency of train dispatching commands.
Patent Information
- Application Number
- CN202411737161.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2044-11-29
AI Technical Summary
Existing technologies cannot correctly identify information elements caused by unexpected deletion or modification in train dispatching command verification, and have difficulty processing multiple interrelated information elements, affecting the accuracy of train dispatching commands and the efficiency of train dispatching command.
The longest common subsequence algorithm is used to group and pair the text of the train dispatching command with the template, identify added, deleted and shared parts, construct a context matching mechanism, match element information through the keyword parameter table, and store it in the verification content linked list group for inspection.
It improves the accuracy of train dispatching commands, can process multiple interrelated information elements, and enhances the efficiency of train dispatching and command work.
Smart Images

Figure CN119670713B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of railway train dispatching command verification technology, and in particular to a train dispatching command verification method based on the longest common subsequence. Background Technology
[0002] In the train dispatching and command system, train dispatching orders are edited, drafted, and issued by train dispatchers. They serve as the written basis for organizing multi-disciplinary collaboration during construction operations or emergencies. The main body of a train dispatching order contains basic information such as the line name, station name, dispatching console name, train number, speed limit kilometer marker, and length change parameters. Incorrect information can easily cause confusion and errors in the transportation organization of different trades. Train dispatchers need to collaborate with other positions to conduct single or multiple checks to confirm accuracy before issuing the train dispatching order.
[0003] In train dispatching and command systems and centralized dispatching systems, using computer programs to assist in the verification of train dispatching orders has become a key method to improve the efficiency of train dispatching operations and the accuracy of key information. The verification program uses specific information parsing methods to identify and extract key information from train dispatching orders. This information is then combined with real-time information held by the train dispatcher (train number, train location within the section, etc.) and valid information provided by other positions (construction plans, strong wind warnings, earthquake warnings, etc.) to verify the completeness of the recipients of the train dispatching orders, the accuracy of key information, and the coordination among multiple work types. The verification program can quickly identify potential errors in the text of train dispatching orders and immediately notify the train dispatcher through a human-machine interface, ensuring that the train dispatching orders issued by the train dispatcher comply with transportation safety and work type coordination standards, effectively reducing the workload of train dispatchers.
[0004] Existing technologies employ a word knowledge base to standardize and clean the text of train dispatching orders. Regular expressions are then used to identify and extract key information from the orders, followed by checks and verification. Specifically, existing technologies first construct a word knowledge base containing comparisons of similar words, useless characters, and keywords. Then, non-standard terms in the train dispatching order text are replaced with given similar words, and invalid characters are cleaned using given useless characters. Next, regular expressions are constructed using keywords to effectively extract key information such as train number, speed limit, and kilometer markers. Finally, by obtaining interface operation status and train dispatching reference information held by the train dispatcher, the accuracy of the key information is judged and verified, completing the verification process for the train dispatching order.
[0005] However, in high-intensity train dispatching operations, unexpected deletions or modifications may occur in the text of dispatching orders. Current technologies heavily rely on regular expressions constructed from keywords; deletions and modifications in the text of dispatching orders can prevent these technologies from correctly identifying element information, affecting the accuracy of element information identification and extraction. Furthermore, current technologies are limited to extracting single element information and have limitations when handling contextual relationships between multiple elements, failing to meet the verification needs of multiple interrelated elements in actual train dispatching work. Due to the lack of a mechanism for handling multiple contextually related elements, current technologies struggle to meet complex verification requirements, thus restricting the efficiency and accuracy of train dispatching and command operations. Summary of the Invention
[0006] The purpose of this invention is to provide a train dispatching command verification method based on the longest common subsequence, which can improve the accuracy of train dispatching commands and process multiple interrelated element information, thereby improving the efficiency of train dispatching and command work, and thus solving the related problems existing in the prior art.
[0007] The objective of this invention is achieved through the following technical solution:
[0008] A method for verifying train dispatching commands based on the longest common subsequence includes:
[0009] The text of the train dispatching command and the template of the train dispatching command are each grouped into text groups and template groups, respectively. The groups are then paired. Based on the longest common subsequence algorithm and the set filtering conditions, the corresponding template groups are selected for each text group, and the added part and the shared part calculated by the longest common subsequence algorithm are obtained.
[0010] For each text group, a context matching mechanism is constructed using the corresponding added and shared parts. Combined with a preset keyword parameter table for matching the preceding and following text, the preceding and following text are matched from the shared parts of the text group. The added and shared parts between the preceding and following text are extracted as element information and stored in the verification content linked list group. After all text groups have been matched, the obtained verification content linked list group is checked.
[0011] As can be seen from the technical solution provided by the present invention, when there are unexpected text deletions or modifications in the element information of train dispatching orders, the element information can be identified and the legality of the information can be determined through the context matching mechanism, thereby improving the accuracy of train dispatching orders; and it can process multiple interrelated element information to meet the needs of complex information verification in actual train dispatching work, while improving the efficiency of train dispatching and command work. Attached Figure Description
[0012] 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.
[0013] Figure 1 A flowchart of a train dispatching command verification method based on the longest common subsequence provided in an embodiment of the present invention;
[0014] Figure 2 This is a schematic diagram illustrating the process of the LCS algorithm processing train dispatching commands according to an embodiment of the present invention.
[0015] Figure 3 This is a schematic diagram illustrating the grouping and pairing process of the train dispatching command text and the train dispatching command template provided in an embodiment of the present invention;
[0016] Figure 4 This is a schematic diagram illustrating the retention results of grouping and pairing provided in an embodiment of the present invention;
[0017] Figure 5 A schematic diagram of the context matching mechanism of the train dispatching command verification method provided in this embodiment of the invention;
[0018] Figure 6 This is a schematic diagram of the verification content linked list group of the train dispatch command verification method provided in this embodiment of the invention. Detailed Implementation
[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the protection scope of the present invention.
[0020] First, the following explanations are provided for the terms that may be used in this article:
[0021] The terms “including,” “comprising,” “containing,” “having,” or other similar semantic descriptions should be interpreted as non-exclusive inclusion. For example, “including a technical feature element (such as raw material, component, ingredient, carrier, dosage form, material, size, part, component, mechanism, device, step, process, method, reaction conditions, processing conditions, parameter, algorithm, signal, data, product or article of manufacture, etc.)” should be interpreted as including not only the expressly listed technical feature element, but also other technical feature elements that are not expressly listed and are well-known in the art.
[0022] The term "composed of" excludes any technical features not expressly listed. When used in a claim, it closes the claim to exclude all technical features other than those expressly listed, except for associated conventional impurities. If the term appears only in a clause of a claim, it limits the claim to the elements expressly listed in that clause; elements recited in other clauses are not excluded from the overall claim.
[0023] Unless otherwise explicitly specified or limited, the terms "installation," "connection," "linking," and "fixing," etc., should be interpreted broadly. For example, they can refer to fixed connections, detachable connections, or integral connections; they can refer to mechanical connections or electrical connections; they can refer to direct connections or indirect connections through an intermediate medium; and they can refer to the internal connection between two components. Those skilled in the art can understand the specific meaning of the above terms in this document according to the specific circumstances.
[0024] The following is a detailed description of a train dispatching command verification method based on the longest common subsequence provided by this invention. Contents not described in detail in the embodiments of this invention are prior art known to those skilled in the art. Where specific conditions are not specified in the embodiments of this invention, they are performed according to conventional conditions in the art or conditions recommended by the manufacturer. Reagents or instruments used in the embodiments of this invention, unless otherwise specified by the manufacturer, are all commercially available conventional products.
[0025] like Figure 1 As shown, a method for verifying train dispatching commands based on the longest common subsequence mainly includes the following steps:
[0026] Step 1: Calculate the added and shared parts of the train dispatching command text and the train dispatching command based on the longest common subsequence algorithm.
[0027] In this step, the text of the train dispatching command and the template of the train dispatching command are each grouped, referred to as text groups and template groups, respectively. The groups are then paired, and based on the longest common subsequence algorithm and the set filtering conditions, the corresponding template groups are selected for each text group. The calculation results of the longest common subsequence algorithm are obtained, including: added parts, deleted parts, and shared parts. Among them, the added parts and shared parts are used to build a context matching mechanism, and the deleted parts are used to distinguish between the added parts and the shared parts and do not participate in subsequent processing.
[0028] Preferably, the main body of the train dispatching command and the train dispatching command template each contain several paragraphs of text content, and different paragraphs are separated by delimiters; the main body of the train dispatching command and the train dispatching command template are grouped according to the delimiters.
[0029] Preferably, the step of selecting a corresponding template group for each text group based on the longest common subsequence algorithm and the set filtering conditions includes: pairing each text group with several template groups, calculating the length of the text in the common part between each text group and each paired template group based on the longest common subsequence algorithm, and selecting the template group with the longest text in the common part.
[0030] Preferably, the addition, deletion, and shared parts calculated by the algorithm for obtaining the longest common subsequence include: obtaining the addition, deletion, and shared parts of each text group relative to the template group with the longest text length.
[0031] Step 2: Based on the added and shared parts, construct a context matching mechanism to identify element information and realize the verification of train dispatching commands.
[0032] In this step, for each text group, a context matching mechanism is constructed using the corresponding added and shared parts. Combined with a preset keyword parameter table for matching the preceding and following text, the preceding and following text are matched from the shared parts of the text group, and the added and shared parts between the preceding and following text are extracted as element information and stored in the verification content linked list group. After all text groups have been matched, the obtained verification content linked list group is checked.
[0033] In this embodiment of the invention, the added portion, the deleted portion, and the shared portion all contain text information and index information; wherein, the index information of the added portion and the shared portion comes from the corresponding text group, and the index information of the deleted portion comes from the corresponding template group.
[0034] Preferably, the preset keyword parameter table stores phrase information associated with the context. Each phrase contains multiple keyword pairs, and each keyword pair contains two keywords, which are used to match the preceding and following text of the text group.
[0035] Preferably, the step of combining a preset keyword parameter table for matching preceding and following text, matching the preceding and following text from the common part of the text group, and extracting the added and common parts between the preceding and following text as element information includes: selecting all keyword pairs required for the inspection process from the preset keyword parameter table; matching the first keyword pair from the beginning of the text group, and matching subsequent keyword pairs after the matching position of the previous keyword pair; if the first keyword of the keyword pair is the same as or satisfies an inclusion relationship with a certain text content in the common part of the text group, then the corresponding text content in the common part is the preceding text; if the second keyword of the keyword pair is the same as or satisfies an inclusion relationship with a certain text content in the common part of the text group, then the corresponding text content in the common part is the following text; extracting the added and common parts between the preceding and following text, and obtaining all text information as element information by combining the corresponding index information.
[0036] Preferably, the storage of the verification content linked list group includes: the verification content linked list group contains multiple linked lists, each linked list corresponding to a single unique word group number; after obtaining the element information, according to the current word group number, the corresponding linked list is created or retrieved in the linked list group and the corresponding element information is stored.
[0037] Preferably, the verification check of the obtained verification content linked list group includes: verifying the obtained verification content linked list group according to the type of verification check and in conjunction with the imported train scheduling reference information; wherein, the train scheduling reference information includes: station name, train number, power supply card number and command receiving range.
[0038] The above-described solution provided by the embodiments of the present invention can improve the accuracy of train dispatching commands and process multiple interrelated information elements, thereby improving the efficiency of train dispatching and command work and solving the related problems existing in the prior art.
[0039] To more clearly demonstrate the technical solution and its effects provided by the present invention, the method provided by the embodiments of the present invention will be described in detail below.
[0040] I. Working principle of the train dispatching command verification method.
[0041] The Longest Common Subsequence (LCS) algorithm is a method for finding the longest shared portion among two or more sequences. This algorithm compares the elements in the sequences to find the longest common subsequence. The basic principle of the LCS algorithm is dynamic programming. It constructs a two-dimensional array to record the solutions to subproblems and gradually fills the array to finally determine the longest common subsequence. In the text recognition of railway dispatching orders, by comparing the dispatching order template and the dispatching order text, the LCS algorithm can identify the added, deleted, and unchanged shared portions in the dispatching order text relative to the dispatching order template. The process of using the LCS algorithm to process dispatching orders is as follows: Figure 2 As shown. Figure 2 The shared, added, and deleted sections contain textual information and index information related to the text.
[0042] II. Calculate the added, deleted, and shared parts of the train dispatching command text and the train dispatching command based on the longest common subsequence algorithm.
[0043] In a train dispatching and command system, dispatching orders need to record the details of transportation organization for multiple work types. Therefore, the dispatching order text and templates contain multiple paragraphs of text, separated by delimiters (e.g., carriage returns). The dispatching order text and templates can be divided into several independent text groups and template groups based on carriage returns, and a pairing process is performed between these groups. During the pairing process, each text group establishes a combination relationship with each template, such as... Figure 3 As shown.
[0044] After the grouping and pairing are completed, the LCS algorithm is used to calculate the length of the text in the common part of each pair, and the template group with the longest text in the common part and its LCS algorithm calculation result are retained for each text group. Figure 3 The results of grouping and pairing are as follows Figure 4 As shown in the figure, the pair with the longest common text is marked with a solid line, while the calculation results of other template groups are no longer retained and are marked with dashed lines in the figure.
[0045] Third, a context matching mechanism is constructed to identify element information and to realize the verification of train dispatching commands.
[0046] The LCS algorithm calculation result for a single group pairing includes the added portion, deleted portion, and shared portion of the text group relative to the template group. Each portion consists of text information and index information. The index information used for the added portion and shared portion comes from the text group, while the index information used for the deleted portion comes from the template group. The deleted portion is mainly used to distinguish between the added portion and the shared portion, and the calculated deleted portion is not further processed.
[0047] By calling information from added and shared sections, the text is constructed according to the text content order within the text groups, as follows: Figure 5 The context matching mechanism shown extracts element information from the text of the train dispatching command. Figure 5 The example provided is an illustration of a context matching mechanism that utilizes two text groups corresponding to additional and shared parts. The index information involved in this example is merely illustrative.
[0048] Figure 5 In the text, the keyword parameter table stores phrase information associated with the context. Each phrase contains multiple keyword pairs. Each keyword pair consists of two keywords, used to match the preceding and following text of the text group. The first keyword pair processed by the traffic dispatch command verification method matches from the beginning of the text group. Subsequent keyword pairs begin searching after the matching position of the previous keyword pair. If the first keyword of a keyword pair is the same as or contains a certain text in the shared part of the text group, then the corresponding text in the shared part is the preceding text. If the second keyword of a keyword pair is the same as or contains a certain text in the shared part of the text group, then the corresponding text in the shared part is the following text. That is, the matching relationship between the keyword and the corresponding shared part is established. The added part and the shared part between the preceding and following text are extracted, and combined with the corresponding index information, all text information is obtained as element information and stored. Figure 6 The linked list of verification content shown.
[0049] Figure 6 The verification content linked list group shown consists of multiple linked lists, each corresponding to a unique phrase sequence number. After obtaining text information as element information, the corresponding linked list is created or retrieved from the linked list group according to the current phrase sequence number, and the element information is stored therein. When executing the verification check logic, the element information is retrieved from the linked list group for verification. The verification check type can be a check for station name validity, command text consistency, etc. In addition, this invention can import train scheduling reference information for verification, which can be information such as station name, train number, power supply card number, and command receiving range.
[0050] To facilitate understanding, relevant examples are provided below based on the scheme described above.
[0051] The following example verifies the train dispatching commands shown in Table 1, including two types of verification checks: station name validity check and command text consistency check. Train dispatching command number 1 corresponds to the station name validity check, and train dispatching command number 2 corresponds to the command text consistency check.
[0052] Table 1: Examples of Train Dispatch Commands and Templates
[0053]
[0054] Example 1: Station Name Validity Check
[0055] After grouping the text and template of the train dispatching command according to the carriage return symbol, the results of the text grouping and template grouping are shown in Table 2 and Table 3.
[0056] Table 2: Text grouping results for station name legality check
[0057]
[0058] Table 3: Template Grouping Results for Station Name Legality Check
[0059]
[0060] The process of grouping and pairing the train dispatch command text and the train dispatch command template is performed. After the grouping and pairing are completed, the LCS algorithm is executed to calculate the common part and its text length in each pair. The calculation results of the grouping and pairing are shown in Table 4. The pair with the longest common part text length and the LCS algorithm calculation results are retained from the grouping and pairing, as shown in Table 5.
[0061] Table 4: Grouping and Pairing Calculation Results of Station Name Legality Check
[0062]
[0063] Table 5: Selected Group Pairing Information for Station Name Legality Check
[0064]
[0065] Based on the information of the added and shared parts shown in Table 5, all keyword pairs used in the station name legality check process are retrieved from the keyword parameter table, and a matching relationship between the shared parts and context keywords is established in the text grouping. Based on the index information obtained from matching context keywords, the adjacent added and shared parts are identified as element information, as shown in Table 6.
[0066] Table 6: Keyword pairs and index information for station name legality check
[0067]
[0068] When performing a station name validity check, the system first retrieves the first element information from the linked list corresponding to each phrase number in the verification content linked list group. Then, it imports the train scheduling reference information to obtain the valid station names A, B, C, D, E, and F. By comparing the element information with the valid station names, it is determined that A1 is not a station name, while B is a station name, thus completing the station name validity verification process.
[0069] Example 2: Command text consistency check.
[0070] The method for verifying train dispatching commands involves grouping the text and template of the train dispatching command based on the carriage return symbol. The resulting text grouping and template grouping results are shown in Tables 7 and 8.
[0071] Table 7: Text grouping results of command text consistency check
[0072]
[0073] Table 8: Text grouping results of command text consistency check
[0074]
[0075] The train dispatch command verification method involves grouping and pairing the train dispatch command text and the train dispatch command template. After grouping and pairing are completed, the method executes the LCS algorithm to calculate the common part and its text length in each pair. The calculation results of grouping and pairing are shown in Table 9. The method retains the pair with the longest common part text length and the LCS algorithm calculation results from the grouping and pairing, as shown in Table 10.
[0076] Table 9: Grouping and Pairing Calculation Results of Command Text Consistency Check
[0077]
[0078]
[0079] Table 10: Selected Group Pairing Information for Command Text Consistency Check
[0080]
[0081] Based on the added and shared information shown in Table 10, the train dispatch command verification method retrieves all keyword pairs used in the command text consistency check process from the keyword parameter table and establishes a matching relationship between the shared part and the context keywords in the text grouping. Based on the index information obtained from matching the context keywords, the adjacent added and shared parts of the train dispatch command verification method are determined as feature information, as shown in Table 11.
[0082] Table 11: Keyword pairs and index information for command text consistency check
[0083]
[0084] When performing a text consistency check on the train dispatching command, the method retrieves element information with consistent keyword pair IDs from each linked list of verification content. When the keyword pair ID is 1, the element information corresponds to the text portion of "B Station II" in a different text group; when the keyword pair ID is 2, the element information corresponds to the text portion of "C Station III" in a different text group. Since the text content in different text groups is consistent, the train dispatching command verification method determines that the text in the train dispatching command is consistent, thus completing the text consistency verification process.
[0085] Through the above description of the embodiments, those skilled in the art can clearly understand that the above embodiments can be implemented by software, or by using software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solutions of the above embodiments can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.), including several instructions to cause a computer device (such as a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0086] The above description is merely a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims. The information disclosed in the background section is intended only to enhance the understanding of the overall background technology of the present invention and should not be construed as an admission or implication in any way that such information constitutes prior art known to those skilled in the art.
Claims
1. A method for verifying train dispatching commands based on the longest common subsequence, characterized in that, include: The text of the train dispatching command and the template of the train dispatching command are each grouped into text groups and template groups, respectively. The groups are then paired. Based on the longest common subsequence algorithm and the set filtering conditions, the corresponding template groups are selected for each text group, and the added part and the shared part calculated by the longest common subsequence algorithm are obtained. For each text group, a context matching mechanism is constructed using the corresponding added and shared parts. Combined with a preset keyword parameter table for matching the preceding and following text, the preceding and following text are matched from the shared parts of the text group. The added and shared parts between the preceding and following text are extracted as element information and stored in the verification content linked list group. After all text groups have been matched, the obtained verification content linked list group is checked. The process of matching the preceding and following text from the common part of a text group, and extracting the added and common parts between the preceding and following text as element information, involves: selecting all keyword pairs required for the inspection process from the preset keyword parameter table; matching the first keyword pair from the beginning of the text group, and matching subsequent keyword pairs after the matching position of the previous keyword pair; if the first keyword of a keyword pair is the same as or contains a certain text content in the common part of the text group, then the corresponding text content in the common part is the preceding text; if the second keyword of a keyword pair is the same as or contains a certain text content in the common part of the text group, then the corresponding text content in the common part is the following text; extracting the added and common parts between the preceding and following text, and obtaining all text information as element information by combining the corresponding index information.
2. The method for verifying train dispatching commands based on the longest common subsequence according to claim 1, characterized in that, The process of grouping the text of the train dispatching command and the train dispatching command template includes: The main body of the train dispatching order and the train dispatching order template each contain several paragraphs of text, with different paragraphs separated by delimiters; The train dispatching command text and the train dispatching command template are grouped according to the delimiter.
3. The method for verifying train dispatching commands based on the longest common subsequence according to claim 1, characterized in that, The process of selecting corresponding template groups for each text group based on the longest common subsequence algorithm and set filtering conditions includes: Each text group is paired with several template groups. Based on the longest common subsequence algorithm, the length of the text in the common part between each text group and each pair of template groups is calculated. Select the template group with the longest text in the common section.
4. The method for verifying train dispatching commands based on the longest common subsequence according to claim 3, characterized in that, The added portion and shared portion calculated by the algorithm for obtaining the longest common subsequence include: Get the added portion and shared portion of each text group relative to the longest template group.
5. The method for verifying train dispatching commands based on the longest common subsequence according to claim 1, characterized in that, Both the added portion and the shared portion contain text information and index information, and the index information of the added portion and the shared portion comes from the corresponding text groups.
6. The method for verifying train dispatching commands based on the longest common subsequence according to claim 1, characterized in that, The preset keyword parameter table stores phrase information associated with the context. Each phrase contains multiple keyword pairs, and each keyword pair contains two keywords, which are used to match the preceding and following text groups.
7. The method for verifying train dispatching commands based on the longest common subsequence according to claim 1, characterized in that, The linked list group containing the stored verification content includes: The verification content linked list group contains multiple linked lists, and each linked list corresponds to a single unique word group number. After obtaining the element information, based on the current phrase number, create or retrieve the corresponding linked list in the linked list group and store the corresponding element information.
8. The method for verifying train dispatching commands based on the longest common subsequence according to claim 1, characterized in that, The verification and inspection of the obtained linked list of verification content includes: The obtained check content linked list group is verified according to the type of check and in combination with the imported train scheduling reference information; The train dispatching reference information includes: station name, train number, power supply card number, and command scope.
9. A method for verifying train dispatching commands based on the longest common subsequence according to any one of claims 1 to 8, characterized in that, The types of checks include: station name validity check and command text consistency check.
Citation Information
Patent Citations
Instruction identification method and device, equipment and computer readable storage medium
CN116129907A
Electric power safety measure ticket checking method and related device
CN118070798A