Unmanned vehicle log acquisition method and device and electronic equipment
Through the collaborative work of log collection agent equipment and log gateway, the problem of scattered and inconsistent format of unmanned vehicle log storage is solved, centralized storage and unified format of logs are realized, and log collection efficiency and user experience are improved.
Patent Information
- Application Number
- CN202411040667.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2024-11-12
AI Technical Summary
Unmanned vehicle log storage is scattered and inconsistent, which leads to difficulty in querying and analysis, and the storage space of terminal equipment is limited, which may lead to inability to store logs normally.
The log collection agent device uses a preset pull strategy to pull logs from the cloud, and the vehicle terminal and the operation terminal use a preset push strategy to push the log to the log gateway, and then performs standardized processing and stores it in the target database to realize centralized storage of logs. and unified format.
It solves the problem of scattered log storage and inconsistent format, improves log collection efficiency, avoids the problem of log storage failure caused by insufficient storage space, improves user experience, and supports scalable database capacity.
Smart Images

Figure CN118945227A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of unmanned vehicles, and in particular to an unmanned vehicle log collection method, device and electronic equipment. Background Art
[0002] Unmanned vehicles are a complex system, including autonomous driving subsystem, chassis subsystem, main control subsystem, intelligent driving subsystem and cloud system services, etc. Each subsystem contains multiple applications. In order to improve the service quality of unmanned vehicles, it is necessary to develop mobile applications and applets to facilitate the operation of staff.
[0003] Since each subsystem is independent, the log storage location and log style are different. In particular, the vehicle-side logs and mobile phone-side logs are discretely stored on each terminal device. When the system is abnormal, such as: the failure of the cargo box door to open, the failure of the automatic driving route, etc., it is impossible to guarantee that the logs can be pulled for analysis in a short time. What's more, the log storage in each terminal device is limited by the limited storage space of the terminal, and in some cases, the logs may not be stored normally. Summary of the invention
[0004] In view of this, the embodiments of the present application provide a method, device and electronic device for collecting logs of an unmanned vehicle to solve the problem in the prior art that the storage of logs of unmanned vehicles is dispersed, which is not conducive to query and statistical analysis.
[0005] A first aspect of an embodiment of the present application provides a method for collecting logs of an unmanned vehicle, comprising:
[0006] Pull the first log from the first end using a preset pulling strategy through a log collection agent device;
[0007] Receiving, through the log gateway, the second log pushed by the second end using the preset push strategy;
[0008] Performing standardization processing on the first log and the second log;
[0009] Store the standardized logs in the target database;
[0010] The first end includes the cloud, the second end includes the unmanned vehicle end and the unmanned vehicle operation terminal, and the standardized processing at least includes log data format conversion
[0011] A second aspect of an embodiment of the present application provides an unmanned vehicle log collection device, including:
[0012] A pulling module is configured to pull the first log from the first end using a preset pulling strategy through a log collection agent device;
[0013] A push module is configured to receive, through a log gateway, a second log pushed by a second end using a preset push strategy;
[0014] A processing module, configured to perform standardized processing on the first log and the second log;
[0015] A storage module is configured to store the standardized logs in a target database;
[0016] Among them, the first end includes the cloud, the second end includes the unmanned vehicle end and the unmanned vehicle operation terminal, and the standardized processing at least includes log data format conversion.
[0017] According to a third aspect of an embodiment of the present application, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.
[0018] Compared with the prior art, the embodiments of the present application have the following beneficial effects: the embodiments of the present application pull the unmanned vehicle logs stored in the cloud through a log collection agent device using a preset pull strategy, and the vehicle side and the operation terminal use a preset push strategy to push the unmanned vehicle logs stored in the vehicle side and the operation terminal to the log gateway, and then standardize the logs in the log collection agent device and the log gateway, and finally store the standardized logs in the target database. It can collect various types of logs in an adaptive manner according to the distribution and storage characteristics of the unmanned vehicle logs, and centrally store the collected unmanned vehicle logs, avoiding the current query and analysis difficulties caused by the scattered storage and non-uniform format of the unmanned vehicle logs, and the capacity of the centralized storage target database is expandable, avoiding the inability to correctly save logs due to insufficient storage space on the vehicle side or the operation terminal, improving the efficiency of log collection and enhancing user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0020] Figure 1 It is a scenario diagram of an application scenario of an embodiment of the present application.
[0021] Figure 2 It is a flow chart of a method for collecting logs of an unmanned vehicle provided in an embodiment of the present application.
[0022] Figure 3It is a flowchart of another unmanned vehicle log collection method provided in an embodiment of the present application.
[0023] Figure 4 It is a flowchart of a method for performing statistical analysis on log data to be analyzed provided in an embodiment of the present application.
[0024] Figure 5 It is a schematic diagram of a method for evaluating N statistical target indicators using normal distribution provided in an embodiment of the present application.
[0025] Figure 6 It is a flowchart of another method for performing statistical analysis on log data to be analyzed provided in an embodiment of the present application.
[0026] Figure 7 It is a schematic diagram of a system for implementing the unmanned vehicle log collection method provided in an embodiment of the present application.
[0027] Figure 8 It is a schematic diagram of an unmanned vehicle log collection device provided in an embodiment of the present application.
[0028] Fig. 9 It is a schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0029] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0030] A method and device for collecting logs of an unmanned vehicle according to an embodiment of the present application will be described in detail below with reference to the accompanying drawings.
[0031] Figure 1 Schematic diagram of an application scenario of an embodiment of the present application. The application scenario may include an unmanned vehicle 1, operation terminals 2 and 3, a server 4 and a network 5.
[0032] The unmanned vehicle 1, the operation terminals 2 and 3 may be hardware or software. When the operation terminals 2 and 3 are hardware, they may be various electronic devices having a display screen and supporting communication with the server 4, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers; when the operation terminals 2 and 3 are software, they may be installed in the terminal devices described above.
[0033] The server 4 may be a server that provides various services, for example, a background server that receives a request sent by a terminal device that establishes a communication connection with the server, and the background server may receive and analyze the request sent by the terminal device, and generate a processing result. The server 4 may be a single server, a server cluster composed of several servers, or a cloud computing service center, which is not limited in the present application.
[0034] It should be noted that the server 4 can be hardware or software. When the server 4 is hardware, it can be various electronic devices that provide various services for the unmanned vehicle 1, the operation terminals 2 and 3. When the server 4 is software, it can be multiple software or software modules that provide various services for the unmanned vehicle 1, the operation terminals 2 and 3, or it can be a single software or software module that provides various services for the unmanned vehicle 1, the operation terminals 2 and 3, and the embodiments of the present application are not limited to this.
[0035] The network 5 can be a wired network connected by coaxial cable, twisted pair and optical fiber, or it can be a wireless network that can interconnect various communication devices without wiring, such as Bluetooth, Near Field Communication (NFC), infrared, etc., which is not limited in the embodiments of the present application.
[0036] The unmanned vehicle 1 can perform tasks autonomously and save the unmanned vehicle log generated by it locally in the unmanned vehicle 1. The control terminals 2 and 3 or the server 4 can remotely control the unmanned vehicle 1 to perform tasks, or receive relevant information sent by the unmanned vehicle 1, and save the unmanned vehicle log generated by itself locally in the control terminal or server.
[0037] It should be noted that the specific types, quantities and combinations of the unmanned vehicle 1, control terminals 2 and 3, server 4 and network 5 can be adjusted according to the actual needs of the application scenario, and the embodiments of the present application do not limit this.
[0038] As mentioned above, since each subsystem is independent, the log storage location and log style are different. In particular, the vehicle-side logs and mobile phone-side logs are discretely stored on each terminal device. When the system is abnormal, such as: the failure of the cargo box door to open, the failure of the automatic driving route, etc., it is impossible to guarantee that the logs can be pulled for analysis in a short time. What's more, the log storage in each terminal device is limited by the limited storage space of the terminal, and in some cases, the logs may not be stored normally.
[0039] In view of this, an embodiment of the present application provides a method for collecting unmanned vehicle logs, which pulls the unmanned vehicle logs stored in the cloud through a log collection agent device using a preset pull strategy, and the vehicle end and the operation terminal use a preset push strategy to push the unmanned vehicle logs stored in the vehicle end and the operation terminal to the log gateway, and then standardizes the logs in the log collection agent device and the log gateway, and finally stores the standardized logs in a target database. It can collect various types of logs in an adaptive manner according to the distribution and storage characteristics of the unmanned vehicle logs, and centrally store the collected unmanned vehicle logs, avoiding the current query and analysis difficulties caused by the scattered storage and non-uniform format of the unmanned vehicle logs, and the capacity of the centralized storage target database is expandable, avoiding the inability to correctly save logs due to insufficient storage space on the vehicle end or the operation terminal, improving the efficiency of log collection and enhancing user experience.
[0040] Figure 2 Schematic diagram of a flow chart of a method for collecting logs of an unmanned vehicle provided in an embodiment of the present application. Figure 2 As shown, the method comprises the following steps:
[0041] In step S201, a first log is pulled from a first end using a preset pulling strategy through a log collection agent device.
[0042] In step S202, a second log pushed by the second end using a preset push strategy is received through a log gateway.
[0043] In step S203, the first log and the second log are standardized.
[0044] In step S204, the normalized log is stored in the target database.
[0045] Among them, the first end includes the cloud, the second end includes the unmanned vehicle end and the unmanned vehicle operation terminal, and the standardized processing at least includes log data format conversion.
[0046] In an embodiment of the present application, the method can be executed by a terminal device, which can include multiple terminal devices, in which log collection agent devices and log gateways are deployed respectively. In some real-time modes, the terminal device can also be a terminal device, in which log collection agent devices and log gateways are deployed at the same time.
[0047] In an embodiment of the present application, the unmanned vehicle log may include the log of the unmanned vehicle itself generated on the vehicle side, as well as the terminal application log, terminal applet log and terminal web page log related to the unmanned vehicle generated in the operating terminal, and cloud log related to the unmanned vehicle generated in the cloud.
[0048] In the embodiment of the present application, the first log can be pulled from the first end by a log collection agent device using a preset pulling strategy, wherein the first end can be a cloud, and the first log is at least part of the log of the unmanned vehicle generated in the cloud.
[0049] In an embodiment of the present application, a second log pushed by the second end using a preset push strategy can also be received through a log gateway. The second end can be an unmanned vehicle terminal or an unmanned vehicle operation terminal. The unmanned vehicle operation terminal can be, for example, a smart phone for controlling the unmanned vehicle, and the second log is at least part of the log in the unmanned vehicle log generated by the unmanned vehicle control application (APP) or applet in the smart phone. Alternatively, the unmanned vehicle operation terminal can also be, for example, other terminal devices for controlling unmanned vehicles, and the second log is at least part of the log in the unmanned vehicle log generated by the unmanned vehicle control World Wide Web (Web) page in the other terminal device.
[0050] In an embodiment of the present application, the first log obtained by the log collection agent device and the second log obtained by the log gateway can be standardized. In one example, the standardized processing can be to first clean the first log and the second log, such as deleting illegal log data, incomplete log data, etc., and then optimize the format of the cleaned log data, convert all log data into a unified standardized format, so as to obtain a standardized log.
[0051] In the embodiment of the present application, the standardized logs can be stored in the target database. The target database can be set in the cloud or other locations as needed. The log data in the target database can be queried and called by other systems such as alarm systems, data analysis systems, and log query systems.
[0052] According to the technical solution provided in the embodiment of the present application, the unmanned vehicle logs stored in the cloud are pulled by the log collection agent device using a preset pull strategy, and the vehicle end and the operation terminal use a preset push strategy to push the unmanned vehicle logs stored in the vehicle end and the operation terminal to the log gateway, and then the logs in the log collection agent device and the log gateway are standardized, and finally the standardized logs are stored in the target database. It is possible to collect various types of logs in an adaptive manner according to the distribution and storage characteristics of the unmanned vehicle logs, and the collected unmanned vehicle logs are centrally stored, avoiding the current query and analysis difficulties caused by the scattered storage and non-uniform format of the unmanned vehicle logs, and the capacity of the centralized storage target database is expandable, avoiding the inability to correctly save logs due to insufficient storage space on the vehicle end or the operation terminal, improving the efficiency of log collection and enhancing user experience.
[0053] In an embodiment of the present application, the preset pull strategy may include a real-time pull strategy, an offline pull strategy, and a batch pull strategy.
[0054] Among them, the real-time pull strategy is used to pull the first target log whose data type is real-time data, and the real-time data includes data whose relevance to the current task of the unmanned vehicle is greater than the first preset threshold. The offline pull strategy is used to pull the second target log whose data type is offline data, and the offline data includes data whose relevance to the current task of the unmanned vehicle is less than the second preset threshold. The batch pull strategy is used to pull the third target log whose data type is batch data, and the batch data includes data whose relevance to the current task of the unmanned vehicle is greater than the third preset threshold and whose priority is less than the fourth preset threshold.
[0055] The values of the first preset threshold, the second preset threshold, the third preset threshold and the fourth preset threshold are determined according to actual needs, but need to meet the following conditions: the first preset threshold is greater than or equal to the second preset threshold, and the third preset threshold is greater than or equal to the second preset threshold.
[0056] In an embodiment of the present application, the real-time pull strategy includes, in response to determining that the first target log is generated, the log collection agent device pulls the first target log in real time. The offline pull strategy includes, in response to receiving an instruction to pull the second target log, the log collection agent device pulls the second target log. The batch pull strategy includes, in response to determining that the third target log meets the batch pull condition, the log collection agent device pulls the target log.
[0057] Among them, the batch pulling conditions include at least one of the following: the time since the last pulling of the third target log reaches the preset pulling cycle, and the unmanned vehicle is currently in non-business time.
[0058] That is to say, different pulling strategies can be adopted for different types of log data in the unmanned vehicle logs generated in the cloud. For example, for data whose relevance to the current task of the unmanned vehicle is greater than the first preset threshold, that is, data that is more sensitive to the business, such as the current location coordinate data of the unmanned vehicle, it needs to be reported and processed in real time. Therefore, the logs related to this type of data can use the real-time pulling strategy and pull the data-related logs immediately after they are generated.
[0059] For data whose relevance to the current task of the unmanned vehicle is less than the second preset threshold, that is, data that is not sensitive to the business, such as audit logs, operation logs, etc., such logs can be first compressed locally and then pulled as needed. Among them, when such logs need to be pulled, the user can send a pull instruction to the log collection agent device, and after receiving the pull instruction, the log collection agent device pulls the corresponding log of this type according to the information indicated by the pull instruction.
[0060] For data whose relevance to the current task of the unmanned vehicle is greater than the third preset threshold and whose priority is less than the fourth preset threshold, that is, data that is necessary for the business but has a lower priority, such as the tire pressure data and cargo box temperature data of the unmanned vehicle, the relevant logs of this type of data can first be compressed locally, and then periodically pulled by the log collection agent device, or pulled by the log collection agent device when the unmanned vehicle is in non-business time, that is, when the unmanned vehicle is not performing a task.
[0061] In the embodiment of the present application, the preset push strategy may include a real-time push strategy, an offline push strategy, and a batch push strategy.
[0062] Among them, the real-time push strategy is used to push the fourth target log whose data type is real-time data, and the real-time data includes data whose relevance to the current task of the unmanned vehicle is greater than the first preset threshold. The offline push strategy is used to push the fifth target log whose data type is offline data, and the offline data includes data whose relevance to the current task of the unmanned vehicle is less than the second preset threshold. The batch push strategy is used to push the sixth target log whose data type is batch data, and the batch data includes data whose relevance to the current task of the unmanned vehicle is greater than the third preset threshold and whose priority is less than the fourth preset threshold.
[0063] In an embodiment of the present application, the real-time push strategy includes, in response to determining that the fourth target log is generated, the second end pushes the fourth target log to the log gateway in real time. The offline push strategy includes, in response to receiving an instruction to push the fifth target log, the second end pushes the fifth target log to the log gateway. The batch push strategy includes, in response to determining that the sixth target log meets the batch push condition, the second end pushes the sixth target log to the log gateway.
[0064] Among them, the batch push conditions include at least one of the following: the time since the last push of the sixth target log reaches the preset pull cycle, and the unmanned vehicle is currently in non-business hours.
[0065] That is to say, different push strategies can be adopted for different types of log data in the unmanned vehicle logs generated in the cloud. For example, for data whose relevance to the current task of the unmanned vehicle is greater than the first preset threshold, that is, data that is more sensitive to the business, such as the current location coordinate data of the unmanned vehicle, it needs to be reported and processed in real time, so the logs related to this type of data can use the real-time push strategy and push the data-related logs immediately after they are generated.
[0066] For data whose relevance to the current task of the unmanned vehicle is less than the second preset threshold, that is, data that is not sensitive to the business, such as audit logs, operation logs, etc., such logs can be first compressed locally and then pushed as needed. Among them, when such logs need to be pushed, the user can send a pull instruction to the vehicle or the operating terminal. After receiving the push instruction, the vehicle or the operating terminal pushes the corresponding log of this type to the log gateway according to the information indicated by the push instruction.
[0067] For data whose relevance to the current task of the unmanned vehicle is greater than the third preset threshold and whose priority is less than the fourth preset threshold, that is, data that is necessary for the business but has a lower priority, such as the tire pressure data and cargo box temperature data of the unmanned vehicle, the relevant logs of this type of data can first be compressed locally, and then pushed to the log gateway periodically, or pushed to the log gateway when the unmanned vehicle is in non-business time, that is, when the unmanned vehicle is not performing a task.
[0068] Figure 3 This is a flow chart of another unmanned vehicle log collection method provided by an embodiment of the present application. Figure 3 Steps S301 to S304 in the embodiment shown are Figure 2 Steps S201 to S204 in the illustrated embodiment are substantially the same and will not be described in detail herein. Figure 3 As shown, the method also includes the following steps:
[0069] In step S305, in response to receiving the data analysis instruction, the log data to be analyzed is obtained from the target database, statistical analysis is performed on the log data to be analyzed, and the analysis result is displayed on the second end.
[0070] In the embodiment of the present application, after the unmanned vehicle log is stored in the target database, the log in the target database can also be queried and statistically analyzed. Among them, a query interface can be provided on the vehicle side or the operating terminal, and the user can access the target database for query by entering the query keyword. Furthermore, the statistical analysis can be implemented through a business intelligence (BI) system, and the statistical analysis results can be displayed on the vehicle side or the operating terminal.
[0071] In the embodiment of the present application, after receiving the data analysis instruction, the data analysis system can be used to obtain the log data to be analyzed from the target database, perform statistical analysis on the log data to be analyzed, and display the analysis results on the second end.
[0072] In the embodiment of the present application, data analysis may include analyzing the target indicators of the unmanned vehicle in the target area, and providing analysis results based on statistical data, as well as abnormality detection. The following describes the analysis methods in these two cases respectively.
[0073] Figure 4 1 is a flow chart of a method for performing statistical analysis on log data to be analyzed provided by an embodiment of the present application. Figure 4 As shown, the method comprises the following steps:
[0074] In step S401, in response to data analysis to count target indicators of unmanned vehicles in a target area, and providing analysis results based on statistical data, N statistical target indicators of M unmanned vehicles in the target area at N different time granularities are obtained.
[0075] Wherein, N is a positive integer greater than or equal to 1.
[0076] In step S402, N statistical target indicators are evaluated using normal distribution, and the target indicator value of a preset distribution interval in the normal distribution curve obtained by evaluation is determined as a statistical analysis result.
[0077] In the embodiment of the present application, when the data analysis is to count the target indicators of the unmanned vehicles in the target area and provide the analysis results based on the statistical data, N statistical target indicators of the M unmanned vehicles in the target area at N different time granularities can be obtained first. For example, the statistical target indicators of the M unmanned vehicles in the target area with hourly granularity, daily granularity, weekly granularity, monthly granularity and quarterly granularity can be obtained respectively.
[0078] Then, these statistical target indicators are evaluated using normal distribution respectively, and the evaluation results are fused. Finally, the target indicator value in the preset distribution interval of the fused normal distribution curve is used as the statistical analysis result.
[0079] In one example, since unmanned vehicles use mobile networks, network fluctuations often occur when they travel to areas such as under bridges or around buildings. If it is necessary to statistically understand the network delay in a certain target area, data statistics can be performed according to the time dimension, grid dimension, vehicle dimension, etc. to evaluate the network delay in the target area.
[0080] For example, for the target area, if each unmanned vehicle has n log records per hour (other time granularity less than one day is obtained), where n is a positive integer, then its average delay in one hour is L 平均延迟 :
[0081] Among them, delay 1 to delay n It is the delay data in n logs of each unmanned vehicle.
[0082] Furthermore, the average daily delay T 平均延迟 for:
[0083] Among them, L 平均延迟1 To L 平均延迟k is the k time periods contained in a day, if L 平均延迟k represents the average delay of one hour, then k=24.
[0084] Furthermore, the average weekly delay T of the target area can be calculated in a similar way. w , for example Where T 平均延迟j is the average latency for the day of the week.
[0085] Since the average value is not very accurate and may lead to statistical errors, the data can be analyzed and evaluated again using the normal distribution method.
[0086] Figure 5 Schematic diagram of a method for evaluating N statistical target indicators using normal distribution provided in an embodiment of the present application. Figure 5 As shown, the horizontal axis represents time, such as hours, days, weeks, months, etc., the vertical axis represents the delay size, and the bar graph represents the number of vehicles, that is, the number of vehicles in the same delay interval at the same time. A credible interval can be selected for the average delay in each time dimension, and then the credible intervals of different time dimensions can be fused, for example, by weighted averaging to obtain the final credible interval. The delay in the final credible interval is the statistical delay of the target area.
[0087] Alternatively, the normal distribution curves in each time dimension may be fused first, and then a credible interval may be selected for the fused curve, and the delay within the credible interval may be used as the statistical delay of the target area.
[0088] It is understandable that the technical solution provided in the embodiment of the present application can also perform data statistics according to other dimensions, such as grid dimension, vehicle dimension, etc., to obtain analysis results.
[0089] For example, you can sort the log data by day, week, or month according to the time dimension, and then aggregate and quantify the year-on-year indicators. Alternatively, you can sort the data by day, week, or month according to the grid dimension, and then aggregate and aggregate the sorted data to finally quantify the year-on-year indicators. Alternatively, you can sort the data by day, week, or month according to the vehicle latitude, and then aggregate and aggregate the sorted data to finally quantify the year-on-year indicators.
[0090] Figure 6 FIG. 1 is a flow chart of another method for performing statistical analysis on log data to be analyzed provided by an embodiment of the present application. Figure 6 As shown, the method comprises the following steps:
[0091] In step S601, in response to data analysis being anomaly detection, the log data to be analyzed is monitored.
[0092] In step S602, in response to abnormal log data being discovered during monitoring, alarm information is generated and sent to the second end.
[0093] In the embodiment of the present application, when the data analysis is anomaly detection, the log data to be analyzed can be monitored. If the monitoring finds abnormal log data, an alarm message is generated and sent to the second end.
[0094] In other words, log alarms, as a supplement to the usual monitoring alarm system, can make up for the exceptions that occurred before the monitoring point, such as TimeoutException. Therefore, after the logs are stored in the target database, the log data in the target database can be monitored to detect these exceptions and perform alarm processing.
[0095] Figure 7 Schematic diagram of a system for implementing the unmanned vehicle log collection method provided in the embodiment of the present application. Figure 7 As shown, the system can include multiple terminal devices such as mobile application, vehicle, Web and cloud. Among them, the mobile application, vehicle and Web can adopt an active push model to aggregate the logs generated therein to the log gateway. A log collection agent device can be installed on the cloud server, and the log collection agent device obtains the logs generated in the cloud by pulling, and the pulling is not perceived by the business.
[0096] According to different business attributes, you can set a variety of collection strategies, such as real-time collection, offline collection and batch collection. Among them, real-time data collection refers to the collection of business-sensitive data, such as the current location coordinates. This data needs to be reported and processed in real time. Offline data collection refers to the collection of business-insensitive data, such as audit logs, operation logs, etc. This log can be compressed locally and uploaded to the system on demand. Batch data collection refers to the collection of business-required but lower-priority data between real-time data and offline data, such as tire pressure data, cargo box temperature data, etc. This data can be uploaded to the system at regular / non-business times after local compression processing.
[0097] Logs collected in real time can be saved in real-time storage space, and logs collected offline and in batches can be saved in offline storage space. After data cleaning and format conversion, the logs in real-time storage space and offline storage space are saved in the database for use by the alarm system, data analysis system, and log query system.
[0098] The converted log format can be privately defined by the user according to actual needs, or the default format can be used, which is not limited here.
[0099] Logs stored in the database can be queried. Daily query is the most commonly used positioning method. For the vehicle side and the operating terminal, it is inconvenient to pull logs for analysis. Therefore, after collecting the logs, data can be queried through a graphical interface on the vehicle side and the operating terminal. Enter the key value to view the log. All unmanned vehicle logs can also be viewed and analyzed online on the web page, which greatly improves work efficiency and shortens the problem location time.
[0100] The technical solution of the embodiment of the present application provides multi-terminal log collection capabilities, and in order to adapt to different application scenarios, multiple collection methods and strategies are designed and implemented. In terms of log analysis, data statistics can also be achieved from multiple dimensions using different algorithms to improve the accuracy of log analysis.
[0101] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present application, which will not be described one by one here.
[0102] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.
[0103] Figure 8 Schematic diagram of an unmanned vehicle log collection device provided in an embodiment of the present application. Figure 8 As shown, the device comprises:
[0104] The pulling module 801 is configured to pull the first log from the first end by using a preset pulling strategy through a log collection agent device.
[0105] The push module 802 is configured to receive, through a log gateway, a second log pushed by the second end using a preset push strategy.
[0106] The processing module 803 is configured to perform standardization processing on the first log and the second log.
[0107] The storage module 804 is configured to store the standardized logs in the target database.
[0108] Among them, the first end includes the cloud, the second end includes the unmanned vehicle end and the unmanned vehicle operation terminal, and the standardized processing at least includes log data format conversion.
[0109] According to the technical solution provided in the embodiment of the present application, the unmanned vehicle logs stored in the cloud are pulled by the log collection agent device using a preset pull strategy, and the vehicle end and the operation terminal use a preset push strategy to push the unmanned vehicle logs stored in the vehicle end and the operation terminal to the log gateway, and then the logs in the log collection agent device and the log gateway are standardized, and finally the standardized logs are stored in the target database. It is possible to collect various types of logs in an adaptive manner according to the distribution and storage characteristics of the unmanned vehicle logs, and the collected unmanned vehicle logs are centrally stored, avoiding the current query and analysis difficulties caused by the scattered storage and non-uniform format of the unmanned vehicle logs, and the capacity of the centralized storage target database is expandable, avoiding the inability to correctly save logs due to insufficient storage space on the vehicle end or the operation terminal, improving the efficiency of log collection and enhancing user experience.
[0110] In an embodiment of the present application, the preset pulling strategies include a real-time pulling strategy, an offline pulling strategy and a batch pulling strategy; the real-time pulling strategy is used to pull the first target log whose data type is real-time data, and the real-time data includes data whose correlation with the current task of the unmanned vehicle is greater than a first preset threshold; the offline pulling strategy is used to pull the second target log whose data type is offline data, and the offline data includes data whose correlation with the current task of the unmanned vehicle is less than a second preset threshold; the batch pulling strategy is used to pull the third target log whose data type is batch data, and the batch data includes data whose correlation with the current task of the unmanned vehicle is greater than a third preset threshold and whose priority is less than a fourth preset threshold; wherein the first preset threshold is greater than or equal to the second preset threshold, and the third preset threshold is greater than or equal to the second preset threshold.
[0111] In an embodiment of the present application, the real-time pulling strategy includes, in response to determining that the first target log is generated, the log collection agent device pulling the first target log in real time; the offline pulling strategy includes, in response to receiving an instruction to pull the second target log, the log collection agent device pulling the second target log; the batch pulling strategy includes, in response to determining that the third target log meets the batch pulling condition, the log collection agent device pulling the target log; wherein the batch pulling condition includes at least one of the following: the time from the last time the third target log was pulled reaches a preset pulling period, and the unmanned vehicle is currently in non-business time.
[0112] In an embodiment of the present application, the preset push strategies include a real-time push strategy, an offline push strategy and a batch push strategy; the real-time push strategy is used to push a fourth target log whose data type is real-time data, and the real-time data includes data whose correlation with the current task of the unmanned vehicle is greater than a first preset threshold; the offline push strategy is used to push a fifth target log whose data type is offline data, and the offline data includes data whose correlation with the current task of the unmanned vehicle is less than a second preset threshold; the batch push strategy is used to push a sixth target log whose data type is batch data, and the batch data includes data whose correlation with the current task of the unmanned vehicle is greater than a third preset threshold and whose priority is less than a fourth preset threshold; wherein the first preset threshold is greater than or equal to the second preset threshold, and the third preset threshold is greater than or equal to the second preset threshold.
[0113] In an embodiment of the present application, the real-time push strategy includes, in response to determining that the fourth target log is generated, pushing the fourth target log to the log gateway in real time by the second end; the offline push strategy includes, in response to receiving an instruction to push the fifth target log, pushing the fifth target log to the log gateway by the second end; the batch push strategy includes, in response to determining that the sixth target log meets the batch push conditions, pushing the sixth target log to the log gateway by the second end; wherein the batch push conditions include at least one of the following: the time since the last push of the sixth target log reaches a preset pull period, and the unmanned vehicle is currently in non-business time.
[0114] In the embodiment of the present application, it also includes: in response to receiving the data analysis instruction, obtaining the log data to be analyzed from the target database, performing statistical analysis on the log data to be analyzed, and displaying the analysis results on the second end.
[0115] In an embodiment of the present application, in response to data analysis for statistically analyzing target indicators of unmanned vehicles in a target area and providing analysis results based on statistical data, statistical analysis is performed on the log data to be analyzed, including: obtaining N statistical target indicators of M unmanned vehicles in the target area at N different time granularities, where N is a positive integer greater than or equal to 1; evaluating the N statistical target indicators using a normal distribution, and determining that the target indicator value of a preset distribution interval in the normal distribution curve obtained by the evaluation is a statistical analysis result.
[0116] In an embodiment of the present application, in response to data analysis being anomaly detection, statistical analysis is performed on the log data to be analyzed, including: monitoring the log data to be analyzed; in response to abnormal log data being discovered through monitoring, generating alarm information and sending the alarm information to the second end.
[0117] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0118] Fig. 9 Schematic diagram of an electronic device provided in an embodiment of the present application. Fig. 9 As shown, the electronic device 9 of this embodiment includes: a processor 901, a memory 902, and a computer program 903 stored in the memory 902 and executable on the processor 901. When the processor 901 executes the computer program 903, the steps in the above-mentioned method embodiments are implemented. Alternatively, when the processor 901 executes the computer program 903, the functions of the modules / units in the above-mentioned device embodiments are implemented.
[0119] The electronic device 9 may be a desktop computer, a notebook, a PDA, a cloud server, or other electronic device. The electronic device 9 may include, but is not limited to, a processor 901 and a memory 902. Those skilled in the art will appreciate that Fig. 9 The electronic device 9 is merely an example and does not limit the electronic device 9 , and may include more or less components than those shown in the figure, or different components.
[0120] The processor 901 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0121] The memory 902 may be an internal storage unit of the electronic device 9, for example, a hard disk or memory of the electronic device 9. The memory 902 may also be an external storage device of the electronic device 9, for example, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 9. The memory 902 may also include both an internal storage unit of the electronic device 9 and an external storage device. The memory 902 is used to store computer programs and other programs and data required by the electronic device.
[0122] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units.
[0123] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. The computer program may include computer program code, which may be in source code form, object code form, executable file or some intermediate form. Computer-readable media may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc.
[0124] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A method for collecting logs of unmanned vehicles. It is characterized in that include: Pull the first log from the first end using a preset pulling strategy through a log collection agent device; Receiving, through the log gateway, the second log pushed by the second end using the preset push strategy; Performing standardization processing on the first log and the second log; Store the standardized logs in the target database; Among them, the first end includes the cloud, the second end includes the unmanned vehicle end and the unmanned vehicle operation terminal, and the standardized processing at least includes log data format conversion.
2. The method according to claim 1, It is characterized in that The preset pulling strategies include real-time pulling strategies, offline pulling strategies and batch pulling strategies; The real-time pulling strategy is used to pull a first target log whose data type is real-time data, and the real-time data includes data whose relevance to the current task of the unmanned vehicle is greater than a first preset threshold; The offline pulling strategy is used to pull a second target log whose data type is offline data, and the offline data includes data whose relevance to the current task of the unmanned vehicle is less than a second preset threshold; The batch pulling strategy is used to pull a third target log whose data type is batch data, wherein the batch data includes data whose relevance to the current task of the unmanned vehicle is greater than a third preset threshold and whose priority is less than a fourth preset threshold; The first preset threshold is greater than or equal to the second preset threshold, and the third preset threshold is greater than or equal to the second preset threshold.
3. The method according to claim 2, It is characterized in that The real-time pulling strategy includes, in response to determining that a first target log is generated, pulling the first target log in real time by a log collection agent device; The offline pulling strategy includes, in response to receiving an instruction to pull a second target log, pulling the second target log by a log collection agent device; The batch pulling strategy includes, in response to determining that the third target log meets the batch pulling condition, pulling the target log by the log collection agent device; Among them, the batch pulling condition includes at least one of the following: the time since the last pulling of the third target log reaches a preset pulling cycle, and the unmanned vehicle is currently in non-business time.
4. The method according to claim 1, It is characterized in that The preset push strategies include real-time push strategy, offline push strategy and batch push strategy; The real-time push strategy is used to push a fourth target log whose data type is real-time data, and the real-time data includes data whose relevance to the current task of the unmanned vehicle is greater than a first preset threshold; The offline push strategy is used to push a fifth target log whose data type is offline data, and the offline data includes data whose relevance to the current task of the unmanned vehicle is less than a second preset threshold; The batch push strategy is used to push a sixth target log whose data type is batch data, wherein the batch data includes data whose relevance to the current task of the unmanned vehicle is greater than a third preset threshold and whose priority is less than a fourth preset threshold; The first preset threshold is greater than or equal to the second preset threshold, and the third preset threshold is greater than or equal to the second preset threshold.
5. The method according to claim 4, It is characterized in that The real-time push strategy includes, in response to determining that a fourth target log is generated, pushing the fourth target log to the log gateway in real time by the second end; The offline push strategy includes, in response to receiving an instruction to push a fifth target log, pushing the fifth target log to the log gateway by the second end; The batch push strategy includes, in response to determining that the sixth target log meets the batch push condition, pushing the sixth target log to the log gateway by the second end; Among them, the batch push conditions include at least one of the following: the time since the last push of the sixth target log reaches the preset pull cycle, and the unmanned vehicle is currently in non-business time.
6. The method according to claim 1, It is characterized in that The method further comprises: In response to receiving the data analysis instruction, the log data to be analyzed is obtained from the target database, statistical analysis is performed on the log data to be analyzed, and the analysis result is displayed on the second end.
7. The method according to claim 6, It is characterized in that In response to the data analysis being to count target indicators of the unmanned vehicle in the target area and providing analysis results based on the statistical data, the statistical analysis of the log data to be analyzed includes: Obtain N statistical target indicators of M unmanned vehicles in the target area at N different time granularities, where N is a positive integer greater than or equal to 1; The N statistical target indicators are evaluated using a normal distribution, and a target indicator value in a preset distribution interval in the normal distribution curve obtained by the evaluation is determined as a statistical analysis result.
8. The method according to claim 6, It is characterized in that In response to the data analysis being anomaly detection, the performing statistical analysis on the log data to be analyzed includes: Monitor the log data to be analyzed; In response to abnormal log data being discovered through monitoring, an alarm message is generated and sent to the second end.
9. An unmanned vehicle log collection device, It is characterized in that include: A pulling module is configured to pull the first log from the first end using a preset pulling strategy through a log collection agent device; A push module is configured to receive, through a log gateway, a second log pushed by a second end using a preset push strategy; A processing module, configured to perform standardized processing on the first log and the second log; A storage module is configured to store the standardized logs in a target database; Among them, the first end includes the cloud, the second end includes the unmanned vehicle end and the unmanned vehicle operation terminal, and the standardized processing at least includes log data format conversion.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.
