Station yard graph drawing method and device, equipment and medium

By acquiring equipment and line data, and using the depth priority algorithm to determine the location of the target segment in the station site diagram, the problems of low efficiency and difficult maintenance in traditional methods are solved, and efficient and accurate station site diagram drawing are achieved.

CN119850778APending Publication Date: 2025-04-18HUNAN CRRC TIMES SIGNAL & COMM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510006820.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-02
Publication Date
2025-04-18

AI Technical Summary

Technical Problem

In the subway intelligent operation and maintenance system, traditional methods are used to draw station maps inefficient and workloads, and the code needs to be modified simultaneously when data is updated, which increases maintenance difficulty.

Method used

By acquiring the device data set and preset line data, the line topology structure is traversed using the depth priority algorithm, the target segment location is determined, and it is saved in the segment data set. Based on these data, drawing a site map reduces the need to calculate the actual location of each device.

Benefits of technology

It effectively reduces the calculation amount of site drawing, improves the drawing efficiency and accuracy, simplifies the equipment layout process, and reduces the difficulty of code maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119850778A_ABST
    Figure CN119850778A_ABST
Patent Text Reader

Abstract

The invention discloses a station yard graph drawing method and device, equipment and a medium, and relates to the field of image drawing, and the method comprises the steps: obtaining an equipment data set; the equipment data set comprises the offset of each piece of equipment relative to the corresponding axle counting section and the target sub-equipment position of each piece of sub-equipment corresponding to each piece of equipment; determining a preset initial drawing position, determining a preset line topology structure based on the preset line data, traversing the preset line topology structure by using a depth-first algorithm to determine each target section, determining a target section position corresponding to each target section based on the preset initial drawing position and the section length, storing each target section and the corresponding target section position into a section data set; the preset line data comprises a section number and a section length corresponding to the axle counting section; and based on the section data set and the equipment data set, drawing the station yard graph by taking the preset initial drawing position as a station yard graph drawing starting point. The drawing efficiency of the station yard graph is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image drawing, and in particular to a method, device, equipment and medium for drawing a station map. Background Art

[0002] At present, in the data production process of the subway intelligent operation and maintenance system, the station map is an important part of the line operation status monitoring during the line operation. Because it involves the layout of the entire line, the drawing of various signal equipment and the status display of the equipment, the drawing workload of the station map is large, and the data update work brought about by data changes also has a large workload. In the traditional method, the station map is drawn by calculating the actual coordinates of various signal equipment, axle counting sections, etc. in the station map, which is inefficient and labor-intensive; on the other hand, the traditional method directly controls the color change, visibility, position, etc. of the corresponding equipment in the station map according to the status of each signal equipment, etc. through hard coding. When the attributes of the equipment change, the code needs to be modified synchronously, which increases the difficulty of code maintenance. Therefore, how to improve the drawing efficiency of the station map is a problem that needs to be solved at present. Summary of the invention

[0003] In view of this, the purpose of this application is to provide a station map drawing method, device, equipment and medium, which can effectively reduce the amount of calculation for station map drawing and improve the drawing efficiency and accuracy of station map. The specific scheme is as follows:

[0004] In a first aspect, the present application provides a method for drawing a station map, comprising:

[0005] Acquire a device data set; the device data set includes an offset of each device relative to a corresponding axle counting section and a target sub-device position of each sub-device corresponding to each device; the target sub-device position is a relative position of the sub-device relative to the device to which it belongs;

[0006] Determine a preset initial drawing position, determine a preset line topology structure based on preset line data, and traverse the preset line topology structure using a depth-first algorithm to determine each target segment, determine the target segment position corresponding to each target segment based on the preset initial drawing position and the segment length, and save each target segment and the corresponding target segment position into a segment data set; the preset line data includes the segment number and segment length corresponding to the axle counting segment; wherein the segment number corresponding to any axle counting segment consists of a left segment number and a right segment number;

[0007] Based on the section data set and the equipment data set, the station map is drawn by taking the preset initial drawing position as the station map drawing starting point.

[0008] Optionally, the station map drawing method further includes:

[0009] Get attribute configuration instructions;

[0010] For any one of the devices, a corresponding device property group is created for the device based on the property configuration instruction, and for any sub-device in the device, a target property corresponding to the sub-device is bound to the device property in the device property group, so as to control the sub-device by changing the device property value corresponding to each of the device properties in the device property group.

