Vehicle-mounted video analysis method and analysis system
By building a collection of NALU and FLV to analyze vehicle video data and using the JT808 protocol to communicate with vehicle equipment, the problem of slow processing speed of the vehicle video analysis system is solved, and the user's experience of watching in-car videos is improved in real time.
Patent Information
- Application Number
- CN202411201245.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-29
- Publication Date
- 2024-12-20
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing in-vehicle video analysis system takes a long time to process video data, resulting in a decrease in user experience of watching in-vehicle videos, especially as the number of intelligent connected vehicles increases rapidly.
By constructing NALU sets and FLV sets, the received on-board video data is analyzed, the JT808 protocol is used to communicate with the vehicle equipment, the video data is sent to the video decoding server, and the parsed video is sent to the unified resource locator to provide the playback address to the user .
It improves the parsing and processing speed of on-board videos, enables users to watch the required videos in real time, and improves the viewing experience.
Smart Images

Figure CN119172592A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of video analysis, and in particular to a vehicle-mounted video analysis method and analysis system. Background Art
[0002] In recent years, with the rapid development of 4 / 5G networks and intelligent driving technology, road test vehicles need to be equipped with video surveillance systems to monitor road conditions and driver orientation. The on-board video of road test vehicles is usually controlled by commands, and the user who watches the on-board video controls the on-board video streaming on the page. As the number of intelligent connected vehicles is growing rapidly, the corresponding amount of on-board video data is also growing rapidly, and the video platform's analysis of video data consumes a lot of system resources, resulting in the existing analysis system taking a long time to parse the video data, reducing the user's experience of watching on-board videos. Summary of the invention
[0003] In order to solve the above problems, the present invention provides a vehicle-mounted video analysis method and analysis system. The specific technical solution of the present invention is as follows:
[0004] A vehicle-mounted video parsing method, the method comprising the following steps: S1: a parsing system receives a viewing request for viewing a vehicle-mounted video sent by a user, then identifies the viewing request and identifies the vehicle code of a target vehicle in the viewing request; S2: after determining the vehicle code in the viewing request, the parsing system establishes a communication connection with the vehicle-mounted device of the vehicle corresponding to the vehicle code; S3: after the parsing system establishes a communication connection with the vehicle-mounted device, the parsing system sends a video sending command to the vehicle-mounted device, so that the vehicle-mounted device sends the corresponding vehicle-mounted video data to the parsing system; S4: after receiving the vehicle-mounted video data, the parsing system parses the received vehicle-mounted video data by constructing a NALU set and an FLV set, and sends the parsed vehicle-mounted video to a uniform resource locator; S5: the parsing system sends the playback address of the uniform resource locator to the user, so that the user plays the vehicle-mounted video to be viewed in the viewing request through the playback address.
[0005] Furthermore, the vehicle code is a license plate number, a frame number or a number assigned to the vehicle by a parsing system.
[0006] Furthermore, in step S1, after receiving a viewing request sent by a user to view an in-vehicle video, the parsing system determines the vehicle code of the target vehicle in the viewing request according to the license plate number input by the user through a mobile device in the viewing request.
[0007] Furthermore, in step S2, the analysis system communicates with the on-board equipment of the vehicle corresponding to the vehicle code through the JT808 protocol.
[0008] Further, in step S3, after the analysis system establishes a communication connection with the on-board device of the vehicle corresponding to the vehicle code, it sends an information transmission command to the on-board device through the JT808 protocol, so that the on-board device pushes the original video stream data of the vehicle corresponding to the vehicle code to the video decoding server address and data receiving port of the analysis system, wherein the information transmission command includes but is not limited to the bitstream type, data type, video decoding server address and data receiving port.
[0009] Further, in step S4, the parsing system parses the received vehicle-mounted video data by constructing a NALU set and an FLV set, including the following steps: after receiving the original video stream data pushed by the vehicle-mounted device, the video decoding server of the parsing system The read0 method serializes the original video stream data into a Packet object with a byte array; the parsing system uses the System.arraycopy method to deep copy the byte array of the Packet object to the NALU set, and then creates a 16-bit FLV set, which is used to store the header information of the FLV, wherein the header information includes but is not limited to the identification and version information of the FLV; the parsing system adds SPS and PPS to the specified number of bits of the metadata information of the FLV in the FLV set according to the data length of the NALU set, and modifies the corresponding number of bits to 0 or 1; the parsing system traverses each byte in the NALU set, and then writes the traversed bytes to the FLV set according to the FLV data format to complete the data transcoding; the parsing system writes the transcoded FLV set to the outbound buffer, and then serializes the data in the outbound buffer according to the vehicle code and sends it to the corresponding uniform resource locator; the parsing system gives the playback address of the uniform resource locator to the user, so that the user can watch the in-vehicle video that needs to be watched according to the playback address.
[0010] A parsing system is provided, wherein the parsing system parses vehicle-mounted video by using the above-mentioned vehicle-mounted video parsing method, and the parsing system comprises a video decoding server.
[0011] Compared with the existing technology, the beneficial effect of the present invention is that the parsing system described in the system parses the received vehicle-mounted video data by constructing a NALU set and an FLV set, thereby improving the processing speed of the parsing system for the vehicle-mounted video, and then puts the parsed vehicle-mounted video into a dedicated uniform resource locator and sends the corresponding playback address to the user, so that the user can watch the vehicle-mounted video that needs to be watched in real time, thereby improving the user's viewing experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 The figure is a flow chart of a vehicle-mounted video analysis method in one embodiment of the present invention. DETAILED DESCRIPTION
[0013] Embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions.
[0014] In the description of the present invention, it should be noted that directional words, such as the terms "center", "lateral", "longitudinal", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise", etc., indicating directions and positional relationships are based on the directions or positional relationships shown in the accompanying drawings, which are only for the convenience of narrating the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and cannot be understood as limiting the specific scope of protection of the present invention.
[0015] In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features. Therefore, the definition of "first" and "second" features can explicitly or implicitly include one or more of the features. In the description of the present invention, "at least" means one or more, unless otherwise clearly and specifically defined.
[0016] In the present invention, unless otherwise specified and limited, the terms "assemble", "connect", and "connection" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can also be a mechanical connection; it can be directly connected, or it can be connected through an intermediate medium, or the two elements can be internally connected. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0017] In the invention, unless otherwise specified and limited, a first feature being “above” or “below” a second feature may include that the first and second features are in direct contact, or may include that the first and second features are not in direct contact but are in contact through another feature between them. Moreover, a first feature being “above”, “below”, and “above” a second feature includes that the first feature is directly above or obliquely above the second feature, or simply means that the first feature is higher in level than the second feature. A first feature being “above”, “below”, and “below” a second feature includes that the first feature is directly below or obliquely below the second feature, or simply means that the first feature is lower in level than the second feature.
[0018] The following is a further description of the specific embodiments of the present invention in conjunction with the drawings of the specification, so that the technical solution and beneficial effects of the present invention are clearer and more explicit. The following description of the embodiments with reference to the drawings is exemplary and intended to explain the present invention, but cannot be understood as limiting the present invention.
[0019] NALU is the highest abstract layer of H.264 (highly compressed digital video codec standard). All syntax structures of H.264 are ultimately encapsulated into NALU. Appropriate delimiters must be defined for NALU units in the code stream. The main parts of the H.264 standard are Access Unit delimiter, SEI (additional enhancement information), primary coded picture, and Redundant Coded Picture. There are also Instantaneous Decoding Refresh (IDR), Hypothetical Reference Decoder (HRD), and Hypothetical Stream Scheduler (HSS).
[0020] FLV is the abbreviation of FLASH VIDEO. The FLV streaming media format is a video format developed with the launch of Flash MX. Because the files it forms are extremely small and the loading speed is extremely fast, it makes it possible to watch video files on the Internet. Its appearance effectively solves the problem that after the video files are imported into Flash, the exported SWF files are large in size and cannot be used well on the Internet. The FLV encapsulation format consists of a file header (flie header) and a file body (file Body). Among them, the FLV body consists of a pair of (Previous Tag Size field + tag (metadata)). The Previous TagSize field is arranged before the tag and occupies 4 bytes. The Previous Tag Size records the size of the previous tag and is used for reverse reading processing. The value of the first Pervious Tag Size after the FLV header is 0. Tags can generally be divided into three types: script (frame) data type, audio data type, and video data.
[0021] The Packet object is a unit of data in TCP / IP protocol communication transmission, often referred to as a data packet. In a packet switching network, a single message is divided into multiple data blocks, which are called packets, each of which contains the address information of the sender and the receiver. These packets are transmitted along different paths in one or more networks and reassembled at the destination. Packet objects are often used in programming to handle the reading, parsing, and sending of these data packets. Packet objects can contain multiple types of data, such as Boolean values (BoolType), byte arrays (ByteArrayType), bytes (ByteType), characters (CharType), 32-bit integers (Int32Type), and strings (StringType). For example, you can use the Packet object to read Boolean values, byte arrays, single bytes, characters, integers, and string data. These operations are usually implemented by calling the corresponding methods of the Packet object, such as ReadBool(), ReadBytes(), ReadByte(), ReadChar(), ReadInt32(), and ReadString().
[0022] The SPS (Sequence Parameter Set) in H.264 is a parameter set used to describe the characteristics and configuration information of a video sequence. SPS is a metadata unit in the H.264 video stream, which contains the settings of the video encoder and the characteristics of the video sequence. PPS (Picture Parameter Set) is a parameter set in the H.264 / AVC video coding standard, which is used to describe the encoding parameters of video frames. It contains some parameters related to image processing and encoding, such as image size, frame rate, color space, etc. PPS is usually used together with SPS (Sequence Parameter Set) to jointly define the encoding parameters of the video sequence.
[0023] Uniform resource locator (URL) is a method of specifying the location of information on the World Wide Web service program of the Internet. Available resources on the Internet can be represented by simple strings, and this document describes the syntax and semantics of such strings. These strings are called "Uniform Resource Locators" (URL).
[0024] like Figure 1As shown, a vehicle video parsing method includes the following steps: S1: the parsing system receives a viewing request for viewing a vehicle video sent by a user, and then identifies the viewing request and identifies the vehicle code of the target vehicle in the viewing request. The user can send the viewing request through a vehicle device, or through a mobile device such as a mobile phone or a computer. S2: after determining the vehicle code in the viewing request, the parsing system communicates with the vehicle device of the vehicle corresponding to the vehicle code. S3: after the parsing system communicates with the vehicle device, it sends a video sending command to the vehicle device, so that the vehicle device sends the corresponding vehicle video data to the parsing system. S4: after receiving the vehicle video data, the parsing system parses the received vehicle video data by constructing a NALU set and an FLV set, and sends the parsed vehicle video to a uniform resource locator. S5: the parsing system sends the playback address of the uniform resource locator to the user, so that the user plays the vehicle video to be viewed in the viewing request through the playback address.
[0025] As one embodiment, the vehicle code is the license plate number, the frame number or the number assigned to the vehicle by the parsing system. After the vehicle is connected to the parsing system, the parsing system can directly use the vehicle number or the frame number as the vehicle code of the vehicle. The license plate number and the frame number are unique, which can effectively prevent the vehicle code of the vehicle from being repeated. Alternatively, the parsing system can sequentially number the vehicles according to the connection sequence between the vehicle and the parsing system, such as 1, 2, 3, etc., and use the number as the vehicle code of the vehicle. The parsing system can construct the vehicle code by numbering the vehicle. The parsing system can quickly determine the vehicle code of the vehicle without the need for the parsing system to identify or the user to upload the license plate number and frame number.
[0026] As one embodiment, in step S1, after the parsing system receives a viewing request for viewing an in-vehicle video sent by a user, if the user sends the viewing request via a mobile device (a mobile phone, a tablet, or a laptop, etc.), the user needs to enter the license plate number of the vehicle to be viewed when sending the viewing request, and the parsing system determines the vehicle to be viewed in the viewing request based on the license plate number of the vehicle entered by the user in the viewing request. If the user sends the viewing request via an in-vehicle device, the parsing system can determine the vehicle code to which the in-vehicle device belongs based on the sending address of the viewing request.
[0027] As one of the embodiments, in step S2, the parsing system communicates with the on-board equipment of the vehicle corresponding to the vehicle code through the JT808 protocol. The JT / T 808 protocol is an industry standard formulated by the Ministry of Transport of China to regulate the data communication between the satellite positioning system terminal of road transport vehicles and the monitoring center. The full name is "Road Transport Vehicle Satellite Positioning System Terminal Communication Protocol and Data Format". This protocol is mainly used to guide how the on-board terminal (such as GPS positioning equipment) exchanges data with the monitoring service platform, including the upload of the vehicle's location information, status information, alarm information, etc., as well as the format and transmission rules of downlink information such as control instructions and setting parameters sent by the platform to the on-board terminal.
[0028] As one of the embodiments, in step S3, after the analysis system establishes a communication connection with the on-board device of the vehicle corresponding to the vehicle code, it sends an information transmission command to the on-board device through the JT808 protocol, so that the on-board device pushes the original video stream data of the vehicle corresponding to the vehicle code to the video decoding server address and data receiving port of the analysis system, wherein the information transmission command includes but is not limited to the bitstream type, data type, video decoding server address and data receiving port.
[0029] As one of the embodiments, in step S4, the parsing system parses the received vehicle-mounted video data by constructing a NALU set and an FLV set, including the following steps: after the video decoding server of the parsing system receives the original video stream data pushed by the vehicle-mounted device, the parsing system uses the channel read0 method (the Channelread0 method is usually used to process data read from the channel. This method is used in many Java-based network programming frameworks, such as Netty.) to serialize the original video stream data into a Packet object with a byte array. The parsing system uses the System.arraycopy method (the System.arraycopy() method is a method used in Java to implement array copying. It provides the function of efficiently copying one-dimensional arrays. This method belongs to the System class and is a native static method used to perform copy operations between arrays. The System.arraycopy() method can be used to copy elements from the source array to the target array, where the source array, the starting position of the source array, the target array, the starting position of the target array, and the length to be copied can all be passed in as parameters.) to deep copy the byte array of the Packet object to the NALU collection, and then create a 16-bit FLV collection, which is used to store the header information of the FLV, where the header information includes but is not limited to the identification and version information of the FLV. According to the data length of the NALU collection, the parsing system adds SPS (SequenceParameter Set) and PPS (Picture Parameter Set) to the specified number of bits of the metadata information of the FLV in the FLV collection, and modifies the corresponding number of bits to 0 or 1. The parsing system traverses each byte in the NALU collection, and then writes the traversed bytes to the FLV collection according to the FLV data format to complete the data transcoding. The parsing system writes the transcoded FLV set to the outbound buffer, and then serializes the data in the outbound buffer according to the vehicle code and sends it to the corresponding uniform resource locator. The parsing system gives the user the playback address of the uniform resource locator, so that the user can watch the in-vehicle video that needs to be watched according to the playback address.
[0030] A parsing system is provided, wherein the parsing system parses vehicle-mounted video by using the above-mentioned vehicle-mounted video parsing method, and the parsing system comprises a video decoding server.
[0031] A control method for an on-board device. After receiving a communication request, the on-board device communicates with a parsing system through a JT808 protocol, then receives an information transmission command, and pushes the original video stream data of the vehicle to a video decoding server address and a data receiving port of the parsing system according to the information transmission command.
[0032] Compared with the existing technology, the beneficial effect of the present invention is that the parsing system described in the system parses the received vehicle-mounted video data by constructing a NALU set and an FLV set, thereby improving the processing speed of the parsing system for the vehicle-mounted video, and then puts the parsed vehicle-mounted video into a dedicated uniform resource locator and sends the corresponding playback address to the user, so that the user can watch the vehicle-mounted video that needs to be watched in real time, thereby improving the user's viewing experience.
[0033] In the description of the specification, the description with reference to the terms "one embodiment", "preferably", "example", "specific example" or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention, and the schematic expressions of the above terms in this specification do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. The connection method connected in the description of the specification has obvious effects and practical effectiveness.
[0034] Through the description of the above structure and principle, technicians in the relevant technical field should understand that the present invention is not limited to the above-mentioned specific implementation methods. Improvements and substitutions based on the present invention using the well-known technology in the field all fall within the protection scope of the present invention and should be defined by the claims.
Claims
1. A vehicle-mounted video analysis method, characterized in that: The method comprises the following steps: S1: The parsing system receives a viewing request sent by a user to view an in-vehicle video, and then identifies the viewing request and identifies a vehicle code of a target vehicle in the viewing request; S2: After determining the vehicle code in the viewing request, the parsing system establishes a communication connection with the onboard device of the vehicle corresponding to the vehicle code; S3: After the analysis system is connected to the vehicle-mounted device through communication, a video sending command is sent to the vehicle-mounted device, so that the vehicle-mounted device sends the corresponding vehicle-mounted video data to the analysis system; S4: After receiving the vehicle video data, the parsing system parses the received vehicle video data by constructing a NALU set and an FLV set, and sends the parsed vehicle video to the uniform resource locator; S5: The parsing system sends the playback address of the uniform resource locator to the user, so that the user can play the in-vehicle video to be viewed in the viewing request through the playback address.
2. The vehicle-mounted video analysis method according to claim 1, characterized in that: The vehicle code is the license plate number, frame number or the number assigned to the vehicle by the parsing system.
3. The vehicle-mounted video analysis method according to claim 1, characterized in that: In step S1, after receiving a viewing request for viewing an in-vehicle video sent by a user, the parsing system determines the vehicle code of the target vehicle in the viewing request according to the license plate number input by the user through a mobile device in the viewing request.
4. The vehicle-mounted video analysis method according to claim 3, characterized in that: In step S2, the analysis system communicates with the on-board equipment of the vehicle corresponding to the vehicle code through the JT808 protocol.
5. The vehicle-mounted video analysis method according to claim 4, characterized in that: In step S3, after the analysis system establishes a communication connection with the on-board device of the vehicle corresponding to the vehicle code, it sends an information transmission command to the on-board device through the JT808 protocol, so that the on-board device pushes the original video stream data of the vehicle corresponding to the vehicle code to the video decoding server address and data receiving port of the analysis system, wherein the information transmission command includes but is not limited to the bitstream type, data type, video decoding server address and data receiving port.
6. The vehicle-mounted video analysis method according to claim 5, characterized in that: In step S4, the parsing system parses the received vehicle video data by constructing a NALU set and an FLV set, including the following steps: After receiving the original video stream data pushed by the vehicle-mounted device, the video decoding server of the parsing system serializes the original video stream data into a Packet object with a byte array through the channel read0 method; The parsing system uses the System.arraycopy method to deep copy the byte array of the Packet object to the NALU set, and then creates a 16-bit FLV set, which is used to store the header information of the FLV, wherein the header information includes but is not limited to the identifier and version information of the FLV; The parsing system adds SPS and PPS to the specified number of bits of the metadata information of the FLV of the FLV set according to the data length of the NALU set, and modifies the corresponding number of bits to 0 or 1; The parsing system traverses each byte in the NALU set, and then writes the traversed bytes into the FLV set according to the FLV data format to complete the data transcoding; The parsing system writes the transcoded FLV set to the outbound buffer, and then serializes the data in the outbound buffer according to the vehicle code and sends it to the corresponding uniform resource locator; The parsing system provides the playback address of the uniform resource locator to the user, so that the user can watch the in-vehicle video that needs to be watched according to the playback address.
7. A parsing system, characterized in that: The analysis system analyzes the in-vehicle video by the in-vehicle video analysis method according to any one of claims 1 to 6, and the analysis system includes a video decoding server.
Citation Information
Patent Citations
Video processing method, device, equipment and medium
CN110611830A
Video stream transcoding method and device based on H.264 format, equipment and medium
CN115942000A
Real-time audio and video playing method
CN116614686A
Vehicle-mounted video friendly watching method and system for road test vehicle
CN117218838A
Vehicle data acquisition and transmission control system
CN209928493U
