Data processing method

By monitoring events and generating structures in the autonomous driving system for analysis, the problems of insufficient data accuracy and insufficient monitoring granularity in the prior art are solved, and more efficient and accurate monitoring and analysis are achieved.

CN119718811APending Publication Date: 2025-03-28BEIJING TUSEN ZHITU TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311255473.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-26
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

The data transmission performance indicator monitoring scheme of existing autonomous driving systems has decreased data accuracy due to timing statistics, and the monitoring granularity is not fine enough, which is prone to missing information and statistical data to cover up practical problems.

Method used

By monitoring the target type events in the target system, the event structure is generated, including event timestamps and feature information, the health status of data flows and nodes is analyzed, and the collection events are saved in the form of structures to avoid resource consumption caused by strings.

Benefits of technology

It improves the efficiency and accuracy of monitoring and statistics, simplifies the process of developers to conduct offline analysis of events, realizes more refined monitoring, and reduces the risk of missing information and statistical data covering up actual problems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119718811A_ABST
    Figure CN119718811A_ABST
Patent Text Reader

Abstract

The invention provides a data processing method, which is applied to a first computing device and comprises the following steps: monitoring an event of a target type in a target system, the target system comprising at least one node, the node being used for operating a data stream; in response to the occurrence of the event, a structural body of the event is generated, and the structural body comprises an event timestamp when the event occurs and feature information used for representing the event; and analyzing at least one of the health state of the data stream and the health state of the node according to the structural body. Through the method provided by the invention, the problem of insufficient data precision caused by regular statistics is solved, the problem of extra resource consumption caused by character strings is solved by storing the collected events in the form of the structural body, and the process of offline analysis of the events by developers is simplified through analysis of the structural body of the events, so that the user experience is improved. And the efficiency and accuracy of monitoring statistics are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a data processing method. The present application also relates to a data processing device, a computing device, and a computer-readable storage medium. Background Art

[0002] With the advancement of computing technology, artificial intelligence has developed rapidly, and autonomous driving is an important branch of artificial intelligence. For autonomous driving systems, online real-time monitoring and offline analysis of their operating status are very important, whether in the R&D test stage or the product stage. Online real-time monitoring can help safety officers and test engineers observe the operating status of the vehicle software, record the software performance of the autonomous driving system, discover potential problems, and make timely judgments and take over when autonomous driving may endanger safety. Offline analysis helps developers find software defects, performance bottlenecks and optimization points through data analysis, improve problem discovery efficiency, and guide the direction of software development.

[0003] Autonomous driving software is usually modular, with data transmission between modules, and different modules process data for different purposes. Existing data transmission performance indicator monitoring solutions usually collect and record data at the data sending and receiving ends, record data when the sending end sends data and when the receiving end receives data, and perform statistics on historical information at regular intervals to obtain statistical data values ​​such as frame rate, latency, and stability of the data stream for storage and display. Since the statistical behavior is timed, it will lead to a decrease in data accuracy, resulting in a certain amount of information loss. There is a situation where the monitoring granularity is not fine enough, which is prone to information missing and statistical data covering up actual problems. Therefore, a new processing method is urgently needed to solve the above problems. Summary of the invention

[0004] In view of this, the embodiment of the present application provides a data processing method. The present application also relates to a data processing device, a computing device, and a computer-readable storage medium to solve the above problems existing in the prior art.

[0005] According to a first aspect of an embodiment of the present application, a data processing method is provided, which is applied to a first computing device, and includes:

[0006] Monitoring events of a target type in a target system, wherein the target system includes at least one node, and the node is used to operate a data flow;

[0007] In response to the occurrence of the event, generating a structure of the event, wherein the structure includes an event timestamp when the event occurs and feature information used to characterize the event;

[0008] At least one of a health status of the data flow and a health status of the node is analyzed according to the structure.

[0009] According to a second aspect of an embodiment of the present application, there is provided a data processing apparatus, applied to a first computing device, comprising:

[0010] A monitoring module configured to monitor events of a target type in a target system, wherein the target system includes at least one node, and the node is used to operate a data flow;

[0011] A generating module, configured to generate a structure of the event in response to the occurrence of the event, wherein the structure includes an event timestamp when the event occurs and feature information for characterizing the event;

[0012] The analysis module is configured to analyze at least one of the health status of the data flow and the health status of the node according to the structure.

[0013] According to a third aspect of an embodiment of the present application, a computing device is provided, comprising a memory, a processor, and computer instructions stored in the memory and executable on the processor, wherein the processor implements the steps of the data processing method when executing the computer instructions.

[0014] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, which stores computer instructions, and when the computer instructions are executed by a processor, the steps of the data processing method are implemented.

[0015] The data processing method provided by the present application is applied to a first computing device, and includes monitoring events of a target type in a target system, wherein the target system includes at least one node, and the node is used to operate a data stream; in response to the occurrence of the event, generating a structure of the event, wherein the structure includes an event timestamp when the event occurs, and characteristic information used to characterize the event; and analyzing at least one of the health status of the data stream and the health status of the node according to the structure.

[0016] An embodiment of the present application solves the problem of insufficient data accuracy due to periodic statistics by collecting various events occurring during the data flow transmission between nodes in the target system, and solves the problem of additional resource consumption due to character strings by saving the collected events in the form of a structure. Through the analysis of the event structure, developers can implement diversified monitoring for different events, simplify the process of developers' offline analysis of events, and improve the efficiency and accuracy of monitoring statistics. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1is a flow chart of a data processing method provided by an embodiment of the present application;

[0018] Figure 2 This is a schematic diagram of the flow of data between modules provided in an embodiment of the present application;

[0019] Figure 3 is an execution flow chart of an execution point provided by an embodiment of the present application;

[0020] Figure 4 It is a state transition time consumption diagram provided by an embodiment of the present application;

[0021] Figure 5 is a structural schematic diagram of a data processing device provided by an embodiment of the present application;

[0022] Figure 6 It is a structural block diagram of a computing device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0023] Many specific details are described in the following description to facilitate a full understanding of the present application. However, the present application can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of the present application, so the present application is not limited by the specific implementation disclosed below.

[0024] The terms used in one or more embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of the present application. The singular forms of "a", "said" and "the" used in one or more embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of the present application refers to and includes any or all possible combinations of one or more associated listed items.

[0025] It should be understood that, although the terms first, second, etc. may be used to describe various information in one or more embodiments of the present application, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of the present application, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0026] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards in the relevant regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0027] With the advancement of computing technology, artificial intelligence has developed rapidly, and autonomous driving is an important branch of artificial intelligence. For autonomous driving systems, online real-time monitoring and offline analysis of their operating status are very important, whether in the R&D test stage or the product stage. In the R&D test stage, online real-time monitoring can help safety officers and test engineers observe the operating status of the vehicle software, so as to record the software performance of the autonomous driving system, find potential problems, and make timely judgments and take over when the autonomous driving system may endanger safety, ensuring the safety of R&D testing; offline analysis helps software developers track the performance of autonomous driving software, find software defects, performance bottlenecks and optimization points through data analysis and other means, improve problem discovery efficiency, guide software development direction, etc. In the product stage, online real-time monitoring is an indispensable module of the safety system. The safety system analyzes the data generated by real-time monitoring, determines whether there is a failure, and notifies the driver of the situation, or enters the minimum risk mode, etc.

[0028] Autonomous driving software is usually modular, with data transmission between modules, and different modules processing data for different purposes. For example, the camera module transmits image data to the detection module, which processes the image data and transmits the detection frame data to the fusion module. For data transmission, its performance indicators usually include frame rate, latency, stability, etc.; for module processing, its performance indicators usually include execution time consumption, CPU time consumption, cache hit count, etc. These indicators comprehensively reflect the autonomous driving system's ability to process real-world data and its ability to utilize computing resources, and are one of the key indicators reflecting the operating status of autonomous driving.

[0029] The existing data transmission performance indicator monitoring scheme usually collects and records data at the data sending and receiving ends. When the sending end sends data and when the receiving end receives data, the information is recorded, and the historical information is counted at regular intervals to obtain statistical values ​​such as the frame rate, delay, and stability of the data stream, which are stored and displayed. Since the statistical behavior is timed, and the frequency of the actual data stream (the typical positioning data frequency is 50Hz) is often much higher than the statistical frequency (the typical statistical frequency is 2Hz or even 1Hz), while reducing the statistical frequency to avoid excessive performance consumption caused by data statistics, it also leads to a decrease in data accuracy and certain information loss. For example, in a short period of time (such as 1 second), the delay of the data stream suddenly increases and then recovers. It is likely that the data fluctuations within the statistical time window are not large, which conceals the actual problem. The existing module processing performance indicator monitoring scheme has similar practices and defects as the data transmission performance indicator monitoring scheme. It also has the problem that the monitoring granularity is not fine enough, information is easily missing, and statistical data conceals the actual problem.