[0011] Optionally, binding the target attribute corresponding to the sub-device with the device attribute in the device attribute group includes:

[0012] The target attribute corresponding to the sub-device is bound to the device attribute in the device attribute group based on a preset custom function.

[0013] Optionally, determining a preset line topology structure based on preset line data, traversing the preset line topology structure using a depth-first algorithm to determine each target segment, determining a target segment position corresponding to each target segment based on the preset initial drawing position and the segment length, and saving each target segment and the corresponding target segment position in a segment data set, includes:

[0014] Determine the preset route topology structure based on the left section number and the right section number corresponding to each of the axle counting sections in the preset route data;

[0015] Traversing the preset line topology structure according to a depth-first algorithm and a preset turnout direction, determining a corresponding current target section based on the traversed current axle counting section, and determining whether the current target section has been saved in the current section data set;

[0016] If the current target section is not saved in the current section data set, the current target section position is determined based on the section length corresponding to the preceding section of the current axle counting section, the current target section and the current target section position are saved in the current section data set, and based on the current section data set, the step of traversing the preset line topology structure according to the depth-first algorithm and the preset turnout direction is jumped to until the traversal of the sections in the preset line topology structure is completed to obtain the latest section data set; wherein the preset initial drawing position is used as the initial target section position;

[0017] If the current target section has been saved in the current section data set, jump to the step of traversing the preset line topology structure according to the depth-first algorithm and the preset turnout direction until the traversal of the sections in the preset line topology structure is completed to obtain the latest section data set.

[0018] Optionally, the saving the current target segment and the current target segment position to the current segment data set includes:

[0019] A corresponding target segment image is created for the current target segment, and the target segment image and the current target segment position are saved in the current segment data set.

[0020] Optionally, the drawing of the station map based on the section data set and the equipment data set and taking the preset initial drawing position as the starting point of the station map drawing includes:

[0021] Taking the preset initial drawing position as the starting point for drawing the station map, traversing the section data set, and completing the drawing of the axle counting section in the station map based on each target section in the section data set and the corresponding target section position, so as to obtain a first drawing result;

[0022] Traversing the equipment data set, and completing drawing of the equipment in the station map based on the offset of each equipment in the equipment data set relative to the corresponding axle counting section and the target sub-equipment position of each sub-equipment corresponding to each equipment, so as to obtain a second drawing result;

[0023] A corresponding drawn station map is obtained based on the first drawing result and the second drawing result.

[0024] Optionally, the drawing of the station map based on the section data set and the equipment data set and taking the preset initial drawing position as the starting point of the station map drawing includes:

[0025] The preset initial drawing position is used as the starting point for drawing the station map, and based on the section data set and the equipment data set, the station map is simultaneously subjected to axle counting section drawing and equipment drawing to obtain a drawn station map.

[0026] In a second aspect, the present application provides a station map drawing device, comprising:

[0027] A first set acquisition module is used to acquire a device data set; the device data set includes an offset of each device relative to the corresponding axle counting section and a target sub-device position of each sub-device corresponding to each device; the target sub-device position is a relative position of the sub-device relative to the device to which it belongs;

[0028] The second set acquisition module is used to determine a preset initial drawing position, determine a preset line topology structure based on preset line data, and traverse the preset line topology structure using a depth-first algorithm to determine each target segment, determine the target segment position corresponding to each target segment based on the preset initial drawing position and the segment length, and save each target segment and the corresponding target segment position into a segment data set; the preset line data includes the segment number and segment length corresponding to the axle counting segment; wherein the segment number corresponding to any axle counting segment consists of a left segment number and a right segment number;

[0029] The station map drawing module is used to draw the station map based on the section data set and the equipment data set, and use the preset initial drawing position as the station map drawing starting point.

[0030] In a third aspect, the present application provides an electronic device, including:

[0031] Memory, used to store computer programs;

[0032] The processor is used to execute the computer program to implement the aforementioned station map drawing method.

[0033] In a fourth aspect, the present application provides a computer-readable storage medium for storing a computer program, wherein the computer program implements the aforementioned station map drawing method when executed by a processor.

