Evidence obtaining method, device and equipment for data of automobile data recorder and storage medium
By connecting the mobile hotspot of the dash recorder, obtaining its hardware parameters, network interface configuration and audio and video data, the problem of cumbersome and inconvenient acquisition of dash recorder data in the existing technology is solved, and the remote real-time acquisition and transmission of dash recorder data is realized, and evidence collection efficiency and credibility of the evidence link are improved.
Patent Information
- Application Number
- CN202510112988.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-24
- Publication Date
- 2025-05-02
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The data acquisition method of existing dash recorders is complicated and can easily lead to data loss or damage, making it difficult to remotely obtain and transmit data in real time.
By connecting to the mobile hotspot of the dash recorder, it obtains its hardware parameters, network interface configuration and audio and video data, and packages these data into evidence data to achieve remote real-time acquisition and transmission.
It improves the efficiency of evidence collection, enhances the credibility of the evidence link, and ensures the integrity and accuracy of the data.
Smart Images

Figure CN119920029A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of automobile evidence collection, and in particular to a method, device and storage medium for collecting evidence from a driving recorder. Background Art
[0002] With the rapid development of the automobile industry and the advancement of intelligent technology, driving recorders, as an important vehicle-mounted device, have been widely popularized and applied. By recording audio and video data during vehicle driving, driving recorders provide important evidence for traffic accident handling, road safety supervision and other fields. As a wireless communication technology, WiFi technology has the advantages of fast transmission speed, wide coverage, and stable connection, and has been widely used in driving recorders. Although existing driving recorders and WiFi technologies have made certain progress, there are still some limitations in data acquisition and transmission. For example, existing driving recorders can usually only store and transmit data through physical media such as memory cards, making it difficult to remotely acquire and transmit data in real time.
[0003] In the fields of traffic accident handling and road safety supervision, the data from dashcams is often used as an important basis for evidence collection. However, the traditional way of acquiring dashcam data has many inconveniences, such as the need to take out the memory card and connect it to the computer for reading, which is not only cumbersome to operate, but also easy to cause data loss or damage during the data transmission process. In addition, since dashcams are usually installed inside the vehicle, it is difficult to directly connect and transmit data physically, so a more convenient and efficient way of acquiring data is needed. Summary of the invention
[0004] In view of the above problems, the embodiments of the present invention provide a method, device and storage medium for collecting evidence of driving recorder data, aiming to solve the problems existing in the prior art, comprehensively obtain driving recorder data, and ensure the integrity of the chain of evidence while improving the efficiency of evidence collection.
[0005] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0006] In a first aspect, the present invention provides a method for collecting evidence from a driving recorder, the method comprising:
[0007] Get the mobile hotspot of the target dashcam and connect to it;
[0008] Sending a first network request to obtain hardware parameters to a target driving recorder, and saving first response data fed back by the target driving recorder into a first dictionary;
[0009] Sending a second network request to the target driving recorder to obtain network interface configuration information, and saving second response data fed back by the target driving recorder into a second dictionary;
[0010] Sending a third network request to the target driving recorder to obtain audio and video data, and saving third response data fed back by the target driving recorder into a third dictionary;
[0011] The first dictionary, the second dictionary and the third dictionary are packaged to obtain forensic data.
[0012] In one embodiment, obtaining the mobile hotspot of the target driving recorder includes:
[0013] Enumerate the names and states of the wireless network cards of external devices and specify the target wireless network card;
[0014] Enumerate the mobile hotspots scanned by the target wireless network card, and collect the network information corresponding to the corresponding mobile hotspots to obtain an original mobile hotspot network information list; the network information includes SSID, MAC address and signal strength;
[0015] Eliminate duplicate network information in the original mobile hotspot network information list to obtain a unique mobile hotspot network information list;
[0016] Determine the mobile hotspot corresponding to the target driving recorder based on the unique mobile hotspot network information list.
[0017] In one embodiment, the enumerating the name and status of the wireless network card of the external device includes:
[0018] Create a first empty list to store all wireless network card information of external devices;
[0019] Create a query interface instance to query wireless network card information;
[0020] Traversing each wireless network card of the external device based on the query interface instance, and creating a fourth dictionary storing wireless network card information each time a wireless network card is traversed, wherein the wireless network card information includes the name and status of the wireless network card;
[0021] Add the fourth dictionary created in each traversal to the first empty list to obtain a wireless network card list.
[0022] In one embodiment, the enumerating the mobile hotspots scanned by the target wireless network card and collecting the network information corresponding to the corresponding mobile hotspots to obtain the original mobile hotspot network information list includes:
[0023] Traverse the wireless network card list to find the wireless network card with the same name as the target wireless network card as the target wireless network card;
[0024] Configure a second empty list of mobile hotspots scanned by the target network card for storage;
[0025] Create a hotspot scanning instance for mobile hotspot operation;
[0026] Based on the hotspot scanning instance, the target wireless network card is controlled to scan the surrounding mobile hotspots according to the set scanning time to obtain the scanning results;
[0027] Traversing each mobile hotspot in the scan results, and creating a fifth dictionary storing parameterized mobile hotspot network information each time a mobile hotspot is traversed, wherein the mobile hotspot network information includes the SSID, MAC address, and signal strength of the mobile hotspot;
[0028] The fifth dictionary created in each traversal is added to the second empty list to obtain the original mobile hotspot network information list.
[0029] In one embodiment, the parameterization process of the mobile hotspot network information includes:
[0030] Convert the SSID of each mobile hotspot from raw bytes to UTF-8 encoding, and regard the mobile hotspots with specified encoding in UTF-8 encoding as hidden mobile hotspots;
[0031] Convert each mobile hotspot's MAC address into an integer unique identifier;
[0032] The signal gain function is used to calculate the strength value corresponding to the signal strength of each mobile hotspot.
[0033] In one embodiment, the first network request for obtaining hardware parameters is sent to the target driving recorder, and the first response data fed back by the target driving recorder is saved in the first dictionary:
[0034] Configure the first address variable pointing to the target dashcam IP address;
[0035] Configure a first path variable for accessing a target driving recorder application programming interface path;
[0036] Configure the first query parameter of the request to query the hardware parameters of the target driving recorder;
[0037] Constructing a first resource locator according to the first address variable, the first path variable and the first query parameter;
[0038] Configure the first user agent field of the virtual machine on the simulated Android device;
[0039] The configuration request is sent to the first request destination field that specifies the target dashcam IP address;
[0040] Configure a first session maintaining field carrying a session identifier for maintaining a session with a target driving recorder;
[0041] constructing a first request header according to the first user agent field, the first request destination field, and the first session persistence field;
[0042] Sending a first network request and passing in a first resource locator and a first request header, obtaining first response data fed back by the target driving recorder, wherein the first response data includes version information, manufacturer, hardware version, serial number, UUID, firmware version, MAC address, storage content, used storage space, name, and password of the target driving recorder;
[0043] Convert the first response data into JSON text data and store it in the first dictionary.
[0044] In one embodiment, the sending of a second network request to the target driving recorder to obtain network interface configuration information and the saving of second response data fed back by the target driving recorder into the second dictionary includes:
[0045] Configure the second address variable pointing to the target dashcam IP address;
[0046] Configure a second path variable for accessing a target driving recorder application programming interface path;
[0047] A second query parameter for configuring a request to query the network interface configuration of a target driving recorder;
[0048] constructing a second resource locator according to the second address variable, the second path variable and the second query parameter;
[0049] Configure the content encoding field to compress the target dashcam's response data using the gzip encoding format;
[0050] Configure a second session holding field carrying a session identifier for holding a session with a target driving recorder;
[0051] After the configuration session is completed, the target dashcam closes the connection processing field of the TCP connection;
[0052] Configure the data type field of the request body data in URL encoding format;
[0053] Configure the second user agent field of the virtual machine on the simulated Android device;
[0054] The configuration request is sent to a second request destination field that specifies the target dashcam IP address;
[0055] Configure the message body length field of the request body content length;
[0056] Construct a second request header according to the content encoding field, the second session maintenance field, the connection handling field, the data type field, the second user agent field, the second request destination field, and the message body length field;
[0057] Sending a second network request and passing in a second resource locator and a second request header, obtaining second response data fed back by the target driving recorder, wherein the second response data includes network interface configuration information of the target driving recorder;
[0058] The second response data is converted into JSON text data and stored in the second dictionary.
[0059] In a second aspect, the present invention provides a device for collecting evidence from a driving recorder, the device comprising:
[0060] Mobile hotspot connection module: used to obtain the mobile hotspot of the target driving recorder and connect to the mobile hotspot of the target driving recorder;
[0061] A first data acquisition module: used for sending a first network request for acquiring hardware parameters to a target driving recorder, and saving first response data fed back by the target driving recorder into a first dictionary;
[0062] A second data acquisition module: used for sending a second network request for acquiring network interface configuration information to a target driving recorder, and saving second response data fed back by the target driving recorder into a second dictionary;
[0063] A third data acquisition module: used for sending a third network request for acquiring audio and video data to the target driving recorder, and saving the third response data fed back by the target driving recorder into a third dictionary;
[0064] Data packaging module: used to package the first dictionary, the second dictionary and the third dictionary to obtain forensic data.
[0065] In one embodiment, the mobile hotspot connection module acquires the mobile hotspot of the target driving recorder, including:
[0066] Enumerate the names and states of the wireless network cards of external devices and specify the target wireless network card;
[0067] Enumerate the mobile hotspots scanned by the target wireless network card, and collect the network information corresponding to the corresponding mobile hotspots to obtain an original mobile hotspot network information list; the network information includes SSID, MAC address and signal strength;
[0068] Eliminate duplicate network information in the original mobile hotspot network information list to obtain a unique mobile hotspot network information list;
[0069] Determine the mobile hotspot corresponding to the target driving recorder based on the unique mobile hotspot network information list.
[0070] In one embodiment, the enumerating the name and status of the wireless network card of the external device includes:
[0071] Create a first empty list to store all wireless network card information of external devices;
[0072] Create a query interface instance to query wireless network card information;
[0073] Traversing each wireless network card of the external device based on the query interface instance, and creating a fourth dictionary storing wireless network card information each time a wireless network card is traversed, wherein the wireless network card information includes the name and status of the wireless network card;
[0074] Add the fourth dictionary created in each traversal to the first empty list to obtain a wireless network card list.
[0075] In one embodiment, the enumerating the mobile hotspots scanned by the target wireless network card and collecting the network information corresponding to the corresponding mobile hotspots to obtain the original mobile hotspot network information list includes:
[0076] Traverse the wireless network card list to find the wireless network card with the same name as the target wireless network card as the target wireless network card;
[0077] Configure a second empty list of mobile hotspots scanned by the target network card for storage;
[0078] Create a hotspot scanning instance for mobile hotspot operation;
[0079] Based on the hotspot scanning instance, the target wireless network card is controlled to scan the surrounding mobile hotspots according to the set scanning time to obtain the scanning results;
[0080] Traversing each mobile hotspot in the scan results, and creating a fifth dictionary storing parameterized mobile hotspot network information each time a mobile hotspot is traversed, wherein the mobile hotspot network information includes the SSID, MAC address, and signal strength of the mobile hotspot;
[0081] The fifth dictionary created in each traversal is added to the second empty list to obtain the original mobile hotspot network information list.
[0082] In one embodiment, the parameterization process of the mobile hotspot network information includes:
[0083] Convert the SSID of each mobile hotspot from raw bytes to UTF-8 encoding, and regard the mobile hotspots with specified encoding in UTF-8 encoding as hidden mobile hotspots;
[0084] Convert each mobile hotspot's MAC address into an integer unique identifier;
[0085] The signal gain function is used to calculate the strength value corresponding to the signal strength of each mobile hotspot.
[0086] In one embodiment, the first data acquisition module is specifically used to:
[0087] Configure the first address variable pointing to the target dashcam IP address;
[0088] Configure a first path variable for accessing a target driving recorder application programming interface path;
[0089] Configure the first query parameter of the request to query the hardware parameters of the target driving recorder;
[0090] Constructing a first resource locator according to the first address variable, the first path variable and the first query parameter;
[0091] Configure the first user agent field of the virtual machine on the simulated Android device;
[0092] The configuration request is sent to the first request destination field that specifies the target dashcam IP address;
[0093] Configure a first session maintaining field carrying a session identifier for maintaining a session with a target driving recorder;
[0094] constructing a first request header according to the first user agent field, the first request destination field, and the first session persistence field;
[0095] Sending a first network request and passing in a first resource locator and a first request header, obtaining first response data fed back by the target driving recorder, wherein the first response data includes version information, manufacturer, hardware version, serial number, UUID, firmware version, MAC address, storage content, used storage space, name, and password of the target driving recorder;
[0096] Convert the first response data into JSON text data and store it in the first dictionary.
[0097] In one embodiment, the second data acquisition module is specifically used for:
[0098] Configure the second address variable pointing to the target dashcam IP address;
[0099] Configure a second path variable for accessing a target driving recorder application programming interface path;
[0100] A second query parameter for configuring a request to query the network interface configuration of a target driving recorder;
[0101] constructing a second resource locator according to the second address variable, the second path variable and the second query parameter;
[0102] Configure the content encoding field to compress the target dashcam's response data using the gzip encoding format;
[0103] Configure a second session holding field carrying a session identifier for holding a session with a target driving recorder;
[0104] After the configuration session is completed, the target dashcam closes the connection processing field of the TCP connection;
[0105] Configure the data type field of the request body data in URL encoding format;
[0106] Configure the second user agent field of the virtual machine on the simulated Android device;
[0107] The configuration request is sent to a second request destination field that specifies the target dashcam IP address;
[0108] Configure the message body length field of the request body content length;
[0109] Construct a second request header according to the content encoding field, the second session maintenance field, the connection handling field, the data type field, the second user agent field, the second request destination field, and the message body length field;
[0110] Sending a second network request and passing in a second resource locator and a second request header, obtaining second response data fed back by the target driving recorder, wherein the second response data includes network interface configuration information of the target driving recorder;
[0111] The second response data is converted into JSON text data and stored in the second dictionary.
[0112] In a third aspect, the present invention provides an electronic device, comprising: a processor and a memory;
[0113] The memory is used to store computer programs;
[0114] The processor is used to execute a driving recorder data evidence collection method provided in any one of the first aspects by calling the computer program.
[0115] In a fourth aspect, the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium includes a program, and when the program is executed by a processor, the program is used to implement a method for collecting evidence from a driving recorder data provided in any one of the first aspects.
[0116] The beneficial effect of the present invention is that the present invention first establishes a wireless connection with the target driving recorder, sends a first network request to obtain hardware parameters to the target driving recorder, and stores the response data in the first dictionary, which can not only determine the data collection capability of the recorder at the time of the incident, but also ensure the integrity of the stored data, and provide hardware support for the chain of evidence; then sends a second network request to obtain network interface configuration information, and stores the response data in the second dictionary, which can ensure stable interactive data and accurate positioning of the recorder in a complex environment, and strengthen the accuracy of the chain of evidence; then sends a third network request to obtain audio and video data, and puts the response data into the third dictionary. The audio and video can truly restore the dynamic scene of the incident as core evidence; finally, the three dictionaries are packaged into evidence data, which opens up the key link from data collection to presentation, gets rid of the trouble of complex data formats, improves the efficiency of evidence collection, enhances the credibility of the chain of evidence, and lays a solid foundation for the proper handling of the incident. Realize remote real-time acquisition and transmission of driving recorder data, and ensure the integrity of the chain of evidence. By connecting to the mobile hotspot of the driving recorder, obtaining its hardware parameters, network interface configuration and audio and video data, and using these data as evidence data, the efficiency and accuracy of evidence collection can be greatly improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0117] Figure 1 The figure is a schematic flow chart of a method for obtaining evidence from a driving recorder data provided by an embodiment of the present invention;
[0118] Figure 2 The figure is a schematic diagram of the structure of a device for collecting evidence of driving recorder data provided by an embodiment of the present invention;
[0119] Figure 3 FIG. 1 is a schematic structural diagram of an electronic device in an embodiment of the present invention. DETAILED DESCRIPTION
[0120] In order to make the purpose, technical solution and advantages of the present invention clearer and more understandable, the present invention is further described below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0121] Based on the shortcomings of the prior art, the present invention provides a specific implementation method of a method for collecting evidence from a driving recorder, such as Figure 1 As shown, the method specifically includes:
[0122] S110: Obtain a mobile hotspot of the target driving recorder, and connect to the mobile hotspot of the target driving recorder.
[0123] The mobile hotspot of the target dash cam is the WiFi of the target dash cam. If the password of the target dash cam is known, the password can be entered to establish a wireless communication link with the target dash cam. If the password of the target dash cam is not known, the password can be cracked using the existing password cracking method and then a wireless communication link can be established with the target dash cam.
[0124] S120: Send a first network request to obtain hardware parameters to the target driving recorder, and save first response data fed back by the target driving recorder into a first dictionary.
[0125] The first network request includes but is not limited to HTTP GET, HTTP POST, HTTP PUT, HTTP DELETE and other methods. The first dictionary is used to store key-value pairs, which can realize the fast search, insertion, deletion, access and update of the first response data. The first response data includes but is not limited to the version information, manufacturer, hardware version, serial number, UUID, firmware version, MAC address, storage content, used storage space, name and password of the target driving recorder.
[0126] S130: Send a second network request to the target driving recorder to obtain network interface configuration information, and save second response data fed back by the target driving recorder into a second dictionary.
[0127] The second network request includes but is not limited to HTTP GET, HTTP POST, HTTP PUT, HTTP DELETE and other methods. The second dictionary is used to store key-value pairs, which can realize fast search, insertion, deletion, access and update of the second response data. The second response data includes but is not limited to the mapping relationship between the interface identifier and the data table identifier, the service address of the network interface, the path information of the data returned by the network interface, the names of each field of the data returned by the network interface and the corresponding data types.
[0128] S140: Send a third network request to the target driving recorder to obtain audio and video data, and save third response data fed back by the target driving recorder into a third dictionary.
[0129] The third network request includes but is not limited to HTTP GET, HTTP POST, HTTP PUT, HTTP DELETE and other methods. The third dictionary is used to store key-value pairs, which can realize the fast search, insertion, deletion, access and update of the third response data. The third response data includes but is not limited to audio and video recordings.
[0130] S150: Pack the first dictionary, the second dictionary and the third dictionary to obtain forensic data.
[0131] Use lists, tuples, or dictionary nesting to package the first dictionary, the second dictionary, and the third dictionary, and use the packaged data as forensic data. After obtaining the forensic data, you can upload the forensic data to an external connection device for visualization. For the data of hardware parameters and network interface configuration information, save it as a file (such as HTML or CSV). For HTML files, you can open it in a browser to view the display effect in table format; CSV files can be opened in spreadsheet software (such as Excel) for viewing. For audio and video data, you can use the matplotlib library for simple visualization, or use the OpenCV library for visualization.
[0132] In this embodiment, a wireless connection is first established with the target dashcam, and a first network request for obtaining hardware parameters is sent to the target dashcam, and the response data is stored in the first dictionary, which can not only determine the data collection capability of the dashcam at the time of the incident, but also ensure the integrity of the stored data, and provide hardware support for the chain of evidence; then a second network request for obtaining network interface configuration information is sent, and the response data is stored in the second dictionary, which can ensure stable interactive data and accurate positioning of the dashcam in a complex environment, and strengthen the accuracy of the chain of evidence; then a third network request for obtaining audio and video data is sent, and the response data is placed in the third dictionary. The audio and video as core evidence can truly restore the dynamic scene of the incident; finally, the three dictionaries are packaged into forensic data and uploaded to an external connection device for visual display, opening up the key link from data collection to presentation, getting rid of the trouble of complex data formats, improving the efficiency of forensics, enhancing the credibility of the chain of evidence, and laying a solid foundation for the proper handling of the incident. Realize the remote real-time acquisition and transmission of dashcam data and ensure the integrity of the chain of evidence. By connecting to the mobile hotspot of the dashcam, obtaining its hardware parameters, network interface configuration and audio and video data, and using these data as forensic data, the efficiency and accuracy of forensics can be greatly improved.
[0133] In one embodiment of the present invention, obtaining the mobile hotspot of the target driving recorder in S110 includes:
[0134] Enumerate the names and states of the wireless network cards of external devices and specify the target wireless network card;
[0135] The external device is a device that sends a network request to the target dashcam, such as a mobile phone, tablet or desktop computer. Multiple wireless network cards (such as built-in WiFi and USB WiFi adapters) may be installed on the external device. By obtaining the name of the wireless network card, ensure that the correct target wireless network card is used. By obtaining the status of the wireless network card (such as connected, disconnected or connecting), ensure that the target wireless network card is in a scannable state.
[0136] Perform the following steps to enumerate the name and status of the wireless network card of the external device:
[0137] Create a first empty list to store all wireless network card information of external devices;
[0138] Create a query interface instance for querying wireless network card information. The query interface instance can be a PyWiFi instance. Try to obtain all wireless network card information through the PyWiFi instance.
[0139] Traversing each wireless network card of the external device based on the query interface instance, and creating a fourth dictionary storing wireless network card information each time a wireless network card is traversed, wherein the wireless network card information includes the name and status of the wireless network card;
[0140] The fourth dictionary created in each traversal is added to the first empty list to obtain a wireless network card list, and finally the names and states of all wireless network cards are obtained in the form of a list, so that which wireless network card can be specified as the target wireless network card according to the wireless network card list, ensuring that the specified target wireless network card is in the optimal and traceable state.
[0141] Enumerate the mobile hotspots scanned by the target wireless network card, collect the network information corresponding to the corresponding mobile hotspots, and obtain the original mobile hotspot network information list, including SSID, MAC address and signal strength;
[0142] To obtain the original mobile hotspot network information list, perform the following steps:
[0143] Traverse the wireless network card list to find a wireless network card with the same name as the target wireless network card as the target wireless network card, and make sure that the selected wireless network card is the wireless network card specified at the beginning;
[0144] Configure a second empty list of mobile hotspots scanned by the target network card for storage;
[0145] Create a hotspot scanning instance for mobile hotspot operation. The hotspot scanning instance can use the scan instance of calling iface;
[0146] Based on the hotspot scanning instance, the target wireless network card is controlled to scan the surrounding mobile hotspots according to the set scanning time to obtain the scanning results;
[0147] Traversing each mobile hotspot in the scan results, and creating a fifth dictionary storing parameterized mobile hotspot network information each time a mobile hotspot is traversed, where the mobile hotspot network information includes the SSID, MAC address, and signal strength of the mobile hotspot;
[0148] The parameterization process of mobile hotspot network information includes the following steps:
[0149] Convert the SSID of each mobile hotspot from raw bytes to UTF-8 encoding, and treat the mobile hotspot with a specified encoding in the UTF-8 encoding as a hidden mobile hotspot. For example, if the encoding contains / / x00, it is regarded as a hidden mobile hotspot and modified to a hidden mobile hotspot;
[0150] Convert the MAC address of each mobile hotspot into an integer unique identifier, for example, using the mac_to_int function to convert the MAC address into an integer, and store it in the fifth dictionary as a unique identifier;
[0151] The signal strength value corresponding to the signal strength of each mobile hotspot is calculated by the signal gain function. For example, the signal strength calculated by (100+i.signal) (here it is assumed that i.signal is an attribute related to obtaining signal strength, which depends on the interface implementation) is stored in the fifth dictionary.
[0152] Add the fifth dictionary created in each traversal to the second empty list to obtain the original mobile hotspot network information list, that is, each time a mobile hotspot is traversed, a corresponding fifth dictionary will be generated, and finally all fifth dictionaries are added to the second empty list to obtain the network information of all scanned mobile hotspots;
[0153] Eliminate duplicate network information in the original mobile hotspot network information list to obtain a unique mobile hotspot network information list. The original mobile hotspot network information list can be deduplicated by list derivation and set deduplication to ensure that there is no duplicate mobile hotspot network information in the returned result, and then return the deduplication result to the unique mobile hotspot network information list.
[0154] Determine the mobile hotspot corresponding to the target dash cam based on the unique mobile hotspot network information list, and comprehensively judge which mobile hotspot is the mobile hotspot of the target dash cam based on the SSID, MAC address and signal strength of the mobile hotspot, to ensure that the mobile hotspot finally selected is the mobile hotspot of the target dash cam to avoid errors.
[0155] In one embodiment of the present invention, S120 specifically includes the following steps:
[0156] Configure the first address variable pointing to the target dashcam IP address;
[0157] Configure a first path variable for accessing a target driving recorder application programming interface path;
[0158] Configure the first query parameter of the request to query the hardware parameters of the target driving recorder;
[0159] Constructing a first resource locator according to the first address variable, the first path variable and the first query parameter;
[0160] Configure the first user agent field of the virtual machine on the simulated Android device;
[0161] The configuration request is sent to the first request destination field that specifies the target dashcam IP address;
[0162] Configure a first session maintaining field carrying a session identifier for maintaining a session with a target driving recorder;
[0163] constructing a first request header according to the first user agent field, the first request destination field, and the first session persistence field;
[0164] Sending a first network request and passing in a first resource locator and a first request header, obtaining first response data fed back by the target driving recorder, wherein the first response data includes version information, manufacturer, hardware version, serial number, UUID, firmware version, MAC address, storage content, used storage space, name, and password of the target driving recorder;
[0165] Convert the first response data into JSON text data and store it in the first dictionary.
[0166] In this embodiment, in terms of data acquisition, by accurately configuring the IP address, path and query parameters to construct a resource locator, it is possible to accurately locate the hardware parameter resources of the target driving recorder, obtain comprehensive device information, and ensure the accuracy and comprehensiveness of the data; in terms of compatibility and standardization, the user agent field of the simulation environment is configured and the request header and resource locator that meet the standards are constructed, which can adapt to the specific environment, follow the network communication specifications, and improve the request success rate and stability; in terms of data processing and application, the response data is converted into JSON format and stored in a dictionary, which is convenient for subsequent data management in a structured manner; in terms of session management, configuring the session persistence field can reduce network overhead and connection anomalies, improve the efficiency and stability of interaction with the driving recorder, and facilitate unified management and monitoring of the hardware parameters of the driving recorder and data analysis and utilization.
[0167] In one embodiment of the present invention, S130 specifically includes the following steps:
[0168] Configure the second address variable pointing to the target dashcam IP address;
[0169] Configure a second path variable for accessing a target driving recorder application programming interface path;
[0170] A second query parameter for configuring a request to query the network interface configuration of a target driving recorder;
[0171] constructing a second resource locator according to the second address variable, the second path variable and the second query parameter;
[0172] Configure the content encoding field to compress the target dashcam's response data using the gzip encoding format;
[0173] Configure a second session holding field carrying a session identifier for holding a session with a target driving recorder;
[0174] After the configuration session is completed, the target dashcam closes the connection processing field of the TCP connection;
[0175] Configure the data type field of the request body data in URL encoding format;
[0176] Configure the second user agent field of the virtual machine on the simulated Android device;
[0177] The configuration request is sent to a second request destination field that specifies the target dashcam IP address;
[0178] Configure the message body length field of the request body content length;
[0179] Construct a second request header according to the content encoding field, the second session maintenance field, the connection handling field, the data type field, the second user agent field, the second request destination field, and the message body length field;
[0180] Sending a second network request and passing in a second resource locator and a second request header, obtaining second response data fed back by the target driving recorder, wherein the second response data includes network interface configuration information of the target driving recorder;
[0181] The second response data is converted into JSON text data and stored in the second dictionary.
[0182] In this embodiment, the second address variable pointing to the target dashcam IP address, the second path variable accessing the target dashcam application programming interface path, and the second query parameter requesting the target dashcam network interface configuration are configured to construct the second resource locator, which can improve flexibility and maintainability. The content encoding field that compresses the response data of the target dashcam in gzip encoding format can optimize data transmission and storage efficiency; the second session retention field that carries the session identifier to maintain the session with the target dashcam can maintain session continuity; the connection processing field that closes the TCP connection of the target dashcam after the session is completed is configured to help manage connection resources reasonably; the data type field of the request body data in URL encoding format can ensure the uniformity of data format and correct parsing; the second user agent field that simulates the virtual machine on the Android device can improve compatibility; the second request destination field that sends the request to the specified target dashcam IP address can accurately direct the request; the message body length field that configures the request body content length can effectively control the request scale. A second network request is sent and a second resource locator and a second request header are passed in to obtain the second response data (including network interface configuration information) fed back by the target driving recorder, which is then converted into JSON text data and stored in the second dictionary to facilitate subsequent search and extraction of data in a key-value pair format. This series of operations as a whole provides key data for understanding the network settings of the driving recorder and making configuration adjustments. At the same time, each configuration operation can improve interaction efficiency, ensure the stability of the network environment, and ensure request accuracy.
[0183] Based on the same inventive concept, an embodiment of the present application also provides a driving recorder data evidence collection device, which can be used to implement a driving recorder data evidence collection method described in the above embodiment, as described in the following embodiment. Since the principle of solving the problem by a driving recorder data evidence collection device is similar to that of a driving recorder data evidence collection method, the implementation of a driving recorder data evidence collection device can refer to the implementation of a driving recorder data evidence collection method, and the repeated parts will not be repeated. As used below, the term "unit" or "module" can be a combination of software and / or hardware that implements predetermined functions. Although the system described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.
[0184] The present invention provides a device for collecting evidence of driving recorder data, such as Figure 2 As shown, the device comprises:
[0185] The mobile hotspot connection module 210 is used to obtain the mobile hotspot of the target driving recorder and connect to the mobile hotspot of the target driving recorder;
[0186] The first data acquisition module 220 is used to send a first network request to obtain hardware parameters to the target driving recorder, and save the first response data fed back by the target driving recorder into the first dictionary;
[0187] The second data acquisition module 230 is used to send a second network request to the target driving recorder to acquire the network interface configuration information, and save the second response data fed back by the target driving recorder into the second dictionary;
[0188] The third data acquisition module 240 is used to send a third network request to the target driving recorder to acquire audio and video data, and save the third response data fed back by the target driving recorder into the third dictionary;
[0189] Data packaging module 250: used to package the first dictionary, the second dictionary and the third dictionary to obtain forensic data.
[0190] In one embodiment of the present invention, obtaining the mobile hotspot of the target driving recorder in the mobile hotspot connection module 210 includes:
[0191] Enumerate the names and states of the wireless network cards of external devices and specify the target wireless network card;
[0192] Enumerate the mobile hotspots scanned by the target wireless network card, collect the network information corresponding to the corresponding mobile hotspots, and obtain the original mobile hotspot network information list; the network information includes SSID, MAC address and signal strength;
[0193] Eliminate duplicate network information in the original mobile hotspot network information list to obtain a unique mobile hotspot network information list;
[0194] Determine the mobile hotspot corresponding to the target driving recorder based on the unique mobile hotspot network information list.
[0195] In one embodiment of the present invention, enumerating the name and status of the wireless network card of the external device includes:
[0196] Create a first empty list to store all wireless network card information of external devices;
[0197] Create a query interface instance to query wireless network card information;
[0198] Based on the query interface instance, each wireless network card of the external device is traversed, and each time a wireless network card is traversed, a fourth dictionary is created to store the wireless network card information, where the wireless network card information includes the name and status of the wireless network card;
[0199] Add the fourth dictionary created in each traversal to the first empty list to obtain a wireless network card list.
[0200] In one embodiment of the present invention, the mobile hotspots scanned by the target wireless network card are enumerated, and the network information corresponding to the corresponding mobile hotspots is collected to obtain the original mobile hotspot network information list including:
[0201] Traverse the wireless network card list to find the wireless network card with the same name as the target wireless network card as the target wireless network card;
[0202] Configure a second empty list of mobile hotspots scanned by the target network card for storage;
[0203] Create a hotspot scanning instance for mobile hotspot operation;
[0204] Based on the hotspot scanning instance, the target wireless network card is controlled to scan the surrounding mobile hotspots according to the set scanning time to obtain the scanning results;
[0205] Traversing each mobile hotspot in the scan results, and creating a fifth dictionary storing parameterized mobile hotspot network information each time a mobile hotspot is traversed, where the mobile hotspot network information includes the SSID, MAC address, and signal strength of the mobile hotspot;
[0206] The fifth dictionary created in each traversal is added to the second empty list to obtain the original mobile hotspot network information list.
[0207] In one embodiment of the present invention, the parameterization process of the mobile hotspot network information includes:
[0208] Convert the SSID of each mobile hotspot from raw bytes to UTF-8 encoding, and regard the mobile hotspots with specified encoding in UTF-8 encoding as hidden mobile hotspots;
[0209] Convert each mobile hotspot's MAC address into an integer unique identifier;
[0210] The signal gain function is used to calculate the strength value corresponding to the signal strength of each mobile hotspot.
[0211] In one embodiment of the present invention, the first data acquisition module 220 is specifically used for:
[0212] Configure the first address variable pointing to the target dashcam IP address;
[0213] Configure a first path variable for accessing a target driving recorder application programming interface path;
[0214] Configure the first query parameter of the request to query the hardware parameters of the target driving recorder;
[0215] Constructing a first resource locator according to the first address variable, the first path variable and the first query parameter;
[0216] Configure the first user agent field of the virtual machine on the simulated Android device;
[0217] The configuration request is sent to the first request destination field that specifies the target dashcam IP address;
[0218] Configure a first session maintaining field carrying a session identifier for maintaining a session with a target driving recorder;
[0219] constructing a first request header according to the first user agent field, the first request destination field, and the first session persistence field;
[0220] Sending a first network request and passing in a first resource locator and a first request header, obtaining first response data fed back by the target driving recorder, the first response data including version information, manufacturer, hardware version, serial number, UUID, firmware version, MAC address, storage content, used storage space, name, and password of the target driving recorder;
[0221] Convert the first response data into JSON text data and store it in the first dictionary.
[0222] In one embodiment of the present invention, the second data acquisition module 230 is specifically used for:
[0223] Configure the second address variable pointing to the target dashcam IP address;
[0224] Configure a second path variable for accessing a target driving recorder application programming interface path;
[0225] A second query parameter for configuring a request to query the network interface configuration of a target driving recorder;
[0226] constructing a second resource locator according to the second address variable, the second path variable and the second query parameter;
[0227] Configure the content encoding field to compress the target dashcam's response data using the gzip encoding format;
[0228] Configure a second session holding field carrying a session identifier for holding a session with a target driving recorder;
[0229] After the configuration session is completed, the target dashcam closes the connection processing field of the TCP connection;
[0230] Configure the data type field of the request body data in URL encoding format;
[0231] Configure the second user agent field of the virtual machine on the simulated Android device;
[0232] The configuration request is sent to a second request destination field that specifies the target dashcam IP address;
[0233] Configure the message body length field of the request body content length;
[0234] Construct a second request header according to the content encoding field, the second session maintenance field, the connection handling field, the data type field, the second user agent field, the second request destination field, and the message body length field;
[0235] Sending a second network request and passing in a second resource locator and a second request header, obtaining second response data fed back by the target driving recorder, wherein the second response data includes network interface configuration information of the target driving recorder;
[0236] The second response data is converted into JSON text data and stored in the second dictionary.
[0237] The embodiment of the present application also provides a specific implementation of an electronic device capable of implementing all steps in the method for obtaining evidence of driving recorder data in the above embodiment, see Figure 3 , the electronic device 300 specifically includes the following contents:
[0238] Processor 310, memory 320, communication unit 330 and bus 340;
[0239] The processor 310 , the memory 320 , and the communication unit 330 communicate with each other via the bus 340 ; the communication unit 330 is used to implement information transmission between server-side devices and terminal devices and other related devices.
[0240] The processor 310 is used to call the computer program in the memory 320. When the processor executes the computer program, all the steps in the method for collecting evidence of driving recorder data in the above embodiment are implemented.
[0241] Those skilled in the art should understand that the memory may be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), etc. The memory is used to store programs, and the processor executes the programs after receiving the execution instruction. Furthermore, the software programs and modules in the above-mentioned memory may also include an operating system, which may include various software components and / or drivers for managing system tasks (such as memory management, storage device control, power management, etc.), and may communicate with various hardware or software components to provide an operating environment for other software components.
[0242] The processor may be an integrated circuit chip having the ability to process signals. The above-mentioned processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc. The methods, steps, and logic block diagrams disclosed in the embodiments of the present application may be implemented or executed. The general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.
[0243] The present application also provides a computer-readable storage medium, which includes a program. When the program is executed by a processor, it is used to execute a method for collecting evidence from driving recorder data provided by any of the aforementioned method embodiments.
[0244] Those skilled in the art should understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk, etc., various media that can store program codes, and the specific media type is not limited in this application.
[0245] The above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A method for collecting evidence from a driving recorder, characterized in that: The method comprises: Get the mobile hotspot of the target dashcam and connect to it; Sending a first network request to obtain hardware parameters to a target driving recorder, and saving first response data fed back by the target driving recorder into a first dictionary; Sending a second network request to the target driving recorder to obtain network interface configuration information, and saving second response data fed back by the target driving recorder into a second dictionary; Sending a third network request to the target driving recorder to obtain audio and video data, and saving third response data fed back by the target driving recorder into a third dictionary; The first dictionary, the second dictionary and the third dictionary are packaged to obtain forensic data.
2. A method for collecting evidence from a driving recorder as claimed in claim 1, characterized in that: The method of obtaining the mobile hotspot of the target driving recorder includes: Enumerate the names and states of the wireless network cards of external devices and specify the target wireless network card; Enumerate the mobile hotspots scanned by the target wireless network card, and collect the network information corresponding to the corresponding mobile hotspots to obtain an original mobile hotspot network information list; the network information includes SSID, MAC address and signal strength; Eliminate duplicate network information in the original mobile hotspot network information list to obtain a unique mobile hotspot network information list; Determine the mobile hotspot corresponding to the target driving recorder based on the unique mobile hotspot network information list.
3. A method for collecting evidence from driving recorder data as claimed in claim 2, characterized in that: The name and status of the wireless network card of the enumerated external device include: Create a first empty list to store all wireless network card information of external devices; Create a query interface instance to query wireless network card information; Traversing each wireless network card of the external device based on the query interface instance, and creating a fourth dictionary storing wireless network card information each time a wireless network card is traversed, wherein the wireless network card information includes the name and status of the wireless network card; Add the fourth dictionary created in each traversal to the first empty list to obtain a wireless network card list.
4. A method for collecting evidence from driving recorder data as claimed in claim 3, characterized in that: The enumeration of the mobile hotspots scanned by the target wireless network card and the collection of network information corresponding to the corresponding mobile hotspots to obtain the original mobile hotspot network information list includes: Traverse the wireless network card list to find the wireless network card with the same name as the target wireless network card as the target wireless network card; Configure a second empty list of mobile hotspots scanned by the target network card for storage; Create a hotspot scanning instance for mobile hotspot operation; Based on the hotspot scanning instance, the target wireless network card is controlled to scan the surrounding mobile hotspots according to the set scanning time to obtain the scanning results; Traversing each mobile hotspot in the scan results, and creating a fifth dictionary storing parameterized mobile hotspot network information each time a mobile hotspot is traversed, wherein the mobile hotspot network information includes the SSID, MAC address, and signal strength of the mobile hotspot; The fifth dictionary created in each traversal is added to the second empty list to obtain the original mobile hotspot network information list.
5. The method for collecting evidence from a driving recorder according to claim 4, wherein the parameterization process of the mobile hotspot network information comprises: Convert the SSID of each mobile hotspot from raw bytes to UTF-8 encoding, and regard the mobile hotspots with specified encoding in UTF-8 encoding as hidden mobile hotspots; Convert each mobile hotspot's MAC address into an integer unique identifier; The signal gain function is used to calculate the strength value corresponding to the signal strength of each mobile hotspot.
6. The device for collecting evidence of driving recorder data according to claim 1, characterized in that: The first network request for obtaining hardware parameters is sent to the target driving recorder, and the first response data fed back by the target driving recorder is saved in the first dictionary: Configure the first address variable pointing to the target dashcam IP address; Configure a first path variable for accessing a target driving recorder application programming interface path; Configure the first query parameter of the request to query the hardware parameters of the target driving recorder; Constructing a first resource locator according to the first address variable, the first path variable and the first query parameter; Configure the first user agent field of the virtual machine on the simulated Android device; The configuration request is sent to the first request destination field that specifies the target dashcam IP address; Configure a first session maintaining field carrying a session identifier for maintaining a session with a target driving recorder; constructing a first request header according to the first user agent field, the first request destination field, and the first session persistence field; Sending a first network request and passing in a first resource locator and a first request header, obtaining first response data fed back by the target driving recorder, wherein the first response data includes version information, manufacturer, hardware version, serial number, UUID, firmware version, MAC address, storage content, used storage space, name, and password of the target driving recorder; Convert the first response data into JSON text data and store it in the first dictionary.
7. The device for collecting evidence of driving recorder data as claimed in claim 1, characterized in that: The sending of a second network request to the target driving recorder to obtain the network interface configuration information and saving the second response data fed back by the target driving recorder into the second dictionary comprises: Configure the second address variable pointing to the target dashcam IP address; Configure a second path variable for accessing a target driving recorder application programming interface path; A second query parameter for configuring a request to query the network interface configuration of a target driving recorder; constructing a second resource locator according to the second address variable, the second path variable and the second query parameter; Configure the content encoding field to compress the target dashcam's response data using the gzip encoding format; Configure a second session maintaining field carrying a session identifier for maintaining a session with a target driving recorder; After the configuration session is completed, the target dashcam closes the connection processing field of the TCP connection; Configure the data type field of the request body data in URL encoding format; Configure the second user agent field of the virtual machine on the simulated Android device; The configuration request is sent to a second request destination field that specifies the target dashcam IP address; Configure the message body length field of the request body content length; Construct a second request header according to the content encoding field, the second session maintenance field, the connection handling field, the data type field, the second user agent field, the second request destination field, and the message body length field; Sending a second network request and passing in a second resource locator and a second request header, obtaining second response data fed back by the target driving recorder, wherein the second response data includes network interface configuration information of the target driving recorder; The second response data is converted into JSON text data and stored in the second dictionary.
8. A device for collecting evidence from a driving recorder, characterized in that: The device comprises: Mobile hotspot connection module: used to obtain the mobile hotspot of the target driving recorder and connect to the mobile hotspot of the target driving recorder; A first data acquisition module: used for sending a first network request for acquiring hardware parameters to a target driving recorder, and saving first response data fed back by the target driving recorder into a first dictionary; A second data acquisition module: used for sending a second network request for acquiring network interface configuration information to a target driving recorder, and saving second response data fed back by the target driving recorder into a second dictionary; A third data acquisition module: used for sending a third network request for acquiring audio and video data to the target driving recorder, and saving the third response data fed back by the target driving recorder into a third dictionary; Data packaging module: used to package the first dictionary, the second dictionary and the third dictionary to obtain forensic data.
9. An electronic device, characterized in that: include: Processor and memory; The memory is used to store computer programs; The processor is configured to execute the method according to any one of claims 1 to 7 by calling the computer program.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a program, which is used to implement the method of any one of claims 1 to 7 when executed by a processor.
Citation Information
Patent Citations
Wireless WiFi signal source orientation method
CN104502890A
Vehicle traveling information restoring method and system and vehicle traveling information restoring method of server
CN105427405A
Wi-Fi hotspot connection method and mobile terminal
CN106507447A
Production detection method and device for wireless equipment
CN111083018A
Information retrieval method and device thereof
CN111479310A