[0030] At present, a considerable number of autonomous driving systems use ROS (Robotics Operating System) as middleware. In order to ensure universality, the data structure DiagnosticsArray provided by ROS for sending and saving performance indicator information uses a large number of strings as the field type of its data structure. However, since the aforementioned data indicators are basically numbers, it is very inefficient to use string format to represent numbers. This will not only bring additional coding pressure, but also additional data transmission pressure.

[0031] Based on this, in the present application, a data processing method is provided. The present application also relates to a data processing apparatus, a computing device, and a computer-readable storage medium, which are described in detail one by one in the following embodiments.

[0032] Figure 1 A flowchart of a data processing method provided according to an embodiment of the present application is shown. The data processing method is applied to a first computing device and specifically includes the following steps:

[0033] Step 102: Monitor events of a target type in a target system, wherein the target system includes at least one node, and the node is used to operate a data flow.

[0034] Among them, the target system specifically refers to a system that needs to perform a data processing method, such as an autonomous driving system, an automatic vending system, a warehouse picking system, etc. In the method provided in this application, the specific business scenario of the target system is not limited, and the actual application shall prevail. The target system includes multiple nodes, and the node specifically refers to a module in the target system for processing data streams. For ease of understanding, in the subsequent processing process, the target system is explained as an example of an autonomous driving system. For those skilled in the art, the method can be applied to other target systems. The autonomous driving system specifically refers to a vehicle operation system that uses communication, computer, network, and control technologies to achieve real-time and continuous control of the vehicle, and fully automates the work of the vehicle driver and highly centrally controls the vehicle.

[0035] The target system includes sensor nodes (also referred to as sensor modules) and algorithm nodes (also referred to as algorithm modules). Nodes specifically refer to modules in the target system for processing data streams. Multiple nodes have a topological network relationship. For example, sensor nodes collect data streams and transmit the collected data streams to downstream algorithm nodes. Algorithm nodes also transmit data streams to each other. Each sensor can serve as a sensor node. Sensors can include inertial measurement units (IMUs), global positioning system (GPS) transceivers, radar (such as millimeter wave radar RADAR) units, laser rangefinders / LIDAR units (or other distance measuring devices), acoustic sensors, and cameras. The sensor system can also include multiple sensors for monitoring vehicles (for example, oxygen monitors, fuel gauge sensors, engine oil pressure sensors, etc.).

[0036] The algorithm module includes a map engine and a positioning module, a perception module, a navigation or path module, and a control module. The map engine and the positioning module are used to provide map information and positioning information. The perception module is used to perceive things in the environment where the vehicle is located based on the information obtained by the sensor system and the map information provided by the map engine. The perception module may include an image perception module, a point cloud perception module, a fusion perception module, etc., which are respectively used to detect image data, detect point cloud data, and perform fusion detection on multiple data or detection results. The navigation or path module is used to plan a driving path for the vehicle based on the processing results of the map engine, the positioning module, and the perception module. The control module converts the decision information input of the navigation or path module and other modules into a control command output for the vehicle control system, and sends the control command to the corresponding components in the vehicle control system through the vehicle network (for example, a vehicle internal electronic network system implemented by CAN bus, local area interconnection network, multimedia directional system transmission, etc.) to realize automatic control of the vehicle; the control module can also obtain information about each component in the vehicle through the vehicle network.

[0037] The target type event specifically refers to a specific operation, state change or signal trigger that occurs during the implementation of the target system. The target type specifically refers to a type that is pre-set and needs to be collected and analyzed. For example, target type events include the arrival of data from a certain input data stream, an exception to a certain input data stream (such as incorrect timestamp, frame loss, long-term inability to receive input data stream, etc.), the start and completion of the node's data processing function, the start and completion of external transmission of data processing results, the start and completion of node initialization, the start and completion of exit cleanup, the user-defined node processing status normal, exception report, etc. Among them, data stream arrival, data stream exception, start and end of data processing function execution, etc. are all target types.

[0038] A data stream is a set of ordered data sequences of bytes with a starting point and an end point. If a camera module continuously captures images, an image data stream is formed. In a specific embodiment provided in the present application, the data stream includes at least one of an input data stream and an output data stream;

[0039] The node is associated with an identifier of an input data stream and an identifier of an output data stream. The node processes the input data stream through a data processing function to obtain an output data stream, and the output data stream includes an execution result of the data processing function.

[0040] The node includes a data processing function, which performs corresponding data processing on the received input data stream to obtain the corresponding output data stream. The data stream flowing into the node is called the input data stream, and the data stream flowing out of the node is called the output data stream.

[0041] For example, data stream 1 and data stream 2 are input to node 1, and the data processing function in node 1 processes data stream 1 and data stream 2 to generate data stream 3, and transmits data stream 3 from node 1 to node 2. For node 1, data stream 1 and data stream 2 are input data streams, and data stream 3 is the output data stream; for node 2, data stream 3 is the input data stream.

[0042] The node performs corresponding operations on the data stream, and specifically, the operations include at least one of receiving, processing, and outputting;

[0043] The event includes at least one of a data flow state change of the data flow and a change of the operation state of the node, the data flow state change is used to indicate that the state of the data flow has changed, and the operation state change is used to indicate that the operation state of the node has changed.

[0044] Among them, for a certain node, when a data stream arrives, the node will receive the data stream, and process the data stream accordingly in the node to generate an output data stream, and output the output data stream to another node. The sensor module collects sensor data, which can be considered as the sensor module receiving the data stream. It should be noted that the output operation of the data stream includes both the output of the original data and the output of the data processing results. For example, after the camera, lidar and other sensors collect pictures or point cloud data, the pictures or point cloud data are output to the outside, which is an output operation. For the result calculated by a certain upstream algorithm node, it is output to the downstream algorithm node, and the output calculation result is also considered an output operation.

[0045] In addition, in practical applications, monitoring events of the target type in the target system specifically monitors at least one of a data flow state change and an operation state change of a node in the target system.

[0046] Specifically, in a specific implementation provided in the present application, the node has a data processing function, and the operation state change of the node includes at least one of the following:

[0047] The data processing function starts executing, the data processing function completes executing, the node starts initializing, the node completes initializing, the node starts exiting and cleaning up, the node completes exiting and cleaning up, the node starts outputting the execution result of the data processing function, and the node transmits the completed execution result.

[0048] The start of execution of a data processing function may be to execute processing on one or several data objects, for example, the data processing function processes a certain collected data frame, or for another example, the data processing function processes several collected continuous data frames. The completion of execution of a data processing function corresponds to the start of execution of the data processing function, and the state of the start of execution of the data processing function and the state of the end of execution of the data processing function can both be understood as specific target type events.

[0049] The node includes one or more data processing functions, which may include the deep learning model applied by each algorithm module and the data capture function of the sensor module. The data processing function starts to execute specifically refers to the event that the data processing function starts to execute data processing, and the data processing function completes execution specifically refers to the event that the data processing function ends to execute data processing. The start and end of execution can be for each data frame of the data stream, that is, the data processing function starts to process each frame and ends the processing of each frame. The node starts to initialize specifically refers to the event that the node starts to initialize, the node completes the initialization specifically refers to the event that the node completes the initialization, the node starts to exit and clean up specifically refers to the event that the node starts to exit and clean up, the node completes the exit and clean up specifically refers to the event that the node ends the exit and clean up, the node starts to output the execution result of the data processing function specifically refers to the event that the node starts to output the execution result externally, and the node outputs the completed execution result specifically refers to the event that the node ends to output the execution result externally. Considering that the algorithm module may need to combine map data to output the detection result, and usually calculates the input data frame based on the deep learning model, the initialization process may include reading map data, loading the deep learning model, allocating video memory, etc. Cleaning is the reverse operation of initialization, such as releasing video memory. In another specific implementation manner provided by the present application, the data flow state change of the data flow includes at least one of the following: data of the data flow arrives at the node, the data flow is abnormal;

[0050] The abnormality of the data stream includes at least one of the following: frame loss of the data stream, an error in the timestamp of the data stream, and interruption of the data stream.

[0051] The data flow state change for data flow specifically refers to the event statistics from the data flow dimension. For example, the arrival of data flow at a node is considered as a data flow arrival event, and the abnormality of data flow is considered as a data flow abnormality event. Furthermore, the abnormality of data flow can specifically include data flow frame loss, incorrect data flow timestamp, data flow interruption (for example, no data flow frame has arrived for a period of time, that is, data flow timeout), etc.