[0034] In the present application, a device data set is obtained; the device data set includes the offset of each device relative to the corresponding axle counting section and the target sub-device position of each sub-device corresponding to each device; the target sub-device position is the relative position of the sub-device relative to the device to which it belongs; a preset initial drawing position is determined, a preset line topology structure is determined based on preset line data, and the preset line topology structure is traversed using a depth-first algorithm to determine each target section, and the target section positions corresponding to each target section are determined based on the preset initial drawing position and the section length, and each target section and the corresponding target section position are saved in a section data set; the preset line data includes the section number and section length corresponding to the axle counting section; wherein the section number corresponding to any axle counting section consists of a left section number and a right section number; based on the section data set and the device data set, a station map is drawn with the preset initial drawing position as the starting point for drawing the station map. As can be seen from the above, the present application draws the station map based on the target sub-device position of each sub-device corresponding to each device, and avoids calculating the actual position of each sub-device by internally encapsulating the device, thereby reducing the amount of calculation; on the other hand, the depth-first algorithm is used to traverse the preset line topology structure and add the traversed target section and the corresponding target section position to the section data set, and the station map is drawn based on the section data set, thereby improving the speed and accuracy of the station map drawing; wherein, the target section position is determined based on the preset initial drawing position and the section length, thereby avoiding the problem of large amount of calculation caused by calculating the position of each target section; at the same time, when the line data changes, it is only necessary to update the preset line data and redraw the station map, thereby improving the efficiency of the station map drawing. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0036] Figure 1 A flow chart for drawing a station diagram disclosed in this application;

[0037] Figure 2 A signal light element effect diagram disclosed in this application;

[0038] Figure 3 A schematic diagram of part of the structured data inside a signal light graphic element disclosed in the present application;

[0039] Figure 4A schematic diagram of a partial device attribute group corresponding to a signal machine disclosed in this application;

[0040] Figure 5 A depth-first calculation flow chart disclosed in this application;

[0041] Figure 6 A schematic diagram of a partially drawn station map disclosed in the present application;

[0042] Figure 7 This is a schematic diagram of the structure of a station map drawing device disclosed in this application;

[0043] Figure 8 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION

[0044] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0045] As an important part of line operation status monitoring during line operation, the station map involves the layout of the entire line, the drawing of various signal devices, and the display of the status of the equipment, which leads to a large workload for drawing the station map. At the same time, the data update work caused by data changes also involves a large workload. In the traditional method, the station map is drawn by calculating the actual coordinates of various signal devices, axle counting sections, etc. in the station map, which is inefficient and labor-intensive. On the other hand, the traditional method directly controls the color change, visibility, position, etc. of the corresponding equipment in the station map according to the status of each signal device, etc. through hard coding. When the attributes of the equipment change, the code needs to be modified synchronously, which increases the difficulty of code maintenance. To this end, the present application provides a station map drawing method that can effectively reduce the amount of calculation for station map drawing and improve the efficiency and accuracy of station map drawing.

[0046] See also Figure 1 As shown, an embodiment of the present invention discloses a method for drawing a station map, comprising:

[0047] Step S11, obtaining a device data set; the device data set includes the offset of each device relative to the corresponding axle counting section and the target sub-device position of each sub-device corresponding to each device; the target sub-device position is the relative position of the sub-device relative to the device to which it belongs.

[0048] In this embodiment, firstly, the offset of each device relative to the corresponding axle counting section and the relative position of each sub-device corresponding to each device are obtained; since the station field map is a two-dimensional image, the offset is the horizontal offset and the vertical offset. It is understandable that there are many contents drawn in the intelligent operation and maintenance station map, such as various equipment such as signal machines, transponders, axle counters, platforms, shield doors, flood prevention doors, and sub-equipment contained in each equipment. In order to reduce the workload, the offset of each equipment relative to the corresponding axle counting section can be calculated. After the position of each axle counting section in the station map is determined, the position of each equipment in the station map is directly determined according to the above offset; at the same time, there is no need to determine the actual position of each sub-equipment in the station map, only the relative position of each sub-equipment relative to the equipment to which it belongs needs to be determined; in this way, it is convenient to intuitively display the layout structure of the entire station and the relative position relationship between each equipment, reducing the amount of calculation, and through the internal encapsulation of each equipment, when drawing each equipment in the station map later, there is no need to care about the specific position of the sub-equipment and the sub-equipment inside each equipment, only the position of each equipment in the station map needs to be determined, which simplifies the process of equipment layout in the station map; the influence of the position change when the internal sub-equipment is modified on the display effect of the overall station map is eliminated.

