Traffic video data processing method and system and computing equipment
By performing grid segmentation and digital model construction on traffic video data in computing devices, the problems of traffic video data processing complexity and low analysis efficiency in the existing technology are solved, and efficient road condition analysis and event processing are achieved.
Patent Information
- Application Number
- CN202410749195.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-11
- Publication Date
- 2024-09-24
AI Technical Summary
Existing technology is difficult to effectively identify and analyze vehicle locations in traffic video data, resulting in complex road condition analysis and inability to handle various road conditions events in a timely manner, which increases construction costs and computational complexity.
By collecting traffic video data in real time in computing devices, performing grid segmentation, generating grid traffic pictures, determining the initial and current location information of target objects, constructing static and dynamic digital models, and analyzing traffic conditions, including traffic smoothness and accidents. information.
It simplifies the spatial position calculation, improves the efficiency of traffic video data processing, realizes intuitive and efficient traffic analysis, and can handle various traffic events in a timely manner.
Smart Images

Figure CN118692236A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of traffic video data processing, and in particular to a traffic video data processing method, a traffic video data processing system and a computing device. Background Art
[0002] At present, road images are generally collected through cameras. According to the existing technology, it is only possible to identify the objects in the images collected by the camera as cars or people, but it is impossible to obtain the location of the car or person. In order to analyze the road conditions, additional sensor equipment needs to be installed to check the location of the car or person. This increases the construction cost on the one hand, and on the other hand, the processing process of video data and related position data is very complicated, requiring complex spatial position calculations, and it is impossible to analyze the road conditions intuitively and efficiently, resulting in the inability to handle various road conditions in a timely manner.
[0003] Therefore, a traffic video data processing method is needed to solve the problems existing in the above technical solutions. Summary of the invention
[0004] To this end, the present invention provides a traffic video data processing method and a traffic video data processing system to solve or at least alleviate the above problems.
[0005] According to one aspect of the present invention, a method for processing traffic video data is provided, which is executed in a computing device, and the computing device is communicatively connected to one or more video acquisition devices, and the method comprises: acquiring traffic video data of a predetermined road area acquired in real time by the video acquisition device, the traffic video data comprising a current traffic picture; performing grid segmentation on the current traffic picture to generate a grid traffic picture; determining initial grid position information of each target object in the grid traffic picture, and constructing a static digital model corresponding to the predetermined road area based on the initial grid position information of each target object, wherein the target object comprises a vehicle; in response to detecting movement of any target object in the grid traffic picture, determining current grid position information of any target object, and generating a motion trajectory of any target object based on the initial grid position information and current grid position information of any target object; generating a dynamic digital model corresponding to the predetermined road area based on the static digital model and the motion trajectory of any target object; and analyzing the predetermined road area corresponding to the grid traffic picture based on the dynamic digital model to determine the traffic conditions of the predetermined road area, wherein the traffic conditions comprise the degree of traffic smoothness and / or traffic accident information, and the traffic accident information is used to indicate whether a traffic accident has occurred in the predetermined road area.
[0006] Optionally, in the traffic video data processing method according to the present invention, based on the dynamic digital model, the predetermined road area corresponding to the grid traffic picture is analyzed to determine the traffic conditions of the predetermined road area, including: determining the number of target objects and / or the speed of each target object in each grid unit in the grid traffic picture based on the dynamic digital model; determining the traffic conditions of the predetermined road area based on the number of target objects and / or the speed of each target object in each grid unit.
[0007] Optionally, in the traffic video data processing method according to the present invention, the traffic conditions of the predetermined road area are determined based on the number of target objects in each grid unit and / or the speed of each target object, including: determining the average speed of the target objects in each grid unit based on the number of target objects in each grid unit in the grid traffic picture and the speed of each target object; determining the degree of traffic smoothness in the predetermined road area based on the average speed of the target objects in each grid unit.
[0008] Optionally, in the traffic video data processing method according to the present invention, the traffic conditions of the predetermined road area are determined based on the number of target objects in each grid unit and / or the speed of each target object, and also include: using a local anomaly factor algorithm to determine the local anomaly factor value corresponding to each grid unit based on the number of target objects in each grid unit in the grid traffic picture; based on the local anomaly factor value corresponding to each grid unit, determining whether the target object in each grid unit is abnormal, so as to determine whether a traffic accident occurs in the predetermined road area, the anomaly including sudden deceleration or stagnation.
[0009] Optionally, in the traffic video data processing method according to the present invention, determining whether a traffic accident occurs in the predetermined road area includes: if it is determined that the target object in any grid unit is abnormal, then determining that a traffic accident occurs in the corresponding position of any grid unit in the predetermined road area.
[0010] Optionally, in the traffic video data processing method according to the present invention, based on the dynamic digital model, the predetermined road area corresponding to the grid traffic picture is analyzed to determine the traffic conditions of the predetermined road area, further comprising: determining the current grid position information of each target object in the grid traffic picture based on the dynamic digital model; clustering the current grid position information of each target object in the grid traffic picture using the K-Means clustering algorithm to divide the predetermined road area corresponding to the grid traffic picture into multiple traffic condition areas; wherein the multiple traffic condition areas include traffic congestion areas and traffic smooth areas.
[0011] Optionally, the traffic video data processing method according to the present invention also includes: determining the number of target objects and the speed of each target object in each of the traffic condition areas based on the dynamic digital model to determine the average speed of the target objects in each of the traffic condition areas; determining the degree of traffic smoothness in each of the traffic condition areas based on the average speed of the target objects in each of the traffic condition areas.
[0012] Optionally, in the traffic video data processing method according to the present invention, a movement trajectory of any target object is generated based on the initial grid position information and the current grid position information of any target object, including: based on the initial grid position information and the current grid position information of any target object, a quadratic Bezier curve is drawn and generated as the movement trajectory of any target object.
[0013] Optionally, in the traffic video data processing method according to the present invention, the current traffic picture is grid-divided to generate a grid traffic picture, including: mapping the current traffic picture based on the Beidou grid code to divide the predetermined road area corresponding to the current traffic picture into multiple grid units, and mapping each target object in the current traffic picture to the corresponding grid unit to obtain a grid traffic picture; wherein each grid unit corresponds to a unique grid code, so that the grid position information can be determined based on the grid code.
[0014] According to one aspect of the present invention, a traffic video data processing system is provided, comprising: one or more video acquisition devices, the video acquisition devices being suitable for acquiring traffic video data of a predetermined road area in real time; a computing device being communicatively connected to the one or more video acquisition devices, the computing device being equipped with a traffic video data processing device, the traffic video data processing device comprising: an acquisition unit being suitable for acquiring traffic video data of a predetermined road area acquired in real time by the video acquisition device, the traffic video data comprising a current traffic picture; a grid segmentation unit being suitable for performing grid segmentation on the current traffic picture to generate a grid traffic picture; a construction unit being suitable for determining initial grid position information of each target object in the grid traffic picture, and constructing a stationary data corresponding to the predetermined road area based on the initial grid position information of each target object. A digital model, wherein the target object includes a vehicle; a trajectory generating unit, adapted to determine the current grid position information of any target object in response to detecting the movement of any target object in the grid traffic picture, and to generate a movement trajectory of any target object based on the initial grid position information and the current grid position information of any target object; a model generating unit, adapted to generate a dynamic digital model corresponding to the predetermined road area based on the static digital model and the movement trajectory of any target object; an analyzing unit, adapted to analyze the predetermined road area corresponding to the grid traffic picture based on the dynamic digital model to determine the traffic conditions of the predetermined road area, wherein the traffic conditions include the degree of traffic smoothness and / or traffic accident information, and the traffic accident information is used to indicate whether a traffic accident occurs in the predetermined road area.
[0015] According to one aspect of the present invention, there is provided a computing device, comprising: at least one processor; and a memory storing program instructions, wherein the program instructions are configured to be suitable for being executed by the at least one processor, and the program instructions include instructions for executing the traffic video data processing method as described above.
[0016] According to one aspect of the present invention, a computer program product is provided, comprising a computer program / instruction, wherein the computer program / instruction implements the method as described above when executed by a processor.
[0017] According to one aspect of the present invention, a readable storage medium storing program instructions is provided. When the program instructions are read and executed by a computing device, the computing device executes the traffic video data processing method as described above.
[0018] According to the technical solution of the present invention, a traffic video data processing method is provided, which generates a grid traffic picture by gridding the traffic picture collected by the video acquisition device in real time, determines the initial grid position information of each target object in the grid traffic picture, builds a static digital model corresponding to the predetermined road area based on the initial grid position information of each target object (vehicle), and determines the current grid position information of any target object when detecting the movement of any target object in the grid traffic picture, generates the action trajectory of any target object accordingly, and then generates a dynamic digital model corresponding to the predetermined road area, and can analyze the predetermined road area corresponding to the grid traffic picture based on the dynamic digital model to determine the traffic road condition of the predetermined road area. According to the technical solution of the present invention, the grid traffic picture is generated by gridding the traffic picture collected by the video acquisition device in real time, and the spatial position can be abstracted into a visual grid representation, so that the spatial position information can be determined efficiently and quickly, and complex spatial calculations are avoided, which greatly reduces the amount of calculation and improves the efficiency of traffic video data processing; and, by analyzing the road condition based on the dynamic digital model generated by the grid traffic picture, the road condition can be analyzed intuitively and efficiently, and various road condition events can be handled in a timely manner.
[0019] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] To achieve the above and related purposes, certain illustrative aspects are described herein in conjunction with the following description and accompanying drawings, which indicate various ways in which the principles disclosed herein can be practiced, and all aspects and their equivalents are intended to fall within the scope of the claimed subject matter. The above and other purposes, features and advantages of the present disclosure will become more apparent by reading the following detailed description in conjunction with the accompanying drawings. Throughout the present disclosure, the same reference numerals generally refer to the same parts or elements.
[0021] Figure 1 A schematic diagram of a traffic video data processing system 100 provided according to an embodiment of the present invention is shown;
[0022] Figure 2 A schematic diagram of a computing device 200 provided according to an embodiment of the present invention is shown;
[0023] Figure 3 A schematic flow chart of a traffic video data processing method 300 provided according to an embodiment of the present invention is shown;
[0024] Figure 4A schematic diagram of a grid traffic picture generated according to an embodiment of the present invention is shown;
[0025] Figure 5 A schematic diagram showing the effect of a dynamic digital model corresponding to a predetermined road area generated according to an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0026] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0027] For ease of understanding, the terms involved in the present invention are explained below.
[0028] Beidou Grid Code (BGC), also known as Beidou Grid Location Code, is a geographic space coding method based on the Beidou Navigation Satellite System (BDS). It divides the earth's surface into grid cells of varying sizes according to certain mathematical rules, and assigns a unique code to each grid cell to identify the location of the grid cell. As a national standard, Beidou Grid Location Code has the following advantages: it can provide grid codes of different accuracy levels to meet different positioning needs; it can divide the earth's surface into grid cells of varying sizes and assign a unique grid code to each grid cell; Beidou Grid Location Code provides a global geographic grid coding solution; the coding model supports efficient spatial data indexing and retrieval, is suitable for large-scale video surveillance networks, and has high computational efficiency.
[0029] The processing process of video data and related position data in the prior art is very complicated, requiring complex spatial position calculations, and is unable to analyze road conditions intuitively and efficiently, resulting in the inability to handle various road condition events in a timely manner.
[0030] To this end, an embodiment of the present invention provides a traffic video data processing method and system, which generates a grid traffic picture by gridding the traffic picture collected in real time by a video acquisition device, and can abstract the spatial position into a visual grid representation, so that the spatial position information can be determined efficiently and quickly, avoiding complex spatial calculations, greatly reducing the amount of calculation, and improving the efficiency of traffic video data processing; and, by performing road condition analysis based on a dynamic digital model generated based on the grid traffic picture, the road condition can be analyzed intuitively and efficiently, and various road condition events can be handled in a timely manner.
[0031] The traffic video data processing method provided according to the embodiment of the present invention can be implemented in a traffic video data processing system. The traffic video data processing system of the present invention is introduced below.
[0032] Figure 1 FIG. 1 is a schematic diagram of a traffic video data processing system 100 provided according to an embodiment of the present invention.
[0033] like Figure 1 As shown, the traffic video data processing system 100 includes a computing device 200 and one or more video acquisition devices 110. The computing device 200 can be connected to the one or more video acquisition devices 110 in a communication manner, for example, through a wired or wireless network connection.
[0034] In the embodiment of the present invention, each video acquisition device 110 can respectively acquire the traffic video data of the corresponding predetermined road area in real time, and can send the real-time acquired traffic video data to the computing device 200 that is communicatively connected thereto in real time.
[0035] In an embodiment of the present invention, the computing device 200 can obtain the traffic video data of the predetermined road area collected in real time by the video acquisition device, and the traffic video data includes the current traffic picture. It should be noted that the video acquisition device 110 can be a camera of various models. Each video acquisition device 110 can respectively collect the traffic video data of the corresponding predetermined road area in real time, and can send the real-time collected traffic video data to the computing device 200 in real time for processing. It can be understood that the traffic video data from the video acquisition device obtained by the computing device 200 includes the traffic picture (i.e., the current traffic picture) collected in real time by the video acquisition device.
[0036] The computing device 200 can generate a grid traffic picture (i.e., a grid traffic picture corresponding to the current traffic picture) by gridding the current traffic picture. Subsequently, the computing device 200 can determine the initial grid position information of each target object (the target object includes a vehicle) in the grid traffic picture, and construct a static digital model corresponding to the predetermined road area based on the initial grid position information of each target object. Here, the target object includes but is not limited to a vehicle.
[0037] In addition, the computing device 200 can determine the current grid position information of any target object in response to detecting the movement of any target object in the grid traffic picture (i.e., the grid position of any target object changes), and generate the movement trajectory of any target object based on the initial grid position information and the current grid position information of any target object. And, based on the static digital model and the movement trajectory of any target object, a dynamic digital model corresponding to the predetermined road area is generated (in real time). Furthermore, the computing device 200 can analyze the predetermined road area corresponding to the grid traffic picture (road condition analysis) based on the dynamic digital model to determine the traffic road condition of the predetermined road area.
[0038] In an embodiment of the present invention, the traffic conditions of a predetermined road area may include traffic flow and / or traffic accident information. The traffic accident information is used to indicate whether a traffic accident has occurred in the predetermined road area. It should be noted that the traffic flow may be represented by, for example, traffic congestion or traffic flow. Furthermore, the traffic flow may also be represented by dividing the predetermined road area into a plurality of traffic condition areas including a traffic congestion area and a traffic flow area.
[0039] In some embodiments, the computing device 200 may be connected to the Beidou satellite navigation system for communication, and the Beidou satellite navigation system may be used to provide high-precision geographic location information services. In this way, the computing device 200 may use the Beidou satellite navigation system to determine the real geographic information (e.g., longitude and latitude coordinates) of the video acquisition device 110, and may use the Beidou satellite navigation system to generate a corresponding Beidou grid code based on the real geographic information of the video acquisition device 110. Furthermore, the current traffic picture of the traffic video data may be mapped based on the generated Beidou grid code.
[0040] According to the traffic video data processing system 100 provided by the embodiment of the present invention, each video acquisition device 110 acquires the traffic video data of the corresponding predetermined road area in real time, and sends it to the computing device 200 for processing and analysis. The computing device 200 in the traffic video data processing system 100 is suitable for executing the traffic video data processing method 300 of the present invention to process and analyze the traffic video data acquired in real time by the video acquisition device 110. The traffic video data processing method 300 of the present invention will be described in detail below.
[0041] In an embodiment of the present invention, Figure 1 As shown, a traffic video data processing device 250 is deployed in the computing device 200 , and the traffic video data processing device 250 can be configured to execute the traffic video data processing method 300 of the present invention.
[0042] like Figure 1As shown, the traffic video data processing device 250 includes an acquisition unit 251, a grid segmentation unit 252, a construction unit 253, a trajectory generation unit 254, a model generation unit 255 and an analysis unit 256 which are coupled in sequence.
[0043] The acquisition unit 251 is used to acquire the traffic video data of the predetermined road area acquired in real time by the video acquisition device 110 , and the traffic video data includes the current traffic picture.
[0044] The grid segmentation unit 252 is used to perform grid segmentation on the current traffic picture to generate a grid traffic picture.
[0045] The construction unit 253 is used to determine the initial grid position information of each target object in the above-mentioned grid traffic picture, and construct a static digital model corresponding to the predetermined road area based on the initial grid position information of each target object, wherein the target object includes a vehicle.
[0046] The trajectory generating unit 254 is used to determine the current grid position information of any target object in response to detecting the movement of any target object in the grid traffic picture, and generate the movement trajectory of any target object based on the initial grid position information and the current grid position information of any target object.
[0047] The model generation unit 255 is used to generate a dynamic digital model corresponding to a predetermined road area based on the static digital model and the movement trajectory of any target object;
[0048] The analysis unit 256 is used to analyze the predetermined road area corresponding to the grid traffic picture based on the dynamic digital model to determine the traffic conditions of the predetermined road area, wherein the traffic conditions include the degree of traffic smoothness and / or traffic accident information, and the traffic accident information is used to indicate whether a traffic accident occurs in the predetermined road area.
[0049] It should be noted that regarding the specific execution logic of the acquisition unit 251, the grid segmentation unit 252, the construction unit 253, the trajectory generation unit 254, the model generation unit 255 and the analysis unit 256 in the traffic video data processing device 250, reference can be made to the description of steps 310 to 360 in the traffic video data processing method 300 below.
[0050] The traffic video data processing system 100 provided by the embodiment of the present invention generates a grid traffic picture by gridding the traffic picture collected in real time by the video acquisition device, and can abstract the spatial position into a visual grid representation, so that the spatial position information can be determined efficiently and quickly, and complex spatial calculations can be avoided, the amount of calculation is greatly reduced, and the efficiency of traffic video data processing is improved; and, by performing road condition analysis based on a dynamic digital model generated based on the grid traffic picture, the road condition can be analyzed intuitively and efficiently, and various road condition events can be handled in a timely manner.
[0051] Figure 2 FIG. 2 shows a schematic diagram of a computing device 200 provided according to an embodiment of the present invention. Figure 2 As shown, in a basic configuration, the computing device 200 includes at least one processing unit 202 and a system memory 204. According to one aspect, depending on the configuration and type of the computing device, the processing unit 202 can be implemented as a processor. The system memory 204 includes, but is not limited to, volatile storage (e.g., random access memory), non-volatile storage (e.g., read-only memory), flash memory, or any combination of such memories. According to one aspect, the system memory 204 includes an operating system 205.
[0052] According to one aspect, operating system 205 is suitable for controlling the operation of computing device 200, for example. Furthermore, examples are practiced in conjunction with graphics libraries, other operating systems, or any other application programs, and are not limited to any particular application or system. Figure 2 The basic configuration is shown in FIG. 2 by those components within the dashed lines. According to one aspect, the computing device 200 has additional features or functionality. For example, according to one aspect, the computing device 200 includes additional data storage devices (removable and / or non-removable), such as magnetic disks, optical disks, or tapes. Such additional storage Figure 2 2 is illustrated by a removable storage device 209 and a non-removable storage device 210.
[0053] As stated above, according to one aspect, a program module 203 is stored in the system memory 204. According to one aspect, the program module 203 may include one or more application programs, and the present invention does not limit the type of application program, for example, the application program may include: email and contact application programs, word processing application programs, spreadsheet application programs, database application programs, slide show application programs, drawing or computer-aided application programs, web browser application programs, etc.
[0054] In the embodiment according to the present invention, the program module 203 includes a plurality of program instructions for executing the traffic video data processing method 300 of the present invention.
[0055] According to one aspect, the examples may be practiced on a circuit comprising discrete electronic components, a packaged or integrated electronic chip containing logic gates, a circuit utilizing a microprocessor, or a single chip containing electronic components or a microprocessor. Figure 2 Each or many components shown in can be integrated into a system on a chip (SOC) on a single integrated circuit to practice examples. According to one aspect, such a SOC device may include one or more processing units, a graphics unit, a communication unit, a system virtualization unit, and various application functions, all of which are integrated (or "burned") into a chip substrate as a single integrated circuit. When operated via SOC, the functions described in this article can be operated via a dedicated logic integrated with other components of the computing device 200 on a single integrated circuit (chip). Other technologies that can perform logical operations (such as AND, OR, and NOT) can also be used to practice embodiments of the present invention, including but not limited to mechanical, optical, fluid, and quantum technologies. In addition, embodiments of the present invention can be practiced in a general-purpose computer or in any other circuit or system.
[0056] According to one aspect, the computing device 200 may also have one or more input devices 212, such as a keyboard, a mouse, a pen, a voice input device, a touch input device, etc. Output devices 214 may also be included, such as a display, a speaker, a printer, etc. The aforementioned devices are examples and other devices may also be used. The computing device 200 may include one or more communication connections 216 that allow communication with other computing devices 218. Examples of suitable communication connections 216 include, but are not limited to: RF transmitters, receivers and / or transceiver circuits; Universal Serial Bus (USB), parallel and / or serial ports.
[0057] The term computer-readable medium as used herein includes computer storage media. Computer storage media may include volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (e.g., computer-readable instructions, data structures, or program modules). System memory 204, removable storage device 209, and non-removable storage device 210 are all examples of computer storage media (i.e., memory storage). Computer storage media may include random access memory (RAM), read-only memory (ROM), electrically erasable read-only memory (EEPROM), flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical storage, cassettes, tapes, disk storage or other magnetic storage devices, or any other products that can be used to store information and can be accessed by computing device 200. According to one aspect, any such computer storage medium can be a part of computing device 200. Computer storage media does not include carrier waves or other propagated data signals.
[0058] According to one aspect, communication media is implemented by computer readable instructions, data structures, program modules, or other data in a modulated data signal (e.g., a carrier wave or other transport mechanism), and includes any information delivery media. According to one aspect, the term "modulated data signal" describes a signal that has one or more characteristics set or changed in a manner that encodes information in the signal. By way of example and not limitation, communication media includes wired media such as a wired network or direct-wired connection, and wireless media such as acoustic, radio frequency (RF), infrared, and other wireless media.
[0059] In an embodiment according to the present invention, the computing device 200 is configured to execute the traffic video data processing method 300. The computing device 200 includes one or more processors and one or more readable storage media storing program instructions. When the program instructions are configured to be executed by one or more processors, the computing device executes the traffic video data processing method 300 in the embodiment of the present invention, so that the computing device 200 executes the traffic video data processing method 300 of the present invention.
[0060] In some embodiments, the computing device 200 executing the traffic video data processing method 300 in the embodiment of the present invention may be a server or a terminal.
[0061] The traffic video data processing method 300 in the embodiment of the present invention is described in detail below.
[0062] Figure 3 FIG. 3 is a flow chart of a traffic video data processing method 300 provided according to an embodiment of the present invention. Figure 3As shown, the traffic video data processing method 300 includes the following steps 310-360.
[0063] Step 310: The computing device 200 obtains traffic video data of a predetermined road area collected in real time by a video acquisition device, where the traffic video data includes a current traffic picture.
[0064] In an embodiment of the present invention, the computing device 200 may be connected to one or more video acquisition devices 110 for communication. The video acquisition device 110 may be, for example, cameras of various models. Each video acquisition device 110 may respectively acquire the traffic video data of the corresponding predetermined road area in real time, and may send the real-time acquired traffic video data to the computing device 200 in real time. It is understood that the traffic video data acquired by the computing device 200 from the video acquisition device includes the traffic picture (i.e., the current traffic picture) acquired in real time by the video acquisition device.
[0065] Step 320: The computing device 200 divides the current traffic picture into grids to generate a grid traffic picture (i.e., a grid traffic picture corresponding to the current traffic picture). Figure 4 A schematic diagram of a grid traffic picture generated according to an embodiment of the present invention is shown.
[0066] Step 330: The computing device 200 determines the initial grid position information of each target object (including vehicles) in the grid traffic picture, and constructs a static digital model corresponding to the predetermined road area based on the initial grid position information of each target object.
[0067] In the embodiment of the present invention, the target object includes but is not limited to a vehicle. The grid position information of the target object is the position information of the grid unit where the target object is located.
[0068] In the embodiment of the present invention, the grid position information may be relative grid position information or absolute grid position information. The relative grid position information may be expressed in grid coordinates (x 相 ,Y 相 ), the absolute grid position information can be represented by grid coordinates (X 绝 ,Y 绝 ). It should be noted that in a single scenario where traffic video data of a predetermined road area is collected by one video acquisition device, relative grid position information can be used to calculate and process data more quickly. In a multi-fusion scenario where traffic video data of a predetermined road area is collected by multiple video acquisition devices (corresponding to multiple acquisition points), absolute grid position information can be used.
[0069] Step 340: In response to detecting the movement of any target object in the grid traffic picture (i.e., the grid position of any target object changes), the computing device 200 determines the current grid position information of any target object, and generates a movement trajectory of the any target object based on the initial grid position information and the current grid position information of the any target object.
[0070] In an embodiment of the present invention, the computing device 200 can monitor in real time whether each target object in the grid traffic picture (the grid traffic picture corresponding to the current traffic picture) moves. When the movement of any target object in the grid traffic picture is detected, the current grid position information of any target object can be determined in response to the detection of the movement of any target object in the grid traffic picture, and the movement trajectory of any target object can be generated based on the initial grid position information and the current grid position information of the any target object.
[0071] Here, it should be understood that the initial grid position information of the target object is the grid position information of the target object determined before the target object movement is detected, and the current grid position information of the target object is the grid position information of the target object determined after the target object movement is detected.
[0072] Step 350: The computing device 200 generates (in real time) a dynamic digital model corresponding to the predetermined road area based on the static digital model and the movement trajectory of any target object.
[0073] Figure 5 The effect schematic diagram of the dynamic digital model corresponding to the predetermined road area generated according to the embodiment of the present invention is shown. In the embodiment of the present invention, by generating the dynamic digital model corresponding to the predetermined road area, the predetermined road area can be dynamically rendered and displayed in real time. It should be understood that the dynamic digital model contains both the current grid position information of each target object and the speed information of each target object. In other words, the computing device 200 can determine the current grid position information of each target object and / or the speed information of each target object based on the dynamic digital model.
[0074] Step 360 , the computing device 200 may analyze the predetermined road area corresponding to the grid traffic picture (road condition analysis) based on the dynamic digital model to determine the traffic conditions of the predetermined road area.
[0075] In an embodiment of the present invention, the traffic conditions of the predetermined road area may include the degree of traffic flow and / or traffic accident information, wherein the traffic accident information is used to indicate whether a traffic accident occurs in the predetermined road area.
[0076] It should be noted that the degree of traffic flow can be represented by, for example, traffic congestion or traffic flow. Further, the degree of traffic flow can also be represented by dividing the predetermined road area into a plurality of traffic condition areas including a traffic congestion area and a traffic flow area.
[0077] In some embodiments, in step 340, the computing device 200 may draw and generate a quadratic Bezier curve based on the initial grid position information and the current grid position information of any target object, and use the drawn quadratic Bezier curve (smooth curve) as the movement trajectory of any target object.
[0078] It should be noted that when generating a quadratic Bezier curve, the point corresponding to the initial grid position information of the target object can be used as the starting point (P0) of the action trajectory, the point corresponding to the current grid position information of the target object can be used as the end point (P2) of the action trajectory, and the intersection of the extended line of the action direction of the target object at the starting point (P0) and the extended line of the action direction of the target object at the end point (P2) can be used as the middle point (P1). Furthermore, a quadratic Bezier curve can be drawn based on the starting point (P0), middle point (P1) and end point (P2) of the action trajectory.
[0079] In some embodiments, in step 320, the computing device 200 can perform grid segmentation on the current traffic picture to generate a grid traffic picture by mapping the current traffic picture based on the Beidou grid code to divide the predetermined road area corresponding to the current traffic picture into a plurality of grid units, and mapping each target object in the current traffic picture to the corresponding grid unit, thereby obtaining a grid traffic picture. Each grid unit corresponds to a unique grid code, so that the grid location information can be determined based on the grid code.
[0080] In some embodiments, grid segmentation can be performed based on the real geographic information of the video acquisition device to generate a grid traffic picture. In this way, the grid position information determined based on the grid traffic picture is absolute grid position information, which is suitable for multi-fusion scenarios in which traffic video data of a predetermined road area is collected through multiple video acquisition devices (corresponding to multiple collection points).
[0081] For example, the computing device 200 can be connected to the Beidou satellite navigation system, which can be used to provide high-precision geographic location information services. In this way, the computing device 200 can use the Beidou satellite navigation system to determine the real geographic information (such as longitude and latitude coordinates) of the video acquisition device 110, and can use the Beidou satellite navigation system to generate a corresponding Beidou grid code based on the real geographic information of the video acquisition device 110. Furthermore, the current traffic picture of the traffic video data can be mapped based on the generated Beidou grid code.
[0082] It should be noted that the prior art uses longitude and latitude to represent geographic location information, and the calculation process of traffic video data is complicated, requiring complex spatial calculations. The present invention generates a grid traffic picture by gridding the traffic picture collected in real time by the video acquisition device, which can abstract the spatial position into a visual grid representation, greatly reducing the amount of calculation based on grid coding, avoiding complex spatial calculations, and the calculation speed is 10 times faster than the prior art.
[0083] In some embodiments, in step 360, the specific method in which the computing device 200 analyzes the predetermined road area corresponding to the grid traffic picture based on the dynamic digital model is as follows: based on the dynamic digital model, determine the number of target objects and / or the speed of each target object in each grid unit in the grid traffic picture. Then, based on the number of target objects and / or the speed of each target object in each grid unit, determine the traffic conditions of the predetermined road area.
[0084] Furthermore, the computing device 200 may determine the average speed of the target objects in each grid unit based on the number of target objects in each grid unit in the grid traffic picture and the speed of each target object, and determine the degree of traffic smoothness in a predetermined road area based on the average speed of the target objects in each grid unit.
[0085] It should be noted that the number of target objects in each grid cell (that is, the density of target objects in the grid cell) can be used to evaluate the density of traffic flow. However, high density does not necessarily mean that traffic is congested, and speed indicators need to be considered at the same time. Therefore, the average speed of the target objects in each grid cell can be calculated based on the number of target objects in each grid cell in the grid traffic picture and the speed of each target object. The average speed of the target objects in each grid cell can be used to evaluate the degree of traffic smoothness.
[0086] In some embodiments, in step 360, determining the traffic conditions of the predetermined road area based on the number of target objects in each grid unit and / or the speed of each target object may further include the following steps:
[0087] The computing device 200 may use a local outlier factor algorithm to determine a local outlier factor value (LOF value) corresponding to each grid cell based on the number of target objects (ie, target object density) in each grid cell in the grid traffic picture.
[0088] Based on the local abnormality factor value corresponding to each of the grid cells, it is determined whether the target object (for example, a vehicle group consisting of multiple vehicles) in each grid cell is abnormal, so as to determine whether a traffic accident occurs in the predetermined road area, and the abnormality includes sudden deceleration or stagnation.
[0089] If it is determined that the target object in any grid unit is abnormal, it is determined that a traffic accident has occurred at a location corresponding to any grid unit in the predetermined road area. If the target objects in all grid units are normal, it can be determined that no traffic accident has occurred in the predetermined road area.
[0090] Specifically, the number of target objects in each grid unit can be taken as a data point, and the size of the grid unit can correspond to the proximity distance. For each data point (the number of target objects in each grid unit), the proximity distance between the data point and other data points (the number of target objects in other grid units) is calculated (which can be represented by the size of the grid unit). In addition, for each data point, the set of neighboring points within the specified radius of the data point is determined (including multiple neighboring points of the data point). Subsequently, for each data point, the average density of the data point and each neighboring point of the data point can be calculated (which can be represented by calculating the inverse of the average value of the distance from the data point to each neighboring point of the data point). Furthermore, for each data point, the local anomaly factor value (LOF value) of the data point can be calculated. Since each data point corresponds to a grid unit, the local anomaly factor value corresponding to each grid unit can be obtained.
[0091] It should be noted that the local anomaly factor value of a data point is used to indicate the degree of abnormality of the data point relative to the density of each neighboring point of the data point. Therefore, based on the local anomaly factor value (LOF value) of the data point, it can be determined whether the data point is abnormal, that is, based on the local anomaly factor value (LOF value) of the data point, the data point can be classified as a normal point or an abnormal point, and it can usually be determined based on the threshold of the LOF value whether the data point is an abnormal point. Accordingly, based on the local anomaly factor value corresponding to each of the grid cells, it can be determined whether the target object in each grid cell is abnormal.
[0092] The local anomaly factor value of a data point can be obtained by calculating the ratio of the local reachable density of the data point to the local reachable density of each of the neighboring points of the data point. The lower the ratio, the more likely the data point is to be an anomaly.
[0093] The calculation formula of local reachability density is as follows:
[0094]
[0095] In the formula, dist k (p) represents the distance between data point p and its kth nearest neighbor, avg k (·) means calculating the average distance of the k nearest neighboring points.
[0096] The calculation formula of the local anomaly factor is as follows:
[0097]
[0098] Where N(p) represents the set of neighboring points of data point p, LRD(o) represents the local reachable density of neighboring point oo, and |N(p)| represents the number of neighboring points contained in the neighboring point set.
[0099] In some embodiments, in step 360, the predetermined road area corresponding to the grid traffic picture can also be analyzed based on the dynamic digital model to determine the traffic conditions of the predetermined road area in the following manner: based on the dynamic digital model, determine the current grid position information of each target object in the grid traffic picture; use the K-Means clustering algorithm to cluster the current grid position information of each target object in the grid traffic picture to divide the predetermined road area corresponding to the grid traffic picture into multiple traffic condition areas. Here, the divided multiple traffic condition areas may include traffic congestion areas and traffic free areas.
[0100] It should be noted that the current grid position information of each target object (target object) can be taken as a data point to obtain a data set containing multiple data points, and the K-Means clustering algorithm is used to cluster the data points in the data set to form multiple clusters, and each data point is assigned to a corresponding cluster, and each cluster represents a traffic condition area (such as a traffic congestion area or a traffic smooth area).
[0101] Clustering each data point using the K-Means clustering algorithm may include the following steps E1 to E5:
[0102] E1. Randomly select K initial cluster centers, each of which can be any data point in the data set.
[0103] E2. For each data point in the data set, calculate the distance between the data point and the K initial cluster centers, and assign the data point to the cluster corresponding to the initial cluster center that is closest to it.
[0104] E3. For each cluster, calculate the average value of all data points in the cluster and use the average value as the new cluster center.
[0105] E4. Repeat the above steps E2 to E3 until the cluster center no longer changes or the number of iterations reaches a predetermined number of iterations.
[0106] E5. Based on the finally obtained K cluster centers, corresponding K clusters can be formed, and each data point is assigned to a corresponding cluster.
[0107] Furthermore, after dividing the predetermined road area corresponding to the grid traffic picture into a plurality of traffic condition areas, the computing device 200 may also determine the number of target objects and the speed of each target object in each traffic condition area based on the dynamic digital model to determine the average speed of the target objects in each traffic condition area. Based on the average speed of the target objects in each traffic condition area, the degree of traffic flow in each traffic condition area may be further determined.
[0108] According to the traffic video data processing method 300 of the present invention, by gridding the traffic picture collected by the video acquisition device in real time, a grid traffic picture is generated, the initial grid position information of each target object in the grid traffic picture is determined, and a static digital model corresponding to the predetermined road area is constructed based on the initial grid position information of each target object (vehicle), and when any target object in the grid traffic picture is detected to move, the current grid position information of any target object is determined, and the action trajectory of any target object is generated accordingly, and then a dynamic digital model corresponding to the predetermined road area is generated, and the predetermined road area corresponding to the grid traffic picture can be analyzed based on the dynamic digital model to determine the traffic road condition of the predetermined road area. According to the technical solution of the present invention, by gridding the traffic picture collected by the video acquisition device in real time to generate a grid traffic picture, the spatial position can be abstracted into a visual grid representation, so that the spatial position information can be determined efficiently and quickly, complex spatial calculations are avoided, the amount of calculation is greatly reduced, and the efficiency of traffic video data processing is improved; and by analyzing the road condition based on the dynamic digital model generated by the grid traffic picture, the road condition can be analyzed intuitively and efficiently, and various road condition events can be handled in a timely manner.
[0109] In addition, the present invention also discloses the following embodiments: A8, a method as described in any one of A1-A7, wherein, based on the initial grid position information and current grid position information of any target object, generating the movement trajectory of any target object, comprises: based on the initial grid position information and current grid position information of any target object, drawing and generating a quadratic Bezier curve as the movement trajectory of any target object. A9, a method as described in any one of A1-A8, wherein, grid segmenting the current traffic picture to generate a grid traffic picture comprises: mapping the current traffic picture based on the Beidou grid code to divide the predetermined road area corresponding to the current traffic picture into a plurality of grid units, and mapping each target object in the current traffic picture to the corresponding grid unit to obtain a grid traffic picture; wherein, each grid unit corresponds to a unique grid code, so as to determine the grid position information based on the grid code. B13, a readable storage medium storing program instructions, when the program instructions are read and processed by a computing device, enables the computing device to process the method as described in any one of A1-A9.
[0110] The various techniques described herein may be implemented in combination with hardware or software, or a combination thereof. Thus, the method and apparatus of the present invention, or some aspects or parts of the method and apparatus of the present invention may be in the form of program codes (i.e., instructions) embedded in a tangible medium, such as a removable hard disk, a USB flash drive, a floppy disk, a CD-ROM, or any other machine-readable storage medium, wherein when the program is loaded into a machine such as a computer and executed by the machine, the machine becomes a device for practicing the present invention.
[0111] In the case where the program code is executed on a programmable computer, the mobile terminal generally includes a processor, a storage medium readable by the processor (including volatile and non-volatile memory and / or storage elements), at least one input device, and at least one output device. The memory is configured to store the program code; the processor is configured to execute the traffic video data processing method of the present invention according to the instructions in the program code stored in the memory.
[0112] By way of example and not limitation, readable media include readable storage media and communication media. Readable storage media stores information such as computer readable instructions, data structures, program modules or other data. Communication media generally embody computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transmission mechanism, and include any information transfer medium. Any combination of the above is also included within the scope of readable media.
[0113] In the description provided herein, algorithms and displays are not inherently related to any particular computer, virtual system or other device. Various general purpose systems can also be used together with the examples of the present invention. According to the above description, it is obvious that the structure required for constructing such systems. In addition, the present invention is not directed to any specific programming language either. It should be understood that various programming languages can be utilized to implement the content of the present invention described herein, and the above description of specific languages is for the purpose of disclosing the best mode of the present invention.
[0114] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.
[0115] Similarly, it should be understood that in order to streamline the present disclosure and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof.
[0116] Those skilled in the art will appreciate that the modules or units or components of the devices in the examples disclosed herein may be arranged in the devices described in the embodiment, or alternatively may be located in one or more devices different from the devices in the examples. The modules in the foregoing examples may be combined into one module or may be divided into multiple submodules.
[0117] Unless otherwise specified, the use of ordinal numbers "first", "second", "third", etc. to describe common objects merely indicates that different instances of similar objects are involved and is not intended to imply that the objects so described must have a given order in time, space, order or in any other manner.
Claims
1. A method for processing traffic video data, executed in a computing device, wherein the computing device is communicatively connected to one or more video acquisition devices, the method comprising: Acquire traffic video data of a predetermined road area collected in real time by the video acquisition device, wherein the traffic video data includes a current traffic picture; Dividing the current traffic picture into grids to generate a grid traffic picture; Determining initial grid position information of each target object in the grid traffic picture, and constructing a stationary digital model corresponding to the predetermined road area based on the initial grid position information of each target object, wherein the target object includes a vehicle; In response to detecting movement of any target object in the grid traffic picture, determining current grid position information of any target object, and generating a movement trajectory of any target object based on initial grid position information and current grid position information of any target object; generating a dynamic digital model corresponding to the predetermined road area based on the static digital model and the movement trajectory of any target object; Based on the dynamic digital model, the predetermined road area corresponding to the grid traffic picture is analyzed to determine the traffic conditions of the predetermined road area, wherein the traffic conditions include the degree of traffic smoothness and / or traffic accident information, and the traffic accident information is used to indicate whether a traffic accident occurs in the predetermined road area.
2. The method of claim 1, wherein: Based on the dynamic digital model, analyzing the predetermined road area corresponding to the grid traffic picture to determine the traffic conditions of the predetermined road area includes: Determining the number of target objects and / or the speed of each target object in each grid cell in the grid traffic picture based on the dynamic digital model; The traffic condition of the predetermined road area is determined based on the number of target objects in each grid unit and / or the speed of each target object.
3. The method of claim 2, wherein: Determining the traffic conditions of the predetermined road area based on the number of target objects in each grid unit and / or the speed of each target object includes: Determining an average speed of the target objects in each grid cell based on the number of target objects in each grid cell in the grid traffic picture and the speed of each target object; The degree of traffic flow in the predetermined road area is determined based on the average speed of the target objects in each grid unit.
4. The method according to claim 2 or 3, wherein: Determining the traffic conditions of the predetermined road area based on the number of target objects in each grid unit and / or the speed of each target object, further comprising: Determine a local anomaly factor value corresponding to each grid cell based on the number of target objects in each grid cell in the grid traffic picture by using a local anomaly factor algorithm; Based on the local abnormality factor value corresponding to each of the grid units, it is determined whether the target object in each of the grid units is abnormal, so as to determine whether a traffic accident occurs in the predetermined road area, wherein the abnormality includes sudden deceleration or stagnation.
5. The method of claim 4, wherein: Determining whether a traffic accident occurs in the predetermined road area includes: If it is determined that the target object in any grid unit is abnormal, it is determined that a traffic accident occurs at a position corresponding to any grid unit in the predetermined road area.
6. The method according to any one of claims 1 to 5, wherein: Based on the dynamic digital model, analyzing the predetermined road area corresponding to the grid traffic picture to determine the traffic conditions of the predetermined road area further includes: Determining current grid position information of each target object in the grid traffic picture based on the dynamic digital model; Using a K-Means clustering algorithm, clustering the current grid position information of each target object in the grid traffic picture, so as to divide the predetermined road area corresponding to the grid traffic picture into a plurality of traffic condition areas; Among them, the multiple traffic condition areas include traffic congestion areas and traffic smooth areas.
7. The method of claim 6, wherein: Also includes: Determining the number of target objects and the speed of each target object in each of the traffic condition areas based on the dynamic digital model, so as to determine an average speed of the target objects in each of the traffic condition areas; Based on the average speed of the target object in each of the traffic condition areas, the traffic flow degree of each of the traffic condition areas is determined.
8. A traffic video data processing system, comprising: One or more video acquisition devices, wherein the video acquisition devices are suitable for acquiring traffic video data of a predetermined road area in real time; A computing device is communicatively connected to one or more video acquisition devices, wherein a traffic video data processing device is deployed in the computing device, and the traffic video data processing device includes: An acquisition unit, adapted to acquire traffic video data of a predetermined road area acquired in real time by the video acquisition device, wherein the traffic video data includes a current traffic picture; A grid segmentation unit, adapted to perform grid segmentation on the current traffic picture to generate a grid traffic picture; A construction unit, adapted to determine initial grid position information of each target object in the grid traffic picture, and construct a static digital model corresponding to the predetermined road area based on the initial grid position information of each target object, wherein the target object includes a vehicle; a trajectory generating unit, adapted to, in response to detecting movement of any target object in the grid traffic picture, determine current grid position information of any target object, and generate a movement trajectory of any target object based on initial grid position information and current grid position information of any target object; A model generation unit, adapted to generate a dynamic digital model corresponding to the predetermined road area based on the static digital model and the movement trajectory of any target object; The analysis unit is suitable for analyzing the predetermined road area corresponding to the grid traffic picture based on the dynamic digital model to determine the traffic conditions of the predetermined road area, wherein the traffic conditions include the degree of traffic smoothness and / or traffic accident information, and the traffic accident information is used to indicate whether a traffic accident occurs in the predetermined road area.
9. A computing device comprising: at least one processor; and A memory storing program instructions, wherein the program instructions are configured to be processed by the at least one processor, and the program instructions include instructions for processing the method according to any one of claims 1 to 7.
10. A computer program product comprising a computer program / instructions, wherein: When the computer program / instructions are executed by a processor, the method according to any one of claims 1 to 7 is implemented.