[0052] In practical applications, each event corresponds to the timestamp of the event and related event parameter fields, which are used to describe the occurrence and related characteristics of the event. By collecting and recording these events, comprehensive monitoring and analysis of the operating status of the autonomous driving system can be provided. The parameter fields carried by each event are structured and pre-defined. For example, the event "data arrival of a certain input data stream" contains fields such as "data stream unique number", "data unique number" and "data timestamp".

[0053] The event recording node receives event-related data sent by each business node. The interface provided by the event recording node is an event recording function. The event recording function receives two groups of parameters. The first group is the event type to be recorded, and the second group is the parameter field related to the event type. The parameter field of the second group of parameters can be zero, one or more, and the number of parameter fields depends on the definition of the event type. The event type is the target type in the above steps, such as data flow arrival, data flow exception, data processing function execution starts, data processing function execution ends, business node starts initialization, business node ends initialization, data processing results start to be sent externally, data processing results end to be sent externally, etc.

[0054] For example, to record the event "data from a certain input data stream has arrived", the business node that receives the data stream sends information to the event recording node. The parameters received by the event recording function in the event recording node are: event type "data from a certain input data stream has arrived", parameter fields "data stream number", "data number" and "data timestamp", etc. In actual applications, there may be multiple data in a data stream. Correspondingly, the data stream has a corresponding data stream number, each data has a data number, and the data stream timestamp of the data stream arrival and each data timestamp are recorded. For example, an image acquisition device acquires a data stream numbered as data stream 1, and data stream 1 includes data numbers: image a, image b, image c, etc., and records the data stream timestamp of data stream 1 and the data timestamps corresponding to each image.

[0055] The timestamp of the event (which can be called the event timestamp) is processed by the event recording function itself, and the current system time when the event occurs is obtained as the event timestamp. The timestamp of the event can also be passed in by the user, just add a set of parameters in the parameter field. The way of processing by the event recording function itself is convenient to reduce the number of parameters passed in by the user and reduce the workload of writing code for calling methods. The event recording function will forward the event to other nodes for corresponding subsequent processing.

[0056] Step 104: In response to the occurrence of the event, generate a structure of the event, wherein the structure includes an event timestamp when the event occurs and feature information for characterizing the event.

[0057] The event recording function will generate events with the passed parameters and forward them to the subsequent event serialization storage node, which will be responsible for recording and serializing the events and generating the event structure. The event timestamp and event feature information will be saved in the structure. The event structure specifically refers to a fixed format for saving event-related information. Furthermore, the event feature information may include event type, event parameters, and other information.

[0058] The event serialization storage node can also output the structure of the serialized event to a specified location. Furthermore, after the event recording function in the event recording node records the relevant information of each event, the event recording function will forward the event to the event serialization storage node for event serialization operation.

[0059] In a specific implementation provided by the present application, the structure for generating the event includes:

[0060] Obtaining the event timestamp when the event occurs through a pre-constructed event base class function;

[0061] Acquiring the values ​​of each preset parameter item of the event as the characteristic information through a pre-constructed event constructor; and

[0062] The structure of the event is generated at least according to the event timestamp and the characteristic information through a pre-constructed event recording function.

[0063] Specifically, an event base class function for recording event timestamps is pre-constructed, and the event timestamps of each event when it occurs are obtained based on the event base class function. An event constructor is pre-constructed, and the values ​​of each preset parameter item of each event are obtained through the event constructor as the characteristic information of the event, such as the event type identifier, the event occurrence number (or the event occurrence identifier, which represents the number of occurrences of the event), the data stream identifier corresponding to the event, the data timestamp and data identifier corresponding to the data stream when the event occurs, etc.

[0064] Finally, through the pre-constructed event recording function, the structure corresponding to each event is generated according to the event timestamp and the characteristic information corresponding to the event.

[0065] Specifically, in a specific implementation provided by the present application, an event base class function BaseEvent is defined, and its parameters include the timestamp of the event occurrence. The event base class function performs necessary initialization work, such as obtaining the time when the event occurs, applying for memory, etc. The timestamp of the event occurrence can be obtained through the event base class function. When an event occurs, the timestamp of the event occurrence can be obtained through the event base class function.

[0066] Then define each event constructor that inherits the event base class function. In the method provided in this application, corresponding event constructors are created for different events. Specifically, each target type corresponds to an event constructor, and the constructor parameters of the event constructor are the parameter fields corresponding to the event. For example, the data arrival event of the data stream is the event constructor IncomingData, the data loss event of the data stream is the event constructor LostFrame, the data processing function starts executing the event is the event constructor FunctionCall, the data processing function completes the execution event is the event constructor FunctionReturn, and so on.

[0067] Taking the data arrival event IncomingData of a data stream as an example, its parameters include the data stream ID channelId, the data ID DataId, the data timestamp DataTimestamp and the like.

[0068] Taking the data loss event LostFrame in the data stream as an example, its parameters include the data stream number channelId, the lost data timestamp lostDataTimestamp, and the like.

[0069] Taking the data processing function start execution event FunctionCall as an example, its parameters include the event occurrence number callId, etc. The event occurrence number specifically refers to the identification information of the event.

[0070] Taking the data processing function completion execution event FunctionReturn as an example, its parameters include the event occurrence number callId and the like.

[0071] Each event constructor defines the preset parameter items of each event, and the values ​​collected by the parameter items of each event constructor are used as the characteristic information of each event. When the event corresponding to each event constructor occurs, the event constructor can collect the characteristic information of the time.

[0072] Based on the above event definitions, an event recording function LogEvent is defined for recording events. This event recording function uses the template feature of the programming language, takes the event constructor as the template parameter, and takes the constructor parameter of the event constructor as the function parameter. When the event recording function is called, the corresponding event will be generated, and the event timestamp and various feature information will be used to generate the time structure of the event.

[0073] It should be noted that the data timestamp corresponding to the event occurrence includes the timestamp of the data frame currently being operated when the event occurs, such as the timestamp of the data frame currently being received, the timestamp of the data frame being calculated, the timestamp of the data frame starting to be output, the timestamp of the data frame completed by output, the timestamp of the data frame with an exception, the timestamp of the data frame missing during the data flow interruption, etc. Specifically, the data timestamp is, for example, the timestamp of the data frame when the data flow arrives at a certain node, or the timestamp of the data frame when the data processing function starts to calculate based on a certain data frame, or the timestamp of the lost frame when the data flow loses a frame; or the timestamp of the frame when the result of a certain frame starts to be output. The timestamp of the frame can be the acquisition timestamp of the data source, and the data source is the sensor node corresponding to the data flow. For example, the camera collects a frame of image at time t, and the image output by the camera to the first algorithm node carries the timestamp t, and the calculation result of the frame output by the first algorithm node to the second algorithm node still carries the timestamp t, and multiple calculation results obtained based on the same data source will carry the acquisition timestamp t of the data source.

[0074] In another specific embodiment provided in the present application, the method further comprises:

[0075] Serializing the structure of the event to generate encoded data;

[0076] The encoded data is sent to a preset storage area, wherein the encoded data is used to analyze at least one of a health status of the data flow and a health status of the node.

[0077] Currently, some autonomous driving systems use ROS (Robotics Operating System) as middleware. ROS provides the data structure DiagnosticsArray for sending and saving performance indicator information. In order to ensure universality, a large number of strings are used as the field type of its data structure. However, the various data indicators mentioned above are basically in digital format, and using string format to represent numbers is very inefficient, which will bring additional coding pressure and data transmission pressure.

[0078] Based on this, in the method provided in the present application, the above-mentioned problem is solved by performing event serialization processing on the structure of the event. After serialization processing on the structure of the event, coded data in a preset format is generated, and the coded data is sent to a preset storage area, so that in the subsequent process, the coded data can be obtained from the preset storage area, and the coded data can be used to analyze at least one of the health status of the data flow and the health status of the node.

[0079] Specifically, the event serialization operation specifically refers to the process of representing fields such as event occurrence time, event type, and event parameters as data in a preset format, and the representation of multiple serialized events is a data stream in a preset format. Deserialization and parsing of the data stream in the preset format can restore fields such as event occurrence time, event type, and event parameters in the order of event occurrence. Furthermore, the preset format can be a binary format, that is, information such as event occurrence time, event type, and event parameter fields are saved in binary format. The data stream in binary format can be output to any location that can receive binary data streams, such as files, Unix domain sockets, TCP sockets, WebSockets, etc.

[0080] The structure of the event is serialized to generate coded data, including:

[0081] Serializing the structure of the event to obtain serialization information;

[0082] The serialized information of the multiple events is encoded according to the timestamp sequence of the multiple events to generate the encoded data.