[0049] It should be noted that in order to facilitate the drawing of site diagrams, dedicated graphics can be designed for each device and sub-device in the site diagram. For example, simple geometric shapes such as circles, rectangles, triangles and other graphics can be used to represent each device and sub-device in the device. For the device graphics corresponding to each device, the components of the device graphics can be described in the form of structured data inside the device graphics to form an independent combination inside the device graphics. When drawing the site diagram, it is only necessary to determine the origin coordinates of the device graphics without worrying about the internal structure of the device graphics. Among them, the upper left corner position of the smallest rectangle that encloses the device graphics can be used as the origin of the device graphics. Figure 2 Take the signal machine graphic element rendering shown as an example. In this rendering, the triangle represents the direction, such as the direction of vehicle travel or the direction of the switch; the combination of rectangle and circle represents the signal machine related equipment, among which the circular part can be the display part of the signal light, and different colors can represent different signal states, such as red light for stop, green light for passage, etc.; the rectangle represents the outer shell of the signal machine or related auxiliary structures; the red graphic element part represents the warning device, which can be used to prompt vehicles not to enter a certain area or need to stop, etc.

[0050] like Figure 3The figure shows part of the structured data inside the signal primitive provided by the present embodiment, wherein the device attributes such as height, width, boundExtend (distance that the primitive boundary extends outward) of the entire signal primitive are set in the part of the structured data, and then the device attributes of each part primitive (circle, rectangle, etc.) inside the signal primitive are described through the comps attribute; wherein the upper left corner position of the smallest rectangle enclosing the part primitive can be used as the relative coordinate of the part primitive, which is used to determine the relative position of the part primitive relative to the device primitive to which it belongs; the following is Figure 3 Some of the code in is explained:

[0051] {

[0052] "type":"rect",

[0053] "background":"rgb(255,255,255)",

[0054] "borderColor":"rgb(255,255,255)",

[0055] "visible":true,

[0056] "rect":[

[0057] 0,

[0058] 5.2724,

[0059] 30.92768, 29.67588 ]

[0062] };

[0063] Among them, type indicates the type of part primitive, rect indicates rectangle, background indicates background color, such as rgb (Red, Green, Blue) (255,255,255), indicating white, borderColor indicates border color, visible indicates whether the rectangular primitive is visible, and the rect array contains four values. The first two values ​​indicate the relative position of the rectangular primitive relative to the signal primitive, such as the relative coordinates of the rectangular primitive are (0, 5.2724), and the latter two values ​​indicate the width and height of the smallest rectangle that wraps the rectangular primitive. In the subsequent drawing process of the station diagram, the relative position of the rectangular primitive can be superimposed by the position of the signal primitive in the station diagram to automatically calculate the position of the rectangular primitive in the station diagram. Structured data is used to describe the primitive, which is convenient for customized modification and serialized transmission of the primitive.

[0064] Furthermore, in order to realize the color change, visibility, position, etc. of the intelligent control device, the device attribute group can be designed according to the actual display effect of the device, and multiple different device attributes can be designed in the device attribute group according to the needs. Specifically, the attribute configuration instruction is first obtained, and for any device in the device, a corresponding device attribute group is created for the device based on the attribute configuration instruction. For any sub-device in the device, the target attribute corresponding to the sub-device is bound to the device attribute in the device attribute group, so as to control the sub-device by changing the device attribute value corresponding to each device attribute in the device attribute group; the above-mentioned target attributes include but are not limited to background color and visibility; the device attribute group includes but is not limited to device attributes, value type (string, number, etc.), default value, attribute type, whether it can be bound; such as Figure 4 The following shows a partial device property group corresponding to a certain signal, where the device property group includes properties, value types, default values, names (device properties), groups (property types), and can be bound. For example, when the name is the station diagram type, the property is zctModel, the value type is a string, the default value is normal, and the group is the signal property setting, which can be bound. It should be noted that the target properties corresponding to the sub-devices can be bound to the device properties in the device property group based on the preset custom function. When the default values ​​corresponding to the device properties change, the sub-devices inside the device can trigger various effects such as color change, size change, rotation, display, and hiding. For example, Figure 4 The name "red light" is bound to the color of the signal light in the signal machine. When the default value corresponding to "red light" becomes 1, the color of the above signal light automatically changes to red. In this way, the internal state of the primitive is exposed in the form of attribute groups. When the primitive state is finally displayed, the outside does not need to understand the internal composition details of the primitive. It only needs to directly assign values ​​to the specified equipment attributes in the attribute group, shielding the internal structure of the primitive. When changes or new requirements occur, only new parts need to be added to the primitive and new equipment attributes need to be added to the attribute group.

