A camera generation engineering quantity method of an urban rail transit monitoring system
Through the secondary development of AutoCAD, the cable length from the camera to the communication room of the urban rail transit monitoring system is automatically calculated, which solves the problems of high design error rate and low efficiency in the existing technology, realizes efficient and accurate camera layout design, and adapts to the development of intelligent engineering.
Patent Information
- Application Number
- CN202411165069.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-23
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2044-08-23
AI Technical Summary
In existing technologies, the design of camera layout for urban rail transit monitoring systems suffers from high error rates and low efficiency. Furthermore, the manual drawing mode is incompatible with the development of intelligent engineering, causing design progress and accuracy to become bottlenecks in engineering construction.
Through secondary development of AutoCAD and the use of ActiveX interface, the association between communication room, cable tray and camera is established, the shortest path is automatically selected, the cable length from camera to communication room is calculated and displayed on drawing, the project quantity is generated and the data is imported into Excel.
It improves the accuracy and efficiency of camera layout design, reduces errors in manual drawing, enhances project progress and drawing accuracy, and meets the needs of intelligent engineering.
Smart Images

Figure CN119203303B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of video monitoring of typical urban rail transit stations, and particularly relates to a method for generating the number of cameras of an urban rail transit monitoring system. BACKGROUND
[0002] With the increasing requirements of rail transit security levels, more and more cameras are arranged in subway stations, and the design personnel's drawing work is more and more heavy. The completely manual drawing of Autocad has high error rate, low efficiency, and slow progress. In the process of engineering construction, the drawing progress and accuracy of the design unit often become the bottleneck of engineering construction. The traditional manual drawing mode has not changed for many years and does not match the development of today's intelligent engineering, and is constantly criticized by the owner unit. SUMMARY
[0003] The present application is proposed to solve the problems existing in the prior art, and the purpose is to provide a method for generating the number of cameras of an urban rail transit monitoring system.
[0004] The technical scheme of the present application is: a method for generating the number of cameras of an urban rail transit monitoring system, comprising the following steps:
[0005] A. determining the coordinates of the communication machine room;
[0006] B. generating a bridge in the building base drawing and establishing a bridge data dictionary set;
[0007] C. specifying the camera insertion point in the plan drawing and inserting the camera;
[0008] D. combining the cable data path model to generate the shortest path of the cable from the camera to the communication machine room, generating the engineering quantity, and displaying in the drawing;
[0009] E. generating the cable and statistical data, and importing the data into Excel.
[0010] Further, step A determines the coordinates of the communication machine room, and the specific process is as follows:
[0011] Firstly, the specific position of the communication machine room in the building base drawing is found;
[0012] Then, the coordinates of the communication machine room are obtained according to the above position.
[0013] Further, step B generates a bridge in the building base drawing and establishes a bridge data dictionary set, and the specific process is as follows:
[0014] Firstly, the bridge width is inputted, and the bridge generation type is determined;
[0015] Then, insert the starting point coordinates and the ending point coordinates of the bridge in the building base map;
[0016] Then, generate the bridge by the starting point coordinates (start_x, start_y, 0), the ending point coordinates (end_x, end_y, 0) and the width of the bridge;
[0017] Then, calculate the maximum point coordinates and the minimum point coordinates of the bridge, the maximum point coordinates of the bridge in the horizontal direction are (end_x, end_y+bridge width / 2, 0), the minimum point coordinates are (start_x, start_y-bridge width / 2, 0), the maximum point coordinates of the bridge in the vertical direction are (end_x+bridge width / 2, end_y, 0), and the minimum point coordinates are (start_x-bridge width / 2, start_y, 0);
[0018] Finally, establish a bridge data dictionary set with the maximum point coordinates and the minimum point coordinates of the bridge as the keys and the type of the bridge as the value, when drawing the convergence bridge, the data dictionary set also contains the starting point coordinates and the ending point coordinates of the convergence bridge, and when drawing the access bridge, the data dictionary set also contains the starting point coordinates of the access bridge.
[0019] Further, step D combines the cable data path model to generate the shortest path of the cable from the camera to the communication room, generates the engineering quantity, and displays it in the drawing, the specific process is as follows:
[0020] d1. Establish an inserted camera toolbar module in AutoCAD;
[0021] d2. Insert the camera in the drawing through the inserted camera toolbar module, and obtain the camera insertion coordinates;
[0022] d3. According to the bridge data dictionary set and the center point coordinates of the communication room, obtain the positional relationship of the camera, the bridge and the communication room, establish a cable path model, and determine the shortest distance from the camera to the communication room;
[0023] d4. According to the shortest distance, generate the cable length, and generate the cable length single line text with the camera insertion point as the reference point.
[0024] Further, the single line text contains the cable model and the cable length.
[0025] Further, step E generates the cable and the statistical data, and imports the data into Excel, the specific process is as follows:
[0026] e1. Insert a statistical engineering quantity toolbar module in AutoCAD;
[0027] e2. Traverse all layers, find the cable length single line of text in the drawing, and output to Excel;
[0028] e3. Extract the cable length in the single line of text and output to Excel;
[0029] e4. Extract the single line of text coordinates and input to Excel for checking in the drawing.
[0030] The beneficial effects of the present application are as follows:
[0031] The present application uses the ActiveX interface provided by AutoCAD to carry out secondary development of the camera arrangement and pipeline drawing of the video monitoring system of the typical station of urban rail transit drawn by AutoCAD, and the association between the communication machine room, the bridge and the camera is established, the shortest path is automatically selected, the cable length from the camera to the communication machine room is calculated and displayed on the drawing. BRIEF DESCRIPTION OF DRAWINGS
[0032] Figure 1 is the bridge drawing module in the present application;
[0033] Figure 2 is the horizontal and vertical bridge schematic diagram of the present application;
[0034] Figure 3 is the method flow chart of the present application;
[0035] Figure 4 is the schematic diagram of the right-angle edge rule for calculating the cable length in the present application;
[0036] Figure 5 is the schematic diagram of the trapezoidal rule for calculating the cable length in the present application;
[0037] Figure 6 is the schematic diagram of the cable length calculation of the access bridge in the present application;
[0038] Figure 7 is the schematic diagram of writing the cable and the cable number into EXCEL by using the regular expression in the present application. DETAILED DESCRIPTION
[0039] Hereinafter, the present application will be described in detail with reference to the accompanying drawings and examples:
[0040] As shown in Figures 1 to 7 , a camera generation engineering quantity method of an urban rail transit monitoring system comprises the following steps:
[0041] A. Determine the communication machine room coordinates;
[0042] B. Generate a bridge in the building base drawing, and establish a bridge data dictionary set;
[0043] C. Specify the camera insertion point in the plan drawing, insert the camera;
[0044] D. Generate the shortest path of the camera to the communication room cable based on the cable data path model, generate the engineering quantity, and display it in the drawing;
[0045] E. Generate cable and statistical data, and import the data into Excel.
[0046] Step A determines the communication room coordinates, the specific process is as follows:
[0047] Specifically, step A determines the communication room coordinates, which are as follows:
[0048] a1. Traverse all elements of the drawing;
[0049] a2. Find all single-line texts, find the communication room single-line text object, adjust the X-axis direction rotation angle of the communication room single-line text to 0, obtain the maximum and minimum point coordinates of the frame of the communication room text object, and establish the minimum enclosure of the communication room text object using the GetBoundingBox method of VBA;
[0050] a3. Further obtain the center point coordinates of the communication room.
[0051] Step B generates a bridge in the building base drawing and establishes a bridge data dictionary set, the specific process is as follows:
[0052] First, input the bridge width to determine the bridge generation type;
[0053] Then, insert the start point coordinates and end point coordinates of the bridge in the building base drawing;
[0054] Then, generate the bridge through the start point coordinates (start_x, start_y, 0), end point coordinates (end_x, end_y, 0), and bridge width;
[0055] Then, calculate the maximum point coordinates and minimum point coordinates of the bridge. The maximum point coordinates of the horizontal bridge are (end_x, end_y+bridge width / 2, 0), and the minimum point coordinates are (start_x, start_y-bridge width / 2, 0). The maximum point coordinates of the vertical bridge are (end_x+bridge width / 2, end_y, 0), and the minimum point coordinates are (start_x-bridge width / 2, start_y, 0);
[0056] Finally, a data dictionary set for cable trays is established, with the coordinates of the maximum and minimum points of the cable tray as keys and the cable tray type as values. When drawing convergence cable trays, the data dictionary set also includes the starting and ending coordinates of the convergence cable tray. When drawing access cable trays, the data dictionary set also includes the starting coordinates of the access cable tray.
[0057] Step B involves generating cable trays in the building's base plan and establishing a cable tray data dictionary set. This also includes drawing the cable trays. The specific process is as follows:
[0058] b1. Create a module for drawing cable trays in AutoCAD;
[0059] b2. Insert the starting coordinates of the cable tray by drawing the cable tray module;
[0060] Specifically, the GetPoint() method is used to obtain the coordinates of the cable tray's starting point and store them.
[0061] b3. Continue inserting the endpoint coordinates of the cable tray and draw the center line of the cable tray;
[0062] Specifically, the GetPoint() method is used to obtain the coordinates of the cable tray's endpoint and store the cable tray's endpoint coordinates;
[0063] b4. Draw a rectangular cable tray with the center line of the cable tray as the center and 1 / 2 of the cable tray width as the offset, and calculate the coordinates of the maximum and minimum points of the cable tray;
[0064] b6. After the cable tray is drawn, add the maximum and minimum point coordinates of each cable tray segment to the cable tray data dictionary set, using the cable tray type as the key;
[0065] b7. After rounding the x and y coordinates of the maximum and minimum points of the cable tray using the Int() method, convert them to string type using the CStr() method;
[0066] b8. The coordinates of the maximum and minimum points are separated by "+", and the x and y coordinates are separated by ",".
[0067] Specifically, the cable tray data dictionary is a collection of values and keys of type string, as shown below:
[0068] {
[0069] “x_min1,y_min1+x_max1,y_max1” : “Backbone cable tray”
[0070] “x_min2,y_min2+x_max2,y_max2” : “Converging cable tray + coordinates of the starting point of the convergent cable tray + coordinates of the ending point of the convergent cable tray”
[0071] "x_min3, y_min3+x_max3, y_max3": "access bridge, access bridge start coordinate" ......
[0072] }。
[0073] The drawing bridge module includes drawing backbone bridge, drawing convergence bridge, and drawing access bridge.
[0074] The bridge type includes backbone, convergence, and access.
[0075] Step D: The camera insertion point and the bridge dictionary data set form a cable data path model. According to the cable data path model, the shortest path of the camera to the communication room cable is generated, the engineering quantity is generated, and it is displayed in the drawing, and the specific process is as follows:
[0076] d1. Establishing an insertion camera toolbar module in AutoCAD;
[0077] d2. Inserting a camera in the drawing through the insertion camera toolbar module, and obtaining the camera insertion coordinates;
[0078] Specifically, the GetPoint() method is used to obtain the camera insertion point coordinate value and store it;
[0079] d3. According to the bridge data dictionary set and the communication room center point coordinates, the position relationship of the camera, the bridge, and the communication room is obtained, and the shortest distance from the camera to the communication room is determined;
[0080] Specifically, the GetPoint() method is used to obtain the camera connection bridge insertion point coordinates, and according to the camera insertion point coordinates and the connection bridge insertion point coordinates, the camera-to-bridge cable quantity is calculated;
[0081] d4. According to the relationship between the connection bridge insertion point coordinates and the bridge data dictionary set, the shortest distance from the camera to the communication room is determined;
[0082] Specifically, the dict.Keys method is used to loop through the keys in the bridge set, and the keyword "+" and the Instr() method and Mid() method are used to extract the maximum point coordinates, the minimum point coordinates, the convergence bridge start point coordinates, the convergence bridge end point coordinates, and the access bridge start point coordinates of each bridge in the bridge data dictionary set;
[0083] According to the relationship between the connection bridge insertion point coordinates and the bridge maximum point coordinates and the bridge minimum point coordinates in the bridge data dictionary, and through the key-value correspondence of the dictionary, the bridge type of the connected bridge this time is judged;
[0084] d5. According to the type of the connecting bridge, the shortest distance from the camera to the communication room is determined.
[0085] Specifically, the cable length calculation method includes a right-angle side rule and a trapezoidal rule.
[0086] Specifically, the right-angle side rule is applicable to the case where the coordinates of the insertion point of the connecting bridge are located in the backbone bridge, such as Figure 4 The specific process is as follows:
[0087] The camera is located at the H position, and the path from the camera to the communication room is H-T2-D-A-E-X. The equivalent distance is the sum of the two right-angle sides OT2 and OX of the right-angle triangle composed of the three points T2, O, and X, plus the distance between the insertion point H of the camera and the access point T2 of the bridge, that is, (T2 horizontal coordinate-X horizontal coordinate)+(T2 vertical coordinate-X vertical coordinate)+(T2 horizontal coordinate-H horizontal coordinate). The right-angle side rule is that the cable length is only related to the camera position, the bridge access point position, and the room position. The above subtraction results are all positive numbers after taking the absolute value.
[0088] Specifically, the trapezoidal rule is applicable to the case where the coordinates of the insertion point of the connecting bridge are located in the convergence bridge, such as Figure 5 The specific process is as follows:
[0089] When the camera accesses the convergence bridge DC, it is divided into two paths.
[0090] One is MT1+T1D+DA+AE+EX. The equivalent distance is the sum of the three sides of the trapezoid, plus the distance between the insertion point M of the camera and the access point T1 of the bridge, that is, (D vertical coordinate-T1 vertical coordinate)+(D horizontal coordinate-X horizontal coordinate)+(D vertical coordinate-X vertical coordinate)+(M point horizontal coordinate-T1 horizontal coordinate).
[0091] The second is MT1+T1C+CA+AE+EX. The equivalent distance is the sum of the three sides of the trapezoid, plus the distance between the insertion point M of the camera and the access point T1 of the bridge, that is, (C vertical coordinate-T1 vertical coordinate)+(C horizontal coordinate-X horizontal coordinate)+(C vertical coordinate-X vertical coordinate)+(M point horizontal coordinate-T1 horizontal coordinate).
[0092] The above subtraction results are all positive numbers after taking the absolute value.
[0093] The minimum distance of the above two paths is the shortest cable length from the camera to the room. The trapezoidal rule is that the cable length is related to the camera position, the bridge access point position, and the room position, and is also related to the start point C coordinate and the end point D coordinate of the convergence bridge.
[0094] Specifically, the trapezoidal rule is applicable to the case where the coordinates of the insertion point of the connecting bridge are located in the access bridge, and the start point coordinate W of the access bridge is located in the convergence bridge DC, as shown inFigure 6 The cable length is related to the camera position, the bridge access point position and the machine room position, and is also related to the convergence bridge start point C coordinate and the end point D coordinate. The convergence bridge start point C coordinate and the end point D coordinate are obtained by judging the convergence bridge connected with the access bridge through the access point start point coordinate in the dictionary data set.
[0095] Step E generates the cable and statistical data, and imports the data into Excel, reads the cable model and unit in the TEXTBOX, displays the cable quantity on the drawing, and the like as shown in the drawing. Figure 7
[0096] The specific process is as follows:
[0097] e1. Insert the statistical engineering quantity toolbar module in AutoCAD;
[0098] e2. Search the cable length single line text in the drawing and output to Excel by traversing all layers;
[0099] e3. Extract the cable length in the single line text and output to Excel;
[0100] e4. Extract the single line text coordinate and input to Excel, so as to check back in the drawing.
[0101] The application utilizes the ActiveX interface provided by AutoCAD to carry out secondary development on the camera arrangement and pipeline drawing of the video monitoring system of the typical station of the urban rail transit drawn by AutoCAD, automatically selects the shortest path by establishing the association among the communication machine room, the bridge and the camera, calculates the cable length from the camera to the communication machine room and displays the cable length on the drawing.
Claims
1. A camera generation engineering quantity method of an urban rail transit monitoring system, characterized in that: The method comprises the following steps: A. determining the communication room coordinates; B. generating the bridge in the building base map and establishing a bridge data dictionary set; C. specifying the camera insertion point in the plan drawing and inserting the camera; D. combining the cable data path model to generate the shortest path of the cable from the camera to the communication room, generating the engineering quantity, and displaying it in the drawing; E. generating the cable and statistical data and importing the data into Excel; Step B generates the bridge in the building base map and establishes a bridge data dictionary set, and the specific process is as follows: First, input the bridge width to determine the bridge generation type; Then, insert the starting point coordinates and the end point coordinates of the bridge in the building base map; Then, generate the bridge through the starting point coordinates, the end point coordinates and the bridge width; Finally, establish a bridge data dictionary set with the maximum point coordinates and the minimum point coordinates of the bridge as the key and the bridge type as the value. When drawing the convergence bridge, the data dictionary set also contains the starting point coordinates and the end point coordinates of the convergence bridge; when drawing the access bridge, the data dictionary set also contains the starting point coordinates of the access bridge; Step D combines the cable data path model to generate the shortest path of the cable from the camera to the communication room, generates the engineering quantity, and displays it in the drawing, and the specific process is as follows: d1. Establishing an insertion camera toolbar module in AutoCAD; d2. Inserting the camera in the drawing through the insertion camera toolbar module and obtaining the camera insertion coordinates; d3. According to the bridge data dictionary set and the communication room center point coordinates, the positional relationship of the camera, the bridge and the communication room is obtained, and the shortest distance from the camera to the communication room is determined; d4. According to the shortest distance, the cable length is generated, and the cable length single line text is generated with the camera insertion point as the reference point.
2. The camera generation engineering quantity method of the urban rail transit monitoring system according to claim 1, characterized in that: Step A determines the communication room coordinates, and the specific process is as follows: First, find the specific location of the communication room in the building base map; Then, according to the above position, the communication room coordinates are obtained.
3. The camera generation engineering quantity method of the urban rail transit monitoring system according to claim 1, characterized in that: The bridge drawing module comprises drawing the backbone bridge, drawing the convergence bridge and drawing the access bridge.
4. The camera generation engineering quantity method of the urban rail transit monitoring system according to claim 1, characterized in that: The single line text contains the cable model and the cable length.
5. The camera generation engineering quantity method of the urban rail transit monitoring system according to claim 1, characterized in that: Step E generates the cable and statistical data and imports the data into Excel, and the specific process is as follows: e1. Inserting a statistical engineering quantity toolbar module in AutoCAD; e2. Traversing all layers, finding the cable length single line text in the drawing, and outputting it to Excel; e3. Extracting the cable length in the single line text and outputting it to Excel; e4. Extracting the single line text coordinates and inputting them into Excel for easy checking in the drawing.
Citation Information
Patent Citations
Intelligent cable path optimizing method
CN103427371A
Cable laying method
CN112803304A