Greedy algorithm-based data extraction method and system for overhead line system design
Through the data extraction method and system based on greedy algorithm, the inefficiency problem caused by manual comparison in contact network design is solved, the automatic sorting and storage of contact network data is realized, the design efficiency is improved, and the key is provided for the automatic layout of contact networks is provided. Data support.
Patent Information
- Application Number
- CN202410843481.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-27
- Publication Date
- 2024-11-19
AI Technical Summary
In the prior art, contact network design data requires manual comparison and discrimination, resulting in low efficiency of automation design, unable to quickly extract effective data, interrupting the digital and automated design process.
Using data extraction methods and systems based on greedy algorithms, the data files of contact network source are obtained and detected, line mileage distribution information is extracted, their continuity and absence are judged, and they are sorted and filtered, and the target data group after reordering is generated, which is automated. Stores the data required for the project.
It effectively gets rid of manual intervention, provides the data foundation required for automated design of contact network plan layout, improves design efficiency, and realizes rapid and automated data processing.
Smart Images

Figure CN118981859A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of contact network design, and in particular to a data extraction method and system for contact network design based on a greedy algorithm. Background Art
[0002] The contact network is a special form of power supply line for electrified railways to transmit electricity to electric locomotives. The contact network layout design of electrified railway projects is a necessary process for the professional design of the contact network. Through the contact network layout design, a two-dimensional layout diagram or a three-dimensional model of the contact network and the layout results data can be generated. The design of the contact network includes various types of interface professional data such as lines, bridges, tunnels, roadbeds, geological conditions, etc. After obtaining various types of data, the contact network carries out professional layout design of the contact network according to professional design specifications, standards and design experience. The layout core is the line data. Up to now, the railway engineering line data is mainly in text and mdb data format, specifically including curve tables, slope tables, broken chain tables, right line curve tables, etc., and each data file is processed by the survey results and interface professionals. In general, it does not correspond to the contact network professional design work points, and requires manual comparison. After selection, the work point data is extracted to provide data support for subsequent work.
[0003] However, this method interrupts the process of automatic layout design of overhead lines due to manual participation, and reduces the efficiency of digital and automated design. In order to quickly extract effective data and automatically enter the next stage of digital and automated calculation, it is necessary to propose a new method to automatically, quickly and effectively provide data and feedback information. Summary of the invention
[0004] The present application provides a method and system for extracting data for contact network design based on a greedy algorithm, so as to solve the problems existing in the prior art of the need for manual comparison and identification of contact network design data and low efficiency of automated design.
[0005] According to the first aspect, an embodiment provides a method for extracting data for contact network design based on a greedy algorithm, the method comprising:
[0006] Obtaining the data file for the source design of the overhead line and detecting the file format, extracting the line mileage distribution information of each source design data file and generating a source data group;
[0007] Based on the greedy algorithm, the line mileage distribution information in the source data group is traversed to determine whether the line mileage distribution is continuous and without missing. If the line mileage distribution is continuous and without missing, the line mileage distribution information in the source data group is sorted along the railway line mileage direction to obtain a rearranged target data group;
[0008] The data files for contact network source design are sorted according to the arrangement order of the corresponding line mileage distribution information in the target data group, and the data required for the project are screened out and stored.
[0009] Furthermore, the data file for contact network source design is obtained and the file format is tested, including:
[0010] The file formats include text, mdb, and excel. If an error in the file format is detected, an error is reported.
[0011] Furthermore, the line mileage distribution information of each source design data file is extracted and a source data group is generated, specifically including:
[0012] Extract the route mileage distribution information of the data file from the file name or identification information.
[0013] Furthermore, the route mileage distribution information includes a starting mileage and an ending mileage, the mileage format is prefix number + mileage + tail number, and the starting mileage and the ending mileage are separated by - or ~.
[0014] Furthermore, based on the greedy algorithm, the line mileage distribution information in the source data group is traversed to determine whether the line mileage distribution is continuous and without missing. If the line mileage distribution is continuous and without missing, the line mileage distribution information in the source data group is sorted along the railway line mileage direction to obtain a rearranged target data group, which specifically includes:
[0015] Traverse the route mileage distribution information in the source data group to determine whether the end mileage of the current route mileage distribution is the same as the start mileage of other route mileage distributions;
[0016] If they are the same, the current route mileage is not the first mileage distribution with the most forward starting mileage among all mileage distributions; if they are different, the current route mileage distribution = the first mileage distribution, and the first mileage is extracted as the first data in the target data group;
[0017] If the number of the first mileage distribution is greater than 1, it is determined that the line mileage distribution is discontinuous and missing, and an error is reported;
[0018] Then, the remaining route mileage distribution information in the source data group is traversed to determine whether the starting mileage of the current route mileage distribution is the same as the ending mileage of the first mileage distribution. If they are the same, the current route mileage distribution is extracted as the second data in the target data group;
[0019] The corresponding operation is looped, and each time through, the target route mileage distribution is extracted from the source data group in turn, and the starting mileage of the target route mileage distribution is the same as the ending mileage of the mileage distribution ranked last in the target data group, until the total number of data items in the target data group is equal to the total number of data items in the source data group, and the sorting is completed;
[0020] Thus, a rearranged target data set is obtained.
[0021] Furthermore, the method further comprises:
[0022] The version-related information of the data file is recorded so that the design links and basis can be traced back when problems arise in the subsequent design process to ensure the quality of the design file. The version-related information includes the sending date and time, file name, and name of the sender.
[0023] According to the second aspect, an embodiment provides a data extraction system for contact network design based on a greedy algorithm, the system comprising:
[0024] A data import module is used to obtain the data files for the contact network source design and detect the file format, extract the line mileage distribution information of each source design data file and generate a source data group;
[0025] A sorting module is used to traverse the line mileage distribution information in the source data group based on a greedy algorithm to determine whether the line mileage distribution is continuous and without missing. If the line mileage distribution is continuous and without missing, the line mileage distribution information in the source data group is sorted along the railway line mileage direction to obtain a rearranged target data group;
[0026] The extraction module is used to sort the data files for contact network source design according to the arrangement order of the corresponding line mileage distribution information in the target data group, filter out the data required for the project and store them.
[0027] Furthermore, the sorting module is specifically used for:
[0028] Traverse the route mileage distribution information in the source data group to determine whether the end mileage of the current route mileage distribution is the same as the start mileage of other route mileage distributions;
[0029] If they are the same, the current route mileage is not the first mileage distribution with the most forward starting mileage among all mileage distributions; if they are different, the current route mileage distribution = the first mileage distribution, and the first mileage is extracted as the first data in the target data group;
[0030] If the number of the first mileage distribution is greater than 1, it is determined that the line mileage distribution is discontinuous and missing, and an error is reported;
[0031] Then, the remaining route mileage distribution information in the source data group is traversed to determine whether the starting mileage of the current route mileage distribution is the same as the ending mileage of the first mileage distribution. If they are the same, the current route mileage distribution is extracted as the second data in the target data group;
[0032] The corresponding operation is looped, and each time through, the target route mileage distribution is extracted from the source data group in turn, and the starting mileage of the target route mileage distribution is the same as the ending mileage of the mileage distribution ranked last in the target data group, until the total number of data items in the target data group is equal to the total number of data items in the source data group, and the sorting is completed;
[0033] Thus, a rearranged target data set is obtained.
[0034] According to the third aspect, an embodiment provides an electronic device, the device comprising: a processor and a memory;
[0035] The memory is used to store one or more program instructions;
[0036] The processor is used to run one or more program instructions to execute the steps of a data extraction method for contact network design based on a greedy algorithm as described in any of the above items.
[0037] According to the fourth aspect, an embodiment provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of a data extraction method for contact network design based on a greedy algorithm as described in any of the above items are implemented.
[0038] The present application provides a method and system for extracting data for contact network design based on a greedy algorithm, which obtains contact network source design data files and detects the file format, extracts the line mileage distribution information of each source design data file and generates a source data group; based on the greedy algorithm, traverses the line mileage distribution information in the source data group to determine whether the line mileage distribution is continuous and without missing, and if the line mileage distribution is continuous and without missing, sorts the line mileage distribution information in the source data group along the railway line mileage direction to obtain a rearranged target data group; sorts the contact network source design data files according to the arrangement order of the corresponding line mileage distribution information in the target data group, and filters out the data required for the project and stores it. The present invention can effectively get rid of manual intervention in inputting data, provide the necessary data basis for one-key automatic design of contact network plane layout, and is a key link in automatic layout design. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 A flowchart of a method for extracting data for contact network design based on a greedy algorithm provided by one embodiment of the present invention;
[0040] Figure 2 A schematic diagram of a data file in a method for extracting data for contact network design based on a greedy algorithm provided by an embodiment of the present invention;
[0041] Figure 3 A first flow chart of a greedy algorithm in a method for extracting data for contact network design based on a greedy algorithm provided by one embodiment of the present invention;
[0042] Figure 4 A second flow chart of a greedy algorithm in a method for extracting data for contact network design based on a greedy algorithm provided by one embodiment of the present invention;
[0043] Figure 5 A schematic diagram of the logical structure of a data extraction system for contact network design based on a greedy algorithm is provided for one embodiment of the present invention. DETAILED DESCRIPTION
[0044] The present invention is further described in detail below by specific embodiments in conjunction with the accompanying drawings. Wherein similar elements in different embodiments adopt associated similar element numbers. In the following embodiments, many detailed descriptions are for making the present application better understood. However, those skilled in the art can easily recognize that some features can be omitted in different situations, or can be replaced by other elements, materials, methods. In some cases, some operations related to the present application are not shown or described in the specification, this is to avoid the core part of the present application being overwhelmed by too much description, and for those skilled in the art, it is not necessary to describe these related operations in detail, and they can fully understand the related operations according to the description in the specification and the general technical knowledge in the art.
[0045] In addition, the features, operations or characteristics described in the specification can be combined in any appropriate manner to form various implementations. At the same time, the steps or actions in the method description can also be interchanged or adjusted in a manner that is obvious to those skilled in the art. Therefore, the various sequences in the specification and the drawings are only for the purpose of clearly describing a certain embodiment and are not meant to be a required sequence, unless otherwise specified that a certain sequence must be followed.
[0046] The first embodiment of the present invention provides a method for extracting data for contact network design based on a greedy algorithm. Figure 1 Provide detailed explanation.
[0047] like Figure 1 As shown, in step S100, the contact network source design data file is obtained and the file format is detected, the line mileage distribution information of each source design data file is extracted and a source data group is generated.
[0048] Get pre-station professional line distribution data or data files: select the data file and import it through the file dialog box, supporting data formats such as mdb and excel, such as Figure 2 As shown, an error is reported when the acquired file format is incorrect; data is received through a data interface, and multiple format databases are supported; the extracted file information is displayed in a window for designers to check.
[0049] Extract the route mileage distribution information of the data file from the file name or identification information. The route mileage distribution information includes the starting mileage and the ending mileage. The mileage format is prefix number + mileage + tail number, such as: DK600+320.35. The starting mileage and the ending mileage are separated by - or ~, for example, "DK330+000~DK384+600".
[0050] In this embodiment, version-related information of the data file is also recorded so that when problems arise in the subsequent design process, the design links and basis can be traced back to ensure the quality of the design file. The version-related information includes the sending date and time, file name, and name of the sender.
[0051] like Figure 1 As shown, in step S200, based on the greedy algorithm, the line mileage distribution information in the source data group is traversed to determine whether the line mileage distribution is continuous and without missing. If the line mileage distribution is continuous and without missing, the line mileage distribution information in the source data group is sorted along the railway line mileage direction to obtain a rearranged target data group.
[0052] The above steps specifically include:
[0053] Traverse the route mileage distribution information in the source data group to determine whether the end mileage of the current route mileage distribution is the same as the start mileage of other route mileage distributions;
[0054] If they are the same, the current route mileage is not the first mileage distribution with the most forward starting mileage among all mileage distributions; if they are different, the current route mileage distribution = the first mileage distribution, and the first mileage is extracted as the first data in the target data group;
[0055] If the number of the first mileage distribution is greater than 1, it is determined that the line mileage distribution is discontinuous and missing, and an error is reported;
[0056] Then, the remaining route mileage distribution information in the source data group is traversed to determine whether the starting mileage of the current route mileage distribution is the same as the ending mileage of the first mileage distribution. If they are the same, the current route mileage distribution is extracted as the second data in the target data group;
[0057] The corresponding operation is looped, and each time through, the target route mileage distribution is extracted from the source data group in turn, and the starting mileage of the target route mileage distribution is the same as the ending mileage of the mileage distribution ranked last in the target data group, until the total number of data items in the target data group is equal to the total number of data items in the source data group, and the sorting is completed;
[0058] Thus, a rearranged target data set is obtained.
[0059] In this embodiment, a greedy algorithm is used to sort data. This method first tries to find the first data in the mileage distribution (file) sequence (the starting mileage is the first among all mileage distributions). The starting mileage of this data is A and the ending mileage of other mileage distribution data is not A. When the data that meets this feature is unique, the second data with the ending mileage of the first data as its starting mileage is searched, and so on, and all data are sorted. Otherwise, an error is reported. The specific process is as follows Figure 3 and Figure 4 shown.
[0060] like Figure 1 As shown, in step S300, the data files for contact network source design are sorted according to the arrangement order of the corresponding line mileage distribution information in the target data group, and the data required for the project are screened out and stored.
[0061] After sorting the data or data files according to the mileage distribution information along the railway line direction to form data groups, the effective data groups are finally extracted and stored in the interface data of the overhead line engineering design.
[0062] Before designing the overhead contact network of an electrified railway, it is necessary to first import the pre-station engineering data related to the line, bridge, tunnel, etc. However, due to the project design progress, the provided file format and content cannot directly meet the requirements of the overhead contact network engineering design, and the designers need to judge one by one, and cannot meet the requirements of the overhead contact network professional engineering software. The embodiment of the present invention provides a method for extracting data for overhead contact network design based on a greedy algorithm, which quickly and effectively extracts the target data and passes it to the overhead contact network layout software function module for overhead contact network layout design through analysis and processing of the source data, which can effectively get rid of the manual intervention of input data, provide the necessary data basis for the one-key automatic design of the overhead contact network plane layout, and is a key link in the automatic layout design.
[0063] Corresponding to the above disclosed method for extracting data for contact network design based on a greedy algorithm, the embodiment of the present invention further discloses a system for extracting data for contact network design based on a greedy algorithm, such as Figure 5 As shown, it specifically includes:
[0064] A data import module is used to obtain the data files for the contact network source design and detect the file format, extract the line mileage distribution information of each source design data file and generate a source data group;
[0065] A sorting module is used to traverse the line mileage distribution information in the source data group based on a greedy algorithm to determine whether the line mileage distribution is continuous and without missing. If the line mileage distribution is continuous and without missing, the line mileage distribution information in the source data group is sorted along the railway line mileage direction to obtain a rearranged target data group;
[0066] The extraction module is used to sort the data files for contact network source design according to the arrangement order of the corresponding line mileage distribution information in the target data group, filter out the data required for the project and store them.
[0067] Furthermore, the sorting module is specifically used for:
[0068] Traverse the route mileage distribution information in the source data group to determine whether the end mileage of the current route mileage distribution is the same as the start mileage of other route mileage distributions;
[0069] If they are the same, the current route mileage is not the first mileage distribution with the most forward starting mileage among all mileage distributions; if they are different, the current route mileage distribution = the first mileage distribution, and the first mileage is extracted as the first data in the target data group;
[0070] If the number of the first mileage distribution is greater than 1, it is determined that the line mileage distribution is discontinuous and missing, and an error is reported;
[0071] Then, the remaining route mileage distribution information in the source data group is traversed to determine whether the starting mileage of the current route mileage distribution is the same as the ending mileage of the first mileage distribution. If they are the same, the current route mileage distribution is extracted as the second data in the target data group;
[0072] The corresponding operation is looped, and each time through, the target route mileage distribution is extracted from the source data group in turn, and the starting mileage of the target route mileage distribution is the same as the ending mileage of the mileage distribution ranked last in the target data group, until the total number of data items in the target data group is equal to the total number of data items in the source data group, and the sorting is completed;
[0073] Thus, a rearranged target data set is obtained.
[0074] It should be noted that the detailed description of a data extraction system for contact network design based on a greedy algorithm provided in an embodiment of the present invention can refer to the relevant description of a data extraction method for contact network design based on a greedy algorithm provided in an embodiment of the present application, which will not be repeated here.
[0075] In addition, an embodiment of the present invention also provides an electronic device, comprising: a processor and a memory; the memory is used to store one or more program instructions; the processor is used to run one or more program instructions to execute the steps of a data extraction method for contact network design based on a greedy algorithm as described in any of the above items.
[0076] It should be noted that, for the detailed description of an electronic device provided in an embodiment of the present invention, reference can be made to the relevant description of a data extraction method for contact network design based on a greedy algorithm provided in an embodiment of the present application, which will not be repeated here.
[0077] In addition, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of a data extraction method for contact network design based on a greedy algorithm as described in any of the above items are implemented.
[0078] It should be noted that, for a detailed description of a computer-readable storage medium provided in an embodiment of the present invention, reference can be made to the relevant description of a data extraction method for contact network design based on a greedy algorithm provided in an embodiment of the present application, which will not be repeated here.
[0079] Those skilled in the art will appreciate that all or part of the functions of the various methods in the above-mentioned embodiments can be implemented by hardware or by computer programs. When all or part of the functions in the above-mentioned embodiments are implemented by computer programs, the program can be stored in a computer-readable storage medium, and the storage medium can include: read-only memory, random access memory, disk, optical disk, hard disk, etc., and the program is executed by a computer to implement the above-mentioned functions. For example, the program is stored in the memory of the device, and when the program in the memory is executed by the processor, all or part of the above-mentioned functions can be implemented. In addition, when all or part of the functions in the above-mentioned embodiments are implemented by computer programs, the program can also be stored in a storage medium such as a server, another computer, disk, optical disk, flash disk or mobile hard disk, and can be downloaded or copied and saved in the memory of the local device, or the system of the local device is updated, and when the program in the memory is executed by the processor, all or part of the functions in the above-mentioned embodiments can be implemented.
[0080] The above specific examples are used to illustrate the present invention, which is only used to help understand the present invention and is not intended to limit the present invention. For those skilled in the art, according to the concept of the present invention, some simple deductions, modifications or substitutions can be made.
Claims
1. A data extraction method for contact network design based on a greedy algorithm, characterized in that: The method comprises: Obtaining the data file for the contact network source design and detecting the file format, extracting the line mileage distribution information of each source design data file and generating a source data group; Based on the greedy algorithm, the line mileage distribution information in the source data group is traversed to determine whether the line mileage distribution is continuous and without missing. If the line mileage distribution is continuous and without missing, the line mileage distribution information in the source data group is sorted along the railway line mileage direction to obtain a rearranged target data group; The data files for contact network source design are sorted according to the arrangement order of the corresponding line mileage distribution information in the target data group, and the data required for the project are screened out and stored.
2. A method for extracting data for contact network design based on a greedy algorithm as claimed in claim 1, characterized in that: Obtain the data file for contact network source design and check the file format, including: The file formats include text, mdb, and excel. If an error in the file format is detected, an error is reported.
3. A method for extracting data for contact network design based on a greedy algorithm as claimed in claim 1, characterized in that: Extract the route mileage distribution information of each source design data file and generate a source data group, including: Extract the route mileage distribution information of the data file from the file name or identification information.
4. A method for extracting data for contact network design based on a greedy algorithm as claimed in claim 3, characterized in that: The route mileage distribution information includes the starting mileage and the ending mileage. The mileage format is prefix number + mileage + tail number. The starting mileage and the ending mileage are separated by - or ~.
5. The method for extracting data for contact network design based on a greedy algorithm according to claim 1, characterized in that: Based on the greedy algorithm, the line mileage distribution information in the source data group is traversed to determine whether the line mileage distribution is continuous and without missing. If the line mileage distribution is continuous and without missing, the line mileage distribution information in the source data group is sorted along the railway line mileage direction to obtain the rearranged target data group, which specifically includes: Traverse the route mileage distribution information in the source data group to determine whether the end mileage of the current route mileage distribution is the same as the start mileage of other route mileage distributions; If they are the same, the current route mileage is not the first mileage distribution with the most forward starting mileage among all mileage distributions; if they are different, the current route mileage distribution = the first mileage distribution, and the first mileage is extracted as the first data in the target data group; If the number of the first mileage distribution is greater than 1, it is determined that the line mileage distribution is discontinuous and missing, and an error is reported; Then, the remaining route mileage distribution information in the source data group is traversed to determine whether the starting mileage of the current route mileage distribution is the same as the ending mileage of the first mileage distribution. If they are the same, the current route mileage distribution is extracted as the second data in the target data group; The corresponding operation is looped, and each time through, the target route mileage distribution is extracted from the source data group in turn, and the starting mileage of the target route mileage distribution is the same as the ending mileage of the mileage distribution ranked last in the target data group, until the total number of data items in the target data group is equal to the total number of data items in the source data group, and the sorting is completed; Thus, a rearranged target data set is obtained.
6. A method for extracting data for contact network design based on a greedy algorithm as claimed in claim 1, characterized in that: The method further comprises: The version-related information of the data file is recorded so that the design links and basis can be traced back when problems arise in the subsequent design process to ensure the quality of the design file. The version-related information includes the sending date and time, file name, and name of the sender.
7. A data extraction system for contact network design based on a greedy algorithm, characterized in that: The system comprises: A data import module is used to obtain the data files for the contact network source design and detect the file format, extract the line mileage distribution information of each source design data file and generate a source data group; A sorting module is used to traverse the line mileage distribution information in the source data group based on a greedy algorithm to determine whether the line mileage distribution is continuous and without missing. If the line mileage distribution is continuous and without missing, the line mileage distribution information in the source data group is sorted along the railway line mileage direction to obtain a rearranged target data group; The extraction module is used to sort the data files for contact network source design according to the arrangement order of the corresponding line mileage distribution information in the target data group, filter out the data required for the project and store them.
8. A data extraction system for contact network design based on a greedy algorithm as claimed in claim 7, characterized in that: The sorting module is specifically used for: Traverse the route mileage distribution information in the source data group to determine whether the end mileage of the current route mileage distribution is the same as the start mileage of other route mileage distributions; If they are the same, the current route mileage is not the first mileage distribution with the most forward starting mileage among all mileage distributions; if they are different, the current route mileage distribution = the first mileage distribution, and the first mileage is extracted as the first data in the target data group; If the number of the first mileage distribution is greater than 1, it is determined that the line mileage distribution is discontinuous and missing, and an error is reported; Then, the remaining route mileage distribution information in the source data group is traversed to determine whether the starting mileage of the current route mileage distribution is the same as the ending mileage of the first mileage distribution. If they are the same, the current route mileage distribution is extracted as the second data in the target data group; The corresponding operation is looped, and each time through, the target route mileage distribution is extracted from the source data group in turn, and the starting mileage of the target route mileage distribution is the same as the ending mileage of the mileage distribution ranked last in the target data group, until the total number of data items in the target data group is equal to the total number of data items in the source data group, and the sorting is completed; Thus, a rearranged target data set is obtained.
9. An electronic device, characterized in that: The device comprises: a processor and a memory; The memory is used to store one or more program instructions; The processor is used to run one or more program instructions to execute the steps of a data extraction method for contact network design based on a greedy algorithm as described in any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of a data extraction method for contact network design based on a greedy algorithm as described in any one of claims 1 to 6 are implemented.
Citation Information
Cited By
Catenary installation standard configuration method and system based on semantic features
CN120012197A
Contact network installation standard configuration method and system based on semantic features
CN120012197B