[0065] Step S12, determine the preset initial drawing position, traverse the preset line data based on the depth-first algorithm to determine the axle counting segment position based on the preset initial drawing position and the traversed segment length, and add the traversed axle counting segment and the corresponding axle counting segment position to the axle counting segment set; the line data includes the segment number and segment length corresponding to the axle counting segment; wherein the segment number corresponding to any axle counting segment consists of a left segment number and a right segment number.

[0066] In this embodiment, the preset initial drawing position when drawing the station map is first determined. Then, based on the left section number and the right section number corresponding to each axle counting section in the preset line data, the preset line data is structured, and then the preset line topology is determined; wherein, the preset line data is structured, and the station map data can be viewed more clearly and effectively, which is convenient for the automatic program to parse and output. It should be noted that the above-mentioned preset line data is pre-prepared data including information on various aspects of the line, such as the direction of the line, the section number corresponding to the axle counting section, the section length, etc.; wherein, for any axle counting section, the left section number and the right section number are corresponding, and these two numbers indicate the connection relationship between the axle counting section and the adjacent section, for example, the section connected to the left and the section connected to the right of the axle counting section can be determined by numbering; the line topology is determined based on the preset line data such as the section number, the section length, that is, a line topology corresponding to the above-mentioned preset line data is constructed, which can intuitively present the connection relationship between the axle counting sections in the line.

[0067] Furthermore, the preset line topology structure is traversed according to the depth-first algorithm and the preset turnout direction to determine the corresponding current target section based on the traversed current axle counting section, and to determine whether the current target section has been saved in the current section data set; wherein, when the preset line topology structure is traversed based on the depth-first algorithm, the line branch can be selected according to the axle counting sections corresponding to the positioning or reverse positioning of the preset turnouts; since the sections in the line are composed of axle counting sections and turnout sections, when the traversed current axle counting section corresponds to a single axle counting section, the single axle counting section is determined as the current target section, and when the traversed current axle counting section corresponds to a turnout section, the entire turnout section is determined as the current target section.

[0068] Determine whether the current target section is saved in the current section data set. If the current target section is not saved in the current section data set, determine the current target section position based on the section length and section type corresponding to the preceding section of the current axle counting section, save the current target section and the current target section position in the current section data set, and jump to the step of traversing the preset line topology structure according to the depth-first algorithm and the preset turnout direction based on the current section data set until the traversal of the sections in the preset line topology structure is completed to obtain the latest section data set; wherein the preset initial drawing position is used as the initial target section position; if the current target section has been saved in the current section data set, jump to the step of traversing the preset line topology structure according to the depth-first algorithm and the preset turnout direction until the traversal of the sections in the preset line topology structure is completed to obtain the latest section data set. It should be noted that a corresponding target section image can be created for the current target section, and the target section image and the current target section position can be saved in the current section data set.

[0069] Specifically, Figure 5 Taking the depth-first calculation flowchart shown as an example, the above-mentioned preset initial drawing position coordinates can be set to (0, 0), and then the path search based on the depth-first algorithm is continuously performed according to the connection relationship of the axle counting sections. When encountering a switch section, a branch search is performed according to the different switch reverse positions. Every time a target section corresponding to an axle counting section is searched, it is determined based on the preset drawing function whether the target section image corresponding to the current target section has been drawn and the target section image is saved in the section data set. If so, the path search continues; if not, the current target section image corresponding to the current target section is drawn, and the coordinates are moved according to the section length and section type corresponding to the predecessor section of the current target section to obtain the current target section position, the current target section image and the current target section position are saved in the current section data set, and the successor section and predecessor section of the axle counting section are recursively calculated. The path will continue to expand. When no unsaved predecessor / post-sequence sections are found, the path search is stopped, and the section data set is read to draw the station map on the two-dimensional canvas.

[0070] Step S13: based on the axle counting section set and the equipment data set, the station map is drawn by taking the preset initial drawing position as the drawing starting point of the station map.