[0083] Specifically, the structure of the event is serialized according to a preset format to generate serialized information. For the convenience of storage, the serialized information of multiple times is encoded according to the timestamp sequence of the event to generate encoded data.

[0084] In practical applications, each event corresponds to a structure. To facilitate subsequent operation processing, the event structure is serialized. Specifically, the event structure is serialized in binary format to obtain serialized information in binary format. To facilitate storage, multiple serialized information in binary format are encoded in the order of event timestamps to obtain encoded data.

[0085] In practical applications, serialization is an operation that consumes a lot of computing resources, and the operation of outputting encoded data involves the input and output interfaces of the operating system. Therefore, the event serialization operation and the output of encoded data are run as separate threads, and asynchronous serialization and storage are used in separate threads, so that the event recording function will not block the caller and avoid affecting the performance of the target system.

[0086] Encoding the serialized information of the multiple events according to the timestamp order of the multiple events to generate the encoded data includes:

[0087] Encoding the serialized information of the multiple events in the order of the timestamps of the multiple events to obtain a serialized information stream; and

[0088] The serialized information stream is compressed to obtain the encoded data.

[0089] Specifically, in the actual data transmission process, the encoded data may have a slow transmission speed and a long transmission time due to its large volume. Based on this, in the process of generating the encoded data, an additional data compression step can be added to the data. Furthermore, the serialized information of multiple events is first encoded in the order of the timestamps of each event to obtain a serialized information stream, and then the generated serialized information stream is compressed to obtain the encoded data. In this application, the compression method of the serialized information is not limited. It is subject to the actual application.

[0090] In a specific implementation manner provided in this specification, sending the encoded data to a preset storage area includes:

[0091] Cache the encoded data in a preset cache area;

[0092] Counting the data capacity of the encoded data in the preset cache area;

[0093] In response to the data capacity being greater than or equal to a threshold, the encoded data in the preset cache area is sent to the preset storage area.

[0094] In practical applications, frequent data transmission may also cause performance loss. Therefore, after generating the encoded data, the encoded data may be cached in a preset cache area, and the data capacity of the encoded data in the preset cache area may be counted. When the data capacity is greater than or equal to a threshold, that is, the encoded data cached in the preset cache area reaches a certain size, a data stream output is performed on the encoded data cached in the preset cache area, and the encoded data in the preset cache area is output to the preset storage area. This can reduce the number of system calls and avoid performance losses caused by frequent switching between user mode and kernel mode.

[0095] Part of the functions of the event serialization storage module can be run in an independent process. A typical implementation is to embed the serialization process into the autonomous driving software module, and transfer the load to an independent process through inter-process communication. The independent process receives the original event binary data stream and performs subsequent actions such as compression and file writing. This can decouple event serialization and event data storage, avoid mutual influence between software modules, and provide more expansion possibilities. For example, part of the functions of the aforementioned online monitoring module can also be integrated into the independent process to centrally process event data and realize cross-module data indicator monitoring, such as cross-module communication delay.

[0096] Step 106: Analyze at least one of the health status of the data flow and the health status of the node according to the structure, and then analyze the health status of the target system.

[0097] After the above steps, the structure of each event will be obtained, and the health status of the data flow and the health status of the node can be further analyzed according to the structure of each event. Specifically, the health status of the data flow or the node can be analyzed according to the structure, which can be implemented by the event serialization data parsing module.

[0098] The event serialization data parsing module is responsible for parsing the binary data files saved by the event serialization data storage module and restoring them into a structured event sequence. That is, it records the event occurrence time, event type, and event parameters of each event. Then, according to different data analysis requirements, the corresponding events are selected from the parsed event sequence for analysis to determine at least one of the health status of the data flow and the health status of the node.

[0099] The event sequence that occurs during the runtime of the target system is parsed according to the event serialization data parsing module to restore the running status at that time. The presentation forms of structured event sequences include but are not limited to C++ struct, Python language dict, Josn format string, Csv format table, etc.

[0100] In a specific implementation provided in the present application, the node has a data processing function;

[0101] Analyzing the health status of the node according to the structure includes:

[0102] determining at least one execution point in the data processing function;

[0103] Obtaining time information of the data processing function when executing at each execution point;

[0104] The time consumption information of the data processing function is determined according to the time information corresponding to each execution point.

[0105] In practical applications, each node has a corresponding data processing function. Usually, a node can have one or more data processing functions. At least one execution point is pre-configured in the data processing function, where the execution point can be understood as a probe function in the data processing function. For example, a probe function is set at a location that needs to be monitored in the data processing function, and the probe function is used as an execution point. In the process of the data processing function executing data processing, the time information corresponding to each execution point is recorded according to each execution point. Furthermore, the time point corresponding to each execution point is recorded. When recording events for the data processing function of the node, the timestamp of the data processing function executing to each execution point can be recorded at the same time, and the corresponding event structure can be generated. After obtaining the time information corresponding to each execution point, the time-consuming information of the data processing function can be determined.

[0106] For example, a data processing function includes two execution points, namely, execution point 1 and execution point 2. During the data processing function's data flow processing operation, the time points corresponding to each execution point are recorded respectively. The time information corresponding to execution point 1 is t1, and the time information corresponding to execution point 2 is t2. When execution point 1 represents the start execution time point of the data processing function, and execution point 2 represents the end execution time point of the data processing function, the time information of the data processing function can be determined based on time information t2 and time information t1. In addition, the execution time of the corresponding code segment can also be determined based on the time difference from the start execution time point of the data processing function to the execution to any execution point. At this time, the point where the data processing function starts to execute can be regarded as an execution point.

[0107] In practical applications, a data processing function may have multiple time information that needs to be recorded. Subsequently, according to different business requirements, the time information to be used is determined, and then the time consumption information corresponding to each business requirement is further determined. Specifically, the at least one execution point includes multiple execution points;

[0108] Determining the time-consuming information of the data processing function according to the time information corresponding to each execution point includes:

[0109] Calculate the processing time of the data processing function between any two execution points according to the time information respectively corresponding to the two execution points;

[0110] At least one of a critical execution segment and an abnormal execution segment in the data processing function that affect data processing efficiency is determined according to the processing time consumption between two execution points.

[0111] In a data processing function, there may be data processing of its own, or it may be necessary to call other business processes, etc. In the process of counting the time consumption of the data processing function, multiple execution points can be set by deploying probe functions, and the processing time consumption of the data processing function between any two execution points can be determined by calculating the difference between the time information corresponding to any two execution points. Multiple execution points divide the data processing function into multiple execution segments, and the processing time consumption between two execution points can be used to further determine at least one of the key execution segments and the abnormal execution segment in the multiple execution segments.

[0112] For example, there are five execution points in the data processing function, namely, execution point 1, execution point 2, execution point 3, execution point 4, and execution point 5. During the data processing process, the time information corresponding to each execution point is recorded respectively, namely, time information t1 corresponding to execution point 1, time information t2 corresponding to execution point 2, time information t3 corresponding to execution point 3, time information t4 corresponding to execution point 4, and time information t5 corresponding to execution point 5. There is an execution segment corresponding to any two execution points, for example, execution segment a is between execution point 1 and execution point 2, execution segment b is between execution point 1 and execution point 3, and so on. The processing time corresponding to each execution segment can be determined through the time information corresponding to each execution point, and the execution segment that exceeds the preset time threshold is determined as a key execution segment, and the execution segment with abnormal fluctuations in processing time is determined as an abnormal execution segment, so as to locate the cause affecting the data processing efficiency.

[0113] In practical applications, analyzing the health status of a node includes not only the health status within the node, but also the health status between nodes. In another specific implementation provided by the present application, the target system includes a plurality of nodes, and the plurality of nodes have an upstream and downstream relationship;

[0114] Analyzing the health status of the node according to the structure includes:

[0115] Calculating the data transmission time between the upstream node and the downstream node according to the time when the upstream node outputs the completion of the execution result and the time when the execution result reaches the corresponding downstream node; and

[0116] At least one of a key node and an abnormal node that affect data transmission efficiency among the multiple nodes is determined according to the data transmission time between any two nodes.

[0117] In the target system, there are usually multiple nodes, such as node 1, node 2, node 3, and node 4, among which node 1 and node 2 collect data, node 3 receives the data from node 1 and node 2 for processing, and passes the processed data stream to node 4. In addition to receiving the data stream from node 3, node 4 also receives the data stream sent by node 2. Therefore, for node 3, its upstream nodes are node 1 and node 2, and its downstream node is node 4; for node 4, its upstream nodes are node 2 and node 3.

