Method, system and equipment for automatically generating basic data and storage medium
By automatically processing layer and block table information in DWG files, the basic data of railway wireless communication network is extracted and cleaned, and the problems of data inaccuracy and inefficiency caused by manual input are solved, and efficient and accurate data generation and import are achieved. .
Patent Information
- Application Number
- CN202411090227.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-09
- Publication Date
- 2024-12-17
AI Technical Summary
The production of basic data of existing railway wireless communication networks relies on manual input, resulting in inaccurate, inconsistent and inefficient data, affecting the reliability and unified processing of data.
By reading DWG graphics files, traversing layers and block tables, automatically extracting graphic entity information, grouping and identifying entity types, extracting basic data of the device, and cleaning and verification, generating import scripts for data management systems, realizing automated data import and check.
It improves the accuracy of data extraction and workflow efficiency, reduces the complexity and possibility of errors in manual operations, and achieves highly automated data generation.
Smart Images

Figure CN119150822A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure relate to the technical field of data generation, and in particular to a method, system, device and storage medium for automatically generating basic data of a railway wireless communication network based on a DWG file. Background Art
[0002] The basic data of the railway wireless communication system network is the basic data for the opening, service provision, operation and maintenance of the railway wireless communication system. The basis for its compilation is the railway wireless communication system construction drawing design plan in DWG file format. The basic data tables of the railway wireless communication system network include equipment basic data tables, network interconnection data tables, etc. There are many tables and the data content is complicated.
[0003] The basic data of the railway wireless communication network required by the existing railway communication network data management equipment currently mainly relies on the network basic data table, which is mainly manually produced. Designers manually input the basic data required for the base station data table, equipment basic data table, network interconnection data table, short number call routing table and other tables of each line, and data reviewers manually check the data according to the design files in DWG format. This data production method that relies entirely on manual labor is prone to inaccurate data, thus affecting the reliability of the data table; inconsistent tables affect the unified processing of data tables by superior departments; at the same time, it is cumbersome and time-consuming, and inefficient. Summary of the invention
[0004] The embodiments of the present disclosure provide a method, system, device and storage medium for automatically generating basic data to solve or alleviate one or more of the above technical problems in the prior art.
[0005] According to one aspect of the present disclosure, a method for automatically generating basic data is provided, comprising:
[0006] Read the DWG graphic file to be read into the graphic database;
[0007] Traverse the layer table of the graphics database to obtain the layer attribute information of the DWG graphics file;
[0008] Traverse the block table of the graphics database to obtain the graphics entity information of the DWG graphics file;
[0009] Group graphic entities by layer attributes;
[0010] Identify entity types for entities with the same layer attributes;
[0011] When the entity type is text type, extract the basic data of the device.
[0012] In a possible implementation, before reading the DWG graphic file to be read into the graphic database, the following steps are included:
[0013] Determine whether the DWG graphic file to be read is produced in a standardized manner according to the layer to which the device belongs;
[0014] When the DWG graphic file is not produced in a standardized manner, an error message will be displayed, prompting you to modify the DWG graphic file.
[0015] In a possible implementation, the DWG graphic file includes a railway wireless communication system construction drawing in a DWG file format; and the device includes a base station device and a repeater device in the railway wireless communication system.
[0016] In a possible implementation, the entity type includes a text type, a block reference type, and a polyline type.
[0017] In a possible implementation, when the entity type is a text type, extracting the basic device data includes:
[0018] Determine the import requirements of the target system;
[0019] Clean the extracted equipment basic data according to the import requirements of the target system.
[0020] In a possible implementation, the import requirements of the target system include file format, data format, import instructions and import commands.
[0021] In a possible implementation, when the entity type is a text type, extracting the basic device data includes:
[0022] Get device reference data;
[0023] Compare the basic data of the equipment after cleaning with the reference data to verify the accuracy of the basic data of the equipment after cleaning.
[0024] In a possible implementation, the method for automatically generating basic data further includes:
[0025] Generate import scripts for data management systems;
[0026] Design test objectives;
[0027] Build the actual operating environment of the railway wireless communication data management system;
[0028] Based on the test target and the operating environment, whether the basic data of the equipment can be imported into the database of the data management system when the import script is run is tested.
[0029] According to one aspect of the present disclosure, a system for automatically generating basic data is provided, comprising:
[0030] The reading unit is used to read the DWG graphic file to be read into the graphic database;
[0031] The first traversal unit is used to traverse the layer table of the graphic database to obtain the layer attribute information of the DWG graphic file;
[0032] The second traversal unit is used to traverse the block table of the graphic database to obtain the graphic entity information of the DWG graphic file;
[0033] The grouping unit is used to group graphic entities according to layer attributes;
[0034] An identification unit, used to identify entity types of entities with the same layer attributes;
[0035] The extraction unit is used to extract basic device data when the entity type is a text type.
[0036] In a possible implementation, it includes:
[0037] A judgment unit, used for judging whether the DWG graphic file to be read is produced in a standard manner according to the layer to which the device belongs;
[0038] The error reporting unit is used to report an error when the DWG graphic file is not produced in a standardized manner, and to prompt the DWG graphic file to be modified.
[0039] In a possible implementation, the DWG graphic file includes a railway wireless communication system construction drawing in a DWG file format; and the device includes a base station device and a repeater device in the railway wireless communication system.
[0040] In a possible implementation, the entity type includes a text type, a block reference type, and a polyline type.
[0041] In a possible implementation, the system for automatically generating basic data further includes:
[0042] A determination unit, used to determine the import requirements of the target system;
[0043] The cleaning unit is used to clean the extracted equipment basic data according to the import requirements of the target system.
[0044] In a possible implementation, the system for automatically generating basic data further includes:
[0045] An acquisition unit, used for acquiring device reference data;
[0046] The comparison unit is used to compare the basic data of the equipment after cleaning with the reference data to verify the accuracy of the basic data of the equipment after cleaning.
[0047] According to one aspect of the present disclosure, there is provided a device, comprising:
[0048] Processor and memory;
[0049] The memory is used to store a computer program, and the processor calls the computer program stored in the memory to execute any one of the above methods for automatically generating basic data.
[0050] According to one aspect of the present disclosure, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the processor is enabled to execute any of the above-mentioned methods for automatically generating basic data.
[0051] The present disclosure has the following beneficial effects: the entire process of the present disclosure is highly automated, from reading DWG files, traversing layers and block table records, entity type judgment, data extraction to data cleaning and verification, all of which are automatically performed by the program. At the same time, through steps such as compliance checking, data cleaning and verification, the accuracy of data extraction in DWG graphic files and the efficiency of the entire workflow are improved, which greatly reduces the complexity of manual operations and the possibility of errors.
[0052] The details of one or more embodiments of the present application are presented in the following drawings and descriptions. Other features and advantages of the present application will become apparent from the accompanying drawings. It should be understood that the above general description and the detailed descriptions below are only exemplary and explanatory and cannot limit the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.
[0054] Figure 1 is a flow chart of a method for automatically generating basic data of the present exemplary embodiment;
[0055] Figure 2 is a block diagram of a system for automatically generating basic data according to the present exemplary embodiment;
[0056] Figure 3 It is a schematic structural diagram of a device of this exemplary embodiment. DETAILED DESCRIPTION
[0057] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as being limited to the examples set forth herein; on the contrary, these embodiments are provided so that the present disclosure will be more comprehensive and complete, and the concepts of the example embodiments are fully conveyed to those skilled in the art. The described features, structures, or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.
[0058] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and thus their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware units or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.
[0059] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the steps. For example, some steps may be decomposed, while some steps may be combined or partially combined, so the actual execution order may change according to the actual situation.
[0060] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchanged where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein, for example.
[0061] In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or sub-modules is not necessarily limited to those steps or sub-modules explicitly listed, but may include other steps or sub-modules not explicitly listed or inherent to these processes, methods, products, or apparatuses.
[0062] Figure 1 is a flow chart of a method for automatically generating basic data according to this exemplary embodiment. Figure 1As shown, an exemplary embodiment of the present disclosure provides a method for automatically generating basic data, including:
[0063] S1 reads the DWG graphic file to be read into the graphic database;
[0064] S2 traverses the layer table of the graphics database to obtain the layer attribute information of the DWG graphics file;
[0065] S3 traverses the block table of the graphic database to obtain graphic entity information of the DWG graphic file;
[0066] S4 groups graphic entities by layer attributes;
[0067] S5 performs entity type recognition on entities with the same layer attributes;
[0068] S6: When the entity type is a text type, extract basic device data.
[0069] This embodiment proposes a method for automatically generating basic data of a railway wireless communication network based on a DWG file. The method automatically extracts basic information of base stations and their connection relationships from a railway wireless communication system diagram in a DWG format drawn by CAD software, and intelligently generates information in a base station data table, a basic equipment data table, a network interconnection data table, and a short number call routing table. At the same time, the method can intelligently generate script data to be imported into a data management device, and perform a secondary check to avoid data errors during the interaction process.
[0070] It is worth noting that this embodiment first performs a graphic database analysis on the construction drawing of the railway wireless communication system in the DWG file format. According to the structure of the AutoCAD graphic database, it can be seen that the block table stores the basic information of all graphic entities, and the layer table stores all the layer information. Due to the different properties of each layer, the attributes of the layers are also different accordingly. For example, the kilometer mark, number and layer attributes of the equipment image entity of the base station are all base station layers; similarly, the kilometer mark, number and layer attributes of the equipment image entity of the base station are all repeater layers.
[0071] Then, entities with the same layer attributes but different types are analyzed. Entities with the same layer attributes can be roughly divided into text type, block reference type and polyline type, etc. The text type includes information such as railway wireless communication network basic data, which is the main object of this embodiment.
[0072] When AutoCAD is not running, the drawing is saved in the file system. The objects in the drawing are identified by their handles. When a drawing is opened, the drawing information can be obtained through AcDbDatabase. Each object in the database has an object ID, which is saved in the current file from the time the object is created to the time it is deleted. The open object function uses the object ID as a variable and returns a pointer to AcDbObject. This pointer is valid before the object is closed. Therefore, the DWG file information can be extracted and exported through the pointer.
[0073] Specifically, the steps of reading the DWG graphic file to be read into the graphic database include:
[0074] Determine whether the DWG graphic file to be read is produced in a standardized manner according to the layer to which the device belongs;
[0075] When the DWG graphic file is not produced in a standardized manner, an error message will be displayed, prompting you to modify the DWG graphic file.
[0076] In this embodiment, when making the DWG graphic file to be read, the base station and repeater and other devices belong to different layers. For example, the base station layer is named "layer_jizhan"; the repeater layer is named "layer_zhifangzhan". If it is not standardized, the program may report an error, and the DWG graphic file needs to be modified first.
[0077] After determining whether the DWG graphic file is produced in accordance with the specification, this embodiment reads the DWG graphic file to be read into the current graphic database; traverses the layer table records to record the name of each layer; traverses the block table records, groups the entities according to the layers they are in, and records the Objectld of the entities; determines the entity type for each group of entities; determines whether the entity type is text; if so, extracts data content such as the base station and repeater list.
[0078] Specifically, the DWG graphic file includes a railway wireless communication system construction drawing in a DWG file format; the equipment includes a base station device and a repeater station device in the railway wireless communication system.
[0079] Specifically, the entity types include text types, block reference types and polyline types.
[0080] Specifically, when the entity type is a text type, extracting the basic device data includes the following steps:
[0081] Determine the import requirements of the target system;
[0082] Clean the extracted equipment basic data according to the import requirements of the target system.
[0083] Specifically, the import requirements of the target system include file format, data format, import instructions and import commands.
[0084] In this embodiment, the import requirements of the target system are determined, such as file format (such as .csv, .txt, .xml, etc.), data format (such as field delimiters, field order, date format, etc.), and any specific import instructions or commands.
[0085] Clean the extracted data, including deduplication according to the import requirements of the target system, processing missing values, and formatting the extracted text information into an appropriate data format.
[0086] Specifically, when the entity type is a text type, extracting the basic device data includes the following steps:
[0087] Get device reference data;
[0088] Compare the basic data of the equipment after cleaning with the reference data to verify the accuracy of the basic data of the equipment after cleaning.
[0089] In this embodiment, the extracted data and reference data are automatically compared to verify the accuracy of the extracted data. The reference data can come from relevant information of other systems and drawings and specifications, such as the location information reference data of the base station system can come from the geographical data of the GIS system and the kilometer mark of the LKJ of this line, and the reference data of the base station name can come from the base station list provided by the drawings and specifications; it can also be a reference data template formulated according to the compilation rules of the basic data, and this template needs to be imported into the system in advance.
[0090] Specifically, the method for automatically generating basic data further includes the steps of:
[0091] Generate import scripts for data management systems;
[0092] Design test objectives;
[0093] Build the actual operating environment of the railway wireless communication data management system;
[0094] Based on the test target and the operating environment, whether the basic data of the equipment can be imported into the database of the data management system when the import script is run is tested.
[0095] In this embodiment, the script for automatic extraction of DWG files can be in Java language, and the exported files can be in the form of csv, txt, on this basis, an import script for the data management system in the form of SQL script can be automatically generated; design test cases and goals, the main purpose of the test here is to see whether the script can run normally and whether the data exported from CAD can be correctly filled into the data management system database; build an actual operating environment for the railway wireless communication data management system to which the script is to be imported, and this environment can be physical or virtualized; use automated testing tools to perform tests and handle abnormal situations.
[0096] Figure 2 is a block diagram of a system for automatically generating basic data according to the exemplary embodiment of the present invention. Figure 2 As shown, an exemplary embodiment of the present disclosure provides a system for automatically generating basic data, including:
[0097] The reading unit 10 is used to read the DWG graphic file to be read into the graphic database;
[0098] The first traversal unit 20 is used to traverse the layer table of the graphic database to obtain the layer attribute information of the DWG graphic file;
[0099] The second traversal unit 30 is used to traverse the block table of the graphic database to obtain the graphic entity information of the DWG graphic file;
[0100] A grouping unit 40, used for grouping graphic entities according to layer attributes;
[0101] An identification unit 50, used for identifying entity types of entities with the same layer attributes;
[0102] The extraction unit 60 is used to extract basic device data when the entity type is a text type.
[0103] Specifically, the system for automatically generating basic data also includes:
[0104] A judgment unit, used for judging whether the DWG graphic file to be read is produced in a standard manner according to the layer to which the device belongs;
[0105] The error reporting unit is used to report an error when the DWG graphic file is not produced in a standardized manner, and to prompt the DWG graphic file to be modified.
[0106] Specifically, the DWG graphic file includes a railway wireless communication system construction drawing in a DWG file format; the equipment includes a base station device and a repeater station device in the railway wireless communication system.
[0107] Specifically, the entity types include text types, block reference types and polyline types.
[0108] Specifically, the system for automatically generating basic data also includes:
[0109] A determination unit, used to determine the import requirements of the target system;
[0110] The cleaning unit is used to clean the extracted equipment basic data according to the import requirements of the target system.
[0111] Specifically, the system for automatically generating basic data also includes:
[0112] An acquisition unit, used for acquiring device reference data;
[0113] The comparison unit is used to compare the basic data of the equipment after cleaning with the reference data to verify the accuracy of the basic data of the equipment after cleaning.
[0114] Figure 3 Schematic diagram of the structure of a device of this exemplary embodiment. Figure 3 As shown, corresponding to the method for automatically generating basic data provided above, the present disclosure also provides a device. Since the embodiment of the device is similar to the above method embodiment, the description is relatively simple. For relevant parts, please refer to the description of the above method embodiment part. The device described below is only schematic. The device may include: a processor (processor) 1, a memory (memory) 2 and a communication bus (i.e., the above device bus) and a search engine, wherein the processor 1 and the memory 2 complete mutual communication through the communication bus and communicate with the outside through the communication interface. The processor 1 can call the logic instructions in the memory 2 to execute the method for automatically generating basic data.
[0115] In addition, the logic instructions in the above-mentioned memory 2 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present disclosure is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the various embodiments of the present disclosure. The aforementioned storage medium includes: a storage chip, a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a disk or an optical disk, and other media that can store program codes.
[0116] On the other hand, an embodiment of the present disclosure further provides a processor-readable storage medium on which a computer program 3 is stored. When the computer program 3 is executed by the processor 1, the method for automatically generating basic data provided in the above embodiments is implemented.
[0117] The processor-readable storage medium can be any available medium or data storage device that can be accessed by the processor 1, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical storage (such as CD, DVD, BD, HVD, etc.), and semiconductor storage (such as ROM, EPROM, EEPROM, non-volatile memory (NANDFLASH), solid-state drive (SSD)), etc.
[0118] The above are only preferred implementations of the present disclosure, and the protection scope of the present disclosure is not limited to the above embodiments. All technical solutions under the concept of the present disclosure belong to the protection scope of the present disclosure. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present disclosure should be regarded as the protection scope of the present disclosure.
Claims
1. A method for automatically generating basic data, characterized in that: include: Read the DWG graphic file to be read into the graphic database; Traverse the layer table of the graphics database to obtain the layer attribute information of the DWG graphics file; Traverse the block table of the graphics database to obtain the graphics entity information of the DWG graphics file; Group graphic entities by layer attributes; Identify entity types for entities with the same layer attributes; When the entity type is text type, extract the basic data of the device.
2. The method for automatically generating basic data according to claim 1, characterized in that: Before reading the DWG drawing file to be read into the drawing database, include: Determine whether the DWG graphic file to be read is produced in a standardized manner according to the layer to which the device belongs; When the DWG graphic file is not produced in a standardized manner, an error message will be displayed, prompting you to modify the DWG graphic file.
3. The method for automatically generating basic data according to claim 1, characterized in that: The DWG graphic file includes a railway wireless communication system construction drawing in a DWG file format; The equipment includes base station equipment and repeater equipment in a railway wireless communication system.
4. The method for automatically generating basic data according to claim 1, characterized in that: The entity types include text type, block reference type and polyline type.
5. The method for automatically generating basic data according to claim 1, characterized in that: When the entity type is text type, the following is included after extracting the basic device data: Determine the import requirements of the target system; Clean the extracted equipment basic data according to the import requirements of the target system.
6. The method for automatically generating basic data according to claim 5, characterized in that: The import requirements of the target system include file format, data format, import instructions and import commands.
7. The method for automatically generating basic data according to claim 5, characterized in that: When the entity type is text type, the following is included after extracting the basic device data: Get device reference data; Compare the basic data of the equipment after cleaning with the reference data to verify the accuracy of the basic data of the equipment after cleaning.
8. The method for automatically generating basic data according to claim 1, characterized in that: Also includes: Generate import scripts for data management systems; Design test objectives; Build the actual operating environment of the railway wireless communication data management system; Based on the test target and the operating environment, whether the basic data of the equipment can be imported into the database of the data management system when the import script is run is tested.
9. A system for automatically generating basic data, characterized in that: include: The reading unit is used to read the DWG graphic file to be read into the graphic database; The first traversal unit is used to traverse the layer table of the graphic database to obtain the layer attribute information of the DWG graphic file; The second traversal unit is used to traverse the block table of the graphic database to obtain the graphic entity information of the DWG graphic file; The grouping unit is used to group graphic entities according to layer attributes; An identification unit, used to identify entity types of entities with the same layer attributes; The extraction unit is used to extract basic device data when the entity type is a text type.
10. The system for automatically generating basic data according to claim 9, characterized in that: include: A judgment unit, used for judging whether the DWG graphic file to be read is produced in a standard manner according to the layer to which the device belongs; The error reporting unit is used to report an error when the DWG graphic file is not produced in a standardized manner, and to prompt the DWG graphic file to be modified.
11. The system for automatically generating basic data according to claim 9, characterized in that: The DWG graphic file includes a railway wireless communication system construction drawing in a DWG file format; The equipment includes base station equipment and repeater equipment in a railway wireless communication system.
12. The system for automatically generating basic data according to claim 9, characterized in that: The entity types include text type, block reference type and polyline type.
13. The system for automatically generating basic data according to claim 9, characterized in that: Also includes: A determination unit, used to determine the import requirements of the target system; The cleaning unit is used to clean the extracted equipment basic data according to the import requirements of the target system.
14. The system for automatically generating basic data according to claim 13, characterized in that: Also includes: An acquisition unit, used for acquiring device reference data; The comparison unit is used to compare the basic data of the equipment after cleaning with the reference data to verify the accuracy of the basic data of the equipment after cleaning.
15. A device, characterized in that include: Processor and memory; The memory is used to store a computer program, and the processor calls the computer program stored in the memory to execute the method for automatically generating basic data according to any one of claims 1 to 8.
16. 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 processor is enabled to execute the method for automatically generating basic data according to any one of claims 1 to 8.