[0071] In a specific implementation, a preset initial drawing position is used as the starting point for drawing the station map. First, the section data set is traversed, and the drawing of the axle counting section in the station map is completed based on each target section in the section data set and the corresponding target section position to obtain a first drawing result; then the equipment data set is traversed, the data corresponding to equipment such as signal machines and transponders are read, and the drawing of the equipment in the station map is completed according to the offset of each equipment relative to the corresponding axle counting section and the target sub-equipment position of each sub-equipment corresponding to each equipment to obtain a second drawing result; finally, the corresponding drawn station map is obtained based on the first drawing result and the second drawing result.

[0072] In another specific implementation, a preset initial drawing position is used as the starting point for drawing the station map, and axle counting section drawing and equipment drawing are performed on the station map simultaneously based on the section data set and the equipment data set to obtain a drawn station map.

[0073] For example Figure 6 As shown in the figure, it is a partial station diagram, in which the "U"-shaped part on the far left of the figure is the car stop; the gray rectangular part in the figure is the axle counting section, including a single axle counting section and a switch section; AC1101, AC1103, AC1109, AC1201, AC1202, AC1205, AC1207 are the numbers of the corresponding axle counters; the figures above the above numbers are the axle counters; the combination of circles and rectangles above the axle counters is the signal; ST1101, ST1103, ST1102 are the numbers of the corresponding switch sections; S0000 is the number of the corresponding axle counting section; the arrow is the direction of vehicle operation; P1101, P1102, P1103 are the numbers corresponding to the areas where P1101, P1102, P1103 are located.

[0074] As can be seen from the above, this embodiment draws the station map based on the target sub-device position of each sub-device corresponding to each device. By internally encapsulating the device, the calculation of the actual position of each sub-device is avoided, thereby reducing the amount of calculation. On the other hand, the preset line topology structure is traversed by the depth-first algorithm, and the target section obtained by the traversal and the corresponding target section position are added to the section data set, and the station map is automatically drawn based on the section data set, thereby avoiding errors caused by human factors and improving the speed and accuracy of station map drawing. Among them, the target section position is determined based on the preset initial drawing position and the section length, thereby avoiding the problem of large amount of calculation caused by calculating the position of each target section. At the same time, when the line data changes, it is only necessary to update the preset line data and redraw the station map, thereby improving the efficiency of station map drawing.

[0075] See also Figure 7 As shown, the embodiment of the present application also discloses a station map drawing device, including:

[0076] The first set acquisition module 11 is used to acquire a device data set; the device data set includes an offset of each device relative to the corresponding axle counting section and a target sub-device position of each sub-device corresponding to each device; the target sub-device position is a relative position of the sub-device relative to the device to which it belongs;

[0077] The second set acquisition module 12 is used to determine a preset initial drawing position, determine a preset line topology structure based on preset line data, and traverse the preset line topology structure using a depth-first algorithm to determine each target segment, determine the target segment position corresponding to each target segment based on the preset initial drawing position and the segment length, and save each target segment and the corresponding target segment position into a segment data set; the preset line data includes the segment number and segment length corresponding to the axle counting segment; wherein the segment number corresponding to any axle counting segment consists of a left segment number and a right segment number;

[0078] The station map drawing module 13 is used to draw the station map based on the section data set and the equipment data set, and use the preset initial drawing position as the station map drawing starting point.

[0079] As can be seen from the above, the present application draws the station map based on the target sub-device position of each sub-device corresponding to each device, and avoids calculating the actual position of each sub-device by internally encapsulating the device, thereby reducing the amount of calculation; on the other hand, the depth-first algorithm is used to traverse the preset line topology structure and add the traversed target section and the corresponding target section position to the section data set, and the station map is drawn based on the section data set, thereby improving the speed and accuracy of the station map drawing; wherein, the target section position is determined based on the preset initial drawing position and the section length, thereby avoiding the problem of large amount of calculation caused by calculating the position of each target section; at the same time, when the line data changes, it is only necessary to update the preset line data and redraw the station map, thereby improving the efficiency of the station map drawing.

[0080] In some specific implementations, the station map drawing device further includes:

[0081] Instruction acquisition module, used to obtain attribute configuration instructions;