[0118] In the case of calculating the health status between nodes, the data transmission time of the execution result between the upstream node and the downstream node can be determined based on the time point when the upstream node outputs the completed execution result and the time point when the execution result reaches the downstream node. Among multiple data transmission time consumptions, the nodes that exceed the preset transmission time threshold are identified as key nodes, and the nodes with abnormal fluctuations in transmission time are identified as abnormal nodes, thereby locating the key nodes and abnormal nodes that affect the low data transmission efficiency. In practical applications, if the transmission efficiency is low, both the upstream nodes and the downstream nodes will be analyzed as key nodes or abnormal nodes. For example, if the data transmission time between node 1 and node 2 is always high, it means that node 1 and node 2 are key nodes; for another example, if the data transmission time between node 3 and node 4 fluctuates greatly, it means that node 3 and node 4 are abnormal nodes.

[0119] In practical applications, the method also includes:

[0120] Calculating a reference mean value corresponding to each node according to a node reference parameter corresponding to each node, wherein the node reference parameter includes at least one of a data timeliness value, a sending time, and an execution time;

[0121] The key nodes are determined in each node according to the reference mean corresponding to each node.

[0122] When determining key nodes, not only nodes whose time consumption exceeds a preset threshold are included, but judgment can also be made based on the node reference parameters of the nodes. Specifically, the reference mean of each node can be calculated based on the node reference parameters of each node. The node reference parameters may include one or more of the data timeliness value, sending time consumption, and execution time consumption. If there are multiple items, weighted processing will be performed according to the weight value of each item to determine the reference mean corresponding to each node.

[0123] After the reference mean is determined, the key nodes can be further determined in each node according to the reference mean corresponding to each node. Furthermore, the nodes can be sorted according to the reference mean, and the key nodes can be selected from the sorting results.

[0124] In another specific implementation provided by the present application, the node has a data processing function;

[0125] Analyzing at least one of the health status of the data flow and the health status of the node according to the structure includes at least one of the following:

[0126] Calculate the data timeliness value according to the event timestamp when the event occurs and the data timestamp in the data stream;

[0127] Calculating the execution time of the data processing function according to the start time and the completion time of the data processing function;

[0128] The time consumed for sending the execution result is calculated according to the time taken for the data processing function to complete execution and the time taken for the node to output the execution result.

[0129] The health status of the data stream and the health status of the node are analyzed based on the structure of the event. Specifically, the analysis is performed based on different events. For example, the health status of the data stream is analyzed based on the structure of the data stream event, and the health status of the node is analyzed based on the structure of the event of the data processing function in the node.

[0130] Specifically, the data age value corresponding to the data stream is calculated based on the event timestamp in the structure of the data stream event and the data timestamp in the data stream, and the health status of the data stream is further judged based on the data age value. For example, when the data age value of the data stream is less than a preset threshold, the data stream is considered healthy; when the data age value of the data stream is greater than or equal to the preset threshold, the data stream is considered abnormal.

[0131] For the nodes in the target system, the execution time of the data processing function in the node can be determined based on the start execution time and completion execution time of the data processing function, and the health status of the node can be determined by the execution time. For example, when the execution time is less than the preset threshold, the node is considered healthy; when the execution time is greater than or equal to the preset threshold, the node is considered abnormal.

[0132] For the nodes in the target system, the sending time of the node sending the execution result can also be calculated based on the completion execution time point and the transmission completion time point of the data processing function in the node, and the health status of the node can be determined by the sending time. For example, when the sending time is less than the preset threshold, the node is considered healthy; when the sending time is greater than or equal to the preset threshold, the node is considered abnormal.

[0133] In addition, the disclosed embodiment can also monitor specific types of driving events, such as emergency braking events, side parking events, manual takeover events, lane change events, acceleration events, deceleration events, etc., and recording these driving events helps to analyze the safety of the vehicle's driving process. If it is found through analysis that the vehicle frequently has emergency braking events during a trip (such as the number of emergency braking times within a predetermined period exceeds a threshold), a prompt message can be generated to prompt whether the vehicle's automatic driving system is abnormal. Or, if the vehicle frequently accelerates and decelerates during driving (such as the number of accelerations and / or decelerations within a predetermined period exceeds a threshold), a prompt message can be generated to prompt that the vehicle's planning module may need to be improved. In some embodiments, the control module issues a corresponding driving event instruction to represent the occurrence of the driving event, such as determining the side parking instruction by recording the side parking instruction, etc. The computing device records the time when the instruction is issued as the timestamp of the event, and the relevant parameters carried in the instruction, such as acceleration value, deceleration value, turning angle, etc., can be used as characteristic information of the driving event. In addition, the embodiments of the present disclosure can also determine manual takeover events by recording the switching of automatic driving states. For example, when the automatic driving state switches to the manual driving state, it means that a manual takeover event has occurred. Emergency braking events can be determined by recording speed drop events. For example, if the speed drops suddenly to 0 within a certain period of time, it means that an emergency braking event has occurred.

[0134] It should be noted that the step of analyzing at least one of the health status of the data flow and the health status of the node according to the structure provided in the method provided in the present application can be performed online through an online analysis node or offline through an offline analysis node. There is no limitation on this in the method provided in the present application.

[0135] In the online analysis scenario, an online analysis node can be set up in the target system. The online analysis node is responsible for receiving all recorded events. At the same time, the online analysis node includes multiple sub-nodes, such as input data flow monitoring sub-nodes, data processing function sub-nodes, etc. The sub-nodes are logically independent of each other and do not involve interaction and sharing of internal states. Each sub-node can register callback functions for different event types so that it can be notified when a specific event occurs. The parameter fields of the event are processed in the callback function, and the internal state is updated, information is reported to the outside, etc. In the method provided in the present application, the online analysis node provides two ways of reporting information to the outside, namely periodic query and active reporting.

[0136] Each child node will update its own internal state when an event occurs. Therefore, the analysis results can be obtained by regularly querying the internal state of the child node. For example, the input data stream monitoring child node module will register a callback function for "data arrival of a certain input data stream". In the callback function, the child node will update parameter information such as the time of the event, the data stream, and the unique number of the data to the internal storage, and calculate the frame rate, reception delay, reception stability (such as the variance of the reception interval) and other data of the data stream based on this information to indicate the health status of the data stream. By calling the query interface of the input data stream monitoring submodule, the health data indicators of each data stream can be obtained.

[0137] In actual applications, some sub-nodes may have the need to report the analysis status immediately. For example, the user-defined exception monitoring sub-node will register the callback function of the "user-defined node processing status normal, exception report" event, and send the monitoring results to the outside immediately when the user reports normal or abnormal. If the monitoring results of the sub-node are received, it can respond immediately when the user reports to ensure real-time performance.

[0138] In the method provided by the present application, part of the functions of the online analysis node can be run in an independent process. A typical implementation is that the event callback function is embedded in the business processing node, and the monitoring status is maintained inside the node, based on which regular query and active reporting are implemented. Nodes that need to obtain monitoring data from the regular query interface and the active reporting interface can be implemented in an independent process by means of RPC (Remote Procedure Call). This allows the actual processing logic of the monitoring data to be decoupled from the monitoring function to avoid mutual influence between software modules.

[0139] In the offline analysis scenario, the offline analysis node can be designed as an automated parsing data processing node. After completing the business processing of the target system, it automatically runs on a platform with sufficient computing resources such as a cloud server, processes the structured event data, and writes it to a database (such as PostgreSQL, MongoDB, InfluxDB, etc.) for direct use by data analysts and node developers. This allows technicians who are not familiar with running events in the target system to participate in the data processing of the target system.

[0140] For example, an offline analysis node can calculate the time difference between the two events of "the module's data processing function starts and completes execution" and write it into the time series database as the "execution time of the data processing function" for direct use by developers and data analysts related to the node data processing function.

[0141] Through the offline analysis node running in the offline environment, users can conduct in-depth analysis and processing of a large amount of event data collected in the target system to achieve targeted system performance optimization. In addition, since all events during the operation of the target system are recorded and stored, the complete event information can be used to develop many data-based debugging and problem reproduction tools. For example, in an autonomous driving scenario, if the arrival time of each data frame and the execution time of the data processing function are recorded in the event, then combined with the recorded autonomous driving data packet (usually containing the calculation results of sensors and algorithm modules, etc.), the data processing function can be reproduced based on time series, and the results of each reproduction are deterministic.

[0142] In a specific embodiment provided in this specification, the method further includes at least one of the following:

[0143] Visually displaying the health status of the data flow and / or the node;

[0144] The data stream and / or the health status of the node are sent to a preset storage area.

[0145] In actual applications, after analyzing the health status of the data flow and the health status of the node, the analyzed health status can also be visualized, for example, through charts, line charts, bar charts, pie charts, etc., so that technical personnel can intuitively observe the health status of the data flow and nodes, and perform corresponding processing.

