Camera generation project quantity method of urban rail transit monitoring system
The method automates camera layout in urban rail transit stations by determining communication room coordinates, generating bridges, and calculating cable lengths, addressing inefficiencies and errors in manual drafting, thus improving design accuracy and compatibility with intelligent engineering.
Patent Information
- Application Number
- CN202411165069.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-23
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2044-08-23
AI Technical Summary
The manual drafting of camera layouts in urban rail transit stations is inefficient, error-prone, and incompatible with modern intelligent engineering demands, leading to increased workload and accuracy issues.
A method for generating engineering quantities of cameras in an urban rail transit monitoring system using AutoCAD, involving determining communication room coordinates, generating bridges and establishing a data dictionary, specifying camera insertion points, combining cable data paths to calculate the shortest path to the communication room, and importing data into Excel.
Automates the camera layout process, reducing errors and increasing efficiency by calculating and displaying cable lengths, thereby enhancing design accuracy and compatibility with intelligent engineering practices.
Smart Images

Figure CN119203303A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of video surveillance of typical stations in urban rail transit, and in particular relates to a method for generating engineering quantities of cameras in an urban rail transit monitoring system. Background Art
[0002] As rail transit security requirements increase, the number of cameras deployed in subway stations is increasing, making the drafting workload for designers increasingly burdensome. Manually creating drawings using AutoCAD is subject to high error rates, low efficiency, and slow progress. During construction, the design team's drawing production schedule and accuracy often become bottlenecks. This traditional manual drafting model, unchanged for years, is incompatible with today's intelligent engineering developments and is constantly criticized by clients. Summary of the Invention
[0003] The present invention is proposed to solve the problems existing in the prior art, and its purpose is to provide a method for generating engineering quantities of cameras in an urban rail transit monitoring system.
[0004] The technical solution of the present invention is: a method for generating engineering quantities by a camera of an urban rail transit monitoring system, comprising the following steps: A. Determine the coordinates of the communication room; B. Generate bridges in the building base map and establish a bridge data dictionary set; C. Specify the camera insertion point in the plan drawing and insert the camera; D. Combine the cable data path model to generate the shortest path from the camera to the communication room cable, generate the project quantity, and display it on the drawing; E. Generate cable and statistical data and import the data into Excel.
[0005] Furthermore, step A determines the coordinates of the communication room. The specific process is as follows: First, find the specific location of the communication room in the building base map; Then, based on the above position, the coordinates of the communication room are obtained.
[0006] Furthermore, step B generates the bridge in the building base map and establishes a bridge data dictionary set. The specific process is as follows: First, input the bridge width and determine the bridge generation type; Then, insert the starting point coordinates and end point coordinates of the bridge into the building base map; Then, the bridge is generated by the starting point coordinates (start_x, start_y, 0), the end point coordinates (end_x, end_y, 0), and the bridge width; Then, calculate the maximum and minimum coordinates of the bridge. The maximum coordinate of the bridge in the horizontal direction is (end_x, end_y + bridge width / 2, 0), and the minimum coordinate is (start_x, start_y - bridge width / 2, 0). The maximum coordinate of the bridge in the vertical direction is (end_x + bridge width / 2, end_y, 0), and the minimum coordinate is (start_x - bridge width / 2, start_y, 0). Finally, a bridge data dictionary set is established with the maximum and minimum point coordinates of the bridge as keys and the bridge type as values. When drawing a convergent bridge, the data dictionary set also includes the starting and ending coordinates of the convergent bridge; when drawing an access bridge, the data dictionary set also includes the starting coordinates of the access bridge.
[0007] Furthermore, step D combines the cable data path model to generate the shortest path from the camera to the communication room cable, generates the project quantity, and displays it on the drawing. The specific process is as follows: d1. Create an insert camera toolbar module in AutoCAD; d2. Insert a camera into the drawing by using the camera toolbar module, and obtain the camera insertion coordinates; d3. Based on the bridge data dictionary set and the coordinates of the center point of the communication room, the positional relationship between the camera, bridge, and communication room is obtained, a cable path model is established, and the shortest distance from the camera to the communication room is determined; d4. Generate the cable length based on the shortest distance, and generate a single line of text for the cable length using the camera insertion point as the reference point.
[0008] Furthermore, the single line of text includes the cable model and cable length.
[0009] Furthermore, step E generates cable and statistical data and imports the data into Excel. The specific process is as follows: e1. Insert the Statistical Engineering Quantity Toolbar module into AutoCAD; e2. Traverse all layers, find the single-line text of cable length in the drawing, and output it to Excel; e3. Extract the cable length from the single-line text and export it to Excel; e4. Extract the coordinates of the single-line text and input them into Excel for easy verification in the drawing.
[0010] The beneficial effects of the present invention are as follows: The present invention utilizes the ActiveX interface provided by AutoCAD to conduct secondary development of AutoCAD drawing of camera layout and pipeline drawing of typical urban rail transit station video surveillance system. By establishing associations among the communication room, bridge and camera, the shortest path is automatically selected, the cable length from the camera to the communication room is calculated and displayed on the drawing. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] Figure 1 It is the bridge drawing module in the present invention; Figure 2 This is a schematic diagram of the horizontal and vertical bridge frames of the present invention; Figure 3 is a flow chart of the method of the present invention; Figure 4 Schematic diagram of the cable length calculation method using the right-angle rule in the present invention; Figure 5 Schematic diagram of the calculation of cable length using the trapezoidal rule in the present invention; Figure 6 This is a schematic diagram of calculating the cable length for access bridges in the present invention; Figure 7 This is a schematic diagram of using regular expressions to write cables and cable quantities into EXCEL in the present invention. DETAILED DESCRIPTION
[0012] Hereinafter, the present invention will be described in detail with reference to the accompanying drawings and embodiments: like Figures 1 to 7 As shown, a method for generating engineering quantities of cameras in an urban rail transit monitoring system includes the following steps: A. Determine the coordinates of the communication room; B. Generate bridges in the building base map and establish a bridge data dictionary set; C. Specify the camera insertion point in the plan drawing and insert the camera; D. Combine the cable data path model to generate the shortest path from the camera to the communication room cable, generate the project quantity, and display it on the drawing; E. Generate cable and statistical data and import the data into Excel.
[0013] Step A determines the coordinates of the communication room. The specific process is as follows: Specifically, step A determines the coordinates of the communication room as follows: a1. Traverse all elements of the drawing; a2. Search all single-line text objects, find the communication room single-line text object, adjust the X-axis rotation angle of the communication room single-line text object to 0, obtain the maximum and minimum coordinates of the communication room text object's bounding box, and use the GetBoundingBox method in VBA to establish the minimum bounding box of the communication room text object; a3. Then obtain the coordinates of the center point of the communication room.
[0014] Step B generates the bridge in the building base map and establishes a bridge data dictionary set. The specific process is as follows: First, input the bridge width and determine the bridge generation type; Then, insert the starting point coordinates and end point coordinates of the bridge into the building base map; Then, the bridge is generated by the starting point coordinates (start_x, start_y, 0), the end point coordinates (end_x, end_y, 0), and the bridge width; Next, calculate the maximum and minimum coordinates of the bridge. The maximum horizontal coordinates are (end_x, end_y + bridge width / 2, 0), and the minimum coordinates are (start_x, start_y - bridge width / 2, 0). The maximum vertical coordinates are (end_x + bridge width / 2, end_y, 0), and the minimum vertical coordinates are (start_x - bridge width / 2, start_y, 0). Finally, a bridge data dictionary set is created, with the bridge's maximum and minimum coordinates as keys and the bridge type as the value. When drawing a converging bridge, the data dictionary set also includes the starting and ending coordinates of the converging bridge. When drawing an access bridge, the data dictionary set also includes the starting coordinates of the access bridge.
[0015] Step B generates the bridge in the building base map and establishes a bridge data dictionary set, which also includes drawing the bridge. The specific process is as follows: b1. Create a bridge drawing module in AutoCAD; b2. Draw the bridge module and insert the bridge starting point coordinates; Specifically, use the GetPoint() method to obtain the coordinate value of the bridge starting point and store the coordinate value of the bridge starting point; b3. Continue inserting the coordinates of the bridge end point and drawing the bridge center line; Specifically, use the GetPoint() method to obtain the coordinate value of the bridge end point and store the coordinate value of the bridge end point; b4. Draw a rectangular bridge frame with the bridge frame center line as the center and 1 / 2 of the bridge frame width as the offset, and calculate the coordinates of the maximum and minimum points of the bridge frame; b6. After the bridge is drawn, the maximum and minimum coordinates of each bridge segment are used as values, and the bridge type is used as the key to add it to the bridge data dictionary set; b7. Use the Int() method to round the horizontal and vertical coordinates of the maximum and minimum points of the bridge to integers, and then use the CStr() method to convert them to string type; b8. The maximum point coordinate and the minimum point coordinate are separated by “+”, and the x coordinate and y coordinate are separated by “,”.
[0016] Specifically, the bridge data dictionary collection format has a string value and a string key, as shown below: { “x_min1,y_min1+x_max1,y_max1” : “Backbone bridge” “x_min2,y_min2+x_max2,y_max2”: “Converging bridge + converging bridge starting point coordinates + converging bridge end point coordinates” “x_min3,y_min3+x_max3,y_max3” : “Access bridge, access bridge starting point coordinates” ...... }.
[0017] The bridge drawing module includes drawing a backbone bridge, drawing a convergence bridge, and drawing an access bridge.
[0018] The bridge types include backbone, aggregation, and access.
[0019] Step D: The camera insertion point and bridge dictionary data set form a cable data path model. Based on the cable data path model, the shortest path from the camera to the communication room cable is generated, the project quantity is generated, and displayed on the drawing. The specific process is as follows: d1. Create an insert camera toolbar module in AutoCAD; d2. Insert a camera into the drawing by using the camera toolbar module, and obtain the camera insertion coordinates; Specifically, use the GetPoint() method to obtain the coordinate value of the camera insertion point and store it; d3. Based on the bridge data dictionary set and the coordinates of the center point of the communication room, obtain the positional relationship between the camera, bridge, and communication room, and determine the shortest distance from the camera to the communication room; Specifically, the GetPoint() method is used to obtain the coordinates of the camera connection bridge insertion point, and the number of cables from the camera to the bridge is calculated based on the coordinates of the camera insertion point and the connection bridge insertion point. d4. Determine the shortest distance from the camera to the communications room based on the relationship between the bridge insertion point coordinates and the bridge data dictionary set; Specifically, the dict.Keys method is used to loop through the keys in the bridge set, and the keywords "+", "," and the Instr() method and the Mid() method are used to extract the maximum point coordinates, minimum point coordinates, convergence bridge starting point coordinates, convergence bridge end point coordinates, and access bridge starting point coordinates of each bridge in the bridge data dictionary set; According to the relationship between the insertion point coordinates of the connecting bridge and the maximum and minimum coordinates of the bridge in the bridge data dictionary, and then through the key-value correspondence of the dictionary, the bridge type of the bridge being connected is determined; d5. Determine the shortest distance from the camera to the communication room based on the type of connecting bridge.
[0020] Specifically, the cable length calculation method includes the right-angle rule and the trapezoidal rule.
[0021] Specifically, the right-angle rule is applicable to the case where the coordinates of the bridge insertion point are located on the backbone bridge. Figure 4 As shown, the specific process is as follows: The camera is located at position H. The path from the camera to the communications room is H - T2 - DAEX. The equivalent distance is the sum of the two right-angled sides OT2 and OX of the right triangle formed by points T2, O, and X, plus the distance between the camera insertion point H and the bridge access point T2: (T2 horizontal coordinate - X horizontal coordinate) + (T2 vertical coordinate - X vertical coordinate) + (T2 horizontal coordinate - H horizontal coordinate). According to the right-angle rule, the cable length depends only on the camera position, the bridge access point location, and the equipment room location. The absolute value of the subtraction result is always a positive number.
[0022] Specifically, the trapezoidal rule is applicable to the case where the coordinates of the bridge insertion point are located at the convergent bridge. Figure 5 As shown, the specific process is as follows: When the camera is connected to the converged bridge DC, it is divided into two paths.
[0023] First, MT1 + T1D + DA + AE + EX. The equivalent distance is the sum of the three sides of the trapezoid plus the distance between the camera insertion point M and the bridge access point T1, 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).
[0024] Second, MT1 + T1C + CA + AE + EX. The equivalent distance is the sum of the three sides of the trapezoid plus the distance between the camera insertion point M and the bridge access point T1, 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).
[0025] The above subtraction results are all positive numbers after taking the absolute value.
[0026] The minimum distance between the two paths is the shortest cable length from the camera to the equipment room. According to the trapezoidal rule, cable length is not only related to the camera location, the bridge access point location, and the equipment room location, but also to the starting point (C) and ending point (D) coordinates of the convergence bridge.
[0027] Specifically, the trapezoidal rule is applicable when the coordinates of the insertion point of the connecting bridge are located in the access bridge, and the coordinates W of the starting point of the access bridge are located in the convergence bridge DC, such as Figure 6 As shown in the figure, cable length is related not only to the camera position, bridge access point location, and equipment room location, but also to the convergence bridge's starting point (C) and ending point (D) coordinates. Using the access point starting point coordinates in the dictionary data set, the convergence bridge connected to the access bridge is determined, and the convergence bridge's starting point (C) and ending point (D) coordinates are obtained.
[0028] Step E generates cable and statistical data, imports the data into Excel, reads the cable model and unit in TEXTBOX, and displays the cable quantity on the drawing, such as Figure 7 shown.
[0029] The specific process is as follows: e1. Insert the Statistical Engineering Quantity Toolbar module into AutoCAD; e2. Traverse all layers, find the single-line text of cable length in the drawing, and output it to Excel; e3. Extract the cable length from the single-line text and export it to Excel; e4. Extract the coordinates of the single-line text and input them into Excel so that they can be easily checked in the drawing.
[0030] The present invention utilizes the ActiveX interface provided by AutoCAD to conduct secondary development of AutoCAD drawing of camera layout and pipeline drawing of typical urban rail transit station video surveillance system. By establishing associations among the communication room, bridge and camera, the shortest path is automatically selected, the cable length from the camera to the communication room is calculated and displayed on the drawing.
Claims
1. A method for generating engineering quantities of cameras in an urban rail transit monitoring system, characterized in that: The following steps are involved: A. Determine the coordinates of the communication room; B. Generate bridges in the building base map and establish a bridge data dictionary set; C. Specify the camera insertion point in the plane drawing and insert the camera; D. Combine the cable data path model to generate the shortest path from the camera to the communication room cable, generate the engineering quantity, and display it in the drawing; E. Generate cable and statistical data and import the data into Excel.
2. The method for generating engineering quantities of cameras in an urban rail transit monitoring system according to claim 1, characterized in that: Step A determines the coordinates of the communication room. The specific process is as follows: First, find the specific location of the communication room in the building base map; Then, based on the above position, the coordinates of the communication room are obtained.
3. The method for generating engineering quantities of cameras in an urban rail transit monitoring system according to claim 1, characterized in that: Step B generates a bridge in the building base map and establishes a bridge data dictionary set. The specific process is as follows: First, input the bridge width and determine the bridge generation type; Then, insert the starting point coordinates and end point coordinates of the bridge frame into the building base map; Then, the bridge is generated through the starting point coordinates, the end point coordinates, and the bridge width; Finally, a bridge data dictionary set is established with the maximum and minimum point coordinates of the bridge as keys and the bridge type as values. When drawing a convergence bridge, the data dictionary set also includes the starting and end coordinates of the convergence bridge; when drawing an access bridge, the data dictionary set also includes the starting coordinates of the access bridge.
4. The method for generating engineering quantities of cameras in an urban rail transit monitoring system according to claim 3, characterized in that: The bridge drawing module includes drawing a backbone bridge, drawing a convergence bridge, and drawing an access bridge.
5. The method for generating engineering quantities of cameras in an urban rail transit monitoring system according to claim 1, characterized in that: Step D: Combine the cable data path model to generate the shortest path from the camera to the communication room cable, generate the engineering quantity, and display it in the drawing. The specific process is as follows: d1. Create a camera toolbar module in AutoCAD; d2. Insert a camera into the drawing by inserting the camera toolbar module, and obtain the camera insertion coordinates; d3. According to the bridge data dictionary set and the coordinates of the center point of the communication room, the positional relationship between the camera, bridge, and communication room is obtained, and the shortest distance from the camera to the communication room is determined; d4. Generate the cable length based on the shortest distance, and generate a single line of text for the cable length using the camera insertion point as the reference point.
6. The method for generating engineering quantities of cameras in an urban rail transit monitoring system according to claim 5, characterized in that: The single-line text contains the cable model and cable length.
7. The method for generating engineering quantities of cameras in an urban rail transit monitoring system according to claim 1, characterized in that: Step E generates cable and statistical data and imports the data into Excel. The specific process is as follows: e1. Insert the Statistical Engineering Quantity Toolbar module into AutoCAD; e2. Traverse all layers, find the single-line text of cable length in the drawing, and output it to Excel; e3. Extract the cable length in the single-line text and output it to Excel; e4. Extract the coordinates of the single-line text and input them into Excel for easy checking in the drawing.
Citation Information
Patent Citations
Intelligent cable path optimizing method
CN103427371A
Cable laying method
CN112803304A
Automatic cable arrangement method based on Dynamo
CN114154282A
Industrial big data application scene construction method combined with three-dimensional digital twinborn model
CN118429541A
Method and device for modeling BIM wiring in railway communication signal indoor engineering
WO2022261996A1