[0082] The device control module is used to create a corresponding device property group for any one of the devices based on the property configuration instruction, and for any sub-device in the device, bind the target property corresponding to the sub-device with the device property in the device property group, so as to control the sub-device by changing the device property value corresponding to each of the device properties in the device property group.

[0083] In some specific embodiments, the device control module includes:

[0084] The property binding unit is used to bind the target property corresponding to the sub-device with the device property in the device property group based on a preset user-defined function.

[0085] In some specific implementations, the second set acquisition module 12 includes:

[0086] A topology construction unit, used for determining a preset route topology structure based on a left section number and a right section number corresponding to each of the axle counting sections in the preset route data;

[0087] A section judgment unit, used for traversing the preset line topology structure according to a depth-first algorithm and a preset turnout direction, so as to determine a corresponding current target section based on the traversed current axle counting section, and to judge whether the current target section has been saved in the current section data set;

[0088] A first execution submodule is used for determining the current target segment position based on the segment length corresponding to the preceding segment of the current axle counting segment if the current target segment is not saved in the current segment data set, saving the current target segment and the current target segment position in the current segment data set, and jumping to the step of traversing the preset line topology structure according to the depth-first algorithm and the preset turnout direction based on the current segment data set until the segment traversal in the preset line topology structure is completed to obtain the latest segment data set; wherein the preset initial drawing position is used as the initial target segment position;

[0089] The second execution unit is used to jump to the step of traversing the preset line topology structure according to the depth-first algorithm and the preset turnout direction if the current target section has been saved in the current section data set, until the traversal of the sections in the preset line topology structure is completed to obtain the latest section data set.

[0090] In some specific implementations, the first execution submodule includes:

[0091] The data storage unit is used to create a corresponding target segment image for the current target segment, and save the target segment image and the current target segment position into the current segment data set.

[0092] In some specific implementations, the station map drawing module 13 includes:

[0093] A first result determination unit is used to use the preset initial drawing position as the starting point for drawing the station map, traverse the section data set, and complete the drawing of the axle counting section in the station map based on each target section in the section data set and the corresponding target section position, so as to obtain a first drawing result;

[0094] A second result determination unit is used to traverse the equipment data set, and complete the drawing of the equipment in the station map based on the offset of each equipment in the equipment data set relative to the corresponding axle counting section and the target sub-equipment position of each sub-equipment corresponding to each equipment, so as to obtain a second drawing result;

[0095] The first station map drawing unit is used to obtain a corresponding drawn station map based on the first drawing result and the second drawing result.

[0096] In some specific implementations, the station map drawing module 13 includes:

[0097] The second station map drawing unit is used to use the preset initial drawing position as the station map drawing starting point, and simultaneously perform axle counting section drawing and equipment drawing on the station map based on the section data set and the equipment data set to obtain a drawn station map.

[0098] Furthermore, the present application also discloses an electronic device. Figure 8 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the diagram cannot be regarded as any limitation on the scope of use of the present application.

[0099] Figure 8 A schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the station map drawing method disclosed in any of the aforementioned embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.

[0100] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.

[0101] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.

[0102] The operating system 221 is used to manage and control the hardware devices and computer programs 222 on the electronic device 20, which may be Windows Server, Netware, Unix, Linux, etc. In addition to the computer program that can be used to complete the site map drawing method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 may further include computer programs that can be used to complete other specific tasks.

[0103] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the station field map drawing method disclosed above is implemented. For the specific steps of the method, reference may be made to the corresponding contents disclosed in the above embodiments, and no further description will be given here.

[0104] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0105] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0106] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0107] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0108] The technical solution provided by the present application is introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for general technicians in this field, according to the idea of ​​the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A method for drawing a station map, characterized in that: include: Acquire a device data set; the device data set includes an offset of each device relative to a corresponding axle counting section and a target sub-device position of each sub-device corresponding to each device; the target sub-device position is a relative position of the sub-device relative to the device to which it belongs; Determine a preset initial drawing position, determine a preset line topology structure based on preset line data, and traverse the preset line topology structure using a depth-first algorithm to determine each target segment, determine the target segment position corresponding to each target segment based on the preset initial drawing position and the segment length, and save each target segment and the corresponding target segment position into a segment data set; the preset line data includes the segment number and segment length corresponding to the axle counting segment; wherein the segment number corresponding to any axle counting segment consists of a left segment number and a right segment number; Based on the section data set and the equipment data set, the station map is drawn by taking the preset initial drawing position as the station map drawing starting point.