[0146] In addition to visually displaying the health status of data streams and nodes, the health status of data streams and nodes can also be sent to a preset storage area for storage. When offline data analysis is required later, the health status of data streams and nodes can be queried from the preset storage area to further locate abnormal events, so that offline analysis can be performed based on the abnormal events.

[0147] It should be noted that in the method provided in the present application, in addition to online analysis, each event can be stored and subsequently analyzed offline. The purpose of offline analysis is to obtain corresponding events according to business needs and restore them, so as to analyze the reasons for the occurrence of the corresponding events.

[0148] In another specific embodiment provided in the present application, the method further comprises:

[0149] receiving an analysis instruction for the event from a second computing device;

[0150] In response to the analysis instruction, the encoded data is read from the preset storage area, and the encoded data is sent to the second computing device, so that the second computing device decodes the encoded data, obtains the event timestamp and feature information of each event, and analyzes at least one of the health status of the data stream and the health status of the node based on the event timestamp and feature information of each event.

[0151] In practical applications, analyzing the health status of data streams and nodes according to the structure of events can be implemented in either the first computing device or the second computing device, where the second computing device is a computing device different from the first computing device. The second computing device sends an analysis instruction for the event to the first computing device, and the analysis instruction can be triggered based on a user operation or based on a specific task in the second computing device. In this application, the manner in which the second device sends the analysis instruction is not limited.

[0152] After receiving the analysis instruction sent by the second computing device, the stored coded data is read from the preset storage area, and the coded data is sent to the second computing device so that the second computing device can decode the coded data, thereby obtaining the event timestamp and feature information of each event, and analyzing at least one of the health status of the data stream and the health status of the node according to the event timestamp and feature information of each event. For the analysis operation of analyzing the health status of the data stream and the health status of the node according to the event timestamp and feature information of each event, please refer to the processing of the above-mentioned related steps for details, which will not be repeated here.

[0153] The method provided in this application solves the problem of insufficient data accuracy due to periodic statistics by collecting events that occur during data transmission and node processing in the target system. By storing events in a preset serialization format, the problem of additional resource consumption due to character strings is solved. By providing a general and efficient monitoring framework, developers can implement diversified monitoring modules for different events for real-time information display and save the use of on-board computing resources as much as possible. By providing specialized data parsing software, serialized stored time data is parsed into structured data and stored in the corresponding database, simplifying the process of developers performing offline analysis of events.

[0154] Embodiment 1

[0155] In Example 1, taking general performance analysis in an autonomous driving system as an example, the data processing method provided in this application is described in detail.

[0156] First, the autonomous driving system is defined as follows:

[0157] 1. Each automatic software module predefines its own input and output data flow information. For example, the input data flow of the automatic driving module X is a and b, and the output data flow is c and d; the input data flow of the automatic driving module Y is c and e, and the output is data flow f.

[0158] 2. Each autonomous driving module contains only one data processing function. Each data processing function processes the input data stream and generates an output data stream.

[0159] Define the following events:

[0160] 1. The input data stream arrives at incomingData, and its parameters are data stream ID StreamID, data ID DataID, data timestamp DataTimestamp, and event timestamp Timestamp.

[0161] 2. The output data stream is sent OutputSent, and the parameters are the data stream number StreamID, the data number DataID, the data timestamp DataTimestamp, and the event timestamp Timestamp.

[0162] 3. The data processing function starts executing FunctionStart, with the parameters being the execution number ExecutionId, the related data number ExecutionDataId, and the event timestamp Timestamp.

[0163] 4. The data processing function completes execution of FunctionEnd, with the parameters being the execution number ExecutionId and the event timestamp Timestamp.

[0164] The above events will occur in the implementation of the autonomous driving middleware. The data processing functions written by developers will not be involved in the occurrence and recording of these events.

[0165] See also Figure 2 , Figure 2 A schematic diagram showing the flow of data flows between modules provided in this embodiment is shown as follows: Figure 2 As shown, there are modules A, B, and C in the autonomous driving system, where the input data streams of module A are data streams 0 and 1, and the output is data stream 9, the input data stream of module B is data stream 9, and the outputs are data streams 19 and 20. The input data streams of module C are data streams 9 and 19, and the output is data stream 61.

[0166] Taking module A as an example, we will provide a schematic illustration. Module A can collect the following event data:

[0167] IncomingData:(Timestamp=****-**-**T08:10:23.156Z,StreamId=0,DataId=0,DataTimestamp=****-**-**T08:10:23.100Z);

[0168] IncomingData:(Timestamp=****-**-**T08:10:23.240Z,StreamId=0,DataId=1,DataTimestamp=****-**-**T08:10:23.200Z);

[0169] IncomingData:(Timestamp=****-**-**T08:10:23.250Z,StreamId=1,DataId=10,DataTimestamp=****-**-**T08:10:23.100Z);

[0170] FunctionStart:(Timestamp=****-**-**T08:10:23.255Z,ExecutionId=1,ExecutionDataId=(0,10));

[0171] FunctionEnd:(Timestamp=****-**-**T08:10:23.310Z,ExecutionId=1);

[0172] OutputSent:(Timestamp=****-**-**T08:10:23.320Z,StreamId=9,DataId=50,DataTimestamp=****-**-**T08:10:23.100Z);

[0173] IncomingData:(Timestamp=****-**-**T08:10:23.340Z,StreamId=1,DataId=11,DataTimestamp=****-**-**T08:10:23.200Z);

[0174] FunctionStart:(Timestamp=****-**-**T08:10:23.352Z,ExecutionId=2,ExecutionDataId=(1,11));

[0175] IncomingData: (Timestamp=****-**-**T08:10:23.360Z, StreamId=0, DataId=2, DataTimestamp=****-**-**T08:10:23.300Z);

[0176] FunctionEnd: (Timestamp=****-**-**T08:10:23.405Z, ExecutionId=2);

[0177] OutputSent: (Timestamp=****-**-**T08:10:23.409Z, StreamId=9, DataId=51, DataTimestamp=****-**-**T08:10:23:200Z).

[0178] The data collected by module B and module C may be similar to that of module A. It can be seen that the above events record in detail the sending and receiving of each data stream and the execution of the processing function. Based on the above data, the following analyses can be performed:

[0179] 1. Analyze the events of a single module to obtain the time taken to collect data, execute functions, and send data within a single module, and thus obtain the basic performance of the autonomous driving module. For example, data collection delay, function execution time, data sending time, etc., you can also draw box plots for historical data based on statistical data to obtain statistical data analysis values ​​such as 1 / 4 and 3 / 4 quantiles, and then combine with the full amount of data to accurately locate outliers, and then perform additional analysis on the autonomous driving system logs, data, and other information near the outliers.

[0180] 2. Combine the configuration to get the data transmission and reception relationship between modules, analyze the events to get the time it takes to send data from the upstream module to the downstream module, and thus get the degree to which the performance of the autonomous driving system is affected by the data transmission middleware. For example, combined with the relationship between upstream and downstream data transmission and reception, since the transmission and reception information of the autonomous driving software module is pre-configured, the upstream and downstream relationship can be known in advance. Then, for each data stream, its sender and receiver can be found, and then the OutputSent event of the sender and the IncomingData event of the receiver can be processed to get the data transmission time. The maximum value, minimum value, mean, variance, growth trend and other analyses can be performed on the time, and outlier analysis can also be performed.

[0181] 3. Combine events to derive dependencies between data frames, and analyze events to derive the total time it takes for data to be generated from the sensor to be calculated by a series of autonomous driving modules, so as to derive the overall performance of the autonomous driving system and identify performance bottlenecks. The analysis here is an extension of the analysis methods mentioned in 1 and 2 above. The analysis in 1 focuses on the time consumption within a single module. The analysis in 2 is mainly based on the upstream and downstream data transmission of a single data stream. 3. For the performance analysis of the entire autonomous driving system, it is necessary to analyze the upstream and downstream relationships of all data streams and all modules as a whole, and draw relevant data flows and calculation flow charts. The time consumption of each step in the data flow and calculation flow chart can provide a certain reference for the analysis of performance bottlenecks. For example, Figure 2 As shown, module A depends on the input of data stream 0 and data stream 1, so the delay of its processing function A will be affected by the delay of these two data streams. Similarly, the delay of module B will be affected by the delay of data stream 0 and data stream 1, the time consumption of processing function A, and the transmission time consumption of data stream 9. Module C will be affected by the delay of input data stream 0 and input data stream 1, the time consumption of processing function A and processing function B, and the transmission time consumption of data stream 9 and data stream 19. Combining the analysis methods in 1 and 2, the time consumption of each transmission and calculation path can be obtained, and the performance bottleneck can be analyzed. Similarly, these data can be analyzed for maximum value, minimum value, mean, variance, outlier, growth trend, etc.

[0182] Embodiment 2

[0183] In Example 2, taking the customized performance analysis of the autonomous driving software module in the autonomous driving system as an example, the data processing method provided in this application is described in detail.

[0184] First, add the following definition to the user function of the autonomous driving software module:

[0185] 1. Inside the user function, developers can customize different "key execution points", called "execution points". For example, developers can add an execution point before and after some time-consuming calculation code blocks, or add execution points in different code execution branches. Adding execution points can be achieved through probe functions.

[0186] 2. There are connections between these execution points. The connections between the execution points can eventually form an execution flowchart, which can be used as a simple representation of the user function.

[0187] Then, add a user-defined event UserEvent, with the parameter being the execution point number CheckPointID. User-defined events occur when developers implement user functions, and the autonomous driving software framework provides developers with relevant monitoring interfaces for users to trigger execution point records.

[0188] See also Figure 3 , Figure 3 The execution flow chart of the execution point provided by the present application is shown as follows: Figure 3 As shown in the figure, five execution points are defined in the autonomous driving module A. At the same time, in the developer's code logic, these execution points will be as follows Figure 3 The flow chart shown is carried out.

[0189] In the user function that executes the autonomous driving module A, the following list of events is recorded:

[0190] FunctionStart(Timestamp=****-**-**,ExecutionId=10) UserEvent(Timestamp=****-**-**,CheckpointId=1) UserEvent(Timestamp=****-**-**,CheckpointId=2) UserEvent(Timestamp=****-**-**,CheckpointId=2) UserEvent(Timestamp=****-**-**,CheckpointId=2) UserEvent(Timestamp=****-**-**,CheckpointId=3) UserEvent(Timestamp=****-**-**,CheckpointId=4) UserEvent(Timestamp=****-**-**,CheckpointId=3) UserEvent(Timestamp=****-**-**,CheckpointId=4) UserEvent(Timestamp=****-**-**,CheckpointId=5) FunctionEnd(Timestamp=****-**-**,ExecutionId=10)

[0191] By calculating the difference between the Timestamps of two UserEvent events, the time taken between two state transitions can be obtained. For example, the event records in the above event list can be obtained as follows: Figure 4 The state transition time diagram shown is Figure 4 A state transition time diagram provided by an embodiment of the present application is shown.

[0192] For example Figure 4 After analysis, we can find the execution time bottleneck inside the user function. For example, the code block from execution point 4 to execution point 5 takes 25ms, and there may be room for optimization of the code here. The time consumption of the two transfers from execution point 3 to execution point 4 has abnormal fluctuations.

[0193] Corresponding to the above method embodiment, the present application also provides a data processing device embodiment, Figure 5 FIG. 1 is a schematic diagram showing the structure of a data processing device provided by an embodiment of the present application. Figure 5 As shown, the apparatus is applied to a first computing device, comprising:

[0194] A monitoring module 502 is configured to monitor events of a target type in a target system, wherein the target system includes at least one node, and the node is used to operate a data flow;

[0195] A generating module 504 is configured to generate a structure of the event in response to the occurrence of the event, wherein the structure includes an event timestamp when the event occurs and feature information for characterizing the event;

[0196] The analysis module 506 is configured to analyze at least one of the health status of the data flow and the health status of the node according to the structure.

[0197] Optionally, the operation includes at least one of receiving, processing, and outputting;

[0198] The event includes at least one of a data flow state change of the data flow and a change of the operation state of the node, the data flow state change is used to indicate that the state of the data flow has changed, and the operation state change is used to indicate that the operation state of the node has changed.

[0199] Optionally, the node has a data processing function, and the operation state change of the node includes at least one of the following:

[0200] The data processing function starts executing, the data processing function completes executing, the node starts initializing, the node completes initializing, the node starts exiting and cleaning up, the node completes exiting and cleaning up, the node starts outputting the execution result of the data processing function, and the node outputs the completion of the execution result.

[0201] Optionally, the data flow state change of the data flow includes at least one of the following: data of the data flow arrives at the node, the data flow becomes abnormal;

[0202] The abnormality of the data stream includes at least one of the following: frame loss of the data stream, an error in the timestamp of the data stream, and interruption of the data stream.

[0203] Optionally, the characteristic information of the event includes at least one of the following: an event type identifier, an event occurrence number, a data stream identifier corresponding to the event, and a data timestamp and data identifier corresponding to the data stream when the event occurs.

[0204] Optionally, the node has a data processing function;

[0205] The analysis module 506 is further configured to:

[0206] determining at least one execution point in the data processing function;

[0207] Obtaining time information of the data processing function when executing at each execution point;

[0208] The time consumption information of the data processing function is determined according to the time information corresponding to each execution point.

[0209] Optionally, the at least one execution point includes multiple execution points;

[0210] The analysis module 506 is further configured to:

[0211] Calculate the processing time of the data processing function between any two execution points according to the time information respectively corresponding to the two execution points;

[0212] At least one of a critical execution segment and an abnormal execution segment in the data processing function that affect data processing efficiency is determined according to the processing time consumption between two execution points.

[0213] Optionally, the target system includes multiple nodes, and the multiple nodes have an upstream and downstream relationship;

[0214] The analysis module 506 is further configured to:

[0215] Calculating the data transmission time between the upstream node and the downstream node according to the time when the upstream node outputs the completion of the execution result and the time when the execution result reaches the corresponding downstream node; and

[0216] At least one of a key node and an abnormal node that affect data transmission efficiency among the multiple nodes is determined according to the data transmission time between any two nodes.

[0217] Optionally, the node has a data processing function;

[0218] The analysis module 506 is further configured to:

[0219] Calculate the data timeliness value according to the event timestamp when the event occurs and the data timestamp in the data stream;

[0220] Calculating the execution time of the data processing function according to the start time and the completion time of the data processing function;

[0221] The time consumed for sending the execution result is calculated according to the time taken for the data processing function to complete execution and the time taken for the node to output the execution result.

[0222] Optionally, the device further comprises:

[0223] A calculation module is configured to calculate a reference mean value corresponding to each node according to a node reference parameter corresponding to each node, wherein the node reference parameter includes at least one of a data timeliness value, a sending time, and an execution time;

[0224] The determination module is configured to determine the key nodes among the nodes according to the reference mean values ​​corresponding to the nodes.

[0225] Optionally, the generating module 504 is further configured to:

[0226] Obtaining the event timestamp when the event occurs through a pre-constructed event base class function;

[0227] Acquiring the values ​​of each preset parameter item of the event as the characteristic information through a pre-constructed event constructor; and

[0228] The structure of the event is generated at least according to the event timestamp and the characteristic information through a pre-constructed event recording function.

[0229] Optionally, the data stream includes at least one of an input data stream and an output data stream;

[0230] The node is associated with an identifier of an input data stream and an identifier of an output data stream. The node processes the input data stream through a data processing function to obtain an output data stream, and the output data stream includes an execution result of the data processing function.

[0231] Optionally, the device further includes a serialization module configured to:

[0232] Serializing the structure of the event to generate encoded data;

[0233] The encoded data is sent to a preset storage area, wherein the encoded data is used to analyze at least one of a health status of the data flow and a health status of the node.

[0234] Optionally, the serialization module is further configured to:

[0235] Serializing the structure of the event to obtain serialization information;

[0236] The serialized information of the multiple events is encoded according to the timestamp sequence of the multiple events to generate the encoded data.

[0237] Optionally, the serialization module is further configured to:

[0238] Encoding the serialized information of the multiple events in the order of the timestamps of the multiple events to obtain a serialized information stream; and

[0239] The serialized information stream is compressed to obtain the encoded data.

[0240] Optionally, the serialization module is further configured to:

[0241] Cache the encoded data in a preset cache area;

[0242] Counting the data capacity of the encoded data in the preset cache area;

[0243] In response to the data capacity being greater than or equal to a threshold, the encoded data in the preset cache area is sent to the preset storage area.

[0244] Optionally, the device further comprises:

[0245] A display module, configured to visually display the data flow and / or the health status of the node;

[0246] The storage module is configured to send the data stream and / or the health status of the node to a preset storage area.

[0247] Optionally, the device further comprises:

[0248] A receiving module, configured to receive an analysis instruction for an event from a second computing device;

[0249] A reading module is configured to read the encoded data from the preset storage area in response to the analysis instruction, and send the encoded data to the second computing device so that the second computing device decodes the encoded data, obtains the event timestamp and feature information of each event, and analyzes at least one of the health status of the data stream and the health status of the node based on the event timestamp and feature information of each event.

[0250] The method provided in this application solves the problem of insufficient data accuracy due to periodic statistics by collecting events that occur during data transmission and node processing in the target system. By storing events in a preset serialization format, the problem of additional resource consumption due to character strings is solved. By providing a general and efficient monitoring framework, developers can implement diversified monitoring modules for different events for real-time information display and save the use of on-board computing resources as much as possible. By providing specialized data parsing software, serialized stored time data is parsed into structured data and stored in the corresponding database, simplifying the process of developers performing offline analysis of events.

[0251] The above is a schematic scheme of a data processing device of this embodiment. It should be noted that the technical scheme of the data processing device and the technical scheme of the above data processing method belong to the same concept, and the details of the technical scheme of the data processing device that are not described in detail can be referred to the description of the technical scheme of the above data processing method.

[0252] Figure 6 The block diagram of a computing device 600 according to an embodiment of the present application is shown. The components of the computing device 600 include but are not limited to a memory 610 and a processor 620. The processor 620 is connected to the memory 610 via a bus 630, and the database 650 is used to store data.

[0253] The computing device 600 also includes an access device 640 that enables the computing device 600 to communicate via one or more networks 660. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 640 may include one or more of any type of network interface (e.g., a network interface card (NIC)) of wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a world-wide interoperability for microwave access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and the like.

[0254] In one embodiment of the present application, the above components of the computing device 600 and Figure 6 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Figure 6 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of the present application. Those skilled in the art may add or replace other components as needed.

[0255] The computing device 600 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or a personal computer (PC). The computing device 600 may also be a mobile or stationary server.

[0256] The processor 620 implements the steps of the data processing method when executing the computer instructions.

[0257] The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the above data processing method belong to the same concept, and the details not described in detail in the technical scheme of the computing device can be referred to the description of the technical scheme of the above data processing method.

[0258] An embodiment of the present application further provides a computer-readable storage medium storing computer instructions, which implement the steps of the data processing method as described above when executed by a processor.

[0259] The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the above data processing method belong to the same concept, and the details not described in detail in the technical scheme of the storage medium can be referred to the description of the technical scheme of the above data processing method.

[0260] The above describes specific embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0261] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of patent practice. For example, in some regions, according to patent practice, the computer-readable medium does not include electric carrier signals and telecommunication signals.

[0262] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described action sequence, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0263] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0264] The preferred embodiments of the present application disclosed above are only used to help explain the present application. The optional embodiments do not describe all the details in detail, nor do they limit the invention to the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the present application. The present application selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present application, so that those skilled in the art can understand and use the present application well. The present application is only limited by the claims and their full scope and equivalents.

Claims

1. A data processing method, characterized in that: Applied to a first computing device, comprising: Monitoring events of a target type in a target system, wherein the target system includes at least one node, and the node is used to operate a data flow; In response to the occurrence of the event, generating a structure of the event, wherein the structure includes an event timestamp when the event occurs and feature information used to characterize the event; At least one of a health status of the data flow and a health status of the node is analyzed according to the structure.

2. The method according to claim 1, characterized in that The operation includes at least one of receiving, processing, and outputting; The event includes at least one of a data flow state change of the data flow and a change of the operation state of the node, the data flow state change is used to indicate that the state of the data flow has changed, and the operation state change is used to indicate that the operation state of the node has changed.

3. The method according to claim 2, characterized in that The node has a data processing function, and the operation state change of the node includes at least one of the following: The data processing function starts executing, the data processing function completes executing, the node starts initializing, the node completes initializing, the node starts exiting and cleaning up, the node completes exiting and cleaning up, the node starts outputting the execution result of the data processing function, and the node outputs the completion of the execution result.

4. The method according to claim 2, characterized in that The data flow state change of the data flow includes at least one of the following: data of the data flow arrives at the node, the data flow is abnormal; The abnormality of the data stream includes at least one of the following: frame loss of the data stream, an error in the timestamp of the data stream, and interruption of the data stream.

5. The method according to claim 1, characterized in that The characteristic information of the event includes at least one of the following: an event type identifier, an event occurrence number, a data stream identifier corresponding to the event, and a data timestamp and data identifier corresponding to the data stream when the event occurs.

6. The method according to claim 1, characterized in that The node has a data processing function; Analyzing the health status of the node according to the structure includes: determining at least one execution point in the data processing function; Obtaining time information of the data processing function when executing at each execution point; The time consumption information of the data processing function is determined according to the time information corresponding to each execution point.

7. The method according to claim 6, characterized in that The at least one execution point includes a plurality of execution points; Determining the time-consuming information of the data processing function according to the time information corresponding to each execution point includes: Calculate the processing time of the data processing function between any two execution points according to the time information respectively corresponding to the two execution points; At least one of a critical execution segment and an abnormal execution segment in the data processing function that affect data processing efficiency is determined according to the processing time consumption between two execution points.

8. The method according to claim 3, characterized in that The target system includes a plurality of nodes, and the plurality of nodes have an upstream and downstream relationship between them; Analyzing the health status of the node according to the structure includes: Calculate the data transmission time between the upstream node and the downstream node according to the time when the upstream node outputs the completion of the execution result and the time when the execution result reaches the corresponding downstream node; as well as At least one of a key node and an abnormal node that affect data transmission efficiency among the multiple nodes is determined according to the data transmission time between any two nodes.

9. The method according to claim 4, characterized in that The node has a data processing function; Analyzing at least one of the health status of the data flow and the health status of the node according to the structure includes at least one of the following: Calculate the data timeliness value according to the event timestamp when the event occurs and the data timestamp in the data stream; Calculating the execution time of the data processing function according to the start time and the completion time of the data processing function; The time consumed for sending the execution result is calculated according to the time taken for the data processing function to complete execution and the time taken for the node to output the execution result.

10. The method according to claim 8, characterized in that Also includes: Calculating a reference mean value corresponding to each node according to a node reference parameter corresponding to each node, wherein the node reference parameter includes at least one of a data timeliness value, a sending time, and an execution time; The key nodes are determined in each node according to the reference mean corresponding to each node.

11. The method according to claim 1, characterized in that The structure of the event is generated, including: Obtaining the event timestamp when the event occurs through a pre-constructed event base class function; Acquiring the values ​​of each preset parameter item of the event as the characteristic information through a pre-constructed event constructor; and The structure of the event is generated at least according to the event timestamp and the characteristic information through a pre-constructed event recording function.

12. The method according to claim 1, characterized in that The data stream includes at least one of an input data stream and an output data stream; The node is associated with an identifier of an input data stream and an identifier of an output data stream. The node processes the input data stream through a data processing function to obtain an output data stream, and the output data stream includes an execution result of the data processing function.

13. The method according to claim 1, characterized in that The method further comprises: Serializing the structure of the event to generate encoded data; The encoded data is sent to a preset storage area, wherein the encoded data is used to analyze at least one of a health status of the data flow and a health status of the node.

14. The method according to claim 13, characterized in that The structure of the event is serialized to generate coded data, including: Serializing the structure of the event to obtain serialization information; The serialized information of the multiple events is encoded in the order of the timestamps of the multiple events to generate the encoded data.

15. The method according to claim 14, characterized in that Encoding the serialized information of the multiple events according to the timestamp order of the multiple events to generate the encoded data includes: Encoding the serialized information of the multiple events in the order of the timestamps of the multiple events to obtain a serialized information stream; and The serialized information stream is compressed to obtain the encoded data.

16. The method according to claim 13, characterized in that Sending the encoded data to a preset storage area includes: Cache the encoded data in a preset cache area; Counting the data capacity of the encoded data in the preset cache area; In response to the data capacity being greater than or equal to a threshold, the encoded data in the preset cache area is sent to the preset storage area.

17. The method according to claim 1, wherein: Also includes at least one of the following: Visually displaying the health status of the data flow and / or the node; The data stream and / or the health status of the node are sent to a preset storage area.

18. The method according to claim 13, characterized in that The method further comprises: receiving an analysis instruction for the event from a second computing device; In response to the analysis instruction, the encoded data is read from the preset storage area, and the encoded data is sent to the second computing device, so that the second computing device decodes the encoded data, obtains the event timestamp and feature information of each event, and analyzes at least one of the health status of the data stream and the health status of the node based on the event timestamp and feature information of each event.

19. A computing device comprising a memory, a processor, and computer instructions stored in the memory and executable on the processor, characterized in that: When the processor executes the computer instructions, the steps of the method according to any one of claims 1 to 18 are implemented.

20. A computer-readable storage medium storing computer instructions, characterized in that: When the computer instructions are executed by a processor, the steps of the method described in any one of claims 1 to 18 are implemented.