2. The method for drawing a station map according to claim 1, characterized in that: Also includes: Get attribute configuration instructions; For any one of the devices, a corresponding device property group is created for the device based on the property configuration instruction, and for any sub-device in the device, a target property corresponding to the sub-device is bound to the device property in the device property group, so as to control the sub-device by changing the device property value corresponding to each of the device properties in the device property group.

3. The method for drawing a station map according to claim 2, characterized in that: The step of binding the target attribute corresponding to the sub-device with the device attribute in the device attribute group includes: The target attribute corresponding to the sub-device is bound to the device attribute in the device attribute group based on a preset custom function.

4. The method for drawing a station map according to claim 1, characterized in that: The determining of a preset line topology structure based on the preset line data, and traversing the preset line topology structure using a depth-first algorithm to determine each target segment, determining a target segment position corresponding to each target segment based on the preset initial drawing position and the segment length, and saving each target segment and the corresponding target segment position to a segment data set, includes: Determine the preset route topology structure based on the left section number and the right section number corresponding to each of the axle counting sections in the preset route data; Traversing the preset line topology structure according to a depth-first algorithm and a preset turnout direction, determining a corresponding current target section based on the traversed current axle counting section, and determining whether the current target section has been saved in the current section data set; If the current target section is not saved in the current section data set, the current target section position is determined based on the section length corresponding to the preceding section of the current axle counting section, the current target section and the current target section position are saved in the current section data set, and based on the current section data set, the step of traversing the preset line topology structure according to the depth-first algorithm and the preset turnout direction is jumped to until the traversal of the sections in the preset line topology structure is completed to obtain the latest section data set; wherein the preset initial drawing position is used as the initial target section position; If the current target section has been saved in the current section data set, jump to the step of traversing the preset line topology structure according to the depth-first algorithm and the preset turnout direction until the traversal of the sections in the preset line topology structure is completed to obtain the latest section data set.

5. The method for drawing a station map according to claim 4, characterized in that: The step of saving the current target segment and the current target segment position to the current segment data set includes: A corresponding target segment image is created for the current target segment, and the target segment image and the current target segment position are saved in the current segment data set.

6. The method for drawing a station map according to any one of claims 1 to 5, characterized in that: The step of drawing the station map based on the section data set and the equipment data set and taking the preset initial drawing position as the station map drawing starting point includes: Taking the preset initial drawing position as the starting point for drawing the station map, traversing the section data set, and completing the drawing of the axle counting section in the station map based on each target section in the section data set and the corresponding target section position, so as to obtain a first drawing result; Traversing the equipment data set, and completing drawing of the equipment in the station map based on the offset of each equipment in the equipment data set relative to the corresponding axle counting section and the target sub-equipment position of each sub-equipment corresponding to each equipment, so as to obtain a second drawing result; A corresponding drawn station map is obtained based on the first drawing result and the second drawing result.

7. The method for drawing a station map according to any one of claims 1 to 5, characterized in that: The step of drawing the station map based on the section data set and the equipment data set and taking the preset initial drawing position as the station map drawing starting point includes: The preset initial drawing position is used as the starting point for drawing the station map, and based on the section data set and the equipment data set, the station map is simultaneously subjected to axle counting section drawing and equipment drawing to obtain a drawn station map.

8. A station map drawing device, characterized in that: include: A first set acquisition module is used to acquire a device data set; the device data set includes an offset of each device relative to the corresponding axle counting section and a target sub-device position of each sub-device corresponding to each device; the target sub-device position is a relative position of the sub-device relative to the device to which it belongs; The second set acquisition module is used to determine a preset initial drawing position, determine a preset line topology structure based on preset line data, and traverse the preset line topology structure using a depth-first algorithm to determine each target segment, determine the target segment position corresponding to each target segment based on the preset initial drawing position and the segment length, and save each target segment and the corresponding target segment position into a segment data set; the preset line data includes the segment number and segment length corresponding to the axle counting segment; wherein the segment number corresponding to any axle counting segment consists of a left segment number and a right segment number; The station map drawing module is used to draw the station map based on the section data set and the equipment data set, and use the preset initial drawing position as the station map drawing starting point.

9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the station map drawing method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: Used to store a computer program, which, when executed by a processor, implements the station map drawing method according to any one of claims 1 to 7.