WO2023093257A1 - Modeling method for self-driving service and related device - Google Patents

Modeling method for self-driving service and related device Download PDF

Info

Publication number
WO2023093257A1
WO2023093257A1 PCT/CN2022/120747 CN2022120747W WO2023093257A1 WO 2023093257 A1 WO2023093257 A1 WO 2023093257A1 CN 2022120747 W CN2022120747 W CN 2022120747W WO 2023093257 A1 WO2023093257 A1 WO 2023093257A1
Authority
WO
WIPO (PCT)
Prior art keywords
behavior
fusion
node
log
service node
Prior art date
Application number
PCT/CN2022/120747
Other languages
French (fr)
Chinese (zh)
Inventor
管高扬
陈瑞宁
连学国
王强东
谭中平
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2023093257A1 publication Critical patent/WO2023093257A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/25Fusion techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the present application relates to the field of automatic driving, and more specifically, relates to a modeling method, computer device, computer equipment, chip system and computer-readable storage medium of an automatic driving business.
  • Autonomous driving technology is the top priority of traditional human-controlled cars turning to smart cars controlled by electronic information systems.
  • self-driving cars are generally developed first, and then through the closed-loop feedback process of modeling, simulation, optimization, and then adjusting the code on the prototype vehicle, the cycle repeats and gradually achieves the requirements of high performance and low latency.
  • This method generally adopts some self-defined domain-specific language to build a business model, which is used to describe the behavior of the business on computing resources such as a central processing unit (CPU) and a graphics processing unit (GPU). model.
  • the fineness of the model determines the upper limit of simulation, simulation, and optimization capabilities.
  • the autonomous driving business is numerous and complex, and it is time-consuming and labor-intensive to manually model each business node, and it is usually necessary to combine multiple business departments to sort out the overall context.
  • the source code of most autonomous driving services is not open to the public, so it is difficult to abstract the model of the service node from the service source code.
  • An embodiment of the present application provides a modeling method for an automatic driving service, a computer device, a computer device, a chip system, and a computer-readable storage medium, which can be used as a service node for the automatic driving service without the source code of the automatic driving service. Run behavioral modeling.
  • a modeling method for an automatic driving service comprising: obtaining a fusion log of a service node of the automatic driving service; obtaining information on N behaviors of the service node according to the fusion log, where N is greater than or equal to 1 is a positive integer; analyze the information of N behaviors of the service node, and obtain an operation behavior model used to describe the operation behavior of the service node.
  • the fusion log is used to record the call event of the service node and the scheduling information of the thread, and the thread is run by the service node.
  • each behavior of the business node includes: the number of threads contained in each behavior, the running time of each behavior, the average value of the running time of each behavior and the probability of running time, the Execution time, average and probability of execution time for each behavior, execution time for each thread in each behavior, execution time, average and average execution time, names of events in each behavior, The average of the time points of events in a behavior or the probability distribution model of the time points of events.
  • Events in each behavior include receive events in each behavior, send events in each behavior, callback start events in each behavior, and callback end events in each behavior.
  • the time point of the event in each behavior includes an absolute time point of the event or a relative time point of the event.
  • the running behavior model of the nth behavior may further include any one or more of the following: the running time of at least one thread included in the nth behavior, the running time of at least one thread included in the nth behavior Period, the trigger relationship of at least one thread included in the nth behavior, or the dependency relationship of the business node.
  • the operating behavior of the service node of the automatic driving service can be modeled, and the operating behavior model used to describe the operating behavior of the service node can be obtained.
  • the operating behavior model can be Provide reverse development guidance for designers and developers, and also calculate the running behavior status of the business nodes of the autonomous driving business on the hardware resources through simulation and other methods, and check whether the running behavior status of the business nodes on the hardware resources conforms to the design expected. Therefore, the operating behavior model of the embodiment of the present application has important value for feedback guidance and auxiliary design.
  • the operating behavior model of the embodiment of the present application can be used as the input for the simulation, simulation and optimization of the subsequent automatic driving business code, and can be used as the input for the subsequent automatic driving business code. Simulation, emulation and optimization provide high precision guarantee.
  • the node-level communication log and the thread-level scheduling log of the service node are obtained; the node-level communication log and the thread-level scheduling log are fused to obtain the fused log.
  • the node-level communication log is used to record the calling event of the service node
  • the thread-level scheduling log is used to record the scheduling information of the thread.
  • Each fusion log entry in the fusion log corresponds to a communication log entry in the node-level communication log or a scheduling log entry in the thread-level scheduling log, and each fusion log entry in at least two fusion log entries is used to record the corresponding The content of the log entry.
  • time information in the node-level communication log and the time information in the thread-level scheduling log can be synchronized according to the time synchronization data in the node-level communication log and the time synchronization data in the thread-level scheduling log; the time information The synchronized node-level communication log and thread-level scheduling log are fused to obtain the fused log. It should be understood that the time synchronization data in the node-level communication log is added during the process of obtaining the node-level communication log, and the time synchronization data in the thread-level scheduling log is added during the process of obtaining the thread-level scheduling log.
  • time synchronization data may be added once during the process of obtaining node-level communication logs and thread-level scheduling logs, or periodic time synchronization data may be added during the process of obtaining node-level communication logs and thread-level scheduling logs.
  • time information with inconsistent form in the node-level communication log and thread-level scheduling log is converted into time information with consistent form, so as to facilitate the acquisition of fusion logs with consistent time information.
  • the log entries in the node-level communication log and the thread-level scheduling log can be fused, so as to obtain a fused log that simultaneously records the call event of the service node and the scheduling information of the thread, which is convenient for subsequent recording in the fused log.
  • the operation behavior model describing the operation behavior of the service node is obtained by merging the log entries.
  • the associated service nodes and dependencies of the service nodes are determined according to the communication data of the service nodes; the scheduling strategy of the service nodes and the associated service nodes is adjusted to obtain the adjusted scheduling Strategy: Run the autonomous driving business according to the adjusted scheduling strategy, collect communication data and scheduling data of business nodes, and obtain node-level communication logs and thread-level scheduling logs.
  • the associated service nodes of the service node include at least one of the ancestor nodes of the service node or the descendant nodes of the service node.
  • the ancestor node of the service node is one or Multiple, the descendants of the service node are the fourth service node receiving the message sent by the service node, the fifth service node receiving the message sent by the fourth service node, the sixth service node receiving the message sent by the fifth service node, etc. one or more of the .
  • the dependency relationship of a service node is the relationship between the service node and service nodes that have receiving and sending relationships with the service node.
  • adjusting the scheduling strategy of the service node and the associated service node includes: adjusting any one or more of the priority of the service node and the associated service node, the binding strategy, the cycle frequency, the length of the reserved time slice, or the length of the deadline indivual.
  • the associated service nodes and dependencies of the service nodes can be determined according to the communication data of the service nodes, and the service nodes and the associated service nodes of the service nodes can be determined by adjusting the scheduling strategy of the service nodes and the associated service nodes of the service nodes Priority execution sequence, so as to avoid resource competition, reduce mutual interference caused by the operation of multiple business nodes, obtain low-noise or no-noise node-level communication logs and thread-level scheduling logs, and facilitate subsequent and accurate establishment of business node operation behavior Model.
  • At least one time segment is determined according to the fusion log entries in the fusion log; according to the at least one time segment, N sets of fusion log entry sets are determined; respectively, according to the N The group fusion log entry set determines the N behavior information of the service node.
  • each time segment in the at least one time segment corresponds to at least two first fusion log entries and at least one second fusion log entry.
  • the first fusion log entry is the fusion log entry corresponding to the scheduling information in the fusion log
  • the second fusion log entry is the fusion log entry corresponding to the call event in the fusion log.
  • the time information of the fusion log entry corresponding to each time segment is within each time segment.
  • Each fusion log entry set in the N sets of fusion log entry sets includes at least one fusion log entry set
  • each fusion log entry set in the at least one fusion log entry set includes at least one first fusion log entry and at least one second fusion log entry log entry.
  • the time information of the second fusion log entry included in each fusion log entry set is within the range of the time information of the first fusion log entry included in each fusion log entry set.
  • At least one time segment can be determined according to the time information of the fusion log entry in the fusion log; at least one time segment is aggregated to obtain at least one cluster; according to the time segment included in each cluster in the at least one cluster, determine At least one set of fused log entries; according to the at least one set of fused log entries, determine N sets of fused log entries; and determine N behavior information of service nodes according to the N sets of fused log entries.
  • each time segment in the at least one time segment includes time information of one or more first fusion log entries in the at least two first fusion log entries, and the first fusion log entry corresponds to the schedule in the fusion log. Fusion log entries for information.
  • Each of the at least one cluster includes one or more of the at least one time slice.
  • At least one fusion log entry set corresponds to at least one cluster, and each fusion log entry set in the at least one fusion log entry set includes at least two first fusion log entries and at least one second fusion log entry.
  • the time information of the first fused log entry included in each fused log entry set is located within the time segment included in the corresponding cluster.
  • the time information of the second fusion log entry included in each fusion log entry set is within the range of the time information of the first fusion log entry included in each fusion log entry set.
  • Each group of fusion log entry sets in the N sets of fusion log entry sets includes one or more fusion log entry sets.
  • the nth behavior among the N behaviors of the business node corresponds to the nth group of fusion log entry sets in the N groups, that is, the nth behavior can correspond to one fusion log entry set, or it can correspond to multiple fusion log entry sets.
  • the information of the behavior of the service node and the running of the thread contained in the behavior of the business node can be obtained.
  • Information such as time is convenient for subsequent further processing of the information of the service node and the information of the thread contained in the service node, so as to support the establishment of an accurate operation behavior model for the operation behavior of the service node.
  • At least one time slice is determined.
  • the identity information of at least two first fusion log entries corresponding to each time segment is the same, and the time of the two first fusion log entries adjacent in time among the at least two first fusion log entries corresponding to each time segment The interval is smaller than the segmentation threshold, and the process number of at least one second fusion log entry corresponding to each time segment is the same as the process number of at least two first fusion log entries corresponding to each time segment.
  • At least one reference time segment may be determined according to the identity information of the at least two first fusion log entries, the time information of the at least two first fusion log entries, and the initial segmentation threshold; according to the constraints and at least one reference Time segment, determine the segmentation parameters of each reference time segment; optimize the initial segmentation threshold according to the optimization method, and obtain the segmentation threshold.
  • the constraint condition is that the time information of one or more second fusion log entries in at least one second fusion log entry is within the time range of the reference time segment, and the identity of the one or more second fusion log entries
  • the process number in the information is the same as the process number of the identity information of each first fusion log entry included in the reference time segment.
  • Each second fusion log entry may record one or more of a receive event, a send event, a callback start event, or a callback end event. When a callback start event is recorded in the multiple second fusion log entries, a callback end event is also recorded in the multiple second fusion log entries.
  • the segmentation parameter can be the execution time of at least one time segment of each thread divided by the average value of the running time, or it can be the average value of values obtained from other functional relationships between the execution time and the running time, which is not done in the embodiment of the present application Specific limits.
  • the optimization method may include a heuristic optimization algorithm or a solver optimization method, which is not specifically limited in this embodiment of the present application.
  • the obtained segmentation threshold is the initial segmentation threshold corresponding to the maximum segmentation parameter of each thread.
  • segmentation thresholds of each thread may be the same or different, which is not specifically limited in this embodiment of the present application.
  • the running time of each time segment of a thread is the difference between the time information of the first fusion log entry that starts first and the time information of the first fusion log entry that ends last included in the time segment.
  • the execution time of each time segment of a thread is the sum of at least one actual execution time in the time segment, and the actual execution time is the time information of the first merged log entry that records the thread start execution and the thread end execution difference.
  • At least one time can be determined according to at least two first fusion log entries with the same identity information and adjacent in time and the segmentation threshold, that is, according to at least two temporally adjacent time records and segmentation thresholds of the same thread. fragment.
  • at least two temporally adjacent time records of the same thread can be divided into at least one time segment, so as to facilitate subsequent acquisition of behavior information of the service node according to at least one time segment.
  • the trigger relationship of the first behavior is obtained according to the information of the first behavior and the behavior information of the service node that has a sending and receiving relationship with the service node; according to the information of the first behavior
  • the trigger relationship between the information and the first behavior is to obtain the message channel for receiving the event corresponding to each behavior that triggers the first behavior.
  • the first behavior is any one of the N behaviors of the service node.
  • the service nodes that have a sending and receiving relationship with the service node include: one or more of the service nodes that send messages to the service node, or one or more of the service nodes that receive the messages sent by the service node.
  • the behavior that triggers the first behavior may be one or more behaviors, and each behavior that triggers the first behavior corresponds to a message channel for receiving events of the first behavior.
  • the running behavior model of the first behavior includes a message channel for receiving events corresponding to each behavior that triggers the first behavior.
  • the operation behavior model used to describe the operation behavior of the service node can be obtained by analyzing the information of N behaviors of the service node.
  • the time information of each first fusion log entry contained in the one or more first fusion log entry sets corresponding to the first row is converted into frequency domain data ; Determine whether there are one or more frequency values exceeding the average value of the frequency domain data in the frequency domain data; if so, then determine at least A time-triggered cycle.
  • the first behavior is any one of the N behaviors of the service node.
  • the first fusion log entry is a fusion log entry corresponding to scheduling information in the fusion log.
  • the operational behavior model of the first behavior includes at least one time-triggered period of the first behavior.
  • the step of obtaining the message channel for receiving the event corresponding to each behavior that triggers the first behavior may be performed before the step of determining at least one time trigger period of the first behavior, or may be performed after determining at least one time trigger period of the first behavior
  • the step of triggering the cycle is performed afterward, which is not specifically limited in this embodiment of the present application.
  • At least one of the first fusion log entries corresponding to the m-th thread among the M threads included in the n-th behavior in the set of one or more first fusion log entries corresponding to the n-th behavior in the N behaviors can be The time information of log entries is converted into frequency domain data, and the running cycle of the mth thread is obtained.
  • the first fusion log entry is a fusion log entry corresponding to scheduling information in the fusion log
  • the operation behavior model used to describe the operation behavior of the service node can be obtained by analyzing the information of N behaviors of the service node.
  • the first line runs the time probability model.
  • the first behavior is any one of the N behaviors of the service node.
  • the first fusion log entry is a fusion log entry corresponding to scheduling information in the fusion log.
  • the running behavior model of the first behavior includes a time probability model of the running of the first behavior.
  • the operation behavior model used to describe the operation behavior of the service node can be obtained by analyzing the information of N behaviors of the service node.
  • the operating behavior model of the service node when it is monitored that the directed graph of the dependency relationship of the service node has changed, the operating behavior model of the service node is updated; or, when the monitoring of the service node’s When the change of the behavior data exceeds the threshold, the behavior data in the running behavior model of the service node is updated.
  • a directed graph of dependency relationships of service nodes may be constructed according to dependency relationships of service nodes. It should also be understood that when the directed graph of dependencies of the service nodes is monitored to change, the fusion log of the service node may be reacquired, and the operating behavior model of the service node may be updated according to the reacquired fusion log of the service node.
  • monitoring a change in the directed dependency graph of a service node includes: monitoring that at least one node in the directed dependency graph has changed, or that the longest path in the directed graph of dependency has changed.
  • the change of at least one node includes any one or more items of at least one node being reduced, at least one node being added, and at least one node having a changed position in the dependency relationship directed graph.
  • the change of the longest path includes any one or more items of the longest path increasing, the longest path shortening, and at least one node in the longest path changing.
  • the change of at least one node in the longest path includes a change of a node constituting the longest path or a change of a position of a node constituting the longest path.
  • the longest path can be found in the dependency directed graph through a search algorithm, and the search algorithm can be a maximum spanning tree algorithm, a dynamic programming algorithm, or a topological sorting algorithm, which is not specifically limited in this embodiment of the present application.
  • the behavior data in the operation behavior model of the business node can be updated by any of the following algorithms: moving average algorithm, simple moving average, weighted moving average , autoregressive moving average model algorithm, etc.
  • the behavior data includes the frequency of receiving messages of the service node, the frequency of sending messages of the service node, the delay of the callback processing of the service node, the number of processes contained in the service node, and each behavior in at least one behavior of the service node Either or more of the number of threads contained.
  • the embodiment of the present application may monitor whether the change of the behavior data of the service node exceeds a threshold while monitoring whether the directed graph of dependency relationship changes.
  • the operation behavior model of the service node can be re-updated when it is monitored that the directed graph of dependency relationship has changed, and it can also be monitored that the change of the behavior data of the service node exceeds the threshold. Update the behavior data in the running behavior model of the business node. Therefore, after the automatic driving scene changes or the automatic driving service code is updated, the operation behavior model of the service node is re-established, so that the model can be used to describe the behavior state of the service node of the changed automatic driving service.
  • an embodiment of the present application provides a computer device, where the computer device includes a unit for implementing the first aspect or any possible implementation manner of the first aspect.
  • an embodiment of the present application provides a computer device, the computer device includes a processor, the processor is used to be coupled with a memory, read and execute instructions and/or program codes in the memory, so as to implement the first aspect or Any possible implementation of the first aspect.
  • an embodiment of the present application provides a chip system, the chip system includes a logic circuit, the logic circuit is used to couple with an input/output interface, and transmit data through the input/output interface to perform the first aspect or the first Any possible implementation of the aspect.
  • the embodiment of the present application provides a computer-readable storage medium, the computer-readable storage medium stores program codes, and when the computer storage medium is run on a computer, the computer executes the first aspect or the first aspect. any possible implementation of .
  • an embodiment of the present application provides a computer program product, the computer program product comprising: computer program code, when the computer program code is run on a computer, the computer is made to execute any of the first aspect or the first aspect.
  • a computer program product comprising: computer program code, when the computer program code is run on a computer, the computer is made to execute any of the first aspect or the first aspect.
  • Figure 1 is a schematic system architecture diagram of an autonomous driving software and hardware platform.
  • Fig. 2 is a schematic system architecture diagram of a modeling method for a service node of an automatic driving service according to an embodiment of the present application.
  • Fig. 3 is a schematic flowchart of a modeling method for a service node of an automatic driving service according to an embodiment of the present application.
  • Fig. 4 is a schematic flowchart of a method for obtaining fusion logs according to an embodiment of the present application.
  • Fig. 5 is a schematic waveform diagram of converting the time information of behavior in the fusion log into frequency domain data according to an embodiment of the present application.
  • Fig. 6 is a schematic flowchart of a method for acquiring node-level communication logs and thread-level scheduling logs according to an embodiment of the present application.
  • Fig. 7 is a schematic diagram of a directed graph of dependency relationships of service nodes according to an embodiment of the present application.
  • Fig. 8 is a schematic diagram of adjusting a scheduling policy of a service node and a service node associated with the service node according to an embodiment of the present application.
  • Fig. 9 is a schematic flowchart of a method for acquiring node-level communication logs and thread-level scheduling logs according to another embodiment of the present application.
  • Fig. 10 is a schematic diagram of an internal structure of a service node according to an embodiment of the present application.
  • Fig. 11 is a schematic flowchart of a modeling method for a service node of an automatic driving service according to another embodiment of the present application.
  • Fig. 12 is a schematic diagram of visualized time information of multiple first fusion log entries in the fusion log according to an embodiment of the present application.
  • Fig. 13 is a schematic flowchart of a modeling method for a service node of an automatic driving service according to another embodiment of the present application.
  • Fig. 14 is a schematic flowchart of a modeling method for a service node of an automatic driving service according to another embodiment of the present application.
  • Fig. 15 is a schematic structural diagram of a modeling device for a service node of an automatic driving service according to an embodiment of the present application.
  • Fig. 16 is a schematic structural diagram of a modeling device for a service node of an automatic driving service according to an embodiment of the present application.
  • the automatic driving vehicle control operating system is an embedded real-time operating system developed by traditional gasoline-powered car factories. It is used for traditional vehicle control and is suitable for power system and chassis control.
  • operating system interface (POSIX) standard operating system suitable for high-performance computing and high-bandwidth communication required for autonomous driving, providing functions such as vehicle environment perception, intelligent decision-making, and path planning.
  • the communication middleware may be a robot operating system (robot operating system, ROS), an automotive open system architecture communication management module (automotive open system architecture communication management, AutoSAR CM), etc.
  • This automatic driving function can be functions such as vehicle environment perception, sensor fusion and path planning.
  • a business node is an abstract concept of a single business. Two or more parties of a business node realize the transmission of messages or service calls between processes or components by calling the application programming interface (application programming interface, API) such as message sending and receiving of the communication middleware.
  • a service node can include one or more behaviors to realize specific automatic driving functions.
  • node denotes a point in a network topology where lines intersect or branch.
  • a node can be understood as a point where lines intersect or branch in a directed graph of dependencies, and a node represents a service node with a specific autopilot function.
  • An associated node of a node refers to at least one of at least one upstream node and at least one downstream node of the node in the dependency directed graph.
  • a behavior is an abstraction of a collection of time slices (ie, one or more tasks) of one or more threads.
  • each business node can perform one or more behaviors, which is a collection of one or more tasks with a clear purpose or clear function.
  • a task is an abstraction of a slice of time for a thread. There is a one-to-one correspondence between a task and a time segment of a thread, that is, a time segment of a thread is a task. One or more tasks can constitute an action.
  • a process is a running activity of a program in a computer on a certain data set. It is the basic unit for system resource allocation and scheduling, and the basis of the operating system structure.
  • the process In the early process-oriented design computer structure, the process is the basic execution entity of the program; in the contemporary thread-oriented design computer structure, the process is the container of the thread.
  • a program is a description of instructions, data and its organizational form, and a process is the entity of a program. Processes are identified by their process ID.
  • a thread is the smallest unit that an operating system can perform operation scheduling.
  • a thread is included in a process and is the actual operating unit in the process.
  • a thread refers to a single sequential flow of control in a process. Multiple threads can run concurrently in a process, and each thread performs different tasks in parallel. Threads can be identified by thread number.
  • one or more threads can constitute a process; a collection of time segments of one or more processes (that is, one or more tasks) can constitute a behavior; and one or more behaviors can constitute a business.
  • a message channel is a designated communication channel between service nodes, and the composition of a message channel includes a sending port of a sender, a receiving port of a receiver, a channel name, a message format, and the like.
  • the running behavior of a business node includes the running behavior of threads contained in the business node on hardware resources and the dependencies and triggering relationships between different business nodes.
  • the hardware resource can be CPU or GPU, etc.
  • the running behavior of the thread on the hardware resource Behavior includes the thread's running time, running cycle, trigger relationship, and so on.
  • Figure 1 is a schematic system architecture diagram of an autonomous driving software and hardware platform.
  • the autonomous driving software and hardware platform system 100 can be divided into three parts: the autonomous driving business 110 , the autonomous driving software system 120 and the autonomous vehicle hardware platform 130 .
  • the automatic driving service 110 is the service source code that can enable the automatic driving car to realize basic automatic driving functions.
  • the automatic driving software system 120 includes a communication middleware 121, a scheduling module 122 and an automatic driving intelligent operating system 123.
  • the communication middleware 121 abstracts and unifies different communication protocol stacks and protocols of the intelligent driving operating system and the safe vehicle control operating system, including communication management (communication management, CM), ROS/ROS2, data distribution service (data distribution service, DDS), Internet protocol-based scalable service-oriented middleware (scalable service-oriented middleware over internet protocol, SOME/IP), etc.
  • the communication middleware 121 provides a unified communication interface and function for the automatic driving service 110, and can record the necessary calling information when the automatic driving service 110 calls the communication interface.
  • the scheduling module 122 can adjust the scheduling strategy of the automatic driving service node according to the actual needs in the process of automatic driving, or according to the actual needs when the service node of the automatic driving service is running, including adjusting the priority and core binding strategy.
  • the scheduling module 122 can also track and record each service node and the running time sequence log of the threads included in the service node in the computing resources.
  • the running timing log may be a node-level communication log of the service node, or a thread-level scheduling log of threads included in the service node.
  • the computing resource may be a CPU or a GPU or the like.
  • Fig. 2 is a schematic system architecture diagram of a modeling method for a service node of an automatic driving service according to the present application.
  • the system architecture 200 of the modeling method for the autonomous driving service provided in this application may include an automatic driving service 210 , an automatic driving software system 220 and an automatic driving vehicle hardware platform 230 .
  • the automatic driving software system 220 includes a communication middleware 221 , a monitoring module 222 , a modeling framework 223 and an automatic driving intelligent operating system 224 .
  • the communication middleware 221 can provide a unified communication platform and capability, and integrates the vehicle communication protocol stack, transmission control protocol/internet protocol (transmission control protocol/internet protocol, TCP/IP) protocol and user datagram protocol/internet protocol (user datagram protocol)
  • TCP/IP transmission control protocol/internet protocol
  • UDP/IP user datagram protocol/internet protocol
  • the protocol/internet protocol (UDP/IP) protocol can provide a unified communication interface and function for the automatic driving service 210, and can also record necessary call information when the automatic driving service 210 calls the communication interface.
  • the monitoring module 222 can obtain the communication data and scheduling data of the business nodes of the autonomous driving business, can interface with the communication middleware 221, the modeling framework 223 and the smart operating system for autonomous driving 224, and can monitor whether the dependencies and operating behavior of the business nodes change , which is convenient for updating the operating behavior model of the service node when the automatic driving service is updated or the automatic driving scene is switched.
  • the monitoring module 222 includes a communication monitoring module 2221 and a trace monitoring module 2222, wherein the communication monitoring module 2221 is used to obtain communication data of service nodes, and the trace monitoring module is used to obtain scheduling data of service nodes.
  • the modeling framework 223 can provide a modeling framework and capabilities, including a dependency analysis module 2231 , a log fusion module 2232 , a segmentation and aggregation module 2233 , and an association analysis module 2234 .
  • the dependency analysis module 2231 can obtain the associated service node and the dependency relationship of the service node according to the communication data of the service node obtained by the communication monitoring module 2221, and adjust the scheduling strategy of the service node and the service node's associated service node to collect the information of the service node. Node-level communication logs and thread-level scheduling logs.
  • the log fusion module 2232 can obtain fusion logs according to the collected node-level communication logs and thread-level scheduling logs of service nodes.
  • the segmentation and aggregation module 2233 can obtain information about one or more behaviors of the service node according to the fusion log.
  • the association analysis module 2234 may obtain an operating behavior model used to describe the behavior of the service node according to information about one or more behaviors of the service node.
  • the running behavior model of this behavior can include the dependencies of the business node, or the running behavior of all threads included in the behavior on hardware resources, and the running behavior can include any one or more of the following: thread running time, running cycle , or trigger relationships.
  • the hardware resource may be a CPU or a GPU or the like.
  • the running behavior model of the behavior may also include any of the following: a message channel for receiving events corresponding to each behavior that triggers the behavior, at least one time trigger period of the behavior, or a time probability model of the behavior. If the running behavior model of the behavior includes a message channel for receiving events corresponding to each behavior that triggers the behavior, then the running behavior model of the behavior may also include the trigger relationship of the behavior.
  • the autonomous driving intelligent operating system 224 runs on the autonomous driving vehicle hardware platform 230 , including a tracker 2241 and a scheduler 2242 .
  • the tracker 2241 and the scheduler 2242 together constitute the scheduling module in FIG. 1 , which can adjust the scheduling strategy of the automatic driving service according to the actual needs during the automatic driving process or the actual needs during the operation of the automatic driving service.
  • the self-driving vehicle hardware platform 230 can provide a basic hardware platform for the self-driving software system 220 , including a processor 251 , a memory 252 and a storage 253 .
  • Fig. 3 is a schematic flow chart of a modeling method for a service node of an automatic driving service according to the present application.
  • the modeling method for the automatic driving business in Figure 3 can be executed by a modeling device or modeling equipment, for example, it can be executed by the automatic driving system in Figure 2, or it can be performed by other modeling devices or modeling devices connected to the automatic driving system. It is realized by using a mold device, and the embodiments of the present application are not limited thereto.
  • the modeling method of the autonomous driving business in Figure 3 includes the following contents.
  • the business is encapsulated into business modules with different functions, such as vehicle environment perception, sensor fusion, path planning and other modules. Each business module contains one or more business nodes, and different business nodes use communication middleware to transfer messages and call services.
  • the autonomous driving business can be connected in series through middleware such as ROS or DDS to form a task node chain and form a complete autonomous driving capability.
  • the fusion log of the service node of the automatic driving service can still be obtained from the communication middleware 221 .
  • the fusion log can record the call event of the service node and the scheduling information of the thread, where the thread is run by the service node.
  • Fig. 4 is a schematic flowchart of a method for obtaining fusion logs.
  • Step S301 obtaining node-level communication logs and thread-level scheduling logs of service nodes.
  • the node-level communication logs of business nodes are communication logs recorded at the granularity of nodes.
  • the node-level communication log of a business node records the invocation events of the business node.
  • the node-level communication log of a business node contains one or more communication log entries. Each communication log entry can include identity information, time information, and log content.
  • the identity information of each communication log entry includes the log that generated each communication log entry
  • the time information of each communication log entry includes the generation time of the log content included in each communication log entry
  • the log content of each communication log entry includes the name of the call event
  • the call event includes Any one of the receiving event of the service node, the sending event of the service node, the callback start event of the service node, and the callback end event of the service node.
  • the calling event is a receiving event or sending event of the service node
  • the log content of the communication log entry also includes the message channel of the calling event.
  • the node-level communication log may include receiving and sending relationships between the service node and other service nodes, so the dependency relationship of the service nodes may be determined through the node-level communication log.
  • Other service nodes refer to other service nodes except the service node.
  • the dependency relationship of a service node is the relationship between the service node and service nodes that have receiving and sending relationships with the service node.
  • the thread-level scheduling log of a business node is a scheduling log recorded at the granularity of a thread.
  • the thread-level scheduling log of the service node records the scheduling information of the thread. Threads are run by business nodes.
  • the thread-level scheduling log of a business node contains one or more scheduling log entries. Each scheduling log entry can include identity information, time information, and log content. The identity information of each scheduling log entry includes the information included in each scheduling log entry.
  • the thread number and process number of the log content, the time information of each scheduling log entry includes the generation time of the log content included in each scheduling log entry, and the log content of each scheduling log entry includes thread priority, thread binding core Information, the name of the event of the thread, and the event of the thread includes any one of the wake-up event of the thread, the task switching event of the thread, and the relocation event of the thread.
  • the obtained node-level communication logs lack information about threads inside service nodes, such as thread priority, thread core binding information, and thread events, it is difficult to accurately establish the behavior of service nodes using only node-level communication logs. module, and because the obtained thread-level scheduling log only has the running information of the thread on the hardware resources, it lacks the behavior information of the service node, such as the call event of the service node, and the records of the thread-level scheduling log are messy, so it is impossible to The running information of the node is directly mapped to the behavior of the service node, so it is necessary to integrate the node-level communication log and the thread-level scheduling log, so as to facilitate the subsequent further analysis of the behavior of the service node.
  • the time information in the node-level communication log is global time stamp information
  • the time information in the thread-level scheduling log is local time stamp information. Since the form of the global time stamp information is inconsistent with the local time stamp information, therefore, in When merging node-level communication logs and thread-level scheduling logs, it is necessary to synchronize the time information in the node-level communication logs with the time information in the thread-level scheduling logs.
  • the method of synchronizing the time of the node-level communication log and the thread-level scheduling log may be: during the process of obtaining the node-level communication log and the thread-level scheduling log, adding Time synchronization data, according to the time synchronization data, the time information in the node-level communication log and the time information in the thread-level scheduling log are synchronized.
  • the synchronization method can be to synchronize data according to time, and convert the time information form of thread-level scheduling logs into the time information form of node-level communication logs, or the synchronization method can be to synchronize data according to time, and convert the time information form of node-level communication logs to It is converted into the time information form of the thread-level scheduling log.
  • time synchronization data can be added once in the process of obtaining node-level communication logs and thread-level scheduling logs, or periodic time synchronization data can be added in the process of obtaining node-level communication logs and thread-level scheduling logs, for example, Add about 5 minutes as a period of time synchronization data.
  • the time synchronization data can be in the form of ⁇ global timestamp, local timestamp> 2-tuple data at a certain moment, or it can be other data including global timestamp and local timestamp that can achieve the purpose of time synchronization structure type.
  • the identities of node-level communication logs and thread-level scheduling logs can be Information, synchronized time information, and log content are merged into one log to obtain a fusion log.
  • the node-level communication log after synchronizing the time information of the node-level communication log and the thread-level scheduling log, the node-level communication log can be merged according to the synchronized time information
  • the identity information and log content of the thread-level scheduling log and the thread-level scheduling log are arranged in a chronological order and put into a log to obtain a fusion log.
  • the identity information of node-level communication logs and the identity information of thread-level scheduling logs can be aligned, and the way of alignment can be by searching node-level communication
  • the corresponding relationship between the process ID in the log and the process ID in the thread-level scheduling log is to align the name of the business node in the node-level communication log with the name of the thread number in the thread-level scheduling log.
  • the time information of the node-level communication log and the thread-level scheduling log is a unified timestamp (for example, both are global timestamp information or local timestamp information)
  • the node-level communication log and the thread-level scheduling log can be directly merged.
  • the fusion log can be obtained from the scheduling log at the node level without first synchronizing the time information of the communication log at the node level and the scheduling log at the thread level.
  • the obtained fused log includes one or more fused log entries, wherein each fused log entry includes time information, type information, identity information and log content.
  • the time information of each fusion log entry includes the time information of the node-level communication log entry or thread-level scheduling log entry corresponding to each fusion log entry, and the type information of each fusion log entry is used to indicate the log corresponding to each fusion log entry.
  • the entries are node-level communication log entries or thread-level scheduling log entries, the identity information of each fusion log entry includes the identity information of the log entry corresponding to each fusion log entry, and the log content of each fusion log entry includes each fusion log entry The log content of the corresponding log entry.
  • Synchronize the time information in the node-level communication log with the thread-level scheduling log for example, you can convert the local timestamp in the thread-level scheduling log into the global timestamp in the node-level communication log, or you can convert the time information in the node-level communication log
  • Global timestamps are converted to local timestamps in thread-level scheduling logs. After converting the local timestamp in the thread-level scheduling log into the global timestamp in the node-level communication log, the time information in the thread-level scheduling log shown in Table 2 is shown in Table 3 below.
  • the content of the obtained fusion log is shown in Table 4.
  • node-level communication log entries and thread-level scheduling log entries when merging node-level communication logs and thread-level scheduling logs, other orders can be used to sort node-level communication log entries and thread-level scheduling log entries, or no sorting is performed, but only node-level communication log entries
  • the content of and the content of thread-level scheduling log entries are placed in the same fusion log, as shown in Table 5 for example.
  • the fusion log can be obtained.
  • the fusion log includes the running information of the thread and the communication information of the business node, and the running information of the thread can be directly mapped to the business node in the subsequent processing.
  • Behavior information so as to support the establishment of an accurate operating behavior model for the operating behavior of business nodes.
  • the node-level communication log and the thread-level scheduling log can be fused through steps S301 and S302, so as to obtain the fused log.
  • the fusion log can be obtained directly by directly obtaining the calling event of the service node and the scheduling information of the thread.
  • the fusion log obtained according to step S310 includes the call event of the service node and the scheduling information of the thread contained in the service node, so the information of N behaviors of the service node can be obtained by processing the information contained in the fusion log.
  • the information of each behavior of the business node includes: the number of threads contained in each behavior, the running time of each behavior, the average running time of each behavior and the probability of running time, and the execution time of each behavior , the average and probability of the execution time of each behavior, the running time of each thread in each behavior, the execution time, the average running time and the average execution time, the name of the event in each behavior, the The mean of the time points of the events in or the probability distribution model of the time points of the events.
  • Events in each behavior include receive events in each behavior, send events in each behavior, callback start events in each behavior, and callback end events in each behavior.
  • the time point of the event in each behavior includes an absolute time point of the event or a relative time point of the event.
  • the behavior of a business node is aggregated by the time records of multiple threads.
  • the time information in fusion log entry 6 to fusion log entry 11 in Table 5 can be aggregated into the first behavior of business node 1, and the fusion log in Table 5
  • the time information in entry 12 to fusion log entry 15 may be aggregated into the second behavior of service node 1 . Therefore, each behavior of the service node includes one or more time records of each thread in one or more threads.
  • the event in the behavior of the business node is the event recorded in the communication log entry corresponding to the time record of the thread included in the behavior.
  • the communication log entry corresponding to the thread time record refers to the time information of the communication log entry recorded in the thread time time frame.
  • the time point of the event in the behavior of the service node may be a relative time point or an absolute time point, which is not specifically limited in this embodiment of the present application.
  • the relative time point of the event is the time point calculated according to the time information recorded in at least one communication log entry
  • the absolute time point of the event is the time information recorded in the communication log entry that recorded the event.
  • the running time of the mth thread in the nth behavior of the business node is: the running time of the time segment belonging to the mth thread included in the nth behavior, that is, the running time of the time segment included in this time segment
  • the first fusion log entry is a fusion log entry corresponding to scheduling information in the fusion log.
  • the execution time of the mth thread in the nth behavior of the business node is: the execution time of the time segment belonging to the mth thread included in the nth behavior, that is, the sum of all actual execution times in this time segment, the actual The execution time is the difference between the time information of the first merged log entry that records the execution of the thread and the execution of the thread that are adjacent to each other in time.
  • the running time of the nth behavior of the service node is: in one or more time segments included in the nth behavior, the time information of the first fusion log entry that starts first and the first fusion log entry that ends last The delta of the time information of the fused log entries.
  • the execution time of the nth behavior of the business node is: the average execution time of the threads included in the nth behavior, that is, the sum of the execution times of the threads included in the nth behavior divided by the time of the threads included in the nth behavior quantity.
  • one or more behaviors of the service node can be obtained according to the time information in the fusion log, and during the operation of the autonomous driving service, the behavior of the service node will run repeatedly, that is, the behavior of the service node includes The thread will run repeatedly multiple times. Therefore, the fusion log contains the time information of each behavior of one or more behaviors of the service node running one or more times. Whether multiple behaviors are the same behavior can be judged according to the set of thread numbers included in each behavior. The execution time and running time of threads obtained when the same behavior is run repeatedly, the execution time and running time of the behavior may be inconsistent.
  • the average execution time and average running time of the thread can be calculated according to the obtained multiple execution times and multiple running times of the threads included in the behavior, that is, the average value of the execution time and the average running time of the thread can be calculated .
  • the average running time, the probability of running time, the average execution time and the probability of execution time of the behavior are calculated.
  • the probability of the behavior's runtime is the probability that each runtime value of the behavior occurs among all the runtime values.
  • the execution time probability of the behavior is the probability that each execution time value of the behavior occurs in all execution time values.
  • the manner of obtaining information on the N behaviors of the service node according to the fusion log may be: according to the fusion log entries in the fusion log, determining at least one time segment; according to at least one time segment, determining N groups of fusion log entry sets; Determine N pieces of behavior information of the service node according to the N groups of fusion log entry sets respectively.
  • information such as the behavior of the service node and the running time of the thread included in the behavior of the business node can be obtained, which is convenient for subsequent
  • the information of the service node and the information of the thread included in the service node are further processed, so as to support the establishment of an accurate running behavior model for the running behavior of the business node.
  • an operation behavior model of the N operation behaviors of the service node can be obtained.
  • the running behavior model of each behavior can be determined based on the information of each behavior.
  • the first behavior is any one of the N behaviors.
  • the running behavior model of the first behavior may include any of the following: the message channel for receiving events corresponding to each behavior that triggers the first behavior, at least one time trigger period of the first behavior, or the time probability of the first behavior Model. If the running behavior model of the first behavior includes a message channel for receiving events corresponding to each behavior that triggers the first behavior, then the running behavior model of the first behavior may also include a trigger relationship of the first behavior.
  • the running behavior model of the first behavior may further include any one or more of the following: dependencies of service nodes, running time of at least one thread included in the first behavior, The trigger relationship of at least one thread, or the running period of at least one thread included in the first behavior.
  • Multi-receiving and multi-sending means that a service node can receive messages sent by multiple other service nodes, and can also send messages to multiple other service nodes. Other service nodes refer to other service nodes except the service node.
  • the trigger relationship of the first behavior can be obtained through an association rule mining algorithm, and it is determined that there is an event trigger in the first behavior, and the trigger relationship can be obtained.
  • Each behavior of the first behavior corresponds to the message channel that receives the event.
  • the behavior that triggers the first behavior may be one or more behaviors that trigger the execution of the first behavior.
  • a behavior that triggers the first behavior corresponds to a message channel that the first behavior receives events.
  • the event-receiving message channels of the first behavior corresponding to each behavior that triggers the first behavior may be the same or different.
  • the service nodes that have a sending and receiving relationship with the service nodes include: one or more of the service nodes that send messages to the service nodes, or the service nodes that receive the messages sent by the service nodes.
  • behavior that triggers the first behavior may be the behavior of the service node, or the behavior of other service nodes except the service node, which is not specifically limited in this embodiment of the present application.
  • the trigger relationship of the N behaviors of the service node can be obtained through an association rule mining algorithm, and one or more behaviors that trigger the first behavior can be determined.
  • the behavior trigger record of the first behavior can be obtained according to one or more behaviors that trigger the first behavior. That is, there is an event trigger for the first behavior, and the behavior trigger record of the first behavior includes the name of the business node and the message channel that receives the event corresponding to each behavior that triggers the first behavior.
  • the behavior that triggers the first behavior of service node 1 includes behavior A, behavior B, and behavior C
  • the behavior trigger record of the first behavior includes: the name of business node 1, the first behavior
  • the triggering relationship of the first behavior or the triggering relationship of the M threads contained in the first behavior can be obtained by the following method: the business node in the same time window and the business node that has a sending and receiving relationship with the business node can be Behaviors are merged to establish a data set of nodes to be analyzed.
  • the node behavior data set to be analyzed can be expressed as ⁇ behavior including receiving events ⁇ , ⁇ behavior including sending events ⁇ , ⁇ other behaviors in the window ⁇ .
  • ⁇ Behaviors Including Receiving Events ⁇ means a data set containing events receiving events in the same time window, and the events containing receiving events include: one or more of the behaviors including receiving events of the service node.
  • ⁇ behaviors with sending events ⁇ means the data set that contains the behaviors of sending events in the same time window.
  • the behaviors that include sending events include: the behavior of business nodes that contain sending events, or the business nodes that send messages to this business node One or more of the behaviors that contain sending events.
  • ⁇ Other behaviors in the window ⁇ means the data set of other behaviors in the same time window, the other behaviors include: the behavior of the business node containing the callback start event, or one of the behaviors of the business node containing the callback end event or Multiple.
  • the behavior data set of the node to be analyzed contains the behaviors including receiving events, sending events and One or more threads of each behavior in the other behaviors of the business node
  • the other behaviors of the business node can be the behavior that contains the callback start event or the behavior that contains the callback end event; the one-hot (one -hot) coding; calling the association rule (apriori) algorithm to find out the frequent itemsets in the behavior data set of the node to be analyzed, as the trigger relationship of the M threads contained in the first behavior or the trigger relationship of the first behavior.
  • the behavior corresponding to the receiving event among the first behaviors of the service node including the receiving event whose confidence degree is greater than the threshold in the above-mentioned node behavior data set to be analyzed is regarded as a necessary triggering behavior of the first behavior.
  • the necessary triggering behavior of the first behavior of the business node if the first behavior only runs once, then according to the time information of the first behavior contained in the fusion log, the time before the callback start event in the first behavior is closest to Behaviors are considered key triggering behaviors.
  • the necessary triggering behavior of the first behavior of the service node if the first behavior will run repeatedly, the time information of the first behavior running multiple times exists in the fusion log.
  • the behavior that is always closest to the time of the callback start event in the first behavior is regarded as the key trigger behavior, that is, the first behavior in the fusion log runs multiple times
  • the behavior that can be found at least once before the time of the callback start event is regarded as the key trigger behavior.
  • a behavior of a business node within the same time window can be combined with a behavior of a business node that has a sending and receiving relationship with the behavior of the business node, and a data set of nodes to be analyzed can be established to obtain the behavior of a business node. trigger relationship. It is also possible to combine multiple behaviors of business nodes within the same time window with behaviors of business nodes that have a sending and receiving relationship with multiple behaviors of the business node, establish a data set of nodes to be analyzed, and obtain triggers of multiple behaviors of business nodes relation.
  • the behavior of the service node that has a transceiving relationship with the behavior of the service node may be one or more behaviors of each of the one or more service nodes that have a transceiving relationship with the behavior of the service node.
  • the frequent itemsets in the business node behavior data set can be obtained through the association rule mining algorithm, that is, If the trigger relationship of the first behavior of the service node is obtained, then the first behavior has an event trigger. If the frequent item set in the behavior data set of the business node cannot be obtained through the association rule mining algorithm, that is, the trigger relationship of the first behavior of the business node cannot be obtained, then there is no event trigger for the first behavior.
  • the trigger relationship of the m-th thread among the M threads included in the first behavior can be obtained through the above method.
  • the trigger relationship of the m-th thread among the M threads included in the first behavior can still be obtained through the above method.
  • the necessary triggering behavior is a necessary condition for triggering the service node to execute the next behavior.
  • the fusion node N5 in FIG. 7 receives messages sent by the sensor node N2 and the pre-processing node N3 . If the behavior of node N2 sending a message and the behavior of node N3 sending a message are both necessary triggering behaviors of node N5, then after N5 executes a behavior, in the next time period, N5 receives at least one message sent by N2 and N3, It will trigger N5 to execute the next behavior.
  • N5 has received multiple messages sent by N2, if N5 has not received the message sent by N3, it will not trigger N5 to execute the next action until N5 receives the message sent by N3, then trigger N5 to execute the next action. one act. Vice versa, that is, N5 has received multiple messages sent by N3. If N5 has not received the message sent by N2, it will not trigger N5 to execute the next action until N5 receives the message sent by N2, then trigger N5 to execute next behavior.
  • the key triggering behavior is the key condition for triggering the next behavior of the service node, but if the business node has multiple necessary triggering behaviors at the same time, the triggering of the The service node executes the next behavior.
  • the behavior of N2 sending a message is a key triggering behavior
  • the behavior of N3 sending a message is not a necessary triggering behavior
  • N5 executes one behavior, in the next time period, even if N5 receives multiple N3 sending If N5 has not received the message sent by N2, it will not trigger N5 to execute the next action until N5 receives a message sent by N2, it will trigger N5 to execute the next action.
  • N5 receives at least one message sent by N2 and N3, and it will Trigger N5 to execute the next action.
  • N5 receives at least one message sent by N2 and N3, and it will Trigger N5 to execute the next action.
  • N5 has received multiple messages sent by N2
  • N5 if N5 has not received the message sent by N3, it will not trigger N5 to execute the next action until N5 receives the message sent by N3, then trigger N5 to execute the next action. one act.
  • N5 has received multiple messages sent by N3. If N5 has not received the message sent by N2, it will not trigger N5 to execute the next action until N5 receives the message sent by N2, then trigger N5 to execute next behavior.
  • frequent itemsets in the node data set to be analyzed can be obtained through other association rule mining algorithms, such as frequent item set discovery algorithm (frequent pattern-growth, FP-Growth) algorithm, multi-stage algorithm, multi-hashing algorithm, etc.
  • frequent item set discovery algorithm frequent pattern-growth, FP-Growth
  • multi-stage algorithm multi-hashing algorithm, etc.
  • the time information of each first fusion log entry contained in one or more first fusion log entry sets corresponding to the first behavior among the N behaviors is converted into frequency domain data, that is, the first behavior is included in the fusion log
  • the time information in is converted to frequency domain data, and it is determined whether there are one or more frequency values exceeding the average value of the frequency domain data in the frequency domain data. If so, determine that there is a time trigger in the first behavior, and determine at least one time trigger period of the first behavior according to one or more frequency values exceeding the average value of the frequency domain data of the first behavior.
  • Each first fusion log entry set includes one or more first fusion log entries.
  • a behavior-triggered record of the first behavior may be obtained.
  • the behavior trigger record of the first behavior includes: the name of the service node and at least one time trigger period of the first behavior.
  • the first behavior among the N behaviors will be repeated multiple times, all the time information of the first behavior in the fusion log will be converted into frequency domain data, so as to determine whether there is a time trigger in the first behavior. If the first behavior is only run once, the time information of the first behavior in the fusion log is converted into frequency domain data, so as to determine whether the first behavior has a time trigger.
  • the step of obtaining the message channel for receiving the event corresponding to each behavior that triggers the first behavior may be performed before the step of determining at least one time trigger period of the first behavior, or after determining at least one time trigger period of the first behavior.
  • the steps of a time-triggered period are performed afterward, which is not specifically limited in this embodiment of the present application.
  • the embodiment of the present application does not limit the implementation manner of how to convert time domain data into frequency domain data.
  • the time information in the first row in the fused log can be converted into frequency domain data using Fourier transform or fast Fourier transform methods.
  • the time trigger period of the first behavior is corresponding to the frequency value time period; If there are multiple frequency values exceeding the average value of the frequency domain data of the first behavior in the frequency domain data of the first behavior, then the first behavior has multi-period time triggers, and multiple frequency values exceeding the first behavior
  • the time period corresponding to the frequency value of the average value of the frequency domain data is the time trigger period of the first behavior.
  • FIG. 5 For example, a partial waveform diagram obtained by converting the time information of a behavior of a service node in the fusion log into frequency domain data is shown in FIG. 5 .
  • Fig. 5 is a schematic waveform diagram of converting the time information of behavior in the fusion log into frequency domain data according to an embodiment of the present application.
  • Fig. 5 is part of the frequency domain data converted from the time information of a behavior of a service node in the fusion log.
  • the time trigger period is multiple frequency values that exceed the average value of the frequency domain data of this behavior.
  • the corresponding time periods that is, the abscissas 20 and 60 corresponding to the peaks shown in FIG. 5 are time trigger periods for this behavior.
  • the trigger mode of the first behavior of the service node is determined according to the following conditions:
  • the time information of the necessary trigger behavior of the first behavior in the fusion log is converted into frequency domain data. If there are one or more frequency values exceeding the average value of the frequency domain data of the necessary trigger behavior of the first behavior in the frequency domain data of the necessary trigger behavior of the first behavior (that is, there are one or more frequency values in the waveform diagram of the frequency domain data peaks), and the number of peaks in the frequency domain data of the first behavior and the necessary trigger behavior of the first behavior is exactly the same as the value of the time period corresponding to the peak, then there is an event trigger in the first behavior.
  • the behavior trigger record of the first behavior includes: the name of the service node, and the event message channel of the first behavior that receives the message sent by the necessary trigger behavior of the first behavior.
  • the first behavior has multiple necessary triggering behaviors, and there is only one key triggering behavior among the multiple necessary triggering behaviors, convert the time information of the key triggering behavior of the first behavior in the fusion log into frequency domain data. If there are one or more frequency values exceeding the average value of the frequency domain data of the key trigger behavior of the first behavior in the frequency domain data of the key trigger behavior of the first behavior (that is, there are one or more frequency values in the waveform diagram of the frequency domain data peaks), and the number of peaks in the frequency domain data of the first behavior and the key trigger behavior of the first behavior is exactly the same as the value of the time period corresponding to the peak, then there is an event trigger in the first behavior.
  • the behavior trigger record of the first behavior includes: the name of the business node, and the message channel of the first behavior that receives the message sent by the key trigger behavior of the first behavior.
  • the frequency domain data does not exist If one or more frequency values exceed the average value of the frequency domain data of the first row, then there is an event trigger for the first row.
  • the behavior trigger record of the first behavior includes: the name of the service node and the message channel that receives the event corresponding to each behavior that triggers the first behavior.
  • the first behavior has a time trigger.
  • the behavior trigger record of the first behavior includes: the name of the service node and one or more time trigger periods of the first behavior.
  • the frequency domain data does not exist One or more frequency values that exceed the average value of the frequency domain data of the first row, then there are other triggers for the first row.
  • the behavior trigger record of the first behavior is: the name of the service node and the time information of one or more first behaviors running.
  • the time information may be absolute time information or relative time information, which is not specifically limited in this embodiment of the present application.
  • the behavior trigger record of the first behavior can be: the name of the business node and the time probability model of the first behavior running.
  • time probability model of the running of the first behavior is used to describe the probability distribution of the time interval of the running of the first behavior.
  • the time interval for running the first behavior may be the interval between the start time of the i-th first behavior running and the i+1th time the first behavior running starts in the fusion log, or it may be the i-th The interval between the time when the first behavior of the first behavior ends and the time when the first behavior of the i+1th time ends, or it can be the time during the running of the first behavior of the ith time and the time during the running of the first behavior of the i+1th time
  • the interval of time is not specifically limited in this embodiment of the present application.
  • the behavior trigger record of the first behavior can be: the name of the business node and the average value of the time interval for the first behavior to run.
  • the triggering manner of the first behavior can be determined through the above method, and the behavior trigger record of the first behavior can be obtained.
  • the triggering mode of the first behavior may be any one of event triggering, time triggering, and other triggering modes.
  • At least one first fusion log entry corresponding to the m-th thread among the M threads contained in the first behavior in the set of one or more first fusion log entries corresponding to the first behavior among the N behaviors The time information of is converted into frequency domain data, that is, the time record of the mth thread in the fusion log of the M threads included in the first row is converted into frequency domain data, and the running period of the mth thread is obtained.
  • step S301 the dependency relationship of service nodes can be obtained.
  • step S320 the running time of at least one thread included in the nth behavior among the N behaviors of the service node can be obtained.
  • step S330 the trigger relationship of at least one thread contained in the nth action among the N actions of the service node, and the running cycle of at least one thread included in the nth action can be obtained.
  • step S330 the message channel of the receiving event corresponding to each behavior that triggers the first behavior, or at least one time trigger period of the first behavior, or the time probability model of the first behavior can be obtained. If the message channel for receiving the event corresponding to each behavior that triggers the first behavior can be obtained, the trigger relationship of the first behavior can also be obtained.
  • the running behavior model used to describe the running behavior of business nodes can provide reverse development guidance for designers and developers, and can also calculate the running behavior status of business nodes on hardware resources through simulation and other methods, and check the performance of business nodes on hardware. Whether the state of the running behavior on the resource is as designed. Therefore, the operating behavior model of the service node in the embodiment of the present application has important value for feedback guidance and auxiliary design.
  • the running behavior model can also be used as the input for the simulation, simulation and optimization of the subsequent automatic driving business code, providing high-precision guarantee for the simulation, simulation and optimization of the subsequent automatic driving business code.
  • the operation behavior model established for the service node can restore the operation behavior state of the service node more accurately.
  • Fig. 6 is a schematic flowchart of a method for acquiring node-level communication logs and thread-level scheduling logs according to an embodiment of the present application.
  • the method for obtaining node-level communication logs and thread-level scheduling logs in FIG. 6 includes the following contents:
  • S410 Determine associated service nodes and dependencies of the service nodes according to the communication data of the service nodes.
  • the communication middleware 221 can obtain the communication data of one or more service nodes.
  • the communication data of each service node includes the receiving event or sending event of each service node. If the communication data includes the receiving event, the communication data also includes the message channel of the receiving event; if the communication data includes the sending event, the communication data also includes The message channel for sending events. For example, for a service node using the ROS communication protocol stack, ROS node (rosnode) information and ROS topic (rostopic) information can be collected to obtain the communication data of the service node.
  • rosnode can include node name (Node name), process identification number (Pid) , information published by nodes (Publications), subscribed information (Subscriptions), connection information (Connections) and other information
  • rostopic can include type information (Type), publisher information (Publisher), subscriber information (Subscriber) and other information.
  • the name and process identification number of the service node can be obtained through Node name and Pid
  • the messages sent and received by the service node can be obtained through Publications, Subscriptions and Connections
  • the existence and reception of the service node can be obtained through Publisher and Subscriber , Send the information of the business node of the relationship.
  • Domain can include domain identifier (Domain ID) and its Domain Participant, etc.
  • Domain Participant can include publisher information (Publisher), subscriber information (Subscriber), topic information (Topic), data subscriber information (Data Reader) and data publisher information (Data Writer) and other information.
  • the message sent and received by the service node can be obtained through Topic, Data Reader, and Data Writer, and the information of the service node that has a receiving and sending relationship with the service node can be obtained through Publisher and Subscriber.
  • the communication data of the service node can be obtained by piling key APIs such as the vehicle communication protocol stack, TCP/IP, UDP/IP receiving, sending, and callback processing contained in the communication middleware 221, and There is no need to use the autopilot service code or piling the autopilot service code to obtain the communication data of one or more service nodes.
  • key APIs such as the vehicle communication protocol stack, TCP/IP, UDP/IP receiving, sending, and callback processing contained in the communication middleware 221, and There is no need to use the autopilot service code or piling the autopilot service code to obtain the communication data of one or more service nodes.
  • the receiving and sending relationship between each service node and other service nodes except itself can be determined, so as to determine the associated service nodes and dependencies of each service node.
  • the associated service node of each service node is at least one of the ancestor node of the service node or the descendant node of the service node.
  • the service node and other service nodes can be regarded as nodes in a directed graph, and the sending and receiving relationship between service nodes can be regarded as a slave sending
  • the node points to the directed connection of the receiving node, so as to generate the directed graph of the dependency relationship of the service node according to the receiving and sending relationship, as shown in Fig. 7 .
  • Fig. 7 is a schematic diagram of a directed graph of dependency relationships of service nodes according to an embodiment of the present application.
  • the directed graph of dependency relationships of service nodes in FIG. 7 is an example of the method in step S410 in FIG. 6 .
  • Figure 7 includes sensing node N0, sensing node N1, sensing node N2, pre-processing node N3, sensing node N4, fusion node N5, sensing node N6, fusion node N7, fusion node N8, fusion node N9, where N1
  • the original scheduling algorithm of the node is round robin (RR) with a priority of 10, and the original scheduling algorithms of other nodes are completely fair scheduler (CFS).
  • N5 as the current node to be analyzed, both N2 and N3 send messages to N5, N1 sends messages to N3, N0 sends messages to N1; N5 sends messages to N7 and N8, and N8 sends messages to N9, then N0, N1, N2 , N3 are the ancestor nodes of N5, and N7, N8, and N9 are all descendant nodes of N5, so the associated business nodes of N5 are N0, N1, N2, N3, N7, N8, and N9, and the dependencies of N5 are N2, N3 , N7, N8 and N5 are directed connections.
  • the modeling framework 223 can call the communication middleware 221 through the monitoring module 222 to collect receiving and sending relationships between service nodes and other service nodes, that is, to obtain a complete static sending and receiving relationship between service nodes.
  • the modeling framework 223 can call the ROS node list (rosnode list) to first obtain all node names, and then call the command to view the ROS node information (rosnode info nodename) for each node in turn to obtain the node Detailed information; optionally, all communication topic information can be obtained by calling the rostopic command.
  • the modeling framework 223 can call the communication middleware 221 through the monitoring module 222 to collect receiving and sending relationships between service nodes and other service nodes, that is, to obtain a complete static sending and receiving relationship between service nodes.
  • the modeling framework 223 can call the ROS node list (rosnode list) to first obtain all node names, and then call the command to view the ROS node information (rosnode info nodename) for each node in turn to
  • the associated service nodes and dependencies of the service nodes can be determined, so as to facilitate the subsequent adjustment of the scheduling strategy of the service nodes, and facilitate the collection of low-noise or no-noise node-level communication logs and thread-level scheduling logs.
  • the scheduling policy of each service node and the associated service nodes of each service node can be adjusted to obtain an adjusted scheduling policy.
  • adjusting the scheduling policy of the service node may include adjusting one or more of the scheduling algorithm, priority, core binding policy, cycle frequency, reserved time slice length, and deadline (deadline) length.
  • the scheduling algorithm is a resource allocation algorithm stipulated according to the resource allocation strategy of the system, which can include Linux completely fair scheduling or real-time scheduling algorithm;
  • Priority; cycle frequency means that if the service node is running periodically, the scheduling effect can be achieved by adjusting the cycle length of the service node, that is, changing the cycle frequency of the service node;
  • the reserved time slice length means that the system will reserve the operation for the service node Time, which will not be interrupted by other business nodes during the running time, so the scheduling effect can be achieved by adjusting the reserved time slice length;
  • the deadline length is the fixed deadline length assigned to each business node.
  • the length of the deadline and the priority cannot be adjusted at the same time.
  • the scheduling algorithm, priority, core binding strategy, cycle frequency, reserved time slice length, and deadline (deadline) length can be adjusted independently or arbitrarily. Adjust any combination.
  • the scheduling policy of each business node and all ancestor nodes of each business node can be adjusted, so that each business node is executed preferentially, and the priority execution order of the ancestor nodes of each business node is based on the distance from the business node Decrease step by step.
  • the priority execution order of business nodes refers to adjusting the scheduling strategy of business nodes so that the business nodes are executed in order, that is, to determine the business nodes that are executed preferentially, and other business nodes except the business nodes that are preferentially executed the order in which they are executed. For example, by adjusting the priorities of each service node and all ancestor nodes of each service node, each service node has the highest priority, and the priority of each service node's ancestor nodes is gradually increased according to the distance from the service node. The levels are decremented, as shown in Figure 8.
  • FIG. 8 is a schematic diagram of adjusting a scheduling policy of a service node and a service node associated with the service node according to an embodiment of the present application.
  • FIG. 8 is a schematic diagram of adjusting the scheduling policy of the fusion node N5 and the ancestor nodes of N5 in the directed graph of the dependency relationship of the service nodes shown in FIG. 7 .
  • Figure 8 includes sensing node N1, sensing node N2, pre-processing node N3, sensing node N4, fusion node N5, sensing node N6, fusion node N7, fusion node N8, fusion node N9, taking N5 as the current to-be-analyzed Nodes, the associated service nodes of N5 are N0, N1, N2, N3, N7, N8, and N9, and the ancestor nodes of N5 are N0, N1, N2, and N3.
  • the scheduling algorithm of N5 is adjusted to a first-come-first-out (FIFO) scheduling algorithm, the priority is adjusted to 99, the scheduling algorithms of the ancestor nodes of N5 are adjusted to RR, and the ancestor nodes of N5 are adjusted to RR.
  • Nodes N2 and N3 adjust the priority to 98, the ancestor node N1 of N5 adjusts the priority to 97, and the ancestor node N0 of N5 adjusts the priority to 96, that is, N5 is set to be executed first, and the ancestor node of N5 is set to be executed first after N5 is executed Execute, and the priority of the ancestor node of N5 is decremented according to the distance from N5.
  • FIFO first-come-first-out
  • the core binding policies of N5 and the ancestor nodes of N5 are all set so that all available cores on the processor 231 can run.
  • N5 can be executed first, and the ancestor nodes of N5 can also be executed first, so as to avoid resource competition and interference from other service nodes except N5, and obtain node-level communication of N5 with low or no background noise Logging and thread-level scheduling logging.
  • the scheduling policy of each service node and the parent node of each service node can be adjusted so that each service node is executed first, and the parent node of each service node is executed first after each service node is executed.
  • the parent node of each service node is the first service node that sends a message to the service node.
  • the scheduling policy of each service node and its descendant nodes can be adjusted so that each service node is executed preferentially, and the priority execution sequence of each service node’s descendant nodes is gradually increased according to the distance from the service node. level decrease.
  • the scheduling strategy of each service node and each service node's sub-nodes can be adjusted, so that each service node is executed first, and each service node's sub-nodes are executed first after the execution of the service node.
  • the scheduling strategy of each service node and its ancestor nodes and descendant nodes can be adjusted, so that each service node is executed preferentially, and the priority execution order of each service node's ancestor nodes is based on the The distance of each business node decreases step by step, so that the priority execution order of the descendant nodes of each business node is after the priority execution order of the ancestor node, and decreases step by step according to the distance from the node; or the priority execution order of the descendant nodes of each business node Decrease step by step according to the distance from the node, so that the priority execution order of the ancestor nodes of each business node is after the priority execution order of descendant nodes, and decrease step by step according to the distance from the node; or make the ancestor nodes of each business node
  • the priority execution order of descendant nodes and descendant nodes is gradually reduced according to the distance from the business node, and the priority execution order of ancestor nodes and descendant nodes with the same distance as
  • the scheduling policy of each service node and its parent node and child nodes can be adjusted so that the service node is executed preferentially, and the parent node of each service node is executed preferentially after the service node is executed, so that each The sub-nodes of each business node are executed first after the execution of the parent node of the business node; Execute first after the node is executed; or make the parent node and child node of each business node execute first after the execution of the business node.
  • the modeling framework 223 can use the scheduler 2242 to adjust the scheduling policies of the service nodes and the service nodes associated with the service nodes.
  • step S420 can be repeated multiple times, and only adjust the scheduling strategy of one service node and its associated service nodes each time, and at the same time adjust the scheduling policy of the service node and its associated service nodes Before making adjustments, it is necessary to record the scheduling policy of the business node and the business node associated with the business node. After adjusting the business node and the business nodes associated with the business node, it is necessary to restore the The scheduling strategy of the associated service node can continue to adjust the scheduling strategy of the next service node and the associated service node of the next service node, so as not to affect the original state of the autonomous driving service and the next service node and the next The processing of the associated business node of the business node.
  • the priority execution order of the service nodes and the associated service nodes of the service nodes can be determined, thereby avoiding resource competition and reducing mutual interference caused by the operation of multiple service nodes , to obtain low-noise or no-noise node-level communication logs and thread-level scheduling logs.
  • each service node is processed, that is, the adjusted dispatch strategy of each service node and the associated service node of each service node is obtained, and the automatic driving service is run according to the adjusted dispatch strategy, and the adjusted dispatch strategy is collected.
  • the communication data and scheduling data of the service node in the scheduling policy state, and the node-level communication log and thread-level scheduling log of the service node are obtained. Since the adjusted scheduling strategy avoids resource competition and interference from other service nodes except the service node, the obtained node-level communication logs and thread-level scheduling logs of the service node are logs with low or no background noise , which can support subsequent and accurate establishment of a model for the operation behavior of the service node.
  • step S420 and step S430 can be combined and repeated multiple times, that is, each time step S420 is performed, only one service node and the scheduling policy of the service node associated with the service node are adjusted, and then step S430 is performed, according to the The adjusted scheduling strategy of the business node and its associated business nodes, run the auto-driving business, collect the communication data and scheduling data of the business node, obtain the node-level communication log and thread-level scheduling log of the business node, and Before step S420, record the scheduling policies of the service node and its associated service nodes, and restore the scheduling policies of the service node and its associated service nodes after step S430.
  • the combination steps of S420 and S430 are performed again, that is, for the next service node, the scheduling strategy of the next service node and the associated service node of the next service node is adjusted, and then according to the next service node and the adjusted scheduling strategy of the associated service node of the next service node, run the automatic driving service, collect the communication data and scheduling data of the next service node, obtain the node-level communication log and thread-level scheduling log of the next service node, and Before step S420, record the scheduling strategy of the next service node and the associated service nodes of the next service node, and restore the scheduling strategy of the next service node and the associated service nodes of the next service node after step S430.
  • the combination steps of S420 and S430 are repeated for each service node to obtain the node-level communication log and thread-level scheduling log of each service node.
  • the modeling framework 223 can use the communication monitoring module 2221 and the Trace monitoring module 2222 in the monitoring module 222 to collect the node-level communication logs and thread-level scheduling logs of the service nodes from the communication middleware 221 and the tracker 2241 respectively, Recorded in the memory 233 of the self-driving vehicle hardware platform 230.
  • Fig. 9 is a schematic flowchart of a method for acquiring node-level communication logs and thread-level scheduling logs according to another embodiment of the present application.
  • the method for obtaining node-level communication logs and thread-level scheduling logs in FIG. 9 is an example of the method for obtaining node-level communication logs and thread-level scheduling logs in FIG. 6 .
  • the method for obtaining node-level communication logs and thread-level scheduling logs in Figure 9 includes the following content:
  • each service node is regarded as a node of a directed graph
  • the sending and receiving relationship between service nodes is regarded as a slave
  • the sending node points to the directed connection of the receiving node, so as to generate a directed graph of the dependency relationship of the service node according to the receiving and sending relationship between the service nodes, as shown in Figure 7.
  • the node-level communication log and thread-level scheduling log of the currently traversed node are obtained each time, so as to complete the acquisition of the log of each node.
  • the method for traversing the directed graph of dependencies may be a graph search method, such as a depth-first search method, or a breadth-first search method, or other traversals that can be traversed to each node in the directed graph of dependencies method.
  • a graph search method such as a depth-first search method, or a breadth-first search method, or other traversals that can be traversed to each node in the directed graph of dependencies method.
  • the dependency analysis module 2231 of the modeling framework 223 may traverse the directed graph of dependencies.
  • All upstream nodes of this node correspond to all ancestor nodes of this business node
  • all downstream nodes of this node correspond to all descendant nodes of this business node
  • all upstream nodes of this node correspond to all parents of this business node Node
  • the downstream nodes of this node correspond to all child nodes of this business node.
  • traversing the node to be analyzed and one or more of the upstream nodes or downstream nodes of the node to be analyzed it can be executed by the dependency analysis module 2231 of the modeling framework 223, traversing the node to be analyzed and the upstream nodes of the node to be analyzed or one or more of the downstream nodes can then obtain the scheduling policy and can be recorded in the memory 232 of the hardware platform 230 of the self-driving vehicle.
  • the adjustable scheduling policy may include one or more of scheduling algorithm, scheduling priority, core binding policy, cycle frequency, reserved time slice length, and deadline length.
  • the length of the deadline and the priority cannot be adjusted at the same time.
  • the scheduling algorithm, priority, core binding strategy, cycle frequency, reserved time slice length, and deadline (deadline) length can be adjusted independently or arbitrarily. Adjust any combination.
  • the scheduling strategy of the node and its layer-upstream node adjust the scheduling strategy of the node and the node’s layer-upstream node so that the service node is executed preferentially, and the node’s layer-1
  • the upstream node is executed first after this node is executed.
  • the scheduling policies of the node and all downstream nodes of the node can be adjusted so that the node is executed preferentially, and the scheduling policies of all downstream nodes of the node are prioritized
  • the execution order decreases step by step according to the distance from the node.
  • the scheduling strategy of the node and the node-1-layer downstream nodes so that the node is executed preferentially, and the node’s layer-1 downstream nodes Nodes are executed first after this node is executed.
  • the node after obtaining the scheduling policies of the node and all upstream nodes and downstream nodes of the node, adjust the scheduling policies of the node and all upstream nodes and downstream nodes of the node, so that the node is executed preferentially, and the node
  • the priority execution order of all upstream nodes of the node decreases step by step according to the distance from the node, so that the priority execution order of all downstream nodes of this node is after the priority execution order of all upstream nodes, and decreases step by step according to the distance from the node; or Make the priority execution order of all downstream nodes of this node decrease step by step according to the distance from this node, make the priority execution order of all upstream nodes of this node after the priority execution order of downstream nodes, and decrease step by step according to the distance from this node ; Or make the priority execution order of all upstream nodes and all downstream nodes of this node decrease step by step according to the distance from this node, so that the priority execution order of upstream nodes and downstream
  • the scheduling strategy of the node and its layer of upstream nodes and layer of downstream nodes adjust the scheduling strategy of the node and its layer of upstream nodes and layer of downstream nodes, so that the node Priority execution, so that the first-level upstream nodes of this node are executed first after the execution of the business node, so that the first-level downstream nodes of this node are executed first after the first-level upstream nodes of this node are executed, or make the first-level downstream nodes of this node Execute first after the node is executed, so that the node's one-level upstream node is executed first after the node's one-level downstream node is executed; or the node's one-level upstream node and one-level downstream node are prioritized after the node is executed implement.
  • adjusting the scheduling policy of the node and one or more of the node's upstream node or the node's downstream node may be executed by the modeling framework 223 through the scheduler 2242 .
  • step S530 For the node to be analyzed, obtain the adjusted scheduling strategy of the node and all upstream nodes of the node according to step S530, run the automatic driving service according to the obtained adjusted scheduling strategy, and collect the communication data and scheduling data of the node, thereby Obtain the node-level communication log and thread-level scheduling log of this node.
  • step S540 The specific implementation manner of step S540 is the same as that of step S430, and will not be repeated here.
  • the scheduling strategy of the node and all upstream nodes of the node recorded in step S520 is restored, so as to avoid the The scheduling strategy of the upstream node is adjusted, which affects the log acquisition of subsequent nodes and the original state of the automatic driving business.
  • step S520 restore the scheduling strategy of the node and its layer-one upstream node.
  • step S520 the scheduling policies of the node and all downstream nodes of the node are restored.
  • step S520 restore the scheduling strategies of the node and its layer-1 downstream nodes.
  • step S520 the scheduling policies of the node and all upstream nodes and all downstream nodes of the node are restored.
  • step S520 the scheduling strategy of the node and its layer of upstream nodes and its layer of downstream nodes. If what is recorded in step S520 is the scheduling strategy of the node and its layer of upstream nodes and its layer of downstream nodes, then the scheduling strategy of the node and its layer of upstream nodes and its layer of downstream nodes to restore.
  • step S550 may be executed by the modeling framework 223, that is, read the scheduling policy recorded in step S520 from the memory 232, and restore the node and one or more of the upstream node of the node or the downstream node of the node Scheduling strategy, so as not to affect the log acquisition of subsequent nodes and the original state of the automatic driving business.
  • Fig. 10 is a schematic diagram of an internal structure of a service node provided according to an embodiment of the present application. What is shown in FIG. 10 is the internal callback processing of the service node, including task T1, task T2 and task T3.
  • the internal callback processing of the service node is executed through the process P1.
  • Process P1 includes thread t1, thread t2 and thread t3. Thread t1 is used to execute task T1, thread t2 is used to execute task T2, and thread t3 is used to execute task T3.
  • the receiving information of thread t1 and thread t2 and the sending information of thread t3 can be obtained through the communication middleware 221, but the information sent by thread t1 and thread t2 to thread t3 belongs to the receiving and sending information of threads included in the service node, and cannot Obtained through the communication middleware 221, that is, the running behavior of the threads included in the service node cannot be obtained through the communication middleware. Therefore, it is necessary to process the node-level communication log and thread-level scheduling log of the service node obtained from the communication middleware 221 to obtain the fusion log, so as to obtain the running behavior of the thread contained in the service node according to the fusion log.
  • FIG. 11 is a schematic flowchart of a modeling method for a service node of an automatic driving service according to another embodiment of the present application.
  • the modeling approach in Figure 11 includes the following:
  • Each fusion log entry in the fusion log includes time information, type information, identity information and log content, so at least one time segment can be determined according to the time information of the fusion log entry.
  • the fusion log entries included in the fusion log can be divided into two types.
  • the first type of fusion log entry records scheduling information
  • the second type of fusion log entry records Call event.
  • a fusion log entry recording scheduling information may be called a first fusion log entry
  • a fusion log entry recording call events may be called a second fusion log entry.
  • Each time segment in the at least one time segment corresponds to at least two first fusion log entries and at least one second fusion log entry, and the time information of the fusion log entry corresponding to each time segment is within each time segment.
  • each time segment in at least one time segment includes time information of one or more first fusion log entries in at least two first fusion log entries, and one or more time information in at least one second fusion log entry The time information of the second fusion log entry is within the time range of each time segment.
  • the first fusion log entries with the same identity information belong to the scheduling information of the same thread of the service node.
  • Segmenting the time information of at least two first fusion log entries with the same identity information is to segment the time records of the same thread of the service node. Segment the time records of the same thread of the service node to obtain at least one time segment, and each time segment corresponds to a task.
  • At least one time segment may be determined according to the time information and identity information of the first fusion log entry included in the fusion log and the time information and identity information of the second fusion log entry included in the fusion log entry, wherein each time The identity information of the at least two first fusion log entries corresponding to the segment is the same, and the time interval between the two first fusion log entries adjacent in time among the at least two first fusion log entries corresponding to each time segment is less than the segmentation threshold, and each The process number of at least one second fusion log entry corresponding to each time segment is the same as the process number of at least two first fusion log entries corresponding to each time segment. That is, the time records of each thread of the service node are segmented according to the segmentation threshold to obtain at least one time segment, and the time records contained in each time segment belong to the same thread.
  • the split threshold can be the same or different for each thread.
  • the segmentation threshold of each thread is a fixed threshold, which may be an empirical value or a value obtained from a simulation experiment, which is not specifically limited in this embodiment of the present application.
  • an optimization method may be used to optimize the segmentation threshold of each thread, including: determining at least one Refer to time slices.
  • a segmentation parameter for each reference time segment is determined.
  • the constraint condition is that the time information of one or more second fusion log entries in the at least one second fusion log entry is within the time range of the reference time segment, and the process in the identity information of the one or more second fusion log entries
  • the number is the same as the process number of the identity information of each first fusion log entry included in the reference time segment.
  • Each second fusion log entry can record any one of a receiving event, a sending event, a callback start event or a callback end event.
  • the initial preset threshold for this segmentation is available according to the constraints, that is, determine whether the time information of one or more second fusion log entries in at least one second fusion log entry of the service node is within the reference time segment within the time range, and the process number in the identity information of the one or more second fusion log entries is the same as the process number in the identity information of each first fusion log entry included in the reference time segment. If so, the initial preset threshold for this split is available. Otherwise, discard the initial preset threshold for this segmentation, select a new initial preset threshold, and re-segment until the initial preset threshold is available. When the initial preset threshold is available, calculate the segmentation parameters of one or more time segments after the m-th thread is segmented.
  • Use an optimization algorithm to optimize the initial segmentation threshold that is, select a new initial segmentation threshold through an optimization method, and segment the time records of the mth thread according to the new initial segmentation threshold. Repeat the above steps to calculate the average value of the segmentation parameters of the time segments segmented according to the new initial segmentation threshold.
  • the optimization end condition is met, the optimization process is ended, and the initial segmentation threshold obtained during the optimization process to maximize the average value of the segmentation parameters of one or more time segments of each thread is used as the segmentation threshold.
  • Records are segmented according to the segmentation threshold, and at least one time segment of the mth thread is obtained.
  • each second fusion log entry may record a receiving event, or may record a sending event, or may record a callback processing event, or may record a receiving event and a sending event, or may record a receiving event event and a callback to handle the event, or you can log a send event and a callback to handle the event, or you can log a receive event, a send event, and a callback to handle the event.
  • a callback processing event includes a callback start event and a callback end event.
  • the method for optimizing the initial segmentation threshold can be a heuristic optimization algorithm or a solver optimization method
  • the heuristic optimization algorithm can be a genetic algorithm, an ant colony algorithm, etc.
  • the optimization end condition can be determined according to a specific optimization method, for example, when optimizing When the method is a genetic algorithm, the optimization end condition may be the number of iterations satisfied, etc., which is not specifically limited in this embodiment.
  • a clustering algorithm can be used to segment the time records of the mth thread, that is, to discretize the time records of the mth thread into time series points per unit time, and the distance between the time series points transformed by the time records is The time records of the mth thread are clustered. When the distance between the two sub-clusters exceeds the preset threshold, the clustering is stopped.
  • the aggregated sub-clusters are used as a time segment to obtain At least one time segment, otherwise re-clustering until the aggregated sub-clusters all meet the constraint condition
  • the constraint condition is that the time information of one or more second fusion log entries in at least one second fusion log entry of the service node is in Within the time range included in the aggregated subcluster, and the process number in the identity information of the one or more second fusion log entries is the same as the process number of the identity information of each first fusion log entry contained in the aggregated subcluster same number.
  • FIG. 12 For example, a visual schematic diagram of splitting the time records of each thread is shown in FIG. 12 .
  • Fig. 12 is a schematic diagram of visualized time information of multiple first fusion log entries in the fusion log according to an embodiment of the present application.
  • t1 to t18 are the visual timing points corresponding to the time information of the first fusion log entry with the same identity information in the fusion log, that is, the time records of the same thread.
  • T 1 to T 9 in FIG. 12 are visual timing fragments of the actual execution time of the thread.
  • Time slice 1, time slice 2 and time slice 3 in FIG. 12 are the time slices obtained after dividing the time record of the thread in FIG. 12 according to step S331.
  • time segment 1 includes time sequence segments T 1 , T 2 , T 3 and T 4 , that is, time segment 1 includes time sequence points t 1 to t 8 .
  • Time segment 2 includes timing segments T 5 and T 6 , that is, time segment 2 includes timing points t 9 to t 12 .
  • Time segment 3 includes timing segments T 7 , T 8 and T 9 , that is, time segment 3 includes timing points t 13 to t 18 .
  • splitting is performed according to step S331, if the interval between actual execution times is smaller than the splitting threshold, splitting is not performed.
  • the difference between t 2 and t 3 is smaller than the segmentation threshold, that is, the interval between T 1 and T 2 is smaller than the segmentation threshold, so T 1 and T 2 are not segmented, that is, T 1 and T 2 in the same time slice.
  • the interval between actual execution times is greater than the split threshold, splitting is performed.
  • the difference between t 8 and t 9 is greater than the segmentation threshold, that is, the interval between T 4 and T 5 is greater than the segmentation threshold, so T 4 and T 5 are segmented, that is, T 4 and T 5 in different time segments.
  • the sum of the times corresponding to timing segments T 1 to T 4 is the execution time of time segment 1 of the thread
  • the difference between the times corresponding to t 1 and t 8 is time segment 1 of the thread running time
  • the sum of the times corresponding to timing segments T 1 to T 9 is the execution time of the thread
  • the difference between the times corresponding to t 1 and t 18 is the running time of the thread.
  • timing points, timing segments, and time segments in FIG. 12 is only for the purpose of identification, and should not be construed as limiting the embodiment of the present application.
  • step S331 is executed for each of the M threads included in the service node, and at least one segmented time segment of each thread is obtained.
  • the embodiment of the present application does not specifically limit the time information segmentation method of the fusion log entry, and the time information of the fusion log entry corresponding to the same identity information as the scheduling information in the fusion log can be segmented, and
  • the method of including the time point of one or more second fusion log entries in the at least one second fusion log entry of the service node in the segmented time segment is the method protected by the embodiment of the present application.
  • each behavior of a business node includes multiple threads, it is necessary to determine N sets of fusion log entry sets according to at least one time segment, wherein each set of fusion log entry sets in the N sets of fusion log entry sets includes at least one fusion log entry set , each fusion log entry set in at least one fusion log entry set includes at least one first fusion log entry and at least one second fusion log entry, and the time information of the second fusion log entry included in each fusion log entry set within the range of the time information of the first fused log entry included in the set of fused log entries.
  • the time segments of each thread in a process among the M threads of the service node obtained in step S331 may be aggregated to obtain at least one cluster, and each cluster in the at least one cluster includes at least one of the time segments or multiple time segments, that is, each cluster in at least one cluster includes at least one time segment of at least one thread.
  • the method of aggregating time slices of M threads may be:
  • the time segment of each thread is discretized into timing points of unit time, so that the time segment of each thread is converted into one-dimensional lattice data.
  • one of the time segments of the m-th thread among the M threads is a time segment from 2ms to 4ms, convert this time segment into a timing point with a unit time of 0.5ms, and obtain 5 timing points, which are 2ms and 2.5ms respectively , 3ms, 3.4ms, 4ms.
  • d ij D-
  • D is the empirical value.
  • the data in the two-dimensional lattice is gathered into a large cluster, that is, the points in all the two-dimensional lattice are gradually gathered into a large cluster from bottom to top, so that the cluster presents a tree structure, Clustering is stopped each time when the distance between two sub-clusters is greater than the first threshold or the distance ratio is greater than the second threshold.
  • both the first threshold and the second threshold are preset thresholds.
  • the distance between two subclusters may be Euclidean distance, Minkowski distance, or Chebyshev distance, etc., which is not specifically limited in this embodiment of the present application.
  • the distance ring ratio when two subclusters are gathered can be the ratio of the threshold when the last subcluster was gathered to the threshold when the subcluster was gathered this time, or it can be based on the threshold when the last subcluster was gathered and the threshold when the subcluster was gathered this time.
  • the values of other functional relationships obtained by the threshold are not specifically limited in this embodiment of the present application.
  • the clustering algorithm may be a hierarchical clustering (Hierarchical Clustering) algorithm, or a clustering algorithm such as a partition method, which is not specifically limited in this embodiment of the present application.
  • time records of M threads of the service node may be aggregated into at least one cluster, and the time records contained in each cluster may belong to the same thread or different threads.
  • At least one fusion log entry set may be determined according to the obtained time segment included in each cluster of the at least one cluster.
  • Each fusion log entry set in the at least one fusion log entry set includes at least two first fusion log entries and at least one second fusion log entry.
  • At least one fusion log entry set is in one-to-one correspondence with at least one cluster.
  • the time information of the first fused log entry included in each fused log entry set is located within the time segment included in the corresponding cluster.
  • the time information of the second fusion log entry included in each fusion log entry set is within the range of the time information of the first fusion log entry included in each fusion log entry set.
  • At least one fusion log entry set may be determined directly according to the time information of the fusion log entry and the determined at least one time segment, wherein each fusion log entry set includes at least two first fusion log entries and at least one Second fusion log entry.
  • At least one first fusion log entry set may be determined according to the determined at least one time segment, where the at least one first fusion log entry set corresponds to the at least one time segment one by one.
  • the time information of one or more first fusion log entries included in each first fusion log entry set is within a corresponding time segment.
  • at least one second fusion log entry set is determined. Wherein at least one second fusion log entry set is in one-to-one correspondence with at least one first fusion log entry set.
  • the time information of one or more second fusion log entries included in each second fusion log entry set is within the time range of the corresponding first fusion log entry set.
  • each fusion log entry set includes a first fusion log entry set and a second fusion log entry set, and the time information of one or more second fusion log entries contained in the second fusion log entry set is in the The time range of the first fusion log entry collection.
  • each time segment in the at least one time segment may correspond to at least two first fusion log entries log entry and at least one second fused log entry.
  • At least two first fusion log entries and at least one second fusion log entry corresponding to each cluster can be determined. That is, the fusion log entry set corresponding to each cluster can be determined, and each fusion log entry set includes a first fusion log entry set and a second fusion log entry set.
  • the time record of a behavior running multiple times will be included in the fusion log.
  • a set of thread numbers corresponding to each fusion log entry set can be obtained.
  • N sets of fusion log entry sets may be determined.
  • the number sets of threads corresponding to each fusion log entry set in the nth group of fusion log entry sets in the N groups are the same.
  • the nth group of fused log entry sets may contain only one fused log entry set, or may include multiple fused log entry sets with the same set of corresponding thread numbers.
  • N behaviors of the service node can be determined. That is, the nth behavior among the N behaviors of the service node corresponds to the nth group of fusion log entry sets in the N groups.
  • the nth behavior among the N behaviors of the business node may only correspond to one fusion log entry set, or may correspond to multiple fusion log entry sets, and each fusion log entry set in the multiple fusion log entry sets corresponds to The same set of thread numbers.
  • the set of Q fusion log entries corresponding to the nth behavior among the N behaviors of the service node the information of the nth behavior among the N behaviors of the business node can be determined, and Q is a positive integer greater than or equal to 1.
  • the information of each behavior in the N behaviors of the business node includes: the number of threads contained in each behavior, the running time of each behavior, the average running time of each behavior and the probability of running time, the Execution time, average and probability of execution time for each behavior, execution time for each thread in each behavior, execution time, average and average execution time, names of events in each behavior, The average of the time points of events in a behavior or the probability distribution model of the time points of events.
  • Events in each behavior include receive events in each behavior, send events in each behavior, callback start events in each behavior, and callback end events in each behavior.
  • the time point of the event in each behavior includes an absolute time point of the event or a relative time point of the event.
  • the following information can be obtained from at least two first fusion log entries contained in the Q fusion log entry set corresponding to the nth behavior: Quantity, running time of the nth behavior, average and probability of running time of the nth behavior, execution time of the nth behavior, average and probability of execution time of the nth behavior, The running time, execution time, average running time, and average execution time of each thread in the nth behavior.
  • q 1, . . . , Q.
  • the following information can be obtained through at least one second fusion log entry included in the Q fusion log entry set corresponding to the nth behavior: the set of event names in the nth behavior, the nth A collection of time points for events in a behavior.
  • the time point of the event may be a relative time point or an absolute time point, which is not specifically limited in this embodiment of the present application.
  • the name of the event included in the nth behavior may be determined according to the obtained set of names of events in the nth behavior. If the nth behavior runs only once, the time point of the event in the nth behavior can be determined through the set of time points of the events in the nth behavior. If the nth behavior will run repeatedly for many times, the average value or probability distribution model of the time points of the events in the nth behavior can be determined through the set of time points of the events in the nth behavior.
  • the set of event time points records relative time points
  • the average value of the event relative time points or the probability distribution model of the relative time points can be directly calculated based on the set of event time points. If the set of event time points records absolute time points, after converting the absolute time points in the set into relative time points, calculate the average value of the relative time points of events or the probability distribution model of relative time points.
  • each behavior of a service node since the behavior of a service node is aggregated by threads, each behavior of a service node includes one or more time segments of each thread in one or more threads.
  • the information of the nth behavior can be obtained by making statistics on the time segment information of the threads included in the nth behavior.
  • the time in each fusion log entry set corresponding to the nth behavior is collected, that is, the information of the time segment of the thread contained in each fusion log entry set is collected, so as to obtain the information of the nth behavior.
  • the number of threads included in the nth behavior is the number of threads to which the time segment included in the behavior belongs.
  • the running time of the mth thread in the nth behavior is: the running time of the time segment belonging to the mth thread contained in the nth behavior, that is, the first fusion log entry that is included in the time segment.
  • the difference between the time information of and the time information of the first fusion log entry that ended last. For example, the difference between the times corresponding to t1 and t18 shown in FIG. 12 is the running time of the thread.
  • the execution time of the mth thread in the nth behavior is: the execution time of the time segment belonging to the mth thread included in the nth behavior, that is, the sum of all actual execution times in the time segment.
  • the actual execution time is the difference between the time information of the first merged log entry that records the execution of the thread and the execution of the thread that are adjacent to each other in time. For example, the sum of the times corresponding to the timing segments T 1 to T 9 shown in FIG. 12 is the execution time of the thread.
  • the running time of the nth behavior is: the difference between the time information of the first fusion log entry that starts first and the time information of the first fusion log entry that ends in one or more time segments included in the nth behavior .
  • the execution time of the nth behavior is: the average execution time of the threads included in the nth behavior, that is, the sum of the execution times of the threads included in the nth behavior divided by the number of threads included in the nth behavior.
  • the average execution time and average running time of the thread can be calculated according to the execution time and multiple running times of multiple threads included in the obtained behavior, that is, the average value of the execution time and the average running time of the thread can be calculated .
  • the average running time, the probability of running time, the average execution time and the probability of execution time of the behavior are calculated.
  • the probability of the behavior's runtime is the probability that each runtime value of the behavior occurs among all the runtime values.
  • the execution time probability of the behavior is the probability that each execution time value of the behavior occurs in all execution time values.
  • step S331 to step S333 the fusion log entry corresponding to the scheduling information and the fusion log entry corresponding to the invocation event in the fusion log are analyzed and processed, and the behavior information of the service node and the running behavior of the thread included in the service node behavior can be obtained and other information, which is convenient for subsequent further processing of the information of the service node and the information of the thread contained in the service node, thereby supporting the establishment of a more accurate operation behavior model for the operation behavior of the service node.
  • FIG. 13 is a schematic flowchart of a modeling method for a service node of an automatic driving service according to another embodiment of the present application.
  • the modeling method in Figure 13 includes the following:
  • step S410 construct the dependency relationship directed graph of the business node, and monitor whether the dependency relationship directed graph changes, that is, monitor the positions or positions of any one or more nodes in the dependency relationship directed graph Whether the number of nodes has changed. If there is a change, go to step S620; if not, go to step S630.
  • a search algorithm can be used to find the longest path in the directed graph of node dependencies as the critical path for monitoring, and monitor whether the nodes in the critical path change, or monitor Whether the directed graph or longest path of dependencies changes.
  • a maximum spanning tree algorithm may be used to find the longest path in the directed dependency graph.
  • a dynamic programming algorithm may be used to find the longest path in the directed dependency graph.
  • a topological sorting algorithm may be used to find the longest path in the directed dependency graph.
  • step S610 may be executed by the monitoring module 222 .
  • step S610 If the following changes are monitored in step S610, then start to obtain the fusion log of the service node from step S310 again, and update the operating behavior model of the service node through steps S320 and S330 according to the obtained fusion log:
  • step S610 After the operating behavior model of the service node is updated, continue to execute step S610, construct a new directed graph of dependencies, and monitor whether the new directed graph of dependencies changes.
  • the behavior data of the service node includes the frequency of receiving messages of the service node, the frequency of sending messages of the service node, and the callback processing time of the service node. delay, the number of processes included in the business node, and the number of threads included in each behavior of at least one behavior of the business node. If the data change exceeds the threshold, go to step S640 to update the behavior data of the operation behavior model of the service node, otherwise go to step S650.
  • step S610 while monitoring whether the directed graph of dependency relationship changes according to step S610, it is possible to monitor whether the change of the behavior data of the service node exceeds the threshold, that is, when it is monitored that the directed graph of dependency relationship does not change, continue to monitor the business Whether the change of the node's behavior data exceeds the threshold.
  • the scheduling policy of the node in the dependency directed graph changes, if the changed scheduling policy of the node causes the behavior data of the node to change, and the change exceeds the threshold, update the service node's behavioral data.
  • step S610 is continued to monitor whether the directed graph of dependencies changes.
  • the algorithm for updating the behavior data may be: a moving average algorithm, a simple moving average, a weighted moving average, an autoregressive moving average model algorithm, etc., which are not specifically limited in this embodiment of the present application.
  • steps S610 to S640 When it is detected that the vehicle is still in the automatic driving mode, repeat steps S610 to S640, and continue to monitor whether the directed graph of dependencies of the service nodes has changed, or whether the behavior data of the service nodes has changed beyond the threshold; In the driving mode, the monitoring of steps S610 to S640 ends.
  • the monitoring action can be performed by the monitoring module 222 .
  • FIG. 14 is a schematic flowchart of a modeling method for a service node of an automatic driving service according to another embodiment of the present application.
  • the modeling method in Figure 14 includes the following:
  • step S710 According to the communication data of the service nodes, determine the associated service nodes and the dependencies of the service nodes. The specific implementation manner of step S710 is the same as that of step S410, and will not be repeated here.
  • step S720 Adjust the scheduling policy of the service node and the associated service node, and obtain the adjusted scheduling policy.
  • the specific implementation manner of step S720 is the same as that of step S420, and will not be repeated here.
  • step S730 Run the automatic driving service according to the adjusted scheduling strategy, collect communication data and scheduling data of the automatic driving service, and obtain node-level communication logs and thread-level scheduling logs.
  • the specific implementation manner of step S730 is the same as that of step S430 or step S301, and will not be repeated here.
  • step S740 merging the node-level communication log and the thread-level scheduling log to obtain the fused log.
  • the specific implementation manner of step S740 is the same as that of step S302, and will not be repeated here.
  • step S750 Obtain information on N behaviors of service nodes according to the fusion log, where N is a positive integer greater than or equal to 1.
  • N is a positive integer greater than or equal to 1.
  • the specific implementation manner of step S750 is the same as that of step S320, and will not be repeated here.
  • step S760 Analyze the information on the N behaviors of the service node to obtain an operation behavior model used to describe the operation behavior of the service node.
  • the specific implementation manner of step S760 is the same as that of step S330, and will not be repeated here.
  • the receiving and sending relationship between each service node and other service nodes except itself can be determined, and the service node and other service nodes except itself can be regarded as nodes of the directed graph , the sending and receiving relationship between service nodes is regarded as a directed connection from the sending node to the receiving node, so that a directed graph of dependency relationships of service nodes can be generated according to the receiving and sending relationship.
  • step S780 Update the behavior data in the operation behavior model of the service node when it is monitored that the change of the behavior data of the service node exceeds the threshold.
  • the specific implementation manner of step S780 is the same as that of step S640, and will not be repeated here.
  • step S790 Re-acquire the fusion log of the service node and update the operation behavior model of the service node when it is monitored that the directed graph of the dependency relationship of the service node has changed.
  • the specific implementation manner of step S790 is the same as that of step S620, and will not be repeated here.
  • the operation behavior model used to describe the operation behavior of the service node of the automatic driving service can be obtained, and the operation behavior model can provide feedback for designers and developers.
  • the operation behavior model can provide feedback for designers and developers.
  • the change of the operating behavior model is monitored, so as to re-update the operating behavior model. Therefore, the operating behavior model of the service node in the embodiment of the present application has important value for feedback guidance and auxiliary design.
  • the operating behavior model of the service node in the embodiment of the present application can be used as the input for the simulation, simulation and optimization of the subsequent automatic driving business code. Provide high-precision guarantee for the simulation, simulation and optimization of subsequent autonomous driving business codes.
  • the above describes the modeling method of the service node of the automatic driving service according to the embodiment of the present application.
  • the following describes the modeling device and equipment of the service node of the automatic driving service according to the embodiment of the present application in conjunction with FIG. 15 and FIG. 16 respectively.
  • the embodiment of the present application also provides a computer storage medium, the computer storage medium stores program instructions, and when the program is executed, it may include the modeling method of the service node of the automatic driving service in the corresponding embodiment as shown in Fig. 3-14 some or all of the steps.
  • Fig. 15 is a schematic structural diagram of a modeling device for a service node of an automatic driving service according to an embodiment of the present application.
  • the modeling device 800 includes an acquisition module 810 , a processing module 820 and a monitoring module 830 .
  • the obtaining module 810 is used to obtain the fusion log of the service node of the automatic driving service, and execute step S310 in the method of FIG. 3, the method of FIG. 4, the method of FIG. 6, the method of FIG. Some or all of the steps in S740.
  • the processing module 820 is used to obtain an operation behavior model for describing the operation behavior of the service node according to the fusion log, and execute steps S320, S330, the method in FIG. 11 , and the method in FIG. 14 in the method of FIG. 3 S750, part or all of the steps in step S760.
  • the monitoring module 830 is used to monitor whether the directed graph of the dependency relationship of the service node changes or whether the change of the behavior data of the service node exceeds the threshold value, and re-establish the operation behavior model of the service node according to the change of the directed graph of the dependency relationship, or according to the change of the behavior data of the service node Changes in the behavior data update the behavior data in the running behavior model, and execute steps S770 to S790 in the method of FIG. 13 and the method of FIG. 14 .
  • Fig. 16 is a structural block diagram of an IO device provided according to an embodiment of the present application.
  • the IO device 900 shown in FIG. 16 includes: a processor 901 , a memory 902 and a communication interface 903 , and the processor 901 , the memory 902 and the communication interface 903 communicate through a bus 904 .
  • the receiver 905 is used to receive pending requests from the host, and the sender 906 is used to send the pending requests stored in the memory 902 to another computing device in the computing cluster.
  • Processor 901 can be a central processing unit (central processing unit, CPU), and can also be other general processors, digital signal processors (digital signal processor, DSP), application specific integrated circuits (application specific integrated circuit, ASIC), on-site Programmable gate array (field programmable gate array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • a general purpose processor may be a microprocessor or any conventional processor or the like. In the implementation process, each step of the above method may be completed by an integrated logic circuit of hardware in the processor 901 or instructions in the form of software.
  • a general-purpose processor may be a microprocessor, or the processor may be any conventional processor, or the like.
  • the steps of the methods disclosed in the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor.
  • Software modules may be located in memory 902, which may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory.
  • the non-volatile memory can be read-only memory (read-only memory, ROM), programmable read-only memory (programmable ROM, PROM), erasable programmable read-only memory (erasable PROM, EPROM), electrically programmable Erases programmable read-only memory (electrically EPROM, EEPROM) or flash memory.
  • Volatile memory can be random access memory (RAM), which acts as external cache memory.
  • RAM random access memory
  • SRAM static random access memory
  • DRAM dynamic random access memory
  • SDRAM synchronous dynamic random access memory
  • Double data rate synchronous dynamic random access memory double data date SDRAM, DDR SDRAM
  • enhanced SDRAM enhanced synchronous dynamic random access memory
  • SLDRAM synchronous connection dynamic random access memory
  • direct rambus RAM, DR RAM direct rambus RAM
  • the memory 902 may store instructions for executing the method performed by the IO device in the foregoing embodiments.
  • the processor 901 can execute the instructions stored in the memory 902 and combine with other hardware (such as the receiver 905 and the transmitter 906) to complete the steps of the IO device in the above embodiment, and the specific working process and beneficial effects can be described in the above embodiment.
  • Memory can be volatile memory or nonvolatile memory, or can include both volatile and nonvolatile memory.
  • the non-volatile memory can be read-only memory (read-only memory, ROM), programmable read-only memory (programmable ROM, PROM), erasable programmable read-only memory (erasable PROM, EPROM), electrically programmable Erases programmable read-only memory (electrically EPROM, EEPROM) or flash memory.
  • Volatile memory can be random access memory (RAM), which acts as external cache memory.
  • RAM random access memory
  • SRAM static random access memory
  • DRAM dynamic random access memory
  • DRAM synchronous dynamic random access memory
  • SDRAM double data rate synchronous dynamic random access memory
  • ESDRAM enhanced synchronous dynamic random access memory
  • SLDRAM direct memory bus random access memory
  • direct rambus RAM direct rambus RAM
  • bus 904 may also include a power bus, a control bus, a status signal bus, and the like. However, for clarity of illustration, the various buses are labeled as bus 904 in the figure.
  • the embodiment of the present application also provides a chip system, the chip system includes a logic circuit, the logic circuit is used to couple with the input/output interface, and transmit data through the input/output interface, so as to execute the IO device in the above embodiment various steps.
  • the present application also provides a computer program product, the computer program product including: computer program code, when the computer program code is run on the computer, the computer is made to execute each of the above-mentioned embodiments. step.
  • the present application also provides a computer-readable medium, the computer-readable medium stores program codes, and when the program codes are run on a computer, the computer is made to execute each of the above-mentioned embodiments. step.
  • each step of the above-mentioned method can be completed by an integrated logic circuit of hardware in a processor or an instruction or program code in the form of software.
  • the steps of the methods disclosed in connection with the embodiments of the present application may be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in the processor.
  • the software module can be located in a mature storage medium in the field such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, register.
  • the storage medium is located in the memory, and the processor reads the information in the memory, and completes the steps of the above method in combination with its hardware. To avoid repetition, no detailed description is given here.
  • the processor in the embodiment of the present application may be an integrated circuit chip, which has a signal processing capability.
  • each step of the above-mentioned method embodiments may be implemented by an integrated logic circuit of hardware in a processor or instructions or program codes in the form of software.
  • a general-purpose processor may be a microprocessor, or the processor may be any conventional processor, or the like.
  • the steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor.
  • the software module can be located in a mature storage medium in the field such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, register.
  • the storage medium is located in the memory, and the processor reads the information in the memory, and completes the steps of the above method in combination with its hardware.
  • Embodiments of the present application provide a modeling method, device and equipment for a service node of an automatic driving service. It will be obvious to those skilled in the art that the present application can use other types of self-driving vehicle platforms without limitation, and the embodiments of the present invention can be applied to various types of self-driving vehicle platforms.
  • the disclosed systems, devices and methods may be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
  • the functions described above are realized in the form of software function units and sold or used as independent products, they can be stored in a computer-readable storage medium.
  • the technical solution of the present application is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disc and other media that can store program codes. .

Abstract

Embodiments of the present application provide a modeling method for a self-driving service and a related device. The method comprises: obtaining a fusion log of a service node of a self-driving service; obtaining information of N behaviors of the service node according to the fusion log, N being a positive integer greater than or equal to one; and analyzing the information of the N behaviors of the service node, and obtaining a motion behavior model used for describing a motion behavior of the service node. The method can model for a motion behavior of a service node of a self-driving service without a self-driving service source code, so as to obtain a motion behavior model used for describing the motion behavior of the service node.

Description

一种自动驾驶业务的建模方法和相关设备A modeling method and related equipment for autonomous driving business
本申请要求于2021年11月26日提交中国专利局、申请号为202111424208.2、申请名称为“一种自动驾驶业务的建模方法和相关设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202111424208.2 and the application title "A modeling method and related equipment for autonomous driving business" filed with the China Patent Office on November 26, 2021, the entire contents of which are incorporated by reference incorporated in this application.
技术领域technical field
本申请涉及自动驾驶领域,并且更具体地,涉及一种自动驾驶业务的建模方法、计算机装置、计算机设备、芯片系统和计算机可读存储介质。The present application relates to the field of automatic driving, and more specifically, relates to a modeling method, computer device, computer equipment, chip system and computer-readable storage medium of an automatic driving business.
背景技术Background technique
自动驾驶技术是传统人工操控汽车转向电子信息系统控制的智能汽车的重中之重。当前自动驾驶汽车普遍采用先开发的方式开展,然后在原型车上通过建模、仿真、优化、再调整代码的闭环反馈过程,循环往复、逐渐地达到高性能和低时延的需求。该方式普遍采用一些自定义的领域专用语言来对业务建立模型,用来描述业务在中央处理器(central processing unit,CPU)、图形处理器(graphics processing unit,GPU)等计算资源上的行为或模式。模型的精细度决定了模拟、仿真、优化能力的上限。但是自动驾驶业务繁多且复杂,手动为每个业务节点建模是一件耗时耗力的工作,而且通常要联合多个业务部门才能梳理出全局脉络。除此之外,目前大多数自动驾驶业务的源代码是不对外公开的,因此难以从业务源代码中抽象出业务节点的模型。Autonomous driving technology is the top priority of traditional human-controlled cars turning to smart cars controlled by electronic information systems. At present, self-driving cars are generally developed first, and then through the closed-loop feedback process of modeling, simulation, optimization, and then adjusting the code on the prototype vehicle, the cycle repeats and gradually achieves the requirements of high performance and low latency. This method generally adopts some self-defined domain-specific language to build a business model, which is used to describe the behavior of the business on computing resources such as a central processing unit (CPU) and a graphics processing unit (GPU). model. The fineness of the model determines the upper limit of simulation, simulation, and optimization capabilities. However, the autonomous driving business is numerous and complex, and it is time-consuming and labor-intensive to manually model each business node, and it is usually necessary to combine multiple business departments to sort out the overall context. In addition, at present, the source code of most autonomous driving services is not open to the public, so it is difficult to abstract the model of the service node from the service source code.
如何在没有自动驾驶业务源代码的情况下,为自动驾驶业务的业务节点的运行行为建立模型成为亟待解决的问题。How to build a model for the operation behavior of the business nodes of the autonomous driving business without the source code of the autonomous driving business has become an urgent problem to be solved.
发明内容Contents of the invention
本申请实施例提供一种自动驾驶业务的建模方法、计算机装置、计算机设备、芯片系统和计算机可读存储介质,在没有自动驾驶业务源代码的情况下,可以为自动驾驶业务的业务节点的运行行为建模。An embodiment of the present application provides a modeling method for an automatic driving service, a computer device, a computer device, a chip system, and a computer-readable storage medium, which can be used as a service node for the automatic driving service without the source code of the automatic driving service. Run behavioral modeling.
第一方面,提供了一种自动驾驶业务的建模方法,该方法包括:获得自动驾驶业务的业务节点的融合日志;根据融合日志获得业务节点的N个行为的信息,N为大于或等于1的正整数;对业务节点的N个行为的信息进行分析,获得用于描述业务节点的运行行为的运行行为模型。In the first aspect, a modeling method for an automatic driving service is provided, the method comprising: obtaining a fusion log of a service node of the automatic driving service; obtaining information on N behaviors of the service node according to the fusion log, where N is greater than or equal to 1 is a positive integer; analyze the information of N behaviors of the service node, and obtain an operation behavior model used to describe the operation behavior of the service node.
应理解,融合日志用于记录业务节点的调用事件和线程的调度信息,线程由业务节点运行。It should be understood that the fusion log is used to record the call event of the service node and the scheduling information of the thread, and the thread is run by the service node.
还应理解,业务节点的每个行为的信息包括:每个行为中包含的线程的数量、每个行为的运行时间、每个行为的运行时间的平均值和运行时间的概率、每个行为的执行时间、每个行为的执行时间的平均值和执行时间的概率、每个行为中每个线程的运行时间、执行时间、平均运行时间和平均执行时间、每个行为中的事件的名称、每个行为中的事件的时 间点的平均值或事件的时间点的概率分布模型。每个行为中的事件包括每个行为中的接收事件、每个行为中的发送事件、每个行为中的回调开始事件和每个行为中的回调结束事件。每个行为中的事件的时间点包括事件的绝对时间点或事件的相对时间点。It should also be understood that the information of each behavior of the business node includes: the number of threads contained in each behavior, the running time of each behavior, the average value of the running time of each behavior and the probability of running time, the Execution time, average and probability of execution time for each behavior, execution time for each thread in each behavior, execution time, average and average execution time, names of events in each behavior, The average of the time points of events in a behavior or the probability distribution model of the time points of events. Events in each behavior include receive events in each behavior, send events in each behavior, callback start events in each behavior, and callback end events in each behavior. The time point of the event in each behavior includes an absolute time point of the event or a relative time point of the event.
还应理解,业务节点N个行为中的第n个行为的运行行为模型可以包括以下内容中的任一个:触发第n个行为的每个行为对应的接收事件的消息通道,第n个行为的至少一个时间触发周期,或第n个行为的时间概率模型。若第n个行为的运行行为模型包括触发第n个行为的每个行为对应的接收事件的消息通道,那么第n个行为的运行行为模型还可以包括第n个行为的触发关系。其中,n=1,……,N。It should also be understood that the running behavior model of the nth behavior among the N behaviors of the service node may include any of the following: the message channel for receiving events corresponding to each behavior that triggers the nth behavior, the nth behavior At least one time-triggered period, or a time-probability model for the nth behavior. If the running behavior model of the nth behavior includes a message channel for receiving events corresponding to each behavior that triggers the nth behavior, then the running behavior model of the nth behavior may also include a trigger relationship of the nth behavior. Wherein, n=1,...,N.
还应理解,第n个行为的运行行为模型还可以进一步包括以下内容中的任一个或多个:第n个行为包含的至少一个线程的运行时间、第n个行为包含的至少一个线程的运行周期、第n个行为包含的至少一个线程的触发关系,或者,业务节点的依赖关系。It should also be understood that the running behavior model of the nth behavior may further include any one or more of the following: the running time of at least one thread included in the nth behavior, the running time of at least one thread included in the nth behavior Period, the trigger relationship of at least one thread included in the nth behavior, or the dependency relationship of the business node.
本申请实施例中,在没有自动驾驶业务源代码的情况下,可以为自动驾驶业务的业务节点的运行行为建模,获得用于描述业务节点的运行行为的运行行为模型,该运行行为模型可以为设计人员和开发人员提供反向开发指导,也可以通过模拟仿真等方式计算出自动驾驶业务的业务节点在硬件资源上的运行行为状态,检查业务节点在硬件资源上的运行行为状态是否符合设计预期。因此本申请实施例的运行行为模型具有反馈指导和辅助设计的重要价值,同时本申请实施例的运行行为模型可以作为后续自动驾驶业务代码的模拟、仿真和优化的输入,为后续自动驾驶业务代码的模拟、仿真和优化提供高精度保障。In the embodiment of the present application, without the source code of the automatic driving service, the operating behavior of the service node of the automatic driving service can be modeled, and the operating behavior model used to describe the operating behavior of the service node can be obtained. The operating behavior model can be Provide reverse development guidance for designers and developers, and also calculate the running behavior status of the business nodes of the autonomous driving business on the hardware resources through simulation and other methods, and check whether the running behavior status of the business nodes on the hardware resources conforms to the design expected. Therefore, the operating behavior model of the embodiment of the present application has important value for feedback guidance and auxiliary design. At the same time, the operating behavior model of the embodiment of the present application can be used as the input for the simulation, simulation and optimization of the subsequent automatic driving business code, and can be used as the input for the subsequent automatic driving business code. Simulation, emulation and optimization provide high precision guarantee.
结合第一方面,在第一方面的某些实现方式中,获得业务节点的节点级通信日志和线程级调度日志;对节点级通信日志和线程级调度日志进行融合,获得融合日志。In combination with the first aspect, in some implementations of the first aspect, the node-level communication log and the thread-level scheduling log of the service node are obtained; the node-level communication log and the thread-level scheduling log are fused to obtain the fused log.
应理解,节点级通信日志用于记录业务节点的调用事件,线程级调度日志用于记录线程的调度信息。融合日志中的每条融合日志条目对应于节点级通信日志中的一条通信日志条目或者线程级调度日志中的一条调度日志条目,至少两条融合日志条目中的每条融合日志条目用于记录对应的日志条目的内容。It should be understood that the node-level communication log is used to record the calling event of the service node, and the thread-level scheduling log is used to record the scheduling information of the thread. Each fusion log entry in the fusion log corresponds to a communication log entry in the node-level communication log or a scheduling log entry in the thread-level scheduling log, and each fusion log entry in at least two fusion log entries is used to record the corresponding The content of the log entry.
还应理解,可以根据节点级通信日志中的时间同步数据和线程级调度日志中的时间同步数据,对节点级通信日志中的时间信息和线程级调度日志中的时间信息进行同步;将时间信息同步后的节点级通信日志和线程级调度日志进行融合,获得融合日志。应理解,节点级通信日志中的时间同步数据是在获取节点级通信日志的过程中加入的,线程级调度日志中的时间同步数据是在获取线程级调度日志的过程中加入的。还应理解,可以在获取节点级通信日志和线程级调度日志的过程中加入一次时间同步数据,也可以在获取节点级通信日志和线程级调度日志的过程中加入周期性的时间同步数据。从而使节点级通信日志和线程级调度日志中形式不一致的时间信息,转化为形式一致的时间信息,从而便于获得时间信息一致的融合日志。It should also be understood that the time information in the node-level communication log and the time information in the thread-level scheduling log can be synchronized according to the time synchronization data in the node-level communication log and the time synchronization data in the thread-level scheduling log; the time information The synchronized node-level communication log and thread-level scheduling log are fused to obtain the fused log. It should be understood that the time synchronization data in the node-level communication log is added during the process of obtaining the node-level communication log, and the time synchronization data in the thread-level scheduling log is added during the process of obtaining the thread-level scheduling log. It should also be understood that time synchronization data may be added once during the process of obtaining node-level communication logs and thread-level scheduling logs, or periodic time synchronization data may be added during the process of obtaining node-level communication logs and thread-level scheduling logs. Thus, the time information with inconsistent form in the node-level communication log and thread-level scheduling log is converted into time information with consistent form, so as to facilitate the acquisition of fusion logs with consistent time information.
本申请实施例中,可以将节点级通信日志和线程级调度日志中的日志条目进行融合,从而获得同时记录有业务节点的调用事件和线程的调度信息的融合日志,便于后续通过融合日志中记录的融合日志条目获得描述业务节点的运行行为的运行行为模型。In the embodiment of this application, the log entries in the node-level communication log and the thread-level scheduling log can be fused, so as to obtain a fused log that simultaneously records the call event of the service node and the scheduling information of the thread, which is convenient for subsequent recording in the fused log. The operation behavior model describing the operation behavior of the service node is obtained by merging the log entries.
结合第一方面,在第一方面的某些实现方式中,根据业务节点的通信数据,确定业务节点的关联业务节点和依赖关系;调整业务节点和关联业务节点的调度策略,获得调整后的调度策略;根据调整后的调度策略运行自动驾驶业务,采集业务节点的通信数据和调度数据,获得节点级通信日志和线程级调度日志。In combination with the first aspect, in some implementations of the first aspect, the associated service nodes and dependencies of the service nodes are determined according to the communication data of the service nodes; the scheduling strategy of the service nodes and the associated service nodes is adjusted to obtain the adjusted scheduling Strategy: Run the autonomous driving business according to the adjusted scheduling strategy, collect communication data and scheduling data of business nodes, and obtain node-level communication logs and thread-level scheduling logs.
应理解,业务节点的关联业务节点包括业务节点的祖先节点或者业务节点的子孙节点中的至少一个。业务节点的祖先节点为向该业务节点发送消息的第一业务节点、向该第一业务节点发送消息的第二业务节点、向该第二业务节点发送消息的第三业务节点等中的一个或多个,业务节点的子孙节点为接收该业务节点发送的消息的第四业务节点、接收该第四业务节点发送消息的第五业务节点、接收该第五业务节点发送消息的第六业务节点等中的一个或多个。还应理解,业务节点的依赖关系为该业务节点和与该业务节点存在接收、发送关系的业务节点之间的关系。It should be understood that the associated service nodes of the service node include at least one of the ancestor nodes of the service node or the descendant nodes of the service node. The ancestor node of the service node is one or Multiple, the descendants of the service node are the fourth service node receiving the message sent by the service node, the fifth service node receiving the message sent by the fourth service node, the sixth service node receiving the message sent by the fifth service node, etc. one or more of the . It should also be understood that the dependency relationship of a service node is the relationship between the service node and service nodes that have receiving and sending relationships with the service node.
还应理解,调整业务节点和关联业务节点的调度策略,包括:调整业务节点和关联业务节点的优先级、绑核策略、周期频率、保留时间片长度,或者最后期限长度中的任一个或多个。It should also be understood that adjusting the scheduling strategy of the service node and the associated service node includes: adjusting any one or more of the priority of the service node and the associated service node, the binding strategy, the cycle frequency, the length of the reserved time slice, or the length of the deadline indivual.
本申请实施例中,可以根据业务节点的通信数据确定业务节点的关联业务节点和依赖关系,通过调整业务节点和业务节点的关联业务节点的调度策略,可以确定业务节点和业务节点的关联业务节点的优先执行顺序,从而避免资源竞争,减少多个业务节点运行造成的相互干扰,获得低底噪或者无底噪的节点级通信日志和线程级调度日志,便于后续准确地建立业务节点的运行行为模型。In the embodiment of this application, the associated service nodes and dependencies of the service nodes can be determined according to the communication data of the service nodes, and the service nodes and the associated service nodes of the service nodes can be determined by adjusting the scheduling strategy of the service nodes and the associated service nodes of the service nodes Priority execution sequence, so as to avoid resource competition, reduce mutual interference caused by the operation of multiple business nodes, obtain low-noise or no-noise node-level communication logs and thread-level scheduling logs, and facilitate subsequent and accurate establishment of business node operation behavior Model.
结合第一方面,在第一方面的某些实现方式中,根据融合日志中的融合日志条目,确定至少一个时间片段;根据至少一个时间片段,确定N组融合日志条目集合;分别根据所述N组融合日志条目集合确定所述业务节点的N个行为的信息。With reference to the first aspect, in some implementation manners of the first aspect, at least one time segment is determined according to the fusion log entries in the fusion log; according to the at least one time segment, N sets of fusion log entry sets are determined; respectively, according to the N The group fusion log entry set determines the N behavior information of the service node.
应理解,至少一个时间片段中的每个时间片段对应于至少两条第一融合日志条目和至少一条第二融合日志条目。第一融合日志条目为融合日志中对应于调度信息的融合日志条目,第二融合日志条目为融合日志中对应于调用事件的融合日志条目。每个时间片段对应的融合日志条目的时间信息在每个时间片段内。N组融合日志条目集合中的每组融合日志条目集合包括至少一个融合日志条目集合,至少一个融合日志条目集合中的每个融合日志条目集合包括至少一条第一融合日志条目和至少一条第二融合日志条目。每个融合日志条目集合包括的第二融合日志条目的时间信息在所述每个融合日志条目集合包括的第一融合日志条目的时间信息的范围内。It should be understood that each time segment in the at least one time segment corresponds to at least two first fusion log entries and at least one second fusion log entry. The first fusion log entry is the fusion log entry corresponding to the scheduling information in the fusion log, and the second fusion log entry is the fusion log entry corresponding to the call event in the fusion log. The time information of the fusion log entry corresponding to each time segment is within each time segment. Each fusion log entry set in the N sets of fusion log entry sets includes at least one fusion log entry set, and each fusion log entry set in the at least one fusion log entry set includes at least one first fusion log entry and at least one second fusion log entry log entry. The time information of the second fusion log entry included in each fusion log entry set is within the range of the time information of the first fusion log entry included in each fusion log entry set.
还应理解,可以根据融合日志中融合日志条目的时间信息,确定至少一个时间片段;对至少一个时间片段进行聚合,获得至少一个簇;根据至少一个簇中的每个簇包括的时间片段,确定至少一个融合日志条目集合;根据至少一个融合日志条目集合,确定N组融合日志条目集合;分别根据N组融合日志条目集合确定业务节点的N个行为的信息。It should also be understood that at least one time segment can be determined according to the time information of the fusion log entry in the fusion log; at least one time segment is aggregated to obtain at least one cluster; according to the time segment included in each cluster in the at least one cluster, determine At least one set of fused log entries; according to the at least one set of fused log entries, determine N sets of fused log entries; and determine N behavior information of service nodes according to the N sets of fused log entries.
还应理解,至少一个时间片段中的每个时间片段包括至少两条第一融合日志条目中的一条或多条第一融合日志条目的时间信息,第一融合日志条目为融合日志中对应于调度信息的融合日志条目。至少一个簇中的每个簇包括至少一个时间片段中的一个或多个时间片段。至少一个融合日志条目集合与至少一个簇一一对应,至少一个融合日志条目集合中的每个融合日志条目集合包括至少两条第一融合日志条目和至少一条第二融合日志条目。每个融合日志条目集合包括的第一融合日志条目的时间信息位于对应的簇包括的时间片段内。每个融合日志条目集合包括的第二融合日志条目的时间信息在所述每个融合日志条目集合包括的第一融合日志条目的时间信息的范围内。N组融合日志条目集合中的每组融合日志条目集合包括一个或多个融合日志条目集合。业务节点的N个行为中第n个行为对应N组中的第n组融合日志条目集合,即第n个行为可以对应一个融合日志条目集合,也可 以对应多个融合日志条目集合。It should also be understood that each time segment in the at least one time segment includes time information of one or more first fusion log entries in the at least two first fusion log entries, and the first fusion log entry corresponds to the schedule in the fusion log. Fusion log entries for information. Each of the at least one cluster includes one or more of the at least one time slice. At least one fusion log entry set corresponds to at least one cluster, and each fusion log entry set in the at least one fusion log entry set includes at least two first fusion log entries and at least one second fusion log entry. The time information of the first fused log entry included in each fused log entry set is located within the time segment included in the corresponding cluster. The time information of the second fusion log entry included in each fusion log entry set is within the range of the time information of the first fusion log entry included in each fusion log entry set. Each group of fusion log entry sets in the N sets of fusion log entry sets includes one or more fusion log entry sets. The nth behavior among the N behaviors of the business node corresponds to the nth group of fusion log entry sets in the N groups, that is, the nth behavior can correspond to one fusion log entry set, or it can correspond to multiple fusion log entry sets.
本申请实施例中,通过对融合日志中对应于线程信息的融合日志条目和对应于调用事件的融合日志条目进行分析处理,可以获得业务节点的行为的信息、业务节点行为所包含的线程的运行时间等信息,便于后续对业务节点的信息和业务节点包含的线程的信息进行进一步处理,从而支持为业务节点的运行行为建立准确的运行行为模型。In the embodiment of the present application, by analyzing and processing the fusion log entries corresponding to the thread information and the fusion log entries corresponding to the invocation events in the fusion log, the information of the behavior of the service node and the running of the thread contained in the behavior of the business node can be obtained. Information such as time is convenient for subsequent further processing of the information of the service node and the information of the thread contained in the service node, so as to support the establishment of an accurate operation behavior model for the operation behavior of the service node.
结合第一方面,在第一方面的某些实现方式中,根据融合日志包括的第一融合日志条目的时间信息和身份信息与融合日志条目包括的第二融合日志条目的时间信息和身份信息,确定至少一个时间片段。With reference to the first aspect, in some implementation manners of the first aspect, according to the time information and identity information of the first fusion log entry included in the fusion log and the time information and identity information of the second fusion log entry included in the fusion log entry, At least one time slice is determined.
应理解,每个时间片段对应的至少两条第一融合日志条目的身份信息相同,每个时间片段对应的至少两条第一融合日志条目中时间相邻的两条第一融合日志条目的时间间隔小于分割阈值,每个时间片段对应的至少一条第二融合日志条目的进程号与每个时间片段对应的至少两条第一融合日志条目的进程号相同。It should be understood that the identity information of at least two first fusion log entries corresponding to each time segment is the same, and the time of the two first fusion log entries adjacent in time among the at least two first fusion log entries corresponding to each time segment The interval is smaller than the segmentation threshold, and the process number of at least one second fusion log entry corresponding to each time segment is the same as the process number of at least two first fusion log entries corresponding to each time segment.
还应理解,可以根据至少两条第一融合日志条目的身份信息、所述至少两条第一融合日志条目的时间信息以及初始分割阈值,确定至少一个参考时间片段;根据约束条件和至少一个参考时间片段,确定每个参考时间片段的分割参数;根据优化方法对初始分割阈值进行优化,获得分割阈值。It should also be understood that at least one reference time segment may be determined according to the identity information of the at least two first fusion log entries, the time information of the at least two first fusion log entries, and the initial segmentation threshold; according to the constraints and at least one reference Time segment, determine the segmentation parameters of each reference time segment; optimize the initial segmentation threshold according to the optimization method, and obtain the segmentation threshold.
还应理解,约束条件为至少一条第二融合日志条目中的一条或多条第二融合日志条目的时间信息在参考时间片段的时间范围内,并且该一条或多条第二融合日志条目的身份信息中的进程号与参考时间片段中包含的每条第一融合日志条目的身份信息的进程号相同。每条第二融合日志条目可以记录一个接收事件、一个发送事件、一个回调开始事件或一个回调结束事件中的一个或多个。当多条第二融合日志条目中记录有一个回调开始事件时,多条第二融合日志条目中还记录有一个回调结束事件。分割参数可以为每个线程的至少一个时间片段的执行时间除以运行时间的平均值,也可以是执行时间和运行时间的其他函数关系获得的值的平均值,本申请实施例对此不做具体限定。优化方法可以包括启发式优化算法或求解器优化方法,本申请实施例对此不做具体限定。获得的分割阈值为每个线程的最大分割参数对应的初始分割阈值。It should also be understood that the constraint condition is that the time information of one or more second fusion log entries in at least one second fusion log entry is within the time range of the reference time segment, and the identity of the one or more second fusion log entries The process number in the information is the same as the process number of the identity information of each first fusion log entry included in the reference time segment. Each second fusion log entry may record one or more of a receive event, a send event, a callback start event, or a callback end event. When a callback start event is recorded in the multiple second fusion log entries, a callback end event is also recorded in the multiple second fusion log entries. The segmentation parameter can be the execution time of at least one time segment of each thread divided by the average value of the running time, or it can be the average value of values obtained from other functional relationships between the execution time and the running time, which is not done in the embodiment of the present application Specific limits. The optimization method may include a heuristic optimization algorithm or a solver optimization method, which is not specifically limited in this embodiment of the present application. The obtained segmentation threshold is the initial segmentation threshold corresponding to the maximum segmentation parameter of each thread.
还应理解,每个线程的分割阈值可以相同,也可以不同,本申请实施例对此不做具体限定。It should also be understood that the segmentation thresholds of each thread may be the same or different, which is not specifically limited in this embodiment of the present application.
还应理解,线程的每个时间片段的运行时间为该时间片段内包含的最先开始的第一融合日志条目的时间信息和最后结束的第一融合日志条目的时间信息的差值。线程的每个时间片段的执行时间为该时间片段内至少一个实际执行时间的和,实际执行时间为两条时间相邻的、记录线程开始执行和线程结束执行的第一融合日志条目的时间信息的差值。It should also be understood that the running time of each time segment of a thread is the difference between the time information of the first fusion log entry that starts first and the time information of the first fusion log entry that ends last included in the time segment. The execution time of each time segment of a thread is the sum of at least one actual execution time in the time segment, and the actual execution time is the time information of the first merged log entry that records the thread start execution and the thread end execution difference.
本申请实施例中,可以根据至少两条身份信息相同且时间相邻的第一融合日志条目和分割阈值,即根据同一线程的至少两个时间相邻的时间记录和分割阈值,确定至少一个时间片段。换句话说,可以将同一线程的至少两个时间相邻的时间记录切分为至少一个时间片段,从而便于后续根据至少一个时间片段,获得业务节点的行为的信息。In the embodiment of the present application, at least one time can be determined according to at least two first fusion log entries with the same identity information and adjacent in time and the segmentation threshold, that is, according to at least two temporally adjacent time records and segmentation thresholds of the same thread. fragment. In other words, at least two temporally adjacent time records of the same thread can be divided into at least one time segment, so as to facilitate subsequent acquisition of behavior information of the service node according to at least one time segment.
结合第一方面,在第一方面的某些实现方式中,根据第一行为的信息和与业务节点存在收发关系的业务节点的行为的信息,获得第一行为的触发关系;根据第一行为的信息和第一行为的触发关系,获得触发第一行为的每个行为对应的接收事件的消息通道。In combination with the first aspect, in some implementations of the first aspect, the trigger relationship of the first behavior is obtained according to the information of the first behavior and the behavior information of the service node that has a sending and receiving relationship with the service node; according to the information of the first behavior The trigger relationship between the information and the first behavior is to obtain the message channel for receiving the event corresponding to each behavior that triggers the first behavior.
应理解,第一行为为业务节点的N个行为中的任一个行为。与业务节点存在收发关系 的业务节点包括:向业务节点发送消息的业务节点,或接收业务节点发送的消息的业务节点中的一个或多个。触发第一行为的行为可以是一个或多个行为,每个触发第一行为的行为对应一个第一行为的接收事件的消息通道。第一行为的运行行为模型包括触发第一行为的每个行为对应的接收事件的消息通道。It should be understood that the first behavior is any one of the N behaviors of the service node. The service nodes that have a sending and receiving relationship with the service node include: one or more of the service nodes that send messages to the service node, or one or more of the service nodes that receive the messages sent by the service node. The behavior that triggers the first behavior may be one or more behaviors, and each behavior that triggers the first behavior corresponds to a message channel for receiving events of the first behavior. The running behavior model of the first behavior includes a message channel for receiving events corresponding to each behavior that triggers the first behavior.
本申请实施例中,可以通过对业务节点的N个行为的信息进行分析,获得用于描述业务节点的运行行为的运行行为模型。In the embodiment of the present application, the operation behavior model used to describe the operation behavior of the service node can be obtained by analyzing the information of N behaviors of the service node.
结合第一方面,在第一方面的某些实现方式中,将第一行为对应的一个或多个第一融合日志条目集合中包含的每条第一融合日志条目的时间信息转换为频域数据;确定频域数据中是否存在一个或多个超出频域数据的平均值的频率值;若是,则根据所述一个或多个超出频域数据的平均值的频率值,确定第一行为的至少一个时间触发周期。With reference to the first aspect, in some implementations of the first aspect, the time information of each first fusion log entry contained in the one or more first fusion log entry sets corresponding to the first row is converted into frequency domain data ; Determine whether there are one or more frequency values exceeding the average value of the frequency domain data in the frequency domain data; if so, then determine at least A time-triggered cycle.
应理解,第一行为为业务节点的N个行为中的任一个行为。第一融合日志条目为融合日志中对应于调度信息的融合日志条目。第一行为的运行行为模型包括第一行为的至少一个时间触发周期。It should be understood that the first behavior is any one of the N behaviors of the service node. The first fusion log entry is a fusion log entry corresponding to scheduling information in the fusion log. The operational behavior model of the first behavior includes at least one time-triggered period of the first behavior.
还应理解,获得触发第一行为的每个行为对应的接收事件的消息通道的步骤可以在确定第一行为的至少一个时间触发周期的步骤之前进行,也可以在确定第一行为的至少一个时间触发周期的步骤之后进行,本申请实施例对此不做具体限定。It should also be understood that the step of obtaining the message channel for receiving the event corresponding to each behavior that triggers the first behavior may be performed before the step of determining at least one time trigger period of the first behavior, or may be performed after determining at least one time trigger period of the first behavior The step of triggering the cycle is performed afterward, which is not specifically limited in this embodiment of the present application.
还应理解,可以将N个行为中第n个行为对应的一个或多个第一融合日志条目集合中对应于第n个行为包含的M个线程中的第m个线程的至少一条第一融合日志条目的时间信息转换为频域数据,获得第m个线程的运行周期。It should also be understood that at least one of the first fusion log entries corresponding to the m-th thread among the M threads included in the n-th behavior in the set of one or more first fusion log entries corresponding to the n-th behavior in the N behaviors can be The time information of log entries is converted into frequency domain data, and the running cycle of the mth thread is obtained.
还应理解,其中第一融合日志条目为融合日志中对应于调度信息的融合日志条目,第一融合日志条目集合为至少一条第一融合日志条目的集合,n=1,……,N,m=1,……,M,M为大于或等于1的正整数。It should also be understood that the first fusion log entry is a fusion log entry corresponding to scheduling information in the fusion log, and the first fusion log entry set is a set of at least one first fusion log entry, n=1, ..., N, m =1, ..., M, M is a positive integer greater than or equal to 1.
本申请实施例中,可以通过对业务节点的N个行为的信息进行分析,获得用于描述业务节点的运行行为的运行行为模型。In the embodiment of the present application, the operation behavior model used to describe the operation behavior of the service node can be obtained by analyzing the information of N behaviors of the service node.
结合第一方面,在第一方面的某些实现方式中,根据第一行为对应的一个或多个第一融合日志条目集合中包含的至少两条第一融合日志条目的时间信息的间隔,获得第一行为运行的时间概率模型。With reference to the first aspect, in some implementation manners of the first aspect, according to the interval of time information of at least two first fusion log entries included in the one or more first fusion log entry sets corresponding to the first behavior, obtain The first line runs the time probability model.
应理解,其中第一行为为业务节点的N个行为中的任一个行为。第一融合日志条目为融合日志中对应于调度信息的融合日志条目。第一行为的运行行为模型包括第一行为运行的时间概率模型。It should be understood that the first behavior is any one of the N behaviors of the service node. The first fusion log entry is a fusion log entry corresponding to scheduling information in the fusion log. The running behavior model of the first behavior includes a time probability model of the running of the first behavior.
本申请实施例中,可以通过对业务节点的N个行为的信息进行分析,获得用于描述业务节点的运行行为的运行行为模型。In the embodiment of the present application, the operation behavior model used to describe the operation behavior of the service node can be obtained by analyzing the information of N behaviors of the service node.
结合第一方面,在第一方面的某些实现方式中,在监控到业务节点的依赖关系有向图发生了变化的情况下,更新业务节点的运行行为模型;或者,在监控到业务节点的行为数据的变化超出阈值的情况下,更新业务节点的运行行为模型中的行为数据。In combination with the first aspect, in some implementations of the first aspect, when it is monitored that the directed graph of the dependency relationship of the service node has changed, the operating behavior model of the service node is updated; or, when the monitoring of the service node’s When the change of the behavior data exceeds the threshold, the behavior data in the running behavior model of the service node is updated.
应理解,可以根据业务节点的依赖关系,构建业务节点的依赖关系有向图。还应理解,在监控到业务节点的依赖关系有向图发生了变化的情况下,可以重新获取业务节点的融合日志,并根据重新获取的业务节点的融合日志,更新业务节点的运行行为模型。It should be understood that a directed graph of dependency relationships of service nodes may be constructed according to dependency relationships of service nodes. It should also be understood that when the directed graph of dependencies of the service nodes is monitored to change, the fusion log of the service node may be reacquired, and the operating behavior model of the service node may be updated according to the reacquired fusion log of the service node.
还应理解,监控到业务节点的依赖关系有向图发生了变化,包括:监控到依赖关系有向图中的至少一个节点发生了变化,或者依赖关系有向图的最长路径发生了变化。It should also be understood that monitoring a change in the directed dependency graph of a service node includes: monitoring that at least one node in the directed dependency graph has changed, or that the longest path in the directed graph of dependency has changed.
还应理解,至少一个节点发生了变化包括至少减少了一个节点、至少增加了一个节点、至少有一个节点在依赖关系有向图中的位置发生了变化中的任一项或多项。最长路径发生了变化包括最长路径增长、最长路径缩短、最长路径中的至少一个节点发生了变化中的任一项或多项。最长路径中的至少一个节点发生了变化包括组成最长路径的节点发生了变化或者组成最长路径的节点的位置发生了变化。It should also be understood that the change of at least one node includes any one or more items of at least one node being reduced, at least one node being added, and at least one node having a changed position in the dependency relationship directed graph. The change of the longest path includes any one or more items of the longest path increasing, the longest path shortening, and at least one node in the longest path changing. The change of at least one node in the longest path includes a change of a node constituting the longest path or a change of a position of a node constituting the longest path.
还应理解,可以通过搜索算法在依赖关系有向图中找到最长路径,搜索算法可以是最大生成树算法、动态规划算法或者拓扑排序算法,本申请实施例对此不做具体限定。It should also be understood that the longest path can be found in the dependency directed graph through a search algorithm, and the search algorithm can be a maximum spanning tree algorithm, a dynamic programming algorithm, or a topological sorting algorithm, which is not specifically limited in this embodiment of the present application.
还应理解,可以实时监控依赖关系有向图是否发生变化,或者可以每隔固定周期检查依赖关系有向图是否发生变化。It should also be understood that it is possible to monitor in real time whether the directed graph of dependencies changes, or to check whether the directed graph of dependencies changes at regular intervals.
还应理解,可以在监控到业务节点的行为数据的变化超出阈值的情况下,通过以下任一种算法更新业务节点的运行行为模型中的行为数据:滑动平均算法、简单移动平均、加权移动平均、自回归滑动平均模型算法等。It should also be understood that, in the case that the behavior data of the business node is monitored to exceed the threshold, the behavior data in the operation behavior model of the business node can be updated by any of the following algorithms: moving average algorithm, simple moving average, weighted moving average , autoregressive moving average model algorithm, etc.
还应理解,行为数据包括业务节点的接收消息的频率、业务节点的发送消息的频率、业务节点的回调处理的时延、业务节点包含的进程的数量、业务节点的至少一个行为中每个行为包含的线程的数量中的任一项或多项。It should also be understood that the behavior data includes the frequency of receiving messages of the service node, the frequency of sending messages of the service node, the delay of the callback processing of the service node, the number of processes contained in the service node, and each behavior in at least one behavior of the service node Either or more of the number of threads contained.
还应理解,本申请实施例可以在监控依赖关系有向图是否发生变化的同时,监控业务节点的行为数据的变化是否超出阈值。It should also be understood that the embodiment of the present application may monitor whether the change of the behavior data of the service node exceeds a threshold while monitoring whether the directed graph of dependency relationship changes.
本申请实施例中,可以在监控到依赖关系有向图发生了变化的情况下,重新更新业务节点的运行行为模型,还可以在监控到业务节点的行为数据的变化超出了阈值的情况下,更新业务节点的运行行为模型中的行为数据。从而在自动驾驶场景变化后或自动驾驶业务代码更新后,重新建立业务节点的运行行为模型,使该模型可以用于描述变化后的自动驾驶业务的业务节点的行为状态。In the embodiment of the present application, the operation behavior model of the service node can be re-updated when it is monitored that the directed graph of dependency relationship has changed, and it can also be monitored that the change of the behavior data of the service node exceeds the threshold. Update the behavior data in the running behavior model of the business node. Therefore, after the automatic driving scene changes or the automatic driving service code is updated, the operation behavior model of the service node is re-established, so that the model can be used to describe the behavior state of the service node of the changed automatic driving service.
第二方面,本申请实施例提供一种计算机设备,该计算机设备包括用于实现第一方面或第一方面的任一种可能的实现方式的单元。In a second aspect, an embodiment of the present application provides a computer device, where the computer device includes a unit for implementing the first aspect or any possible implementation manner of the first aspect.
第三方面,本申请实施例提供一种计算机设备,该计算机设备包括处理器,该处理器用于与存储器耦合,读取并执行该存储器中的指令和/或程序代码,以执行第一方面或第一方面的任一种可能的实现方式。In a third aspect, an embodiment of the present application provides a computer device, the computer device includes a processor, the processor is used to be coupled with a memory, read and execute instructions and/or program codes in the memory, so as to implement the first aspect or Any possible implementation of the first aspect.
第四方面,本申请实施例提供一种芯片系统,该芯片系统包括逻辑电路,该逻辑电路用于与输入/输出接口耦合,通过该输入/输出接口传输数据,以执行第一方面或第一方面任一种可能的实现方式。In a fourth aspect, an embodiment of the present application provides a chip system, the chip system includes a logic circuit, the logic circuit is used to couple with an input/output interface, and transmit data through the input/output interface to perform the first aspect or the first Any possible implementation of the aspect.
第五方面,本申请实施例提供一种计算机可读存储介质,该计算机可读存储介质存储有程序代码,当该计算机存储介质在计算机上运行时,使得计算机执行如第一方面或第一方面的任一种可能的实现方式。In the fifth aspect, the embodiment of the present application provides a computer-readable storage medium, the computer-readable storage medium stores program codes, and when the computer storage medium is run on a computer, the computer executes the first aspect or the first aspect. any possible implementation of .
第六方面,本申请实施例提供一种计算机程序产品,该计算机程序产品包括:计算机程序代码,当该计算机程序代码在计算机上运行时,使得该计算机执行如第一方面或第一方面的任一种可能的实现方式。In a sixth aspect, an embodiment of the present application provides a computer program product, the computer program product comprising: computer program code, when the computer program code is run on a computer, the computer is made to execute any of the first aspect or the first aspect. One possible implementation.
附图说明Description of drawings
图1是自动驾驶软硬件平台的示意性系统架构图。Figure 1 is a schematic system architecture diagram of an autonomous driving software and hardware platform.
图2是根据本申请一个实施例的自动驾驶业务的业务节点的建模方法的示意性系统 架构图。Fig. 2 is a schematic system architecture diagram of a modeling method for a service node of an automatic driving service according to an embodiment of the present application.
图3是根据本申请一个实施例的自动驾驶业务的业务节点的建模方法的示意性流程图。Fig. 3 is a schematic flowchart of a modeling method for a service node of an automatic driving service according to an embodiment of the present application.
图4是根据本申请一个实施例的获得融合日志的方法的示意性流程图。Fig. 4 is a schematic flowchart of a method for obtaining fusion logs according to an embodiment of the present application.
图5是根据本申请一个实施例的行为在融合日志中的时间信息转换为频域数据的波形示意图。Fig. 5 is a schematic waveform diagram of converting the time information of behavior in the fusion log into frequency domain data according to an embodiment of the present application.
图6是根据本申请一个实施例的获取节点级通信日志和线程级调度日志的方法的示意性流程图。Fig. 6 is a schematic flowchart of a method for acquiring node-level communication logs and thread-level scheduling logs according to an embodiment of the present application.
图7是根据本申请一个实施例的业务节点的依赖关系有向图的示意图。Fig. 7 is a schematic diagram of a directed graph of dependency relationships of service nodes according to an embodiment of the present application.
图8是根据本申请一个实施例的调整业务节点和业务节点的关联业务节点的调度策略的示意图。Fig. 8 is a schematic diagram of adjusting a scheduling policy of a service node and a service node associated with the service node according to an embodiment of the present application.
图9是根据本申请另一实施例的获取节点级通信日志和线程级调度日志的方法的示意性流程图。Fig. 9 is a schematic flowchart of a method for acquiring node-level communication logs and thread-level scheduling logs according to another embodiment of the present application.
图10是根据本申请一个实施例的业务节点内部结构的示意图。Fig. 10 is a schematic diagram of an internal structure of a service node according to an embodiment of the present application.
图11是根据本申请另一实施例的自动驾驶业务的业务节点的建模方法的示意性流程图。Fig. 11 is a schematic flowchart of a modeling method for a service node of an automatic driving service according to another embodiment of the present application.
图12是根据本申请实施例的融合日志中多条第一融合日志条目的时间信息可视化示意图。Fig. 12 is a schematic diagram of visualized time information of multiple first fusion log entries in the fusion log according to an embodiment of the present application.
图13是根据本申请另一实施例的自动驾驶业务的业务节点的建模方法的示意性流程图。Fig. 13 is a schematic flowchart of a modeling method for a service node of an automatic driving service according to another embodiment of the present application.
图14是根据本申请另一实施例的自动驾驶业务的业务节点的建模方法的示意性流程图。Fig. 14 is a schematic flowchart of a modeling method for a service node of an automatic driving service according to another embodiment of the present application.
图15是根据本申请一个实施例的自动驾驶业务的业务节点的建模装置的结构示意图。Fig. 15 is a schematic structural diagram of a modeling device for a service node of an automatic driving service according to an embodiment of the present application.
图16是根据本申请一个实施例的自动驾驶业务的业务节点的建模设备的结构示意图。Fig. 16 is a schematic structural diagram of a modeling device for a service node of an automatic driving service according to an embodiment of the present application.
具体实施方式Detailed ways
下面将结合附图,对本申请实施例中的技术方案进行描述。The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings.
本申请实施例的技术方案可以应用于各种自动驾驶车控操作系统和自动驾驶智能操作系统等,本申请实施例对此并不限定。The technical solutions of the embodiments of the present application can be applied to various automatic driving vehicle control operating systems and automatic driving intelligent operating systems, etc., which are not limited in the embodiments of the present application.
自动驾驶车控操作系统是传统汽油动力车厂开发的嵌入式实时操作系统,用于传统的车辆控制,适用于动力系统与底盘控制等领域,自动驾驶智能操作系统是基于可移植操作系统接口(portable operating system interface,POSIX)标准的操作系统,适用于自动驾驶所需要的高性能计算和高带宽通信的操作系统,提供车辆环境感知、智能决策和路径规划等功能。The automatic driving vehicle control operating system is an embedded real-time operating system developed by traditional gasoline-powered car factories. It is used for traditional vehicle control and is suitable for power system and chassis control. operating system interface (POSIX) standard operating system, suitable for high-performance computing and high-bandwidth communication required for autonomous driving, providing functions such as vehicle environment perception, intelligent decision-making, and path planning.
为便于理解本申请实施例,首先对本申请中涉及的几个术语做简单说明。In order to facilitate the understanding of the embodiments of the present application, several terms involved in the present application are briefly described first.
1、业务1. Business
在自动驾驶智能操作系统中,业务通常是使用通信中间件封装、具有特定的自动驾驶功能的进程和线程的集合。该通信中间件可以是机器人操作系统(robot operating system,ROS)、汽车开放系统架构通信管理模块(automotive open system architecture communication management,AutoSAR CM)等。该自动驾驶功能可以是车辆环境感知、传感器融合和路 径规划等功能。In the autonomous driving intelligent operating system, the business is usually a collection of processes and threads that are encapsulated by communication middleware and have specific autonomous driving functions. The communication middleware may be a robot operating system (robot operating system, ROS), an automotive open system architecture communication management module (automotive open system architecture communication management, AutoSAR CM), etc. This automatic driving function can be functions such as vehicle environment perception, sensor fusion and path planning.
2、业务节点2. Business node
业务节点是单个业务的抽象概念,业务节点双方或多方通过调用通信中间件的消息发送、接收等应用程序接口(application programming interface,API)实现消息或服务调用在进程或组件之间的传递。一个业务节点可以包括一个或多个行为,实现特定的自动驾驶功能。A business node is an abstract concept of a single business. Two or more parties of a business node realize the transmission of messages or service calls between processes or components by calling the application programming interface (application programming interface, API) such as message sending and receiving of the communication middleware. A service node can include one or more behaviors to realize specific automatic driving functions.
3、节点3. Node
在网络理论或图论中,术语节点表示网络拓扑中,线相交或分支的点。节点可以理解为依赖关系有向图中的线相交或分支的点,一个节点代表一个具有特定的自动驾驶功能的业务节点。一个节点的关联节点指的是该节点在依赖关系有向图中的至少一个上游节点和至少一个下游节点中的至少一个。In network theory or graph theory, the term node denotes a point in a network topology where lines intersect or branch. A node can be understood as a point where lines intersect or branch in a directed graph of dependencies, and a node represents a service node with a specific autopilot function. An associated node of a node refers to at least one of at least one upstream node and at least one downstream node of the node in the dependency directed graph.
4、行为4. Behavior
行为是一个或多个线程的时间片段(即一个或多个任务)的集合的抽象概念。为实现特定的自动驾驶功能,每个业务节点可以执行一个或多个行为,该行为是具有明确目的或明确功能的一个或多个任务的集合。A behavior is an abstraction of a collection of time slices (ie, one or more tasks) of one or more threads. In order to realize a specific autonomous driving function, each business node can perform one or more behaviors, which is a collection of one or more tasks with a clear purpose or clear function.
5、任务5. Tasks
任务是线程的时间片段的抽象概念。任务与线程的时间片段一一对应,即一个线程的一个时间片段是一个任务。一个或多个任务可以构成一个行为。A task is an abstraction of a slice of time for a thread. There is a one-to-one correspondence between a task and a time segment of a thread, that is, a time segment of a thread is a task. One or more tasks can constitute an action.
6、进程(process)6. Process
进程是计算机中的程序关于某数据集合上的一次运行活动,是系统进行资源分配和调度的基本单位,是操作系统结构的基础。在早期面向进程设计的计算机结构中,进程是程序的基本执行实体;在当代面向线程设计的计算机结构中,进程是线程的容器。程序是指令、数据及其组织形式的描述,进程是程序的实体。进程通过进程标识来识别。A process is a running activity of a program in a computer on a certain data set. It is the basic unit for system resource allocation and scheduling, and the basis of the operating system structure. In the early process-oriented design computer structure, the process is the basic execution entity of the program; in the contemporary thread-oriented design computer structure, the process is the container of the thread. A program is a description of instructions, data and its organizational form, and a process is the entity of a program. Processes are identified by their process ID.
7、线程7. Thread
线程是操作系统能够进行运算调度的最小单位。线程被包含在进程之中,是进程中的实际运作单位。一条线程指的是进程中一个单一顺序的控制流,一个进程中可以并发多个线程,每条线程并行执行不同的任务。线程可以通过线程编号来识别。A thread is the smallest unit that an operating system can perform operation scheduling. A thread is included in a process and is the actual operating unit in the process. A thread refers to a single sequential flow of control in a process. Multiple threads can run concurrently in a process, and each thread performs different tasks in parallel. Threads can be identified by thread number.
综上所述,一个或多个线程可以构成一个进程;一个或多个进程的时间片段(即一个或多个任务)的集合可以构成一个行为;一个或多个行为可以构成一个业务。To sum up, one or more threads can constitute a process; a collection of time segments of one or more processes (that is, one or more tasks) can constitute a behavior; and one or more behaviors can constitute a business.
8、消息通道(topic):8. Message channel (topic):
在本申请实施例中,消息通道是业务节点之间指定的通信通道,消息通道的组成包括发送者的发送端口、接收者的接收端口、通道名称、消息格式等。In this embodiment of the application, a message channel is a designated communication channel between service nodes, and the composition of a message channel includes a sending port of a sender, a receiving port of a receiver, a channel name, a message format, and the like.
9、业务节点的运行行为:9. Operating behavior of business nodes:
业务节点的运行行为包括业务节点所包含的线程在硬件资源上的运行行为和不同业务节点之间的依赖关系和触发关系,该硬件资源可以是CPU或GPU等,该线程在硬件资源上的运行行为包括该线程的运行时间、运行周期、触发关系等。The running behavior of a business node includes the running behavior of threads contained in the business node on hardware resources and the dependencies and triggering relationships between different business nodes. The hardware resource can be CPU or GPU, etc., and the running behavior of the thread on the hardware resource Behavior includes the thread's running time, running cycle, trigger relationship, and so on.
图1是自动驾驶软硬件平台的示意性系统架构图。Figure 1 is a schematic system architecture diagram of an autonomous driving software and hardware platform.
自动驾驶软硬件平台系统100可以分为三大部分:自动驾驶业务110、自动驾驶软件系统120和自动驾驶车辆硬件平台130。The autonomous driving software and hardware platform system 100 can be divided into three parts: the autonomous driving business 110 , the autonomous driving software system 120 and the autonomous vehicle hardware platform 130 .
自动驾驶业务110是可以使自动驾驶汽车实现基本的自动驾驶功能的业务源代码。自 动驾驶软件系统120中包含通信中间件121、调度模块122和自动驾驶智能操作系统123。通信中间件121抽象统一了智能驾驶操作系统、安全车控操作系统的不同通信协议栈和协议,包括通信管理(communication management,CM)、ROS/ROS2、数据分发服务(data distribution service,DDS)、基于网际协议的可扩展面向服务的中间件(scalable service-oriented middleware over internet protocol,SOME/IP)等。通信中间件121为自动驾驶业务110提供了统一的通信接口和功能,可以在自动驾驶业务110调用通信接口的同时记录必要的调用信息。调度模块122可以根据自动驾驶过程中的实际需要,或者根据自动驾驶业务的业务节点运行时的实际需要,调整自动驾驶业务节点的调度策略,包括调整优先级、绑核策略等。调度模块122还可以跟踪记录每个业务节点和业务节点所包含的线程在计算资源中的运行时序日志。该运行时序日志可以是该业务节点的节点级通信日志,也可以是该业务节点所包含的线程的线程级调度日志。该计算资源可以是CPU或GPU等。The automatic driving service 110 is the service source code that can enable the automatic driving car to realize basic automatic driving functions. The automatic driving software system 120 includes a communication middleware 121, a scheduling module 122 and an automatic driving intelligent operating system 123. The communication middleware 121 abstracts and unifies different communication protocol stacks and protocols of the intelligent driving operating system and the safe vehicle control operating system, including communication management (communication management, CM), ROS/ROS2, data distribution service (data distribution service, DDS), Internet protocol-based scalable service-oriented middleware (scalable service-oriented middleware over internet protocol, SOME/IP), etc. The communication middleware 121 provides a unified communication interface and function for the automatic driving service 110, and can record the necessary calling information when the automatic driving service 110 calls the communication interface. The scheduling module 122 can adjust the scheduling strategy of the automatic driving service node according to the actual needs in the process of automatic driving, or according to the actual needs when the service node of the automatic driving service is running, including adjusting the priority and core binding strategy. The scheduling module 122 can also track and record each service node and the running time sequence log of the threads included in the service node in the computing resources. The running timing log may be a node-level communication log of the service node, or a thread-level scheduling log of threads included in the service node. The computing resource may be a CPU or a GPU or the like.
图2是根据本申请提供的自动驾驶业务的业务节点的建模方法的示意性系统架构图。Fig. 2 is a schematic system architecture diagram of a modeling method for a service node of an automatic driving service according to the present application.
本申请提供的自动驾驶业务的建模方法的系统架构200可以包括自动驾驶业务210、自动驾驶软件系统220和自动驾驶车辆硬件平台230。The system architecture 200 of the modeling method for the autonomous driving service provided in this application may include an automatic driving service 210 , an automatic driving software system 220 and an automatic driving vehicle hardware platform 230 .
自动驾驶软件系统220中包括通信中间件221、监控模块222、建模框架223和自动驾驶智能操作系统224。The automatic driving software system 220 includes a communication middleware 221 , a monitoring module 222 , a modeling framework 223 and an automatic driving intelligent operating system 224 .
通信中间件221可以提供统一的通信平台和能力,集成了车载通信协议栈、传输控制协议/网际协议(transmission control protocol/internet protocol,TCP/IP)协议和用户数据报协议/网际协议(user datagram protocol/internet protocol,UDP/IP)协议,可以为自动驾驶业务210提供统一的通信接口和功能,还可以在自动驾驶业务210调用通信接口时记录必要的调用信息。The communication middleware 221 can provide a unified communication platform and capability, and integrates the vehicle communication protocol stack, transmission control protocol/internet protocol (transmission control protocol/internet protocol, TCP/IP) protocol and user datagram protocol/internet protocol (user datagram protocol) The protocol/internet protocol (UDP/IP) protocol can provide a unified communication interface and function for the automatic driving service 210, and can also record necessary call information when the automatic driving service 210 calls the communication interface.
监控模块222可以获取自动驾驶业务的业务节点的通信数据和调度数据,可以对接通信中间件221、建模框架223和自动驾驶智能操作系统224,并且可以监控业务节点的依赖关系和运行行为是否变化,便于在自动驾驶业务更新或自动驾驶场景切换时更新业务节点的运行行为模型。监控模块222包括通信监测模块2221和追踪(trace)监测模块2222,其中通信监测模块2221用于获得业务节点的通信数据,trace监测模块用于获得业务节点的调度数据。The monitoring module 222 can obtain the communication data and scheduling data of the business nodes of the autonomous driving business, can interface with the communication middleware 221, the modeling framework 223 and the smart operating system for autonomous driving 224, and can monitor whether the dependencies and operating behavior of the business nodes change , which is convenient for updating the operating behavior model of the service node when the automatic driving service is updated or the automatic driving scene is switched. The monitoring module 222 includes a communication monitoring module 2221 and a trace monitoring module 2222, wherein the communication monitoring module 2221 is used to obtain communication data of service nodes, and the trace monitoring module is used to obtain scheduling data of service nodes.
建模框架223可以提供建模框架和能力,包括依赖分析模块2231、日志融合模块2232、切分聚合模块2233和关联分析模块2234。依赖分析模块2231可以根据通信监测模块2221获得的业务节点的通信数据,获得该业务节点的关联业务节点和依赖关系,通过调整业务节点和业务节点的关联业务节点的调度策略,从而采集业务节点的节点级通信日志和线程级调度日志。日志融合模块2232可以根据采集到的业务节点的节点级通信日志和线程级调度日志,获得融合日志。切分聚合模块2233可以根据融合日志获得该业务节点的一个或多个行为的信息。关联分析模块2234可以根据该业务节点的一个或多个行为的信息,获得用于描述所述业务节点的行为的运行行为模型。该行为的运行行为模型可以包括该业务节点的依赖关系、或该行为所包含的所有线程在硬件资源上的运行行为,该运行行为可以包括以下任一个或多个:线程的运行时间、运行周期、或触发关系。该硬件资源可以是CPU或GPU等。该行为的运行行为模型还可以包括以下任一个:触发该行为的每个行为对应的接收事件的消息通道,该行为的至少一个时间触发周期,或该行为的时间概率模型。若该行为的运行行为模型包括触发该行为的每个行为对应的接收事件的消息通道,那么该 行为的运行行为模型还可以包括该行为的触发关系。The modeling framework 223 can provide a modeling framework and capabilities, including a dependency analysis module 2231 , a log fusion module 2232 , a segmentation and aggregation module 2233 , and an association analysis module 2234 . The dependency analysis module 2231 can obtain the associated service node and the dependency relationship of the service node according to the communication data of the service node obtained by the communication monitoring module 2221, and adjust the scheduling strategy of the service node and the service node's associated service node to collect the information of the service node. Node-level communication logs and thread-level scheduling logs. The log fusion module 2232 can obtain fusion logs according to the collected node-level communication logs and thread-level scheduling logs of service nodes. The segmentation and aggregation module 2233 can obtain information about one or more behaviors of the service node according to the fusion log. The association analysis module 2234 may obtain an operating behavior model used to describe the behavior of the service node according to information about one or more behaviors of the service node. The running behavior model of this behavior can include the dependencies of the business node, or the running behavior of all threads included in the behavior on hardware resources, and the running behavior can include any one or more of the following: thread running time, running cycle , or trigger relationships. The hardware resource may be a CPU or a GPU or the like. The running behavior model of the behavior may also include any of the following: a message channel for receiving events corresponding to each behavior that triggers the behavior, at least one time trigger period of the behavior, or a time probability model of the behavior. If the running behavior model of the behavior includes a message channel for receiving events corresponding to each behavior that triggers the behavior, then the running behavior model of the behavior may also include the trigger relationship of the behavior.
自动驾驶智能操作系统224运行在自动驾驶车辆硬件平台230之上,包括追踪器2241和调度器2242。追踪器2241和调度器2242共同构成图1中的调度模块,可以根据自动驾驶过程中的实际需要、或者自动驾驶业务运行时的实际需要调整自动驾驶业务的调度策略。The autonomous driving intelligent operating system 224 runs on the autonomous driving vehicle hardware platform 230 , including a tracker 2241 and a scheduler 2242 . The tracker 2241 and the scheduler 2242 together constitute the scheduling module in FIG. 1 , which can adjust the scheduling strategy of the automatic driving service according to the actual needs during the automatic driving process or the actual needs during the operation of the automatic driving service.
自动驾驶车辆硬件平台230可以为自动驾驶软件系统220提供基础硬件平台,包括处理器251、内存252和存储器253。The self-driving vehicle hardware platform 230 can provide a basic hardware platform for the self-driving software system 220 , including a processor 251 , a memory 252 and a storage 253 .
图3是根据本申请提供的自动驾驶业务的业务节点的建模方法的示意性流程图。图3的自动驾驶业务的建模方法可以由建模装置或建模设备来执行,例如可以由图2的自动驾驶系统来执行,也可以由与自动驾驶系统相连接的其它建模装置或建模设备来实现,本申请的实施例并不限于此。图3的自动驾驶业务的建模方法包括如下内容。Fig. 3 is a schematic flow chart of a modeling method for a service node of an automatic driving service according to the present application. The modeling method for the automatic driving business in Figure 3 can be executed by a modeling device or modeling equipment, for example, it can be executed by the automatic driving system in Figure 2, or it can be performed by other modeling devices or modeling devices connected to the automatic driving system. It is realized by using a mold device, and the embodiments of the present application are not limited thereto. The modeling method of the autonomous driving business in Figure 3 includes the following contents.
S310,获得自动驾驶业务的业务节点的融合日志。S310. Obtain the fusion log of the service node of the automatic driving service.
由于大多数自动驾驶业务的源代码不对外公开,因此难以从自动驾驶业务的源代码中抽象出业务模型,例如生成函数调用关系图的方法。但是目前大多数自动驾驶操作系统为了将业务逻辑和底层通信、接口等进行解耦,使用了ROS、DDS或者执行管理(execution manager,EM)等通信中间件,使用通信中间件的接口将自动驾驶业务封装为不同功能的业务模块,例如车辆环境感知、传感器融合、路径规划等模块。每个业务模块包含一个或者多个业务节点,不同业务节点之间使用通信中间件相互传递消息并调用服务。自动驾驶业务可以通过ROS或DDS等中间件串接起来形成任务节点链,形成完整的自动驾驶能力。因此虽然无法获得自动驾驶业务的源代码,但是仍可以从通信中间件221中获得自动驾驶业务的业务节点的融合日志。融合日志中可以记录业务节点的调用事件和线程的调度信息,其中线程由业务节点运行。Since most of the source codes of autonomous driving services are not open to the public, it is difficult to abstract business models from the source codes of autonomous driving services, such as the method of generating function call graphs. However, most current autonomous driving operating systems use communication middleware such as ROS, DDS, or execution manager (execution manager, EM) in order to decouple business logic from underlying communication and interfaces. The business is encapsulated into business modules with different functions, such as vehicle environment perception, sensor fusion, path planning and other modules. Each business module contains one or more business nodes, and different business nodes use communication middleware to transfer messages and call services. The autonomous driving business can be connected in series through middleware such as ROS or DDS to form a task node chain and form a complete autonomous driving capability. Therefore, although the source code of the automatic driving service cannot be obtained, the fusion log of the service node of the automatic driving service can still be obtained from the communication middleware 221 . The fusion log can record the call event of the service node and the scheduling information of the thread, where the thread is run by the service node.
可选地,在步骤S310前,可以包括图4中的步骤S301和步骤S302。图4是获得融合日志的方法的示意性流程图。Optionally, before step S310, step S301 and step S302 in FIG. 4 may be included. Fig. 4 is a schematic flowchart of a method for obtaining fusion logs.
步骤S301,获得业务节点的节点级通信日志和线程级调度日志。Step S301, obtaining node-level communication logs and thread-level scheduling logs of service nodes.
业务节点的节点级通信日志是以节点为粒度记录的通信日志。业务节点的节点级通信日志记录了该业务节点的调用事件。业务节点的节点级通信日志中包含一条或多条通信日志条目,每条通信日志条目可以包括身份信息、时间信息和日志内容,每条通信日志条目的身份信息包括产生每条通信日志条目的日志内容的业务节点的名称和进程号,每条通信日志条目的时间信息包括每条通信日志条目包括的日志内容的产生时间,每条通信日志条目的日志内容包括调用事件的名称,该调用事件包括业务节点的接收事件、业务节点的发送事件、业务节点的回调开始事件、业务节点的回调结束事件中的任一个。当该调用事件为业务节点的接收事件或发送事件时,该条通信日志条目的日志内容还包括该调用事件的消息通道。The node-level communication logs of business nodes are communication logs recorded at the granularity of nodes. The node-level communication log of a business node records the invocation events of the business node. The node-level communication log of a business node contains one or more communication log entries. Each communication log entry can include identity information, time information, and log content. The identity information of each communication log entry includes the log that generated each communication log entry The name and process number of the business node of the content, the time information of each communication log entry includes the generation time of the log content included in each communication log entry, the log content of each communication log entry includes the name of the call event, and the call event includes Any one of the receiving event of the service node, the sending event of the service node, the callback start event of the service node, and the callback end event of the service node. When the calling event is a receiving event or sending event of the service node, the log content of the communication log entry also includes the message channel of the calling event.
应理解的是,节点级通信日志中可以包含业务节点与其他业务节点的接收和发送关系,因此可以通过节点级通信日志确定业务节点的依赖关系。其他业务节点指的是除该业务节点外的其他业务节点。还应理解,业务节点的依赖关系为该业务节点和与该业务节点存在接收、发送关系的业务节点之间的关系。It should be understood that the node-level communication log may include receiving and sending relationships between the service node and other service nodes, so the dependency relationship of the service nodes may be determined through the node-level communication log. Other service nodes refer to other service nodes except the service node. It should also be understood that the dependency relationship of a service node is the relationship between the service node and service nodes that have receiving and sending relationships with the service node.
业务节点的线程级调度日志是以线程为粒度记录的调度日志。业务节点的线程级调度日志记录了线程的调度信息。线程由业务节点运行。业务节点的线程级调度日志中包含一 条或多条调度日志条目,每条调度日志条目可以包括身份信息、时间信息和日志内容,每条调度日志条目的身份信息包括产生每条调度日志条目包括的日志内容的线程的编号和进程号,每条调度日志条目的时间信息包括每条调度日志条目包括的日志内容的产生时间,每条调度日志条目的日志内容包括线程的优先级、线程的绑核信息、线程的事件的名称,线程的事件包括线程的唤醒事件、线程的任务切换事件、线程的迁核事件中的任一个。The thread-level scheduling log of a business node is a scheduling log recorded at the granularity of a thread. The thread-level scheduling log of the service node records the scheduling information of the thread. Threads are run by business nodes. The thread-level scheduling log of a business node contains one or more scheduling log entries. Each scheduling log entry can include identity information, time information, and log content. The identity information of each scheduling log entry includes the information included in each scheduling log entry. The thread number and process number of the log content, the time information of each scheduling log entry includes the generation time of the log content included in each scheduling log entry, and the log content of each scheduling log entry includes thread priority, thread binding core Information, the name of the event of the thread, and the event of the thread includes any one of the wake-up event of the thread, the task switching event of the thread, and the relocation event of the thread.
S302,对节点级通信日志和线程级调度日志进行融合,获得融合日志。S302. Fuse the node-level communication log and the thread-level scheduling log to obtain the fusion log.
由于获取到的节点级通信日志缺少业务节点内部的线程的信息,例如线程的优先级、线程的绑核信息、线程的事件等信息,仅使用节点级通信日志难以对业务节点的行为进行准确建模,并且由于获取到的线程级调度日志只有线程在硬件资源上的运行信息,缺少业务节点的行为信息,如业务节点的调用事件等信息,且线程级调度日志的记录较为杂乱,无法将线程的运行信息直接映射到业务节点的行为,因此需要将节点级通信日志与线程级调度日志进行融合,从而便于后续进一步分析业务节点的行为。Since the obtained node-level communication logs lack information about threads inside service nodes, such as thread priority, thread core binding information, and thread events, it is difficult to accurately establish the behavior of service nodes using only node-level communication logs. module, and because the obtained thread-level scheduling log only has the running information of the thread on the hardware resources, it lacks the behavior information of the service node, such as the call event of the service node, and the records of the thread-level scheduling log are messy, so it is impossible to The running information of the node is directly mapped to the behavior of the service node, so it is necessary to integrate the node-level communication log and the thread-level scheduling log, so as to facilitate the subsequent further analysis of the behavior of the service node.
在一些实施例中,节点级通信日志中的时间信息为全局时间戳信息,线程级调度日志中的时间信息为本地时间戳信息,由于全局时间戳信息与本地时间戳信息的形式不一致,因此在对节点级通信日志和线程级调度日志进行融合时,需要将节点级通信日志中的时间信息与线程级调度日志中的时间信息进行同步。In some embodiments, the time information in the node-level communication log is global time stamp information, and the time information in the thread-level scheduling log is local time stamp information. Since the form of the global time stamp information is inconsistent with the local time stamp information, therefore, in When merging node-level communication logs and thread-level scheduling logs, it is necessary to synchronize the time information in the node-level communication logs with the time information in the thread-level scheduling logs.
可选地,将节点级通信日志与线程级调度日志的时间进行同步的方式可以是:在获取节点级通信日志和线程级调度日志的过程中,在节点级通信日志和线程级调度日志中加入时间同步数据,根据时间同步数据,对节点级通信日志中的时间信息和线程级调度日志中的时间信息进行同步。同步的方式可以是根据时间同步数据,将线程级调度日志的时间信息形式转化为节点级通信日志的时间信息形式,或者同步的方式可以是根据时间同步数据,将节点级通信日志的时间信息形式转化为线程级调度日志的时间信息形式。Optionally, the method of synchronizing the time of the node-level communication log and the thread-level scheduling log may be: during the process of obtaining the node-level communication log and the thread-level scheduling log, adding Time synchronization data, according to the time synchronization data, the time information in the node-level communication log and the time information in the thread-level scheduling log are synchronized. The synchronization method can be to synchronize data according to time, and convert the time information form of thread-level scheduling logs into the time information form of node-level communication logs, or the synchronization method can be to synchronize data according to time, and convert the time information form of node-level communication logs to It is converted into the time information form of the thread-level scheduling log.
可选地,可以在获取节点级通信日志和线程级调度日志的过程中加入一次时间同步数据,或者可以在获取节点级通信日志和线程级调度日志的过程中加入周期性时间同步数据,例如,加入约5分钟为一个周期的时间同步数据。Optionally, time synchronization data can be added once in the process of obtaining node-level communication logs and thread-level scheduling logs, or periodic time synchronization data can be added in the process of obtaining node-level communication logs and thread-level scheduling logs, for example, Add about 5 minutes as a period of time synchronization data.
可选地,时间同步数据可以是在某个时刻的<全局时间戳,本地时间戳>二元组数据形式,或者可以是其他包含全局时间戳和本地时间戳的、可以达到时间同步目的的数据结构形式。Optionally, the time synchronization data can be in the form of <global timestamp, local timestamp> 2-tuple data at a certain moment, or it can be other data including global timestamp and local timestamp that can achieve the purpose of time synchronization structure type.
可选地,在节点级通信日志和线程级调度日志进行融合的过程中,将节点级通信日志和线程级调度日志的时间信息进行同步后,可以将节点级通信日志和线程级调度日志的身份信息、同步后的时间信息、日志内容合并放入到一份日志中,获得融合日志。Optionally, in the process of merging node-level communication logs and thread-level scheduling logs, after synchronizing the time information of node-level communication logs and thread-level scheduling logs, the identities of node-level communication logs and thread-level scheduling logs can be Information, synchronized time information, and log content are merged into one log to obtain a fusion log.
可选地,在节点级通信日志和线程级调度日志进行融合的过程中,将节点级通信日志和线程级调度日志的时间信息进行同步后,可以根据同步后的时间信息,将节点级通信日志和线程级调度日志的身份信息和日志内容按照时间先后顺序排列放入一份日志中,获得融合日志。Optionally, in the process of merging the node-level communication log and the thread-level scheduling log, after synchronizing the time information of the node-level communication log and the thread-level scheduling log, the node-level communication log can be merged according to the synchronized time information The identity information and log content of the thread-level scheduling log and the thread-level scheduling log are arranged in a chronological order and put into a log to obtain a fusion log.
可选地,在节点级通信日志和线程级调度日志进行融合的过程中,可以将节点级通信日志的身份信息和线程级调度日志的身份信息进行对齐,对齐的方式可以是通过查找节点级通信日志中的进程标识和线程级调度日志中的进程标识的对应关系,将节点级通信日志中的业务节点的名称和线程级调度日志中的线程号的名称进行对齐。Optionally, during the fusion process of node-level communication logs and thread-level scheduling logs, the identity information of node-level communication logs and the identity information of thread-level scheduling logs can be aligned, and the way of alignment can be by searching node-level communication The corresponding relationship between the process ID in the log and the process ID in the thread-level scheduling log is to align the name of the business node in the node-level communication log with the name of the thread number in the thread-level scheduling log.
在另一些实施例中,如果节点级通信日志和线程级调度日志的时间信息是统一的时间 戳(例如均为全局时间戳信息或者本地时间戳信息),则可以直接合并节点级通信日志和线程级调度日志得到融合日志,而无需先同步节点级通信日志的时间信息和线程级调度日志的时间信息。In some other embodiments, if the time information of the node-level communication log and the thread-level scheduling log is a unified timestamp (for example, both are global timestamp information or local timestamp information), then the node-level communication log and the thread-level scheduling log can be directly merged. The fusion log can be obtained from the scheduling log at the node level without first synchronizing the time information of the communication log at the node level and the scheduling log at the thread level.
对节点级通信日志和线程级调度日志进行融合后,获得的融合日志包括一条或多条融合日志条目,其中,每条融合日志条目包括时间信息、类型信息、身份信息和日志内容。每条融合日志条目的时间信息包括每条融合日志条目对应的节点级通信日志条目或线程级调度日志条目的时间信息,每条融合日志条目的类型信息用于指示每条融合日志条目对应的日志条目为节点级通信日志条目或线程级调度日志条目,每条融合日志条目的身份信息包括每条融合日志条目对应的日志条目的身份信息,每条融合日志条目的日志内容包括每条融合日志条目对应的日志条目的日志内容。After the node-level communication log and the thread-level scheduling log are fused, the obtained fused log includes one or more fused log entries, wherein each fused log entry includes time information, type information, identity information and log content. The time information of each fusion log entry includes the time information of the node-level communication log entry or thread-level scheduling log entry corresponding to each fusion log entry, and the type information of each fusion log entry is used to indicate the log corresponding to each fusion log entry The entries are node-level communication log entries or thread-level scheduling log entries, the identity information of each fusion log entry includes the identity information of the log entry corresponding to each fusion log entry, and the log content of each fusion log entry includes each fusion log entry The log content of the corresponding log entry.
例如,假设获得的节点级通信日志内容如下表1所示,获得的线程级调度日志内容如下表2所示。For example, assume that the content of the obtained node-level communication log is shown in Table 1 below, and the content of the obtained thread-level scheduling log is shown in Table 2 below.
表1节点级通信日志Table 1 Node-level communication logs
编号serial number 身份信息Identity Information 时间信息time information 日志内容log content
通信日志条目1Communication log entry 1 业务节点名称1,进程号1Business node name 1, process number 1 全局时间戳1global timestamp 1 通信数据1communication data 1
通信日志条目2Communication log entry 2 业务节点名称1,进程号1Business node name 1, process number 1 全局时间戳2global timestamp 2 通信数据2communication data 2
通信日志条目3Communication log entry 3 业务节点名称1,进程号1Business node name 1, process number 1 全局时间戳3Global Timestamp 3 通信数据3communication data 3
通信日志条目4Communication log entry 4 业务节点名称1,进程号1Business node name 1, process number 1 全局时间戳4Global Timestamp 4 通信数据4communication data 4
通信日志条目5Communication log entry 5 业务节点名称1,进程号2Business node name 1, process number 2 全局时间戳5Global Timestamp 5 通信数据5communication data 5
表2线程级调度日志Table 2 Thread-level scheduling logs
编号serial number 身份信息Identity Information 时间信息time information 日志内容log content
调度日志条目1dispatch log entry 1 进程号1,线程号3Process number 1, thread number 3 本地时间戳1local timestamp 1 调度数据1Scheduling Data 1
调度日志条目2dispatch log entry 2 进程号1,线程号3Process number 1, thread number 3 本地时间戳2local timestamp 2 调度数据2Scheduling Data 2
调度日志条目3dispatch log entry 3 进程号1,线程号4Process number 1, thread number 4 本地时间戳3local timestamp 3 调度数据3Scheduling data 3
调度日志条目4Dispatch log entry 4 进程号1,线程号3Process number 1, thread number 3 本地时间戳4local timestamp 4 调度数据4Scheduling Data 4
调度日志条目5Dispatch log entry 5 进程号1,线程号4Process number 1, thread number 4 本地时间戳5local timestamp 5 调度数据5Scheduling Data 5
调度日志条目6 Dispatch log entry 6 进程号1,线程号3Process number 1, thread number 3 本地时间戳6 local timestamp 6 调度数据6 Scheduling Data 6
调度日志条目7Dispatch log entry 7 进程号1,线程号3Process number 1, thread number 3 本地时间戳7local timestamp 7 调度数据7Scheduling Data 7
调度日志条目8 Dispatch log entry 8 进程号1,线程号4Process number 1, thread number 4 本地时间戳8 local time stamp 8 调度数据8 Scheduling data 8
调度日志条目9Dispatch log entry 9 进程号1,线程号3Process number 1, thread number 3 本地时间戳9local timestamp 9 调度数据9Scheduling Data 9
调度日志条目10 dispatch log entry 10 进程号1,线程号4Process number 1, thread number 4 本地时间戳10 local timestamp 10 调度数据10 Scheduling Data 10
调度日志条目11Dispatch log entry 11 进程号2,线程号5Process number 2, thread number 5 本地时间戳11local timestamp 11 调度数据11Scheduling Data 11
将节点级通信日志与线程级调度日志中的时间信息进行同步,例如可以将线程级调度日志中的本地时间戳转化为节点级通信日志中的全局时间戳,或者可以将节点级通信日志中的全局时间戳转化为线程级调度日志中的本地时间戳。将线程级调度日志中的本地时间戳转化为节点级通信日志中的全局时间戳后,如表2所示的线程级调度日志中的时间信息如下表3所示。Synchronize the time information in the node-level communication log with the thread-level scheduling log, for example, you can convert the local timestamp in the thread-level scheduling log into the global timestamp in the node-level communication log, or you can convert the time information in the node-level communication log Global timestamps are converted to local timestamps in thread-level scheduling logs. After converting the local timestamp in the thread-level scheduling log into the global timestamp in the node-level communication log, the time information in the thread-level scheduling log shown in Table 2 is shown in Table 3 below.
表3时间信息同步后的线程级调度日志Table 3 Thread-level scheduling log after time information synchronization
编号serial number 身份信息Identity Information 时间信息time information 日志内容log content
调度日志条目1dispatch log entry 1 进程号1,线程号3Process number 1, thread number 3 全局时间戳AGlobal Timestamp A 调度数据1Scheduling Data 1
调度日志条目2dispatch log entry 2 进程号1,线程号3Process number 1, thread number 3 全局时间戳BGlobal Timestamp B 调度数据2Scheduling Data 2
调度日志条目3dispatch log entry 3 进程号1,线程号4Process number 1, thread number 4 全局时间戳CGlobal Timestamp C 调度数据3Scheduling data 3
调度日志条目4Dispatch log entry 4 进程号1,线程号3Process number 1, thread number 3 全局时间戳DGlobal timestamp D 调度数据4Scheduling Data 4
调度日志条目5Dispatch log entry 5 进程号1,线程号4Process number 1, thread number 4 全局时间戳EGlobal Timestamp E 调度数据5Scheduling Data 5
调度日志条目6 Dispatch log entry 6 进程号1,线程号3Process number 1, thread number 3 全局时间戳FGlobal timestamp F 调度数据6Scheduling Data 6
调度日志条目7Dispatch log entry 7 进程号1,线程号3Process number 1, thread number 3 全局时间戳GGlobal timestamp G 调度数据7Scheduling Data 7
调度日志条目8 Dispatch log entry 8 进程号1,线程号4Process number 1, thread number 4 全局时间戳HGlobal timestamp H 调度数据8Scheduling data 8
调度日志条目9Dispatch log entry 9 进程号1,线程号3Process number 1, thread number 3 全局时间戳IGlobal Timestamp I 调度数据9Scheduling Data 9
调度日志条目10 dispatch log entry 10 进程号1,线程号4Process number 1, thread number 4 全局时间戳JGlobal Timestamp J 调度数据10Scheduling Data 10
调度日志条目11Dispatch log entry 11 进程号2,线程号5Process number 2, thread number 5 全局时间戳KGlobal timestamp K 调度数据11Scheduling Data 11
例如,对节点级通信日志中的时间信息与线程级调度日志中的时间信息按照从先到后的顺序排列后,获得的融合日志的内容如表4所示。For example, after the time information in the node-level communication log and the time information in the thread-level scheduling log are arranged in a first-to-back order, the content of the obtained fusion log is shown in Table 4.
表4融合日志Table 4 fusion log
Figure PCTCN2022120747-appb-000001
Figure PCTCN2022120747-appb-000001
例如,在对节点级通信日志和线程级调度日志进行融合时,可以使用其他顺序对节点 级通信日志条目和线程级调度日志条目进行排序,或者不进行排序,而是仅把节点级通信日志条目的内容和线程级调度日志条目的内容放置在同一融合日志中,例如表5所示。For example, when merging node-level communication logs and thread-level scheduling logs, other orders can be used to sort node-level communication log entries and thread-level scheduling log entries, or no sorting is performed, but only node-level communication log entries The content of and the content of thread-level scheduling log entries are placed in the same fusion log, as shown in Table 5 for example.
表5融合日志Table 5 fusion log
Figure PCTCN2022120747-appb-000002
Figure PCTCN2022120747-appb-000002
应理解,表1、表2、表3、表4和表5中对条目、身份信息、时间信息、日志内容等的编号命名仅是出于标识的目的,并不应理解为对本申请实施例的限制。It should be understood that the numbering and naming of entries, identity information, time information, log content, etc. in Table 1, Table 2, Table 3, Table 4, and Table 5 are only for identification purposes, and should not be interpreted as a reference to the embodiment of the present application. limits.
通过对节点级通信日志和线程级调度日志的融合,可以获得融合日志,融合日志中包括线程的运行信息和业务节点的通信信息,可以在后续处理中将线程的运行信息直接映射到业务节点的行为的信息,从而支持为业务节点的运行行为建立准确的运行行为模型。Through the fusion of node-level communication logs and thread-level scheduling logs, the fusion log can be obtained. The fusion log includes the running information of the thread and the communication information of the business node, and the running information of the thread can be directly mapped to the business node in the subsequent processing. Behavior information, so as to support the establishment of an accurate operating behavior model for the operating behavior of business nodes.
应理解,在上述实施例中可以通过步骤S301和步骤S302,对节点级通信日志和线程级调度日志进行融合,从而获得融合日志。在另一些实施例中,可以通过直接获取业务节点的调用事件和线程的调度信息,从而直接获得该融合日志。It should be understood that in the above embodiment, the node-level communication log and the thread-level scheduling log can be fused through steps S301 and S302, so as to obtain the fused log. In some other embodiments, the fusion log can be obtained directly by directly obtaining the calling event of the service node and the scheduling information of the thread.
S320,根据融合日志获得业务节点的N个行为的信息,N为大于或等于1的正整数。S320. Obtain information on N behaviors of service nodes according to the fusion log, where N is a positive integer greater than or equal to 1.
根据步骤S310获得的融合日志中包含业务节点的调用事件和业务节点包含的线程的调度信息,因此可以通过对融合日志中包含的信息进行处理,获得业务节点的N个行为的信息。其中,业务节点的每个行为的信息包括:每个行为中包含的线程的数量、每个行为 的运行时间、每个行为的运行时间的平均值和运行时间的概率、每个行为的执行时间、每个行为的执行时间的平均值和执行时间的概率、每个行为中每个线程的运行时间、执行时间、平均运行时间和平均执行时间、每个行为中的事件的名称、每个行为中的事件的时间点的平均值或事件的时间点的概率分布模型。每个行为中的事件包括每个行为中的接收事件、每个行为中的发送事件、每个行为中的回调开始事件和每个行为中的回调结束事件。每个行为中的事件的时间点包括事件的绝对时间点或事件的相对时间点。The fusion log obtained according to step S310 includes the call event of the service node and the scheduling information of the thread contained in the service node, so the information of N behaviors of the service node can be obtained by processing the information contained in the fusion log. Among them, the information of each behavior of the business node includes: the number of threads contained in each behavior, the running time of each behavior, the average running time of each behavior and the probability of running time, and the execution time of each behavior , the average and probability of the execution time of each behavior, the running time of each thread in each behavior, the execution time, the average running time and the average execution time, the name of the event in each behavior, the The mean of the time points of the events in or the probability distribution model of the time points of the events. Events in each behavior include receive events in each behavior, send events in each behavior, callback start events in each behavior, and callback end events in each behavior. The time point of the event in each behavior includes an absolute time point of the event or a relative time point of the event.
业务节点的行为由多个线程的时间记录聚合而成,例如表5中的融合日志条目6至融合日志条目11中的时间信息可以聚合为业务节点1的第一行为,表5中的融合日志条目12至融合日志条目15中的时间信息可以聚合为业务节点1的第二行为。因此业务节点的每个行为中包含一个或多个线程中每个线程的一个或多个时间记录。业务节点的行为中的事件是该行为包含的线程的时间记录对应的通信日志条目中记录的事件,线程的时间记录对应的通信日志条目是指该通信日志条目的时间信息在线程的时间记录的时间范围内。业务节点的行为中的事件的时间点可以是相对时间点,也可以是绝对时间点,本申请实施例对此不做具体限定。事件的相对时间点是根据至少一条通信日志条目记录的时间信息计算获得的时间点,事件的绝对时间点是记录该事件的通信日志条目中记录的时间信息。The behavior of a business node is aggregated by the time records of multiple threads. For example, the time information in fusion log entry 6 to fusion log entry 11 in Table 5 can be aggregated into the first behavior of business node 1, and the fusion log in Table 5 The time information in entry 12 to fusion log entry 15 may be aggregated into the second behavior of service node 1 . Therefore, each behavior of the service node includes one or more time records of each thread in one or more threads. The event in the behavior of the business node is the event recorded in the communication log entry corresponding to the time record of the thread included in the behavior. The communication log entry corresponding to the thread time record refers to the time information of the communication log entry recorded in the thread time time frame. The time point of the event in the behavior of the service node may be a relative time point or an absolute time point, which is not specifically limited in this embodiment of the present application. The relative time point of the event is the time point calculated according to the time information recorded in at least one communication log entry, and the absolute time point of the event is the time information recorded in the communication log entry that recorded the event.
还应理解的是,业务节点的第n个行为内的第m个线程的运行时间为:第n个行为中包含的属于第m个线程的时间片段的运行时间,即该时间片段中包含的最先开始的第一融合日志条目的时间信息和最后结束的第一融合日志条目的时间信息的差值。第一融合日志条目为融合日志中对应于调度信息的融合日志条目。业务节点的第n个行为内的第m个线程的执行时间为:第n个行为中包含的属于第m个线程的时间片段的执行时间,即该时间片段内所有实际执行时间的和,实际执行时间为两条时间相邻的、记录线程开始执行和线程结束执行的第一融合日志条目的时间信息的差值。n=1,......,N,m=1,......,M,N和M是大于或等于1的正整数。It should also be understood that the running time of the mth thread in the nth behavior of the business node is: the running time of the time segment belonging to the mth thread included in the nth behavior, that is, the running time of the time segment included in this time segment The difference between the time information of the first fusion log entry that started first and the time information of the first fusion log entry that ended last. The first fusion log entry is a fusion log entry corresponding to scheduling information in the fusion log. The execution time of the mth thread in the nth behavior of the business node is: the execution time of the time segment belonging to the mth thread included in the nth behavior, that is, the sum of all actual execution times in this time segment, the actual The execution time is the difference between the time information of the first merged log entry that records the execution of the thread and the execution of the thread that are adjacent to each other in time. n=1, . . . , N, m=1, . . . , M, N and M are positive integers greater than or equal to 1.
还应理解的是,业务节点的第n个行为的运行时间为:第n个行为包含的一个或多个时间片段中,最先开始的第一融合日志条目的时间信息和最后结束的第一融合日志条目的时间信息的差值。业务节点的第n个行为的执行时间为:第n个行为中包含的线程的执行时间的平均值,即第n个行为包含的线程的执行时间之和除以第n个行为包含的线程的数量。It should also be understood that the running time of the nth behavior of the service node is: in one or more time segments included in the nth behavior, the time information of the first fusion log entry that starts first and the first fusion log entry that ends last The delta of the time information of the fused log entries. The execution time of the nth behavior of the business node is: the average execution time of the threads included in the nth behavior, that is, the sum of the execution times of the threads included in the nth behavior divided by the time of the threads included in the nth behavior quantity.
还应理解的是,根据融合日志中的时间信息可以获得业务节点的一个或多个行为,并且在自动驾驶业务运行期间,业务节点的行为会多次重复运行,即业务节点的行为所包含的线程会重复运行多次。因此融合日志中包含业务节点的一个或多个行为中每个行为运行一次或多次的时间信息。根据每个行为所包含的线程的编号的集合可以判断多个行为是否为同一行为。由于同一行为重复运行时获得的线程的执行时间、运行时间、该行为的执行时间和运行时间均可能不一致。因此可以根据获得的该行为所包含的线程的多个执行时间和多个运行时间,计算该线程的平均执行时间和平均运行时间,即计算该线程的执行时间的平均值和运行时间的平均值。根据获得的该行为的多个运行时间和多个执行时间,计算该行为的运行时间的平均值、运行时间的概率、执行时间的平均值和执行时间的概率。该行为的运行时间的概率是该行为的每个运行时间数值在所有运行时间数值中出现的概率。该行为的执行时间的概率是该行为的每个执行时间数值在所有执行时间数值中出现的概率。It should also be understood that one or more behaviors of the service node can be obtained according to the time information in the fusion log, and during the operation of the autonomous driving service, the behavior of the service node will run repeatedly, that is, the behavior of the service node includes The thread will run repeatedly multiple times. Therefore, the fusion log contains the time information of each behavior of one or more behaviors of the service node running one or more times. Whether multiple behaviors are the same behavior can be judged according to the set of thread numbers included in each behavior. The execution time and running time of threads obtained when the same behavior is run repeatedly, the execution time and running time of the behavior may be inconsistent. Therefore, the average execution time and average running time of the thread can be calculated according to the obtained multiple execution times and multiple running times of the threads included in the behavior, that is, the average value of the execution time and the average running time of the thread can be calculated . According to the obtained multiple running times and multiple execution times of the behavior, the average running time, the probability of running time, the average execution time and the probability of execution time of the behavior are calculated. The probability of the behavior's runtime is the probability that each runtime value of the behavior occurs among all the runtime values. The execution time probability of the behavior is the probability that each execution time value of the behavior occurs in all execution time values.
可选地,根据融合日志获得业务节点的N个行为的信息的方式可以是:根据融合日志中的融合日志条目,确定至少一个时间片段;根据至少一个时间片段,确定N组融合日志条目集合;分别根据所述N组融合日志条目集合确定所述业务节点的N个行为的信息。根据融合日志获得业务节点的N个行为的信息的方式可以参见图11的描述。Optionally, the manner of obtaining information on the N behaviors of the service node according to the fusion log may be: according to the fusion log entries in the fusion log, determining at least one time segment; according to at least one time segment, determining N groups of fusion log entry sets; Determine N pieces of behavior information of the service node according to the N groups of fusion log entry sets respectively. Refer to the description in FIG. 11 for the manner of obtaining information on N behaviors of service nodes according to the fused logs.
通过对融合日志中对应于调度信息的融合日志条目和对应于调用事件的融合日志条目进行分析处理,可以获得业务节点的行为的信息、业务节点行为所包含的线程的运行时间等信息,便于后续对业务节点的信息和业务节点包含的线程的信息进行进一步处理,从而支持为业务节点的运行行为建立准确的运行行为模型。By analyzing and processing the fusion log entries corresponding to the scheduling information and the fusion log entries corresponding to the call events in the fusion log, information such as the behavior of the service node and the running time of the thread included in the behavior of the business node can be obtained, which is convenient for subsequent The information of the service node and the information of the thread included in the service node are further processed, so as to support the establishment of an accurate running behavior model for the running behavior of the business node.
S330,对业务节点的N个行为的信息进行分析,获得用于描述业务节点的运行行为的运行行为模型。S330, analyzing information on N behaviors of the service node to obtain an operation behavior model used to describe the operation behavior of the service node.
根据步骤S320获得的业务节点的N个行为的信息,可以获得业务节点的N个运行行为的运行行为模型。换句话说,可以根据每个行为的信息,确定每个行为的运行行为模型。假设第一行为是该N个行为中的任一个行为。那么,第一行为的运行行为模型可以包括以下中的任一个:触发第一行为的每个行为对应的接收事件的消息通道,第一行为的至少一个时间触发周期,或第一行为的时间概率模型。若第一行为的运行行为模型包括触发第一行为的每个行为对应的接收事件的消息通道,那么第一行为的运行行为模型还可以包括第一行为的触发关系。According to the information on the N behaviors of the service node obtained in step S320, an operation behavior model of the N operation behaviors of the service node can be obtained. In other words, the running behavior model of each behavior can be determined based on the information of each behavior. Assume that the first behavior is any one of the N behaviors. Then, the running behavior model of the first behavior may include any of the following: the message channel for receiving events corresponding to each behavior that triggers the first behavior, at least one time trigger period of the first behavior, or the time probability of the first behavior Model. If the running behavior model of the first behavior includes a message channel for receiving events corresponding to each behavior that triggers the first behavior, then the running behavior model of the first behavior may also include a trigger relationship of the first behavior.
在一些实施例中,第一行为的运行行为模型还可以进一步包括以下内容中的任一个或多个:业务节点的依赖关系、第一行为包含的至少一个线程的运行时间、第一行为包含的至少一个线程的触发关系、或者,第一行为包含的至少一个线程的运行周期。In some embodiments, the running behavior model of the first behavior may further include any one or more of the following: dependencies of service nodes, running time of at least one thread included in the first behavior, The trigger relationship of at least one thread, or the running period of at least one thread included in the first behavior.
由于自动驾驶业务的部分业务节点使用定时器以固定频率运行,只用融合日志中的接收事件和发送事件分析业务节点的行为的触发方式并不全面,因此需要根据自动驾驶业务的业务节点的行为的信息,确定业务节点的行为的触发方式,获得业务节点的行为的行为触发记录。同时由于业务节点间存在多收多发的情形,导致难以通过简单的分析得到业务节点的触发关系,因此需要根据业务节点的行为的信息,获得该业务节点的触发关系。多收多发指的是一个业务节点可以接收到多个其他业务节点发送的消息,也可以向多个其他业务节点发送消息。其他业务节点指的是除该业务节点外的其他业务节点。Since some service nodes of the autonomous driving service use timers to run at a fixed frequency, it is not comprehensive to analyze the triggering method of the behavior of the service nodes only by merging the receiving events and sending events in the log. information, determine the trigger mode of the behavior of the business node, and obtain the behavior trigger record of the behavior of the business node. At the same time, it is difficult to obtain the trigger relationship of the service node through simple analysis due to the situation of multiple receiving and multiple sending among the service nodes. Therefore, it is necessary to obtain the trigger relationship of the service node according to the behavior information of the service node. Multi-receiving and multi-sending means that a service node can receive messages sent by multiple other service nodes, and can also send messages to multiple other service nodes. Other service nodes refer to other service nodes except the service node.
可选地,可以根据第一行为的信息和与业务节点存在收发关系的业务节点的行为的信息,通过关联规则挖掘算法获得第一行为的触发关系,确定第一行为存在事件触发,并获得触发第一行为的每个行为对应的接收事件的消息通道。Optionally, according to the information of the first behavior and the behavior information of the service node that has a transceiving relationship with the service node, the trigger relationship of the first behavior can be obtained through an association rule mining algorithm, and it is determined that there is an event trigger in the first behavior, and the trigger relationship can be obtained. Each behavior of the first behavior corresponds to the message channel that receives the event.
应理解的是,触发第一行为的行为可以是一个或多个触发第一行为运行的行为。一个触发第一行为的行为对应一个第一行为的接收事件的消息通道。每个触发第一行为的行为对应的第一行为的接收事件的消息通道可以是相同的,也可以是不同的。与业务节点存在收发关系的业务节点包括:向业务节点发送消息的业务节点,或接收业务节点发送的消息的业务节点中的一个或多个。It should be understood that the behavior that triggers the first behavior may be one or more behaviors that trigger the execution of the first behavior. A behavior that triggers the first behavior corresponds to a message channel that the first behavior receives events. The event-receiving message channels of the first behavior corresponding to each behavior that triggers the first behavior may be the same or different. The service nodes that have a sending and receiving relationship with the service nodes include: one or more of the service nodes that send messages to the service nodes, or the service nodes that receive the messages sent by the service nodes.
应理解的是,触发第一行为的行为可以是该业务节点的行为,也可以是除该业务节点外其他业务节点的行为,本申请实施例对此不做具体限定。It should be understood that the behavior that triggers the first behavior may be the behavior of the service node, or the behavior of other service nodes except the service node, which is not specifically limited in this embodiment of the present application.
可选地,通过关联规则挖掘算法可以获得业务节点的N个行为的触发关系,并且可以确定一个或多个触发第一行为的行为。根据一个或多个触发第一行为的行为可以获得第一行为的行为触发记录。即第一行为存在事件触发,且第一行为的行为触发记录包括业务节 点的名称和触发第一行为的每个行为对应的接收事件的消息通道。例如,若触发业务节点1的第一行为的行为包括行为A、行为B和行为C,则第一行为存在事件触发,且第一行为的行为触发记录包括:业务节点1的名称、第一行为中接收行为A发送的消息的消息通道、第一行为中接收行为B发送的消息的消息通道、以及第一行为中接收行为C发送的消息的消息通道。Optionally, the trigger relationship of the N behaviors of the service node can be obtained through an association rule mining algorithm, and one or more behaviors that trigger the first behavior can be determined. The behavior trigger record of the first behavior can be obtained according to one or more behaviors that trigger the first behavior. That is, there is an event trigger for the first behavior, and the behavior trigger record of the first behavior includes the name of the business node and the message channel that receives the event corresponding to each behavior that triggers the first behavior. For example, if the behavior that triggers the first behavior of service node 1 includes behavior A, behavior B, and behavior C, then there is an event trigger for the first behavior, and the behavior trigger record of the first behavior includes: the name of business node 1, the first behavior The message channel that receives the message sent by behavior A in the middle, the message channel that receives the message sent by behavior B in the first behavior, and the message channel that receives the message sent by behavior C in the first behavior.
可选地,可以通过以下方法获得第一行为的触发关系或第一行为包含的M个线程的触发关系:可以将在同一时间窗口内的业务节点和与该业务节点存在收发关系的业务节点的行为合并,建立待分析节点数据集。该待分析节点行为数据集可以表示为{{含接收事件的行为},{含发送事件的行为},{窗口内的其他行为}}。{含接收事件的行为}表示的是同一时间窗口内含有接收事件的行为的数据集,该含有接收事件的行为包括:业务节点的含有接收事件的行为中的一个或多个。{含发送事件的行为}表示的是同一时间窗口内含有发送事件的行为的数据集,该含有发送事件的行为包括:业务节点的含有发送事件的行为、或者向该业务节点发送消息的业务节点的含有发送事件的行为中的一个或多个。{窗口内的其他行为}表示的是同一时间窗口内的其他行为的数据集,该其他行为包括:业务节点的含有回调开始事件的行为,或者业务节点的含有回调结束事件的行为中的一个或多个。由于业务节点的N个行为中的每个行为均由一个或多个线程组成,因此该待分析节点行为数据集中包含的是在同一时间窗口内的含接收事件的行为、含发送事件的行为和业务节点的其他行为中每个行为的一个或多个线程,业务节点的其他行为可以是包含回调开始事件的行为或包含回调结束事件的行为;对该待分析节点行为数据集进行独热(one-hot)编码;调用关联规则(apriori)算法找出该待分析节点行为数据集中的频繁项集,作为第一行为包含的M个线程的触发关系或第一行为的触发关系。Optionally, the triggering relationship of the first behavior or the triggering relationship of the M threads contained in the first behavior can be obtained by the following method: the business node in the same time window and the business node that has a sending and receiving relationship with the business node can be Behaviors are merged to establish a data set of nodes to be analyzed. The node behavior data set to be analyzed can be expressed as {{behavior including receiving events}, {behavior including sending events}, {other behaviors in the window}}. {Behaviors Including Receiving Events} means a data set containing events receiving events in the same time window, and the events containing receiving events include: one or more of the behaviors including receiving events of the service node. {behaviors with sending events} means the data set that contains the behaviors of sending events in the same time window. The behaviors that include sending events include: the behavior of business nodes that contain sending events, or the business nodes that send messages to this business node One or more of the behaviors that contain sending events. {Other behaviors in the window} means the data set of other behaviors in the same time window, the other behaviors include: the behavior of the business node containing the callback start event, or one of the behaviors of the business node containing the callback end event or Multiple. Since each of the N behaviors of the business node is composed of one or more threads, the behavior data set of the node to be analyzed contains the behaviors including receiving events, sending events and One or more threads of each behavior in the other behaviors of the business node, the other behaviors of the business node can be the behavior that contains the callback start event or the behavior that contains the callback end event; the one-hot (one -hot) coding; calling the association rule (apriori) algorithm to find out the frequent itemsets in the behavior data set of the node to be analyzed, as the trigger relationship of the M threads contained in the first behavior or the trigger relationship of the first behavior.
可选地,将上述待分析节点行为数据集中置信度大于阈值的、该业务节点的含有接收事件的第一行为中接收事件对应的行为视为第一行为的必要触发行为。在业务节点的第一行为的必要触发行为中,若第一行为仅运行一次,则根据融合日志中包含的第一行为运行一次的时间信息,将第一行为中回调开始事件的时间前最接近的行为视为关键触发行为。在业务节点的第一行为的必要触发行为中,若第一行为会多次重复运行,则融合日志中存在第一行为多次运行的时间信息。根据融合日志中包含的第一行为多次运行的时间信息,将第一行为中回调开始事件的时间前总是最接近的行为视为关键触发行为,即将在融合日志中第一行为多次运行的时间信息中、在该回调开始事件的时间前均可以至少找到一次的行为视为关键触发行为。Optionally, the behavior corresponding to the receiving event among the first behaviors of the service node including the receiving event whose confidence degree is greater than the threshold in the above-mentioned node behavior data set to be analyzed is regarded as a necessary triggering behavior of the first behavior. In the necessary triggering behavior of the first behavior of the business node, if the first behavior only runs once, then according to the time information of the first behavior contained in the fusion log, the time before the callback start event in the first behavior is closest to Behaviors are considered key triggering behaviors. In the necessary triggering behavior of the first behavior of the service node, if the first behavior will run repeatedly, the time information of the first behavior running multiple times exists in the fusion log. According to the time information of multiple runs of the first behavior contained in the fusion log, the behavior that is always closest to the time of the callback start event in the first behavior is regarded as the key trigger behavior, that is, the first behavior in the fusion log runs multiple times In the time information of , the behavior that can be found at least once before the time of the callback start event is regarded as the key trigger behavior.
应理解的是,可以将在同一时间窗口内的业务节点的一个行为和与该业务节点的该行为存在收发关系的业务节点的行为合并,建立待分析节点数据集,获得业务节点的一个行为的触发关系。还可以将在同一时间窗口内的业务节点的多个行为和与该业务节点的多个行为存在收发关系的业务节点的行为合并,建立待分析节点数据集,获得业务节点的多个行为的触发关系。与该业务节点的该行为存在收发关系的业务节点的行为可以是一个或多个与该业务节点的该行为存在收发关系的业务节点中每个业务节点的一个或多个行为。It should be understood that a behavior of a business node within the same time window can be combined with a behavior of a business node that has a sending and receiving relationship with the behavior of the business node, and a data set of nodes to be analyzed can be established to obtain the behavior of a business node. trigger relationship. It is also possible to combine multiple behaviors of business nodes within the same time window with behaviors of business nodes that have a sending and receiving relationship with multiple behaviors of the business node, establish a data set of nodes to be analyzed, and obtain triggers of multiple behaviors of business nodes relation. The behavior of the service node that has a transceiving relationship with the behavior of the service node may be one or more behaviors of each of the one or more service nodes that have a transceiving relationship with the behavior of the service node.
还应理解的是,若根据业务节点的第一行为的信息和与业务节点存在收发关系的业务节点的行为的信息,通过关联规则挖掘算法可以获得该业务节点行为数据集中的频繁项集,即获得业务节点的第一行为的触发关系,则该第一行为存在事件触发。若通过关联规则挖掘算法不能获得该业务节点行为数据集中的频繁项集,即不能获得业务节点的第一行为的 触发关系,则该第一行为不存在事件触发。It should also be understood that, according to the information of the first behavior of the business node and the behavior information of the business node that has a transceiving relationship with the business node, the frequent itemsets in the business node behavior data set can be obtained through the association rule mining algorithm, that is, If the trigger relationship of the first behavior of the service node is obtained, then the first behavior has an event trigger. If the frequent item set in the behavior data set of the business node cannot be obtained through the association rule mining algorithm, that is, the trigger relationship of the first behavior of the business node cannot be obtained, then there is no event trigger for the first behavior.
还应理解的是,当第一行为存在事件触发时,可以通过上述方法获得第一行为包含的M个线程中第m个线程的触发关系。当第一行为不存在事件触发时,仍可以通过上述方法获得第一行为包含的M个线程中第m个线程的触发关系。其中,m=1,......,M,M为大于或等于1的正整数。It should also be understood that when there is an event trigger in the first behavior, the trigger relationship of the m-th thread among the M threads included in the first behavior can be obtained through the above method. When there is no event trigger in the first behavior, the trigger relationship of the m-th thread among the M threads included in the first behavior can still be obtained through the above method. Wherein, m=1, . . . , M, M is a positive integer greater than or equal to 1.
还应理解的是,必要触发行为是触发该业务节点执行下一行为的必要条件。如图7所示,图7中融合节点N5接收传感节点N2和前处理节点N3发送的消息。若节点N2发送消息的行为和节点N3发送消息的行为均为节点N5的必要触发行为,则在N5执行完一次行为后,在下一时间段内,N5接收到至少一次N2和N3发送的消息,就会触发N5执行下一次行为。换句话说即使N5接收到多次N2发送的消息,若N5一直未接收到N3发送的消息,则一直不会触发N5执行下一次行为,直到N5接收到N3发送的消息,则触发N5执行下一次行为。反之亦然,即N5接收到多次N3发送的消息,若N5一直未接收到N2发送的消息,则一直不会触发N5执行下一次行为,直到N5接收到N2发送的消息,则触发N5执行下一次行为。It should also be understood that the necessary triggering behavior is a necessary condition for triggering the service node to execute the next behavior. As shown in FIG. 7 , the fusion node N5 in FIG. 7 receives messages sent by the sensor node N2 and the pre-processing node N3 . If the behavior of node N2 sending a message and the behavior of node N3 sending a message are both necessary triggering behaviors of node N5, then after N5 executes a behavior, in the next time period, N5 receives at least one message sent by N2 and N3, It will trigger N5 to execute the next behavior. In other words, even if N5 has received multiple messages sent by N2, if N5 has not received the message sent by N3, it will not trigger N5 to execute the next action until N5 receives the message sent by N3, then trigger N5 to execute the next action. one act. Vice versa, that is, N5 has received multiple messages sent by N3. If N5 has not received the message sent by N2, it will not trigger N5 to execute the next action until N5 receives the message sent by N2, then trigger N5 to execute next behavior.
还应理解的是,关键触发行为是触发该业务节点执行下一行为的关键条件,但是若该业务节点同时存在多个必要触发行为,则在满足执行完全部必要触发行为的前提下,触发该业务节点执行下一行为。如图7所示,若N2发送消息的行为为关键触发行为,N3发送消息的行为不是必要触发行为,则在N5执行完一次行为后,在下一时间段内,N5即使接收到多次N3发送的消息,若N5一直未接收到N2发送的消息,则一直不会触发N5执行下一次行为,直到N5在接收到一次N2发送的消息后,就会触发N5执行下一次行为。It should also be understood that the key triggering behavior is the key condition for triggering the next behavior of the service node, but if the business node has multiple necessary triggering behaviors at the same time, the triggering of the The service node executes the next behavior. As shown in Figure 7, if the behavior of N2 sending a message is a key triggering behavior, and the behavior of N3 sending a message is not a necessary triggering behavior, then after N5 executes one behavior, in the next time period, even if N5 receives multiple N3 sending If N5 has not received the message sent by N2, it will not trigger N5 to execute the next action until N5 receives a message sent by N2, it will trigger N5 to execute the next action.
若N2发送消息的行为为关键触发行为,N3发送消息的行为为必要触发行为,则在N5执行完一次行为后,在下一时间段内,N5接收到至少一次N2和N3发送的消息,就会触发N5执行下一次行为。换句话说即使N5接收到多次N2发送的消息,若N5一直未接收到N3发送的消息,则一直不会触发N5执行下一次行为,直到N5接收到N3发送的消息,则触发N5执行下一次行为。反之亦然,即N5接收到多次N3发送的消息,若N5一直未接收到N2发送的消息,则一直不会触发N5执行下一次行为,直到N5接收到N2发送的消息,则触发N5执行下一次行为。If the behavior of N2 sending a message is a key triggering behavior, and the behavior of N3 sending a message is a necessary triggering behavior, then after N5 executes one behavior, in the next time period, N5 receives at least one message sent by N2 and N3, and it will Trigger N5 to execute the next action. In other words, even if N5 has received multiple messages sent by N2, if N5 has not received the message sent by N3, it will not trigger N5 to execute the next action until N5 receives the message sent by N3, then trigger N5 to execute the next action. one act. Vice versa, that is, N5 has received multiple messages sent by N3. If N5 has not received the message sent by N2, it will not trigger N5 to execute the next action until N5 receives the message sent by N2, then trigger N5 to execute next behavior.
可选地,可以通过其他关联规则挖掘算法获得待分析节点数据集中的频繁项集,例如频繁项集发现算法(frequent pattern-growth,FP-Growth)算法、多阶段算法、多哈希算法等。Optionally, frequent itemsets in the node data set to be analyzed can be obtained through other association rule mining algorithms, such as frequent item set discovery algorithm (frequent pattern-growth, FP-Growth) algorithm, multi-stage algorithm, multi-hashing algorithm, etc.
可选地,将N个行为中第一行为对应的一个或多个第一融合日志条目集合中包含的每条第一融合日志条目的时间信息转换为频域数据,即将第一行为在融合日志中的时间信息转换为频域数据,确定频域数据中是否存在一个或多个超出频域数据的平均值的频率值。若是,则确定第一行为存在时间触发,并根据一个或多个超出第一行为的频域数据的平均值的频率值,确定第一行为的至少一个时间触发周期。每个第一融合日志条目集合中包含一条或多条第一融合日志条目。Optionally, the time information of each first fusion log entry contained in one or more first fusion log entry sets corresponding to the first behavior among the N behaviors is converted into frequency domain data, that is, the first behavior is included in the fusion log The time information in is converted to frequency domain data, and it is determined whether there are one or more frequency values exceeding the average value of the frequency domain data in the frequency domain data. If so, determine that there is a time trigger in the first behavior, and determine at least one time trigger period of the first behavior according to one or more frequency values exceeding the average value of the frequency domain data of the first behavior. Each first fusion log entry set includes one or more first fusion log entries.
可选地,根据第一行为的至少一个时间触发周期,可以获得第一行为的行为触发记录。当第一行为存在时间触发时,第一行为的行为触发记录包括:业务节点的名称和第一行为的至少一个时间触发周期。Optionally, according to at least one time-triggered period of the first behavior, a behavior-triggered record of the first behavior may be obtained. When the first behavior has a time trigger, the behavior trigger record of the first behavior includes: the name of the service node and at least one time trigger period of the first behavior.
应理解的是,若N个行为中第一行为会重复运行多次,则将第一行为在融合日志中的 所有时间信息转换为频域数据,从而判断第一行为是否存在时间触发。若第一行为仅运行一次,则将第一行为在融合日志中的一次时间信息转换为频域数据,从而判断第一行为是否存在时间触发。It should be understood that, if the first behavior among the N behaviors will be repeated multiple times, all the time information of the first behavior in the fusion log will be converted into frequency domain data, so as to determine whether there is a time trigger in the first behavior. If the first behavior is only run once, the time information of the first behavior in the fusion log is converted into frequency domain data, so as to determine whether the first behavior has a time trigger.
还应理解的是,获得触发第一行为的每个行为对应的接收事件的消息通道的步骤可以在确定第一行为的至少一个时间触发周期的步骤之前进行,也可以在确定第一行为的至少一个时间触发周期的步骤之后进行,本申请实施例对此不做具体限定。It should also be understood that the step of obtaining the message channel for receiving the event corresponding to each behavior that triggers the first behavior may be performed before the step of determining at least one time trigger period of the first behavior, or after determining at least one time trigger period of the first behavior. The steps of a time-triggered period are performed afterward, which is not specifically limited in this embodiment of the present application.
本申请实施例对如何将时域数据转换为频域数据的实现方式并不限定。例如,可以使用傅里叶变换或快速傅里叶变换方法将第一行为在融合日志中的时间信息转换为频域数据。The embodiment of the present application does not limit the implementation manner of how to convert time domain data into frequency domain data. For example, the time information in the first row in the fused log can be converted into frequency domain data using Fourier transform or fast Fourier transform methods.
若第一行为的频域数据中存在一个超出第一行为的频域数据的平均值的频率值,则第一行为存在单周期的时间触发,且第一行为的时间触发周期为该频率值对应的时间周期;若第一行为的频域数据中存在多个超出第一行为的频域数据的平均值的频率值,则第一行为存在多周期的时间触发,且多个超出第一行为的频域数据的平均值的频率值对应的时间周期均为第一行为的时间触发周期。If there is a frequency value exceeding the average value of the frequency domain data of the first behavior in the frequency domain data of the first behavior, then there is a single-cycle time trigger in the first behavior, and the time trigger period of the first behavior is corresponding to the frequency value time period; if there are multiple frequency values exceeding the average value of the frequency domain data of the first behavior in the frequency domain data of the first behavior, then the first behavior has multi-period time triggers, and multiple frequency values exceeding the first behavior The time period corresponding to the frequency value of the average value of the frequency domain data is the time trigger period of the first behavior.
例如,将业务节点的一个行为在融合日志中的时间信息转换为频域数据获得的部分波形图如图5所示。For example, a partial waveform diagram obtained by converting the time information of a behavior of a service node in the fusion log into frequency domain data is shown in FIG. 5 .
图5是根据本申请一个实施例的行为在融合日志中的时间信息转换为频域数据的波形示意图。图5为业务节点的一个行为在融合日志中的时间信息转换的部分频域数据。图5中存在两个超出该行为的频域数据的平均值的频率值,因此该行为存在多周期的时间触发,且时间触发周期为多个超出该行为的频域数据的平均值的频率值对应的时间周期,即如图5所示的波峰对应的横坐标20和60均为该行为的时间触发周期。Fig. 5 is a schematic waveform diagram of converting the time information of behavior in the fusion log into frequency domain data according to an embodiment of the present application. Fig. 5 is part of the frequency domain data converted from the time information of a behavior of a service node in the fusion log. In Figure 5, there are two frequency values that exceed the average value of the frequency domain data of this behavior, so there is a multi-period time trigger for this behavior, and the time trigger period is multiple frequency values that exceed the average value of the frequency domain data of this behavior The corresponding time periods, that is, the abscissas 20 and 60 corresponding to the peaks shown in FIG. 5 are time trigger periods for this behavior.
可选地,若通过上述方法可以找到业务节点的第一行为的频繁项集,且通过上述方法将第一行为在融合日志中的时间信息转换为频域数据后,该频域数据中存在一个或多个超出第一行为的频域数据的平均值的频率值(即频域数据的波形图中存在一个或多个波峰),则根据以下情况确定业务节点的第一行为的触发方式:Optionally, if the frequent itemsets of the first behavior of the service node can be found through the above method, and after the time information of the first behavior in the fusion log is converted into frequency domain data through the above method, there is a or a plurality of frequency values exceeding the average value of the frequency domain data of the first behavior (that is, there are one or more peaks in the waveform diagram of the frequency domain data), the trigger mode of the first behavior of the service node is determined according to the following conditions:
(1)若第一行为仅有一个必要触发行为,则将第一行为的必要触发行为在融合日志中的时间信息转换为频域数据。若第一行为的必要触发行为的频域数据中也存在一个或多个超出第一行为的必要触发行为的频域数据的平均值的频率值(即频域数据的波形图中存在一个或多个波峰),且第一行为和第一行为的必要触发行为的频域数据中的波峰的数目和波峰对应的时间周期的值完全一致,则第一行为存在事件触发。当第一行为存在事件触发时,第一行为的行为触发记录包括:该业务节点的名称、第一行为中接收第一行为的必要触发行为发送的消息的事件的消息通道。(1) If the first behavior has only one necessary trigger behavior, the time information of the necessary trigger behavior of the first behavior in the fusion log is converted into frequency domain data. If there are one or more frequency values exceeding the average value of the frequency domain data of the necessary trigger behavior of the first behavior in the frequency domain data of the necessary trigger behavior of the first behavior (that is, there are one or more frequency values in the waveform diagram of the frequency domain data peaks), and the number of peaks in the frequency domain data of the first behavior and the necessary trigger behavior of the first behavior is exactly the same as the value of the time period corresponding to the peak, then there is an event trigger in the first behavior. When the first behavior has an event trigger, the behavior trigger record of the first behavior includes: the name of the service node, and the event message channel of the first behavior that receives the message sent by the necessary trigger behavior of the first behavior.
若第一行为和第一行为的必要触发行为的频域数据中的波峰的数目和波峰对应的时间周期的值中存在至少一项不一致,则第一行为存在其他触发。If there is at least one discrepancy between the number of peaks in the frequency domain data of the first behavior and the necessary trigger behavior of the first behavior and the value of the time period corresponding to the peak, then there is another trigger in the first behavior.
(2)若第一行为有多个必要触发行为,且多个必要触发行为中仅有一个关键触发行为,则将第一行为的关键触发行为在融合日志中的时间信息转换为频域数据。若第一行为的关键触发行为的频域数据中也存在一个或多个超出第一行为的关键触发行为的频域数据的平均值的频率值(即频域数据的波形图中存在一个或多个波峰),且第一行为和第一行为的关键触发行为的频域数据中的波峰的数目和波峰对应的时间周期的值完全一致,则第一行为存在事件触发。当第一行为存在事件触发时,第一行为的行为触发记录包括:该 业务节点的名称、第一行为中接收第一行为的关键触发行为发送的消息的事件的消息通道。(2) If the first behavior has multiple necessary triggering behaviors, and there is only one key triggering behavior among the multiple necessary triggering behaviors, convert the time information of the key triggering behavior of the first behavior in the fusion log into frequency domain data. If there are one or more frequency values exceeding the average value of the frequency domain data of the key trigger behavior of the first behavior in the frequency domain data of the key trigger behavior of the first behavior (that is, there are one or more frequency values in the waveform diagram of the frequency domain data peaks), and the number of peaks in the frequency domain data of the first behavior and the key trigger behavior of the first behavior is exactly the same as the value of the time period corresponding to the peak, then there is an event trigger in the first behavior. When there is an event trigger for the first behavior, the behavior trigger record of the first behavior includes: the name of the business node, and the message channel of the first behavior that receives the message sent by the key trigger behavior of the first behavior.
若第一行为和第一行为的关键触发行为的频域数据中的波峰的数目和波峰对应的时间周期的值中存在至少一项不一致,则第一行为存在其他触发。If there is at least one discrepancy between the number of peaks in the frequency domain data of the first behavior and the key trigger behavior of the first behavior and the value of the time period corresponding to the peak, then there is another trigger in the first behavior.
(3)若可以找到业务节点的第一行为的频繁项集,也可以找到第一行为在融合日志中的时间信息转换的频域数据中的一个或多个超出第一行为的频域数据的平均值的频率值(即频域数据的波形图中的一个或多个波峰),且不满足上述(1)、(2)情况,则第一行为存在其他触发。(3) If the frequent itemset of the first behavior of the service node can be found, one or more frequency domain data beyond the first behavior of the first behavior in the frequency domain data converted from the time information in the fusion log can also be found The frequency value of the average value (that is, one or more peaks in the waveform diagram of the frequency domain data), and the above conditions (1) and (2) are not satisfied, then there are other triggers in the first behavior.
可选地,若通过上述方法可以找到业务节点的第一行为的频繁项集,但通过上述方法将第一行为在融合日志中的时间信息转换为频域数据后,该频域数据中不存在一个或多个超出第一行为的频域数据的平均值的频率值,则第一行为存在事件触发。当第一行为存在事件触发时,第一行为的行为触发记录包括:业务节点的名称和触发第一行为的每个行为对应的接收事件的消息通道。Optionally, if the frequent itemsets of the first behavior of the service node can be found through the above method, but after the time information of the first behavior in the fusion log is converted into frequency domain data through the above method, the frequency domain data does not exist If one or more frequency values exceed the average value of the frequency domain data of the first row, then there is an event trigger for the first row. When there is an event trigger for the first behavior, the behavior trigger record of the first behavior includes: the name of the service node and the message channel that receives the event corresponding to each behavior that triggers the first behavior.
可选地,若通过上述方法不能找到业务节点的第一行为的频繁项集,但通过上述方法将第一行为在融合日志中的时间信息转换为频域数据后,该频域数据中存在一个或多个超出第一行为的频域数据的平均值的频率值,则第一行为存在时间触发。当第一行为存在时间触发时,第一行为的行为触发记录包括:业务节点的名称和第一行为的一个或多个时间触发周期。Optionally, if the frequent itemset of the first behavior of the service node cannot be found through the above method, but after the time information of the first behavior in the fusion log is converted into frequency domain data through the above method, there is a or multiple frequency values exceeding the average value of the frequency domain data of the first behavior, then the first behavior has a time trigger. When the first behavior has a time trigger, the behavior trigger record of the first behavior includes: the name of the service node and one or more time trigger periods of the first behavior.
可选地,若通过上述方法不能找到业务节点的第一行为的频繁项集,且通过上述方法将第一行为在融合日志中的时间信息转换为频域数据后,该频域数据中不存在一个或多个超出第一行为的频域数据的平均值的频率值,则第一行为存在其他触发。Optionally, if the frequent itemset of the first behavior of the service node cannot be found through the above method, and after the time information of the first behavior in the fusion log is converted into frequency domain data through the above method, the frequency domain data does not exist One or more frequency values that exceed the average value of the frequency domain data of the first row, then there are other triggers for the first row.
可选地,当第一行为存在其他触发且仅运行一次时,根据第一行为对应的一个第一融合日志条目集合中包含的至少一条第一融合日志条目的时间信息,即根据第一行为在融合日志中的时间信息,获得第一行为的行为触发记录。当第一行为存在其他触发且仅运行一次时,第一行为的行为触发记录为:业务节点的名称和一个或多个第一行为运行的时间信息。该时间信息可以是绝对时间信息,也可以是相对时间信息,本申请实施例对此不做具体限定。Optionally, when the first behavior has other triggers and only runs once, according to the time information of at least one first fusion log entry contained in a first fusion log entry set corresponding to the first behavior, that is, according to the first behavior in The time information in the log is fused to obtain the behavior trigger record of the first behavior. When the first behavior has other triggers and only runs once, the behavior trigger record of the first behavior is: the name of the service node and the time information of one or more first behaviors running. The time information may be absolute time information or relative time information, which is not specifically limited in this embodiment of the present application.
可选地,当第一行为存在其他触发且会多次重复运行时,根据第一行为对应的多个第一融合日志条目集合中包含的至少两条第一融合日志条目的时间信息,即根据第一行为在融合日志中的时间信息,获得第一行为运行的时间间隔。根据第一行为运行的时间间隔,获得第一行为运行的时间概率模型和第一行为的行为触发记录。当第一行为存在其他触发且会多次重复运行时,第一行为的行为触发记录可以为:业务节点的名称和第一行为运行的时间概率模型。Optionally, when the first behavior has other triggers and will be repeated multiple times, according to the time information of at least two first fusion log entries included in the plurality of first fusion log entry sets corresponding to the first behavior, that is, according to The time information of the first behavior in the fusion log is obtained to obtain the running time interval of the first behavior. According to the running time interval of the first behavior, the time probability model of the running of the first behavior and the behavior trigger record of the first behavior are obtained. When the first behavior has other triggers and will run repeatedly, the behavior trigger record of the first behavior can be: the name of the business node and the time probability model of the first behavior running.
应理解的是,第一行为运行的时间概率模型用于描述第一行为运行的时间间隔的概率分布。第一行为运行的时间间隔的概率分布指的是第一行为第i次运行与第i+1次运行的时间间隔的值的概率分布,其中,i=1,......,I,I为大于或等于1的正整数。It should be understood that the time probability model of the running of the first behavior is used to describe the probability distribution of the time interval of the running of the first behavior. The probability distribution of the time interval of the operation of the first line refers to the probability distribution of the value of the time interval between the i-th operation and the i+1-th operation of the first line, wherein, i=1,...,I , I is a positive integer greater than or equal to 1.
还应理解的是,第一行为运行的时间间隔可以是在融合日志中第i次第一行为运行开始的时间和第i+1次第一行为运行开始的时间的间隔,也可以是第i次第一行为运行结束的时间和第i+1次第一行为运行结束的时间的间隔,或者可以是第i次第一行为运行过程中的时间和第i+1次第一行为运行过程中的时间的间隔,本申请实施例对此不做具体限定。It should also be understood that the time interval for running the first behavior may be the interval between the start time of the i-th first behavior running and the i+1th time the first behavior running starts in the fusion log, or it may be the i-th The interval between the time when the first behavior of the first behavior ends and the time when the first behavior of the i+1th time ends, or it can be the time during the running of the first behavior of the ith time and the time during the running of the first behavior of the i+1th time The interval of time is not specifically limited in this embodiment of the present application.
可选地,当第一行为存在其他触发且会多次重复运行时,根据第一行为对应的多个第 一融合日志条目集合中包含的至少两条第一融合日志条目的时间信息,即根据第一行为在融合日志中的时间信息,获得第一行为运行的时间间隔和时间间隔的平均值。根据第一行为运行的时间间隔的平均值,获得第一行为的行为触发记录。当第一行为存在其他触发且会多次重复运行时,第一行为的行为触发记录可以为:业务节点的名称和第一行为运行的时间间隔的平均值。Optionally, when the first behavior has other triggers and will be repeated multiple times, according to the time information of at least two first fusion log entries included in the plurality of first fusion log entry sets corresponding to the first behavior, that is, according to The first behavior is the time information in the fusion log, and the running time interval and the average value of the time interval of the first behavior are obtained. According to the average value of the time interval during which the first behavior runs, the behavior trigger record of the first behavior is obtained. When the first behavior has other triggers and will run repeatedly, the behavior trigger record of the first behavior can be: the name of the business node and the average value of the time interval for the first behavior to run.
应理解的是,通过上述方法可以确定第一行为的触发方式,并获得第一行为的行为触发记录。第一行为的触发方式可能是事件触发、时间触发、其他触发中的任一种触发方式。It should be understood that the triggering manner of the first behavior can be determined through the above method, and the behavior trigger record of the first behavior can be obtained. The triggering mode of the first behavior may be any one of event triggering, time triggering, and other triggering modes.
可选地,可以将N个行为中第一行为对应的一个或多个第一融合日志条目集合中对应于第一行为包含的M个线程中的第m个线程的至少一条第一融合日志条目的时间信息转换为频域数据,即将第一行为包含的M个线程中的第m个线程在融合日志中的时间记录转换为频域数据,获得第m个线程的运行周期。Optionally, at least one first fusion log entry corresponding to the m-th thread among the M threads contained in the first behavior in the set of one or more first fusion log entries corresponding to the first behavior among the N behaviors The time information of is converted into frequency domain data, that is, the time record of the mth thread in the fusion log of the M threads included in the first row is converted into frequency domain data, and the running period of the mth thread is obtained.
综上所述,通过步骤S301可以获得业务节点的依赖关系。通过步骤S320可以获得业务节点的N个行为中第n个行为包含的至少一个线程的运行时间。通过步骤S330可以获得业务节点的N个行为中第n个行为包含的至少一个线程的触发关系、第n个行为包含的至少一个线程的运行周期。通过步骤S330还可以获得触发第一行为的每个行为对应的接收事件的消息通道,或第一行为的至少一个时间触发周期,或第一行为的时间概率模型。若可以获得触发第一行为的每个行为对应的接收事件的消息通道,则也可以获得第一行为的触发关系。To sum up, through step S301, the dependency relationship of service nodes can be obtained. Through step S320, the running time of at least one thread included in the nth behavior among the N behaviors of the service node can be obtained. Through step S330, the trigger relationship of at least one thread contained in the nth action among the N actions of the service node, and the running cycle of at least one thread included in the nth action can be obtained. Through step S330, the message channel of the receiving event corresponding to each behavior that triggers the first behavior, or at least one time trigger period of the first behavior, or the time probability model of the first behavior can be obtained. If the message channel for receiving the event corresponding to each behavior that triggers the first behavior can be obtained, the trigger relationship of the first behavior can also be obtained.
用于描述业务节点的运行行为的运行行为模型可以为设计人员和开发人员提供反向开发指导,也可以通过模拟仿真等方式计算出业务节点在硬件资源上的运行行为状态,检查业务节点在硬件资源上的运行行为状态是否符合设计预期。因此本申请实施例的业务节点的运行行为模型具有反馈指导和辅助设计的重要价值。该运行行为模型还可以作为后续自动驾驶业务代码的模拟、仿真和优化的输入,为后续自动驾驶业务代码的模拟、仿真和优化提供高精度保障。The running behavior model used to describe the running behavior of business nodes can provide reverse development guidance for designers and developers, and can also calculate the running behavior status of business nodes on hardware resources through simulation and other methods, and check the performance of business nodes on hardware. Whether the state of the running behavior on the resource is as designed. Therefore, the operating behavior model of the service node in the embodiment of the present application has important value for feedback guidance and auxiliary design. The running behavior model can also be used as the input for the simulation, simulation and optimization of the subsequent automatic driving business code, providing high-precision guarantee for the simulation, simulation and optimization of the subsequent automatic driving business code.
在一些实施例中,获取业务节点的节点级通信日志和线程级调度日志时,由于没有调整业务节点的优先执行顺序,导致产生了除该业务节点自身外的其他业务节点运行造成的干扰,使获得的该业务节点的节点级通信日志和线程级调度日志中可能包含较高的底噪。自动驾驶业务的业务节点的运行行为模型的精细程度可以由获取到的节点级通信日志和线程级调度日志的受噪程度决定。当获取到的节点级通信日志和线程级调度日志是低底噪或者无底噪的日志时,为业务节点建立的运行行为模型可以更加准确的还原业务节点的运行行为状态。In some embodiments, when obtaining the node-level communication log and thread-level scheduling log of the service node, because the priority execution order of the service node is not adjusted, the interference caused by the operation of other service nodes other than the service node itself occurs, so that The obtained node-level communication log and thread-level scheduling log of the service node may contain a high noise floor. The degree of refinement of the operating behavior model of the service node of the autonomous driving service can be determined by the degree of noise of the obtained node-level communication logs and thread-level scheduling logs. When the obtained node-level communication logs and thread-level scheduling logs are low-noise or no-noise logs, the operation behavior model established for the service node can restore the operation behavior state of the service node more accurately.
图6是根据本申请一个实施例的获取节点级通信日志和线程级调度日志的方法的示意性流程图。图6中的获取节点级通信日志和线程级调度日志的方法包括如下内容:Fig. 6 is a schematic flowchart of a method for acquiring node-level communication logs and thread-level scheduling logs according to an embodiment of the present application. The method for obtaining node-level communication logs and thread-level scheduling logs in FIG. 6 includes the following contents:
S410,根据业务节点的通信数据,确定业务节点的关联业务节点和依赖关系。S410. Determine associated service nodes and dependencies of the service nodes according to the communication data of the service nodes.
在自动驾驶车辆进入自动驾驶模式并运行自动驾驶业务时,通信中间件221可以获取到一个或多个业务节点的通信数据。每个业务节点的通信数据包括每个业务节点的接收事件或发送事件,若通信数据包括接收事件,则该通信数据还包括接收事件的消息通道;若通信数据包括发送事件,则通信数据还包括发送事件的消息通道。例如对使用ROS通信协议栈的业务节点,可以采集ROS节点(rosnode)信息和ROS话题(rostopic)信息获得业务节点的通信数据,例如rosnode可以包括节点名称(Node name)、进程识别号(Pid)、 节点发布的信息(Publications)、订阅的信息(Subscriptions)、连接信息(Connections)等信息,rostopic可以包括类型信息(Type)、发布者信息(Publisher)、订阅者信息(Subscriber)等信息。其中,通过Node name、Pid可以获得该业务节点的名称和进程识别号,通过Publications、Subscriptions、Connections可以获得该业务节点发送的消息和接收的消息,通过Publisher、Subscriber可以获得与该业务节点存在接收、发送关系的业务节点的信息。对使用DDS通信协议栈的业务节点,可以采集域(Domain)信息和内部域参与者(Domain Participant)信息获得业务节点的通信数据,例如Domain可以包括域标识符(Domain ID)及其Domain Participant等信息,Domain Participant可以包括发布者信息(Publisher)、订阅者信息(Subscriber)、话题信息(Topic)、数据订阅者信息(Data Reader)和数据发布者信息(Data Writer)等信息。其中,通过Topic、Data Reader、Data Writer可以获得该业务节点发送的消息和接收的消息,通过Publisher、Subscriber可以获得与该业务节点存在接收、发送关系的业务节点的信息。When the self-driving vehicle enters the self-driving mode and runs the self-driving service, the communication middleware 221 can obtain the communication data of one or more service nodes. The communication data of each service node includes the receiving event or sending event of each service node. If the communication data includes the receiving event, the communication data also includes the message channel of the receiving event; if the communication data includes the sending event, the communication data also includes The message channel for sending events. For example, for a service node using the ROS communication protocol stack, ROS node (rosnode) information and ROS topic (rostopic) information can be collected to obtain the communication data of the service node. For example, rosnode can include node name (Node name), process identification number (Pid) , information published by nodes (Publications), subscribed information (Subscriptions), connection information (Connections) and other information, rostopic can include type information (Type), publisher information (Publisher), subscriber information (Subscriber) and other information. Among them, the name and process identification number of the service node can be obtained through Node name and Pid, the messages sent and received by the service node can be obtained through Publications, Subscriptions and Connections, and the existence and reception of the service node can be obtained through Publisher and Subscriber , Send the information of the business node of the relationship. For service nodes using the DDS communication protocol stack, domain information and internal domain participant (Domain Participant) information can be collected to obtain communication data of service nodes. For example, Domain can include domain identifier (Domain ID) and its Domain Participant, etc. Information, Domain Participant can include publisher information (Publisher), subscriber information (Subscriber), topic information (Topic), data subscriber information (Data Reader) and data publisher information (Data Writer) and other information. Among them, the message sent and received by the service node can be obtained through Topic, Data Reader, and Data Writer, and the information of the service node that has a receiving and sending relationship with the service node can be obtained through Publisher and Subscriber.
可选地,本申请实施例可以通过对通信中间件221包含的车载通信协议栈、TCP/IP、UDP/IP的接收、发送、回调处理等关键API进行打桩,获取业务节点的通信数据,而不需要使用自动驾驶业务代码或对自动驾驶业务代码打桩,从而获得一个或多个业务节点的通信数据。Optionally, in the embodiment of the present application, the communication data of the service node can be obtained by piling key APIs such as the vehicle communication protocol stack, TCP/IP, UDP/IP receiving, sending, and callback processing contained in the communication middleware 221, and There is no need to use the autopilot service code or piling the autopilot service code to obtain the communication data of one or more service nodes.
根据获取到的多个业务节点的通信数据,可以确定每个业务节点与除自身外其他业务节点的接收、发送关系,从而确定每个业务节点的关联业务节点和依赖关系。每个业务节点的关联业务节点为该业务节点的祖先节点或者该业务节点的子孙节点中的至少一个。According to the acquired communication data of multiple service nodes, the receiving and sending relationship between each service node and other service nodes except itself can be determined, so as to determine the associated service nodes and dependencies of each service node. The associated service node of each service node is at least one of the ancestor node of the service node or the descendant node of the service node.
可选地,在确定业务节点与除自身外其他业务节点的接收、发送关系后,可以将该业务节点与除自身外其他业务节点当做有向图的节点,业务节点间的收发关系当做从发送节点指向接收节点的有向连线,从而根据该接收、发送关系生成业务节点的依赖关系有向图,如图7所示。Optionally, after determining the receiving and sending relationship between a service node and other service nodes except itself, the service node and other service nodes can be regarded as nodes in a directed graph, and the sending and receiving relationship between service nodes can be regarded as a slave sending The node points to the directed connection of the receiving node, so as to generate the directed graph of the dependency relationship of the service node according to the receiving and sending relationship, as shown in Fig. 7 .
图7是根据本申请一个实施例的业务节点的依赖关系有向图的示意图。图7中的业务节点的依赖关系有向图是图6中的步骤S410方法的示例。Fig. 7 is a schematic diagram of a directed graph of dependency relationships of service nodes according to an embodiment of the present application. The directed graph of dependency relationships of service nodes in FIG. 7 is an example of the method in step S410 in FIG. 6 .
图7中包括传感节点N0、传感节点N1、传感节点N2、前处理节点N3、感知节点N4、融合节点N5、感知节点N6、融合节点N7、融合节点N8、融合节点N9,其中N1的原始调度算法是时间片轮转算法(round robin,RR),优先级是10,其他节点的原始调度算法均为完全公平调度算法(completely fair scheduler,CFS)。以N5作为当前待分析的节点,N2与N3均向N5发送消息,N1向N3发送消息,N0向N1发送消息;N5向N7、N8发送消息,N8向N9发送消息,则N0、N1、N2、N3均为N5的祖先节点,N7、N8、N9均为N5的子孙节点,因此N5的关联业务节点为N0、N1、N2、N3、N7、N8、N9,N5的依赖关系为N2、N3、N7、N8与N5之间的有向连线。Figure 7 includes sensing node N0, sensing node N1, sensing node N2, pre-processing node N3, sensing node N4, fusion node N5, sensing node N6, fusion node N7, fusion node N8, fusion node N9, where N1 The original scheduling algorithm of the node is round robin (RR) with a priority of 10, and the original scheduling algorithms of other nodes are completely fair scheduler (CFS). Taking N5 as the current node to be analyzed, both N2 and N3 send messages to N5, N1 sends messages to N3, N0 sends messages to N1; N5 sends messages to N7 and N8, and N8 sends messages to N9, then N0, N1, N2 , N3 are the ancestor nodes of N5, and N7, N8, and N9 are all descendant nodes of N5, so the associated business nodes of N5 are N0, N1, N2, N3, N7, N8, and N9, and the dependencies of N5 are N2, N3 , N7, N8 and N5 are directed connections.
可选地,建模框架223可以通过监控模块222调用通信中间件221采集到业务节点与其他业务节点的接收、发送关系,即获取到业务节点间完整的静态的收发关系。例如,对使用ROS通信协议栈的业务节点,建模框架223可以调用ROS节点列表(rosnode list)首先获取所有节点名称,然后对每个节点依次调用查看ROS节点信息命令(rosnode info nodename)获取节点详细信息;可选地,可以通过调用rostopic命令获取所有通信topic信息。应理解的是,对DDS、AutoSAR CM、SOME/IP协议栈也可以使用类似的方法,主动调用API获取到节点和消息通道的具体信息。Optionally, the modeling framework 223 can call the communication middleware 221 through the monitoring module 222 to collect receiving and sending relationships between service nodes and other service nodes, that is, to obtain a complete static sending and receiving relationship between service nodes. For example, for business nodes using the ROS communication protocol stack, the modeling framework 223 can call the ROS node list (rosnode list) to first obtain all node names, and then call the command to view the ROS node information (rosnode info nodename) for each node in turn to obtain the node Detailed information; optionally, all communication topic information can be obtained by calling the rostopic command. It should be understood that a similar method can also be used for DDS, AutoSAR CM, and SOME/IP protocol stacks to actively call APIs to obtain specific information about nodes and message channels.
根据业务节点的通信数据,可以确定业务节点的关联业务节点和依赖关系,从而便于后续调整业务节点的调度策略,便于采集到低底噪或者无底噪的节点级通信日志和线程级调度日志。According to the communication data of the service nodes, the associated service nodes and dependencies of the service nodes can be determined, so as to facilitate the subsequent adjustment of the scheduling strategy of the service nodes, and facilitate the collection of low-noise or no-noise node-level communication logs and thread-level scheduling logs.
S420,调整业务节点和关联业务节点的调度策略,获得调整后的调度策略。S420. Adjust the scheduling policy of the service node and the associated service node, and obtain the adjusted scheduling policy.
根据步骤S410获得的业务节点的关联业务节点和依赖关系,可以调整每个业务节点和每个业务节点的关联业务节点的调度策略,获得调整后的调度策略。According to the associated service nodes and dependencies of the service nodes obtained in step S410, the scheduling policy of each service node and the associated service nodes of each service node can be adjusted to obtain an adjusted scheduling policy.
应理解的是,调整业务节点的调度策略可以包括调整调度算法、优先级、绑核策略、周期频率、保留时间片长度、最后期限(deadline)长度中的一个或多个。其中,调度算法是根据系统的资源分配策略所规定的资源分配算法,可以包括Linux完全公平调度或者实时调度算法;优先级是业务节点被调度运行时的优先等级,决定业务节点在使用资源时的优先次序;周期频率是指若业务节点是周期性运行时,可以通过调整业务节点的周期长度,即改变业务节点的周期频率达到调度效果;保留时间片长度是指系统会为业务节点固定保留运行时间,在该运行时间内不会被其他业务节点打断,因此可以通过调整保留时间片长度达到调度效果;deadline长度是为每个业务节点固定分配的最后期限长度。It should be understood that adjusting the scheduling policy of the service node may include adjusting one or more of the scheduling algorithm, priority, core binding policy, cycle frequency, reserved time slice length, and deadline (deadline) length. Among them, the scheduling algorithm is a resource allocation algorithm stipulated according to the resource allocation strategy of the system, which can include Linux completely fair scheduling or real-time scheduling algorithm; Priority; cycle frequency means that if the service node is running periodically, the scheduling effect can be achieved by adjusting the cycle length of the service node, that is, changing the cycle frequency of the service node; the reserved time slice length means that the system will reserve the operation for the service node Time, which will not be interrupted by other business nodes during the running time, so the scheduling effect can be achieved by adjusting the reserved time slice length; the deadline length is the fixed deadline length assigned to each business node.
应理解的是,deadline长度与优先级不能同时进行调整,除此之外,调度算法、优先级、绑核策略、周期频率、保留时间片长度、最后期限(deadline)长度可以任意进行单独调整或者任意进行组合调整。It should be understood that the length of the deadline and the priority cannot be adjusted at the same time. In addition, the scheduling algorithm, priority, core binding strategy, cycle frequency, reserved time slice length, and deadline (deadline) length can be adjusted independently or arbitrarily. Adjust any combination.
可选地,可以调整每个业务节点和每个业务节点的所有祖先节点的调度策略,使每个业务节点优先执行,使每个业务节点的祖先节点的优先执行顺序根据与该业务节点的距离逐级递减。Optionally, the scheduling policy of each business node and all ancestor nodes of each business node can be adjusted, so that each business node is executed preferentially, and the priority execution order of the ancestor nodes of each business node is based on the distance from the business node Decrease step by step.
应理解的是,业务节点的优先执行顺序指的是通过调整业务节点的调度策略,使业务节点按照顺序执行,即确定优先被执行的业务节点,以及除优先被执行的业务节点外其他业务节点被执行的顺序。例如,通过调整每个业务节点和每个业务节点的所有祖先节点的优先级,使每个业务节点的优先级最高,使每个业务节点的祖先节点的优先级根据与该业务节点的距离逐级递减,如图8所示。It should be understood that the priority execution order of business nodes refers to adjusting the scheduling strategy of business nodes so that the business nodes are executed in order, that is, to determine the business nodes that are executed preferentially, and other business nodes except the business nodes that are preferentially executed the order in which they are executed. For example, by adjusting the priorities of each service node and all ancestor nodes of each service node, each service node has the highest priority, and the priority of each service node's ancestor nodes is gradually increased according to the distance from the service node. The levels are decremented, as shown in Figure 8.
图8是根据本申请一个实施例的调整业务节点和业务节点的关联业务节点的调度策略的示意图。图8是对图7所示的业务节点的依赖关系有向图中的融合节点N5和N5的祖先节点进行调度策略调整的示意图。Fig. 8 is a schematic diagram of adjusting a scheduling policy of a service node and a service node associated with the service node according to an embodiment of the present application. FIG. 8 is a schematic diagram of adjusting the scheduling policy of the fusion node N5 and the ancestor nodes of N5 in the directed graph of the dependency relationship of the service nodes shown in FIG. 7 .
图8中包括传感节点N1、传感节点N2、前处理节点N3、感知节点N4、融合节点N5、感知节点N6、融合节点N7、融合节点N8、融合节点N9,将N5作为当前的待分析节点,N5的关联业务节点为N0、N1、N2、N3、N7、N8、N9,其中,N5的祖先节点为N0、N1、N2、N3。Figure 8 includes sensing node N1, sensing node N2, pre-processing node N3, sensing node N4, fusion node N5, sensing node N6, fusion node N7, fusion node N8, fusion node N9, taking N5 as the current to-be-analyzed Nodes, the associated service nodes of N5 are N0, N1, N2, N3, N7, N8, and N9, and the ancestor nodes of N5 are N0, N1, N2, and N3.
经过步骤S420后,将N5的调度算法调整为先来先服务调度算法(first in first out,FIFO),优先级调整为99,将N5的祖先节点的调度算法均调整为RR,将N5的祖先节点N2和N3调整优先级为98,N5的祖先节点N1调整优先级为97,N5的祖先节点N0调整优先级为96,即将N5设置为优先执行,N5的祖先节点设置为在N5执行后优先执行,且N5的祖先节点的优先级按照与N5的距离递减。同时,将N5和N5的祖先节点的绑核策略均设置为处理器231上所有可用核都可运行。经过上述调整,N5可以优先执行,N5的祖先节点也可以依次优先执行,从而可以避免资源竞争和除N5之外的其他业务节点的干扰,获得低底噪或者无底噪的N5的节点级通信日志和线程级调度日志。After step S420, the scheduling algorithm of N5 is adjusted to a first-come-first-out (FIFO) scheduling algorithm, the priority is adjusted to 99, the scheduling algorithms of the ancestor nodes of N5 are adjusted to RR, and the ancestor nodes of N5 are adjusted to RR. Nodes N2 and N3 adjust the priority to 98, the ancestor node N1 of N5 adjusts the priority to 97, and the ancestor node N0 of N5 adjusts the priority to 96, that is, N5 is set to be executed first, and the ancestor node of N5 is set to be executed first after N5 is executed Execute, and the priority of the ancestor node of N5 is decremented according to the distance from N5. At the same time, the core binding policies of N5 and the ancestor nodes of N5 are all set so that all available cores on the processor 231 can run. After the above adjustments, N5 can be executed first, and the ancestor nodes of N5 can also be executed first, so as to avoid resource competition and interference from other service nodes except N5, and obtain node-level communication of N5 with low or no background noise Logging and thread-level scheduling logging.
可选地,可以调整每个业务节点及每个业务节点的父节点的调度策略,使每个业务节点优先执行,使每个业务节点的父节点在每个业务节点执行后优先执行。每个业务节点的父节点为向该业务节点发送消息的第一业务节点。Optionally, the scheduling policy of each service node and the parent node of each service node can be adjusted so that each service node is executed first, and the parent node of each service node is executed first after each service node is executed. The parent node of each service node is the first service node that sends a message to the service node.
可选地,可以调整每个业务节点和每个业务节点的子孙节点的调度策略,使每个业务节点优先执行,使每个业务节点的子孙节点的优先执行顺序根据与该业务节点的距离逐级递减。Optionally, the scheduling policy of each service node and its descendant nodes can be adjusted so that each service node is executed preferentially, and the priority execution sequence of each service node’s descendant nodes is gradually increased according to the distance from the service node. level decrease.
可选地,可以调整每个业务节点及每个业务节点的子节点的调度策略,使每个业务节点优先执行,使每个业务节点的子节点在该业务节点执行后优先执行。Optionally, the scheduling strategy of each service node and each service node's sub-nodes can be adjusted, so that each service node is executed first, and each service node's sub-nodes are executed first after the execution of the service node.
可选地,可以调整每个业务节点和每个业务节点的祖先节点和子孙节点的调度策略,使每个业务节点优先执行,使每个业务节点的祖先节点的优先执行顺序根据与该业务节点的距离逐级递减,使每个业务节点的子孙节点的优先执行顺序在祖先节点的优先执行顺序之后,根据与该节点的距离逐级递减;或者使每个业务节点的子孙节点的优先执行顺序根据与该节点的距离逐级递减,使每个业务节点的祖先节点的优先执行顺序在子孙节点的优先执行顺序之后,根据与该节点的距离逐级递减;或者使每个业务节点的祖先节点和子孙节点的优先执行顺序根据与该业务节点的距离逐级递减,与该业务节点距离相同的祖先节点和子孙节点的优先执行顺序相同。Optionally, the scheduling strategy of each service node and its ancestor nodes and descendant nodes can be adjusted, so that each service node is executed preferentially, and the priority execution order of each service node's ancestor nodes is based on the The distance of each business node decreases step by step, so that the priority execution order of the descendant nodes of each business node is after the priority execution order of the ancestor node, and decreases step by step according to the distance from the node; or the priority execution order of the descendant nodes of each business node Decrease step by step according to the distance from the node, so that the priority execution order of the ancestor nodes of each business node is after the priority execution order of descendant nodes, and decrease step by step according to the distance from the node; or make the ancestor nodes of each business node The priority execution order of descendant nodes and descendant nodes is gradually reduced according to the distance from the business node, and the priority execution order of ancestor nodes and descendant nodes with the same distance as the business node is the same.
可选地,可以调整每个业务节点及每个业务节点的父节点和子节点的调度策略,使该业务节点优先执行,使每个业务节点的父节点在该业务节点执行后优先执行,使每个业务节点的子节点在该业务节点的父节点执行后优先执行;或者使每个业务节点的子节点在该业务节点执行后优先执行,使每个业务节点的父节点在该业务节点的子节点执行后优先执行;或者使每个业务节点的父节点和子节点在该业务节点执行后一同优先执行。Optionally, the scheduling policy of each service node and its parent node and child nodes can be adjusted so that the service node is executed preferentially, and the parent node of each service node is executed preferentially after the service node is executed, so that each The sub-nodes of each business node are executed first after the execution of the parent node of the business node; Execute first after the node is executed; or make the parent node and child node of each business node execute first after the execution of the business node.
可选地,建模框架223可以通过调度器2242调整业务节点和业务节点的关联业务节点的调度策略。Optionally, the modeling framework 223 can use the scheduler 2242 to adjust the scheduling policies of the service nodes and the service nodes associated with the service nodes.
应理解的是,步骤S420可以多次重复进行,每次进行时仅针对一个业务节点和该业务节点的关联业务节点的调度策略进行调整,同时在对该业务节点和该业务节点的关联业务节点进行调整前,需要先记录该业务节点和该业务节点的关联业务节点的调度策略,在对该业务节点和该业务节点的关联业务节点进行调整后,需要先还原该业务节点和该业务节点的关联业务节点的调度策略,才可以继续对下一业务节点和下一业务节点的关联业务节点的调度策略进行调整,从而不会影响自动驾驶业务的原有状态和对下一业务节点以及下一业务节点的关联业务节点的处理。It should be understood that step S420 can be repeated multiple times, and only adjust the scheduling strategy of one service node and its associated service nodes each time, and at the same time adjust the scheduling policy of the service node and its associated service nodes Before making adjustments, it is necessary to record the scheduling policy of the business node and the business node associated with the business node. After adjusting the business node and the business nodes associated with the business node, it is necessary to restore the The scheduling strategy of the associated service node can continue to adjust the scheduling strategy of the next service node and the associated service node of the next service node, so as not to affect the original state of the autonomous driving service and the next service node and the next The processing of the associated business node of the business node.
通过调整每个业务节点和每个业务节点的关联业务节点的调度策略,可以确定业务节点和业务节点的关联业务节点的优先执行顺序,从而避免资源竞争,减少多个业务节点运行造成的相互干扰,获得低底噪或者无底噪的节点级通信日志和线程级调度日志。By adjusting the scheduling strategy of each service node and the associated service nodes of each service node, the priority execution order of the service nodes and the associated service nodes of the service nodes can be determined, thereby avoiding resource competition and reducing mutual interference caused by the operation of multiple service nodes , to obtain low-noise or no-noise node-level communication logs and thread-level scheduling logs.
S430,根据调整后的调度策略运行自动驾驶业务,采集业务节点的通信数据和调度数据,获得节点级通信日志和线程级调度日志。S430. Run the automatic driving service according to the adjusted scheduling strategy, collect communication data and scheduling data of service nodes, and obtain node-level communication logs and thread-level scheduling logs.
根据步骤S420对每个业务节点均进行处理,即获得每个业务节点和每个业务节点的关联业务节点的调整后的调度策略,根据调整后的调度策略运行自动驾驶业务,采集在调整后的调度策略状态下的该业务节点的通信数据和调度数据,获得该业务节点的节点级通信日志和线程级调度日志。由于调整后的调度策略避免了资源竞争和除该业务节点之外的其他业务节点的干扰,因此获得的该业务节点的节点级通信日志和线程级调度日志是低底 噪或者无底噪的日志,可以支持后续准确地为该业务节点的运行行为建立模型。According to step S420, each service node is processed, that is, the adjusted dispatch strategy of each service node and the associated service node of each service node is obtained, and the automatic driving service is run according to the adjusted dispatch strategy, and the adjusted dispatch strategy is collected. The communication data and scheduling data of the service node in the scheduling policy state, and the node-level communication log and thread-level scheduling log of the service node are obtained. Since the adjusted scheduling strategy avoids resource competition and interference from other service nodes except the service node, the obtained node-level communication logs and thread-level scheduling logs of the service node are logs with low or no background noise , which can support subsequent and accurate establishment of a model for the operation behavior of the service node.
应理解的是,步骤S420和步骤S430可以组合后重复运行多次,即在步骤S420每次进行时仅调整一个业务节点和该业务节点的关联业务节点的调度策略,然后进行步骤S430,根据该业务节点和该业务节点的关联业务节点的调整后的调度策略,运行自动驾驶业务,采集该业务节点的通信数据和调度数据,获得该业务节点的节点级通信日志和线程级调度日志,并在步骤S420前记录该业务节点和该业务节点的关联业务节点的调度策略,在步骤S430后还原该业务节点和该业务节点的关联业务节点的调度策略。在步骤S420和S430组合进行一次后,再次进行S420和S430的组合步骤,即针对下一业务节点,调整下一业务节点和下一业务节点的关联业务节点的调度策略,然后根据下一业务节点和下一业务节点的关联业务节点的调整后的调度策略,运行自动驾驶业务,采集下一业务节点的通信数据和调度数据,获得下一业务节点的节点级通信日志和线程级调度日志,并在步骤S420前记录下一业务节点和下一业务节点的关联业务节点的调度策略,在步骤S430后还原下一业务节点和下一业务节点的关联业务节点的调度策略。对每个业务节点重复进行S420和S430的组合步骤,获得每个业务节点的节点级通信日志和线程级调度日志。It should be understood that step S420 and step S430 can be combined and repeated multiple times, that is, each time step S420 is performed, only one service node and the scheduling policy of the service node associated with the service node are adjusted, and then step S430 is performed, according to the The adjusted scheduling strategy of the business node and its associated business nodes, run the auto-driving business, collect the communication data and scheduling data of the business node, obtain the node-level communication log and thread-level scheduling log of the business node, and Before step S420, record the scheduling policies of the service node and its associated service nodes, and restore the scheduling policies of the service node and its associated service nodes after step S430. After the combination of steps S420 and S430 is performed once, the combination steps of S420 and S430 are performed again, that is, for the next service node, the scheduling strategy of the next service node and the associated service node of the next service node is adjusted, and then according to the next service node and the adjusted scheduling strategy of the associated service node of the next service node, run the automatic driving service, collect the communication data and scheduling data of the next service node, obtain the node-level communication log and thread-level scheduling log of the next service node, and Before step S420, record the scheduling strategy of the next service node and the associated service nodes of the next service node, and restore the scheduling strategy of the next service node and the associated service nodes of the next service node after step S430. The combination steps of S420 and S430 are repeated for each service node to obtain the node-level communication log and thread-level scheduling log of each service node.
可选地,建模框架223可以通过监控模块222中的通信监测模块2221和Trace监测模块2222,分别从通信中间件221和追踪器2241中采集业务节点的节点级通信日志和线程级调度日志,记录在自动驾驶车辆硬件平台230的存储器233中。Optionally, the modeling framework 223 can use the communication monitoring module 2221 and the Trace monitoring module 2222 in the monitoring module 222 to collect the node-level communication logs and thread-level scheduling logs of the service nodes from the communication middleware 221 and the tracker 2241 respectively, Recorded in the memory 233 of the self-driving vehicle hardware platform 230.
图9是根据本申请另一实施例的获取节点级通信日志和线程级调度日志的方法的示意性流程图。图9中的获取节点级通信日志和线程级调度日志的方法是图6中的获取节点级通信日志和线程级调度日志的方法的示例。图9中的获取节点级通信日志和线程级调度日志的方法包括如下内容:Fig. 9 is a schematic flowchart of a method for acquiring node-level communication logs and thread-level scheduling logs according to another embodiment of the present application. The method for obtaining node-level communication logs and thread-level scheduling logs in FIG. 9 is an example of the method for obtaining node-level communication logs and thread-level scheduling logs in FIG. 6 . The method for obtaining node-level communication logs and thread-level scheduling logs in Figure 9 includes the following content:
S510,是否已遍历节点依赖关系有向图中的每个节点。S510, whether each node in the node dependency directed graph has been traversed.
根据步骤S410获得的业务节点的通信数据,可以确定每个业务节点与除自身外其他业务节点的接收、发送关系,将每个业务节点当做有向图的节点,业务节点间的收发关系当做从发送节点指向接收节点的有向连线,从而根据业务节点间的接收、发送关系生成业务节点的依赖关系有向图,如图7所示。According to the communication data of the service nodes obtained in step S410, the receiving and sending relationship between each service node and other service nodes except itself can be determined, each service node is regarded as a node of a directed graph, and the sending and receiving relationship between service nodes is regarded as a slave The sending node points to the directed connection of the receiving node, so as to generate a directed graph of the dependency relationship of the service node according to the receiving and sending relationship between the service nodes, as shown in Figure 7.
通过遍历依赖关系有向图中的每个节点,每次获取当前所遍历的节点的节点级通信日志和线程级调度日志,从而完成每个节点的日志的获取。当依赖关系图中还存在未获取到日志的节点时,重复步骤S520至S550获取该节点的节点级通信日志和线程级调度日志;当依赖关系图中的所有节点都已获取到日志时,结束对依赖关系有向图中节点的日志获取步骤。By traversing each node in the dependency directed graph, the node-level communication log and thread-level scheduling log of the currently traversed node are obtained each time, so as to complete the acquisition of the log of each node. When there is still a node that has not obtained the log in the dependency graph, repeat steps S520 to S550 to obtain the node-level communication log and thread-level scheduling log of the node; when all the nodes in the dependency graph have obtained the log, end Log acquisition steps for nodes in a directed graph of dependencies.
可选地,遍历依赖关系有向图的方法可以是图搜索方法,例如深度优先搜索方法,或者广度优先搜索方法,或者其他可以实现对依赖关系有向图中每个节点都可遍历到的遍历方法。Optionally, the method for traversing the directed graph of dependencies may be a graph search method, such as a depth-first search method, or a breadth-first search method, or other traversals that can be traversed to each node in the directed graph of dependencies method.
可选地,可以由建模框架223的依赖分析模块2231对依赖关系有向图进行遍历。Optionally, the dependency analysis module 2231 of the modeling framework 223 may traverse the directed graph of dependencies.
S520,遍历待分析节点的上游节点,记录该节点及其所有上游节点当前的调度策略。S520. Traverse the upstream nodes of the node to be analyzed, and record the current scheduling policies of the node and all its upstream nodes.
遍历依赖关系有向图中的每个节点时,记录该节点及该节点的所有上游节点当前的调度策略,可以便于后续还原该节点及该节点的所有上游节点的原始调度策略,避免对后续节点的日志获取造成影响,也可以避免对自动驾驶业务的原有状态造成影响。该节点的所有上游节点对应的是该业务节点的所有祖先节点,该节点的所有下游节点对应的是该业务 节点的所有子孙节点,该节点的一层上游节点对应的是该业务节点的所有父节点,该节点的一层下游节点对应的是该业务节点的所有子节点。When traversing each node in the dependency directed graph, record the current scheduling strategy of the node and all upstream nodes of the node, which can facilitate subsequent restoration of the original scheduling strategy of the node and all upstream nodes of the node, and avoid It can also avoid the impact on the original state of the autonomous driving business. All upstream nodes of this node correspond to all ancestor nodes of this business node, all downstream nodes of this node correspond to all descendant nodes of this business node, and all upstream nodes of this node correspond to all parents of this business node Node, the downstream nodes of this node correspond to all child nodes of this business node.
可选地,可以遍历待分析节点的上游节点,记录该节点及该节点的一层上游节点当前的调度策略;或者可以遍历待分析节点的下游节点,记录该节点及该节点的所有下游节点当前的调度策略;或者可以遍历待分析节点的下游节点,记录该节点及该节点的一层下游节点当前的调度策略;或者可以遍历待分析节点的上游节点和下游节点,记录该节点及其该节点的所有上游节点和所有下游节点当前的调度策略;或者可以遍历待分析节点的上游节点和下游节点,记录该节点及该节点的一层上游节点和一层下游节点当前的调度策略。Optionally, it is possible to traverse the upstream nodes of the node to be analyzed, and record the current scheduling policy of the node and its layer-one upstream nodes; or it is possible to traverse the downstream nodes of the node to be analyzed, and record the current or can traverse the downstream nodes of the node to be analyzed, and record the current scheduling strategy of the node and its downstream nodes; or can traverse the upstream and downstream nodes of the node to be analyzed, and record the node and its nodes The current scheduling strategy of all upstream nodes and all downstream nodes of the node; or it can traverse the upstream nodes and downstream nodes of the node to be analyzed, and record the current scheduling strategy of the node and its layer of upstream nodes and layer of downstream nodes.
可选地,遍历待分析节点和待分析节点的上游节点或下游节点中的一个或多个时,可以由建模框架223的依赖分析模块2231执行,遍历待分析节点和待分析节点的上游节点或下游节点中的一个或多个后获得的调度策略可以记录在自动驾驶车辆硬件平台230的内存232中。Optionally, when traversing the node to be analyzed and one or more of the upstream nodes or downstream nodes of the node to be analyzed, it can be executed by the dependency analysis module 2231 of the modeling framework 223, traversing the node to be analyzed and the upstream nodes of the node to be analyzed or one or more of the downstream nodes can then obtain the scheduling policy and can be recorded in the memory 232 of the hardware platform 230 of the self-driving vehicle.
可选地,可以进行调整的调度策略可以包括调度算法、调度优先级、绑核策略、周期频率、保留时间片长度、deadline长度中的一个或多个。Optionally, the adjustable scheduling policy may include one or more of scheduling algorithm, scheduling priority, core binding policy, cycle frequency, reserved time slice length, and deadline length.
应理解的是,deadline长度与优先级不能同时进行调整,除此之外,调度算法、优先级、绑核策略、周期频率、保留时间片长度、最后期限(deadline)长度可以任意进行单独调整或者任意进行组合调整。It should be understood that the length of the deadline and the priority cannot be adjusted at the same time. In addition, the scheduling algorithm, priority, core binding strategy, cycle frequency, reserved time slice length, and deadline (deadline) length can be adjusted independently or arbitrarily. Adjust any combination.
S530,依次调整该节点及该节点的所有上游节点的调度策略。S530. Adjust the scheduling policies of the node and all upstream nodes of the node in sequence.
针对待分析节点,获得该节点及该节点的所有上游节点的调度策略后,调整该节点和该节点的所有上游节点的调度策略,使该节点优先执行,使该节点的所有上游节点的优先执行顺序根据与该节点的距离逐级递减,如图8所示。For the node to be analyzed, after obtaining the scheduling strategy of this node and all upstream nodes of this node, adjust the scheduling strategy of this node and all upstream nodes of this node, so that this node is executed first, and all upstream nodes of this node are executed first The order decreases step by step according to the distance from the node, as shown in Figure 8.
可选地,可以在获得该节点及该节点的一层上游节点的调度策略后,调整该节点及该节点的一层上游节点的调度策略,使该业务节点优先执行,使该节点的一层上游节点在该节点执行后优先执行。Optionally, after obtaining the scheduling strategy of the node and its layer-upstream node, adjust the scheduling strategy of the node and the node’s layer-upstream node so that the service node is executed preferentially, and the node’s layer-1 The upstream node is executed first after this node is executed.
可选地,可以在获得该节点及该节点的所有下游节点的调度策略后,调整该节点和该节点的所有下游节点的调度策略,使该节点优先执行,使该节点的所有下游节点的优先执行顺序根据与该节点的距离逐级递减。Optionally, after obtaining the scheduling policies of the node and all downstream nodes of the node, the scheduling policies of the node and all downstream nodes of the node can be adjusted so that the node is executed preferentially, and the scheduling policies of all downstream nodes of the node are prioritized The execution order decreases step by step according to the distance from the node.
可选地,可以在获得该节点及该节点的一层下游节点的调度策略后,调整该节点及该节点的一层下游节点的调度策略,使该节点优先执行,使该节点的一层下游节点在该节点执行后优先执行。Optionally, after obtaining the scheduling policy of the node and its layer-1 downstream nodes, adjust the scheduling strategy of the node and the node-1-layer downstream nodes so that the node is executed preferentially, and the node’s layer-1 downstream nodes Nodes are executed first after this node is executed.
可选地,可以在获得该节点及该节点的所有上游节点和下游节点的调度策略后,调整该节点和该节点的所有上游节点和下游节点的调度策略,使该节点优先执行,使该节点的所有上游节点的优先执行顺序根据与该节点的距离逐级递减,使该节点的所有下游节点的优先执行顺序在所有上游节点的优先执行顺序之后,根据与该节点的距离逐级递减;或者使该节点的所有下游节点的优先执行顺序根据与该节点的距离逐级递减,使该节点的所有上游节点的优先执行顺序在下游节点的优先执行顺序之后,根据与该节点的距离逐级递减;或者使该节点的所有上游节点和所有下游节点的优先执行顺序根据与该节点的距离逐级递减,使与该节点距离相同的上游节点和下游节点的优先执行顺序相同。Optionally, after obtaining the scheduling policies of the node and all upstream nodes and downstream nodes of the node, adjust the scheduling policies of the node and all upstream nodes and downstream nodes of the node, so that the node is executed preferentially, and the node The priority execution order of all upstream nodes of the node decreases step by step according to the distance from the node, so that the priority execution order of all downstream nodes of this node is after the priority execution order of all upstream nodes, and decreases step by step according to the distance from the node; or Make the priority execution order of all downstream nodes of this node decrease step by step according to the distance from this node, make the priority execution order of all upstream nodes of this node after the priority execution order of downstream nodes, and decrease step by step according to the distance from this node ; Or make the priority execution order of all upstream nodes and all downstream nodes of this node decrease step by step according to the distance from this node, so that the priority execution order of upstream nodes and downstream nodes with the same distance from this node are the same.
可选地,可以在获得该节点及该节点的一层上游节点和一层下游节点的调度策略后,调整该节点及该节点的一层上游节点和一层下游节点的调度策略,使该节点优先执行,使 该节点的一层上游节点在该业务节点执行后优先执行,使该节点的一层下游节点在该节点的一层上游节点执行后优先执行,或者使该节点的一层下游节点在该节点执行后优先执行,使该节点的一层上游节点在该节点的一层下游节点执行后优先执行;或者使该节点的一层上游节点和一层下游节点在该节点执行后一同优先执行。Optionally, after obtaining the scheduling strategy of the node and its layer of upstream nodes and layer of downstream nodes, adjust the scheduling strategy of the node and its layer of upstream nodes and layer of downstream nodes, so that the node Priority execution, so that the first-level upstream nodes of this node are executed first after the execution of the business node, so that the first-level downstream nodes of this node are executed first after the first-level upstream nodes of this node are executed, or make the first-level downstream nodes of this node Execute first after the node is executed, so that the node's one-level upstream node is executed first after the node's one-level downstream node is executed; or the node's one-level upstream node and one-level downstream node are prioritized after the node is executed implement.
可选地,调整该节点及该节点的上游节点或该节点的下游节点中的一个或多个的调度策略,可以由建模框架223通过调度器2242执行。Optionally, adjusting the scheduling policy of the node and one or more of the node's upstream node or the node's downstream node may be executed by the modeling framework 223 through the scheduler 2242 .
S540,根据调整后的调度策略运行自动驾驶业务,采集该节点的通信数据和调度数据,获得该节点的节点级通信日志和线程级调度日志。S540. Run the automatic driving service according to the adjusted scheduling policy, collect communication data and scheduling data of the node, and obtain a node-level communication log and a thread-level scheduling log of the node.
针对待分析节点,根据步骤S530获得该节点和该节点的所有上游节点的调整后的调度策略,根据获得的调整后的调度策略,运行自动驾驶业务,采集该节点的通信数据和调度数据,从而获得该节点的节点级通信日志和线程级调度日志。步骤S540的具体实现方式与步骤S430中的具体实现方式相同,不再赘述。For the node to be analyzed, obtain the adjusted scheduling strategy of the node and all upstream nodes of the node according to step S530, run the automatic driving service according to the obtained adjusted scheduling strategy, and collect the communication data and scheduling data of the node, thereby Obtain the node-level communication log and thread-level scheduling log of this node. The specific implementation manner of step S540 is the same as that of step S430, and will not be repeated here.
S550,根据记录还原该节点及该节点的所有上游节点的调度策略。S550. Restoring the scheduling policies of the node and all upstream nodes of the node according to the records.
针对待分析节点,根据步骤S520中记录的该节点及该节点的所有上游节点的调度策略,对该节点和该节点的所有上游节点的调度策略进行还原,避免由于对该节点和该节点的所有上游节点的调度策略进行了调整,而导致后续节点的日志获取和自动驾驶业务的原有状态受到影响。For the node to be analyzed, according to the scheduling strategy of the node and all upstream nodes of the node recorded in step S520, the scheduling strategy of the node and all upstream nodes of the node is restored, so as to avoid the The scheduling strategy of the upstream node is adjusted, which affects the log acquisition of subsequent nodes and the original state of the automatic driving business.
可选地,若步骤S520中记录的是该节点及该节点的一层上游节点的调度策略,则对该节点及该节点的一层上游节点的调度策略进行还原。Optionally, if what is recorded in step S520 is the scheduling strategy of the node and its layer-one upstream node, restore the scheduling strategy of the node and its layer-one upstream node.
可选地,若步骤S520中记录的是该节点及该节点的所有下游节点的调度策略,则对该节点及该节点的所有下游节点的调度策略进行还原。Optionally, if the scheduling policies of the node and all downstream nodes of the node are recorded in step S520, the scheduling policies of the node and all downstream nodes of the node are restored.
可选地,若步骤S520中记录的是该节点及该节点的一层下游节点的调度策略,则对该节点及该节点的一层下游节点的调度策略进行还原。Optionally, if what is recorded in step S520 is the scheduling strategy of the node and its layer-1 downstream nodes, restore the scheduling strategies of the node and its layer-1 downstream nodes.
可选地,若步骤S520中记录的是该节点及该节点的所有上游节点和所有下游节点的调度策略,则对该节点及该节点的所有上游节点和所有下游节点的调度策略进行还原。Optionally, if the scheduling policies of the node and all upstream nodes and all downstream nodes of the node are recorded in step S520, the scheduling policies of the node and all upstream nodes and all downstream nodes of the node are restored.
可选地,若步骤S520中记录的是该节点及该节点的一层上游节点和一层下游节点的调度策略,则对该节点及该节点的一层上游节点和一层下游节点的调度策略进行还原。Optionally, if what is recorded in step S520 is the scheduling strategy of the node and its layer of upstream nodes and its layer of downstream nodes, then the scheduling strategy of the node and its layer of upstream nodes and its layer of downstream nodes to restore.
可选地,步骤S550可以由建模框架223执行,即从内存232中读取步骤S520中记录的调度策略,恢复该节点和该节点的上游节点或该节点的下游节点中的一个或多个的调度策略,从而不影响后续节点的日志获取和自动驾驶业务的原有状态。Optionally, step S550 may be executed by the modeling framework 223, that is, read the scheduling policy recorded in step S520 from the memory 232, and restore the node and one or more of the upstream node of the node or the downstream node of the node Scheduling strategy, so as not to affect the log acquisition of subsequent nodes and the original state of the automatic driving business.
图10是根据本申请一个实施例提供的业务节点内部结构的示意图。图10中所示的是业务节点内部的回调处理,包括任务T1、任务T2和任务T3。该业务节点内部的回调处理通过进程P1执行。进程P1包括线程t1、线程t2和线程t3。线程t1用于执行任务T1,线程t2用于执行任务T2,线程t3用于执行任务T3。其中线程t1、线程t2的接收信息和线程t3的发送信息均可以通过通信中间件221获得,但线程t1和线程t2向线程t3发送的信息属于业务节点所包含的线程的接收、发送信息,无法通过通信中间件221获得,即业务节点所包含的线程的运行行为无法通过通信中间件获得。因此需要对从通信中间件221中获得的业务节点的节点级通信日志和线程级调度日志进行处理,获得融合日志,从而根据融合日志,获得业务节点所包含的线程的运行行为。Fig. 10 is a schematic diagram of an internal structure of a service node provided according to an embodiment of the present application. What is shown in FIG. 10 is the internal callback processing of the service node, including task T1, task T2 and task T3. The internal callback processing of the service node is executed through the process P1. Process P1 includes thread t1, thread t2 and thread t3. Thread t1 is used to execute task T1, thread t2 is used to execute task T2, and thread t3 is used to execute task T3. Among them, the receiving information of thread t1 and thread t2 and the sending information of thread t3 can be obtained through the communication middleware 221, but the information sent by thread t1 and thread t2 to thread t3 belongs to the receiving and sending information of threads included in the service node, and cannot Obtained through the communication middleware 221, that is, the running behavior of the threads included in the service node cannot be obtained through the communication middleware. Therefore, it is necessary to process the node-level communication log and thread-level scheduling log of the service node obtained from the communication middleware 221 to obtain the fusion log, so as to obtain the running behavior of the thread contained in the service node according to the fusion log.
图11是根据本申请另一实施例的自动驾驶业务的业务节点的建模方法的示意性流程 图。图11中的建模方法包括如下内容:Fig. 11 is a schematic flowchart of a modeling method for a service node of an automatic driving service according to another embodiment of the present application. The modeling approach in Figure 11 includes the following:
S331,根据融合日志中的融合日志条目,确定至少一个时间片段。S331. Determine at least one time segment according to fusion log entries in the fusion log.
为进一步分析业务节点包含的线程的运行行为,需要对获得的融合日志中的信息进行分析。融合日志中的每条融合日志条目包括时间信息、类型信息、身份信息和日志内容,因此可以根据融合日志条目的时间信息,确定至少一个时间片段。In order to further analyze the running behavior of the threads included in the service node, it is necessary to analyze the information in the obtained fusion log. Each fusion log entry in the fusion log includes time information, type information, identity information and log content, so at least one time segment can be determined according to the time information of the fusion log entry.
如上所述,根据融合日志条目中的类型信息,融合日志中包括的融合日志条目可以分为两种,第一种融合日志条目中记录的是调度信息,第二种融合日志条目中记录的是调用事件。为了便于描述,可以将记录调度信息的融合日志条目称为第一融合日志条目,将记录调用事件的融合日志条目称为第二融合日志条目。As mentioned above, according to the type information in the fusion log entry, the fusion log entries included in the fusion log can be divided into two types. The first type of fusion log entry records scheduling information, and the second type of fusion log entry records Call event. For ease of description, a fusion log entry recording scheduling information may be called a first fusion log entry, and a fusion log entry recording call events may be called a second fusion log entry.
至少一个时间片段中的每个时间片段对应于至少两条第一融合日志条目和至少一条第二融合日志条目,每个时间片段对应的融合日志条目的时间信息在所述每个时间片段内。示例性的,至少一个时间片段中的每个时间片段包括至少两条第一融合日志条目中的一条或多条第一融合日志条目的时间信息,至少一条第二融合日志条目中的一条或多条第二融合日志条目的时间信息在每个时间片段的时间范围内。融合日志中的一条或多条第一融合日志条目中,身份信息相同的第一融合日志条目属于业务节点的同一线程的调度信息。对至少两条身份信息相同的第一融合日志条目的时间信息进行切分,即为对业务节点的同一线程的时间记录进行切分。对业务节点的同一线程的时间记录进行切分,获得至少一个时间片段,每个时间片段与一个任务相对应。Each time segment in the at least one time segment corresponds to at least two first fusion log entries and at least one second fusion log entry, and the time information of the fusion log entry corresponding to each time segment is within each time segment. Exemplarily, each time segment in at least one time segment includes time information of one or more first fusion log entries in at least two first fusion log entries, and one or more time information in at least one second fusion log entry The time information of the second fusion log entry is within the time range of each time segment. Among the one or more first fusion log entries in the fusion log, the first fusion log entries with the same identity information belong to the scheduling information of the same thread of the service node. Segmenting the time information of at least two first fusion log entries with the same identity information is to segment the time records of the same thread of the service node. Segment the time records of the same thread of the service node to obtain at least one time segment, and each time segment corresponds to a task.
可选地,可以根据融合日志中包括的第一融合日志条目的时间信息和身份信息与融合日志条目包括的第二融合日志条目的时间信息和身份信息,确定至少一个时间片段,其中每个时间片段对应的至少两条第一融合日志条目的身份信息相同,每个时间片段对应的至少两条第一融合日志条目中时间相邻的两条第一融合日志条目的时间间隔小于分割阈值,每个时间片段对应的至少一条第二融合日志条目的进程号与每个时间片段对应的至少两条第一融合日志条目的进程号相同。即根据分割阈值对业务节点的每个线程的时间记录进行切分,获得至少一个时间片段,每个时间片段中包含的时间记录属于同一个线程。每个线程的分割阈值可以相同,也可以不同。Optionally, at least one time segment may be determined according to the time information and identity information of the first fusion log entry included in the fusion log and the time information and identity information of the second fusion log entry included in the fusion log entry, wherein each time The identity information of the at least two first fusion log entries corresponding to the segment is the same, and the time interval between the two first fusion log entries adjacent in time among the at least two first fusion log entries corresponding to each time segment is less than the segmentation threshold, and each The process number of at least one second fusion log entry corresponding to each time segment is the same as the process number of at least two first fusion log entries corresponding to each time segment. That is, the time records of each thread of the service node are segmented according to the segmentation threshold to obtain at least one time segment, and the time records contained in each time segment belong to the same thread. The split threshold can be the same or different for each thread.
可选地,每个线程的分割阈值为一个固定的阈值,该阈值可以是经验值,也可以是根据仿真实验获得的数值,本申请实施例对此不做具体限定。Optionally, the segmentation threshold of each thread is a fixed threshold, which may be an empirical value or a value obtained from a simulation experiment, which is not specifically limited in this embodiment of the present application.
可选地,可以通过优化方法优化每个线程的分割阈值,包括:根据至少两条第一融合日志条目的身份信息、至少两条第一融合日志条目的时间信息以及初始分割阈值,确定至少一个参考时间片段。根据约束条件和至少一个参考时间片段,确定每个参考时间片段的分割参数。约束条件为至少一条第二融合日志条目中的一条或多条第二融合日志条目的时间信息在参考时间片段的时间范围内,并且该一条或多条第二融合日志条目的身份信息中的进程号与参考时间片段中包含的每条第一融合日志条目的身份信息的进程号相同。每条第二融合日志条目可以记录一个接收事件、一个发送事件、一个回调开始事件或一个回调结束事件中的任一个。当多条第二融合日志条目中记录有一个回调开始事件时,多条第二融合日志条目中还记录有一个回调结束事件。根据优化方法对初始分割阈值进行优化,获得分割阈值,优化方法包括启发式优化算法或求解器优化方法。即根据业务节点包含的M个线程中第m个线程的初始预设阈值,对第m个线程的时间记录进行切分,获得第m个线程的至少一个参考时间片段,m=1,......,M,M为大于或等于1的正整数。切分后根 据约束条件判断本次切分的初始预设阈值是否可用,即判断业务节点的至少一条第二融合日志条目中的一条或多条第二融合日志条目的时间信息是否在参考时间片段的时间范围内,并且该一条或多条第二融合日志条目的身份信息中的进程号与参考时间片段中包含的每条第一融合日志条目的身份信息的进程号相同。若在,则本次切分的初始预设阈值可用。否则丢弃本次切分的初始预设阈值,选择一个新的初始预设阈值,重新进行切分,直到初始预设阈值可用。当初始预设阈值可用时,计算第m个线程切分后的一个或多个时间片段的分割参数。例如计算每个时间片段的执行时间除以运行时间的值,获得第m个线程的所有时间片段的分割参数的平均值。使用优化算法对初始分割阈值进行优化,即通过优化方法选择新的初始分割阈值,根据新的初始分割阈值对第m个线程的时间记录进行切分。重复上述步骤,计算根据新的初始分割阈值切分的时间片段的分割参数的平均值。当满足优化结束条件时,结束优化过程,将优化过程中获得的使每个线程的一个或多个时间片段的分割参数的平均值最大的初始分割阈值作为分割阈值,对第m个线程的时间记录按照该分割阈值进行切分,获得第m个线程的至少一个时间片段。Optionally, an optimization method may be used to optimize the segmentation threshold of each thread, including: determining at least one Refer to time slices. According to the constraints and at least one reference time segment, a segmentation parameter for each reference time segment is determined. The constraint condition is that the time information of one or more second fusion log entries in the at least one second fusion log entry is within the time range of the reference time segment, and the process in the identity information of the one or more second fusion log entries The number is the same as the process number of the identity information of each first fusion log entry included in the reference time segment. Each second fusion log entry can record any one of a receiving event, a sending event, a callback start event or a callback end event. When a callback start event is recorded in the multiple second fusion log entries, a callback end event is also recorded in the multiple second fusion log entries. The initial segmentation threshold is optimized according to an optimization method to obtain the segmentation threshold, and the optimization method includes a heuristic optimization algorithm or a solver optimization method. That is, according to the initial preset threshold value of the m-th thread among the M threads contained in the business node, the time record of the m-th thread is segmented to obtain at least one reference time segment of the m-th thread, m=1, .. ...., M, M is a positive integer greater than or equal to 1. After segmentation, judge whether the initial preset threshold for this segmentation is available according to the constraints, that is, determine whether the time information of one or more second fusion log entries in at least one second fusion log entry of the service node is within the reference time segment within the time range, and the process number in the identity information of the one or more second fusion log entries is the same as the process number in the identity information of each first fusion log entry included in the reference time segment. If so, the initial preset threshold for this split is available. Otherwise, discard the initial preset threshold for this segmentation, select a new initial preset threshold, and re-segment until the initial preset threshold is available. When the initial preset threshold is available, calculate the segmentation parameters of one or more time segments after the m-th thread is segmented. For example, calculate the value of dividing the execution time of each time segment by the running time, and obtain the average value of the segmentation parameters of all time segments of the mth thread. Use an optimization algorithm to optimize the initial segmentation threshold, that is, select a new initial segmentation threshold through an optimization method, and segment the time records of the mth thread according to the new initial segmentation threshold. Repeat the above steps to calculate the average value of the segmentation parameters of the time segments segmented according to the new initial segmentation threshold. When the optimization end condition is met, the optimization process is ended, and the initial segmentation threshold obtained during the optimization process to maximize the average value of the segmentation parameters of one or more time segments of each thread is used as the segmentation threshold. For the time of the mth thread Records are segmented according to the segmentation threshold, and at least one time segment of the mth thread is obtained.
应理解的是,每条第二融合日志条目中可以记录一个接收事件,或者可以记录一个发送事件,或者可以记录一个回调处理事件,或者可以记录一个接收事件和一个发送事件,或者可以记录一个接收事件和一个回调处理事件,或者可以记录一个发送事件和一个回调处理事件,或者可以记录一个接收事件、一个发送事件和一个回调处理事件。一个回调处理事件包括一个回调开始事件和一个回调结束事件。It should be understood that each second fusion log entry may record a receiving event, or may record a sending event, or may record a callback processing event, or may record a receiving event and a sending event, or may record a receiving event event and a callback to handle the event, or you can log a send event and a callback to handle the event, or you can log a receive event, a send event, and a callback to handle the event. A callback processing event includes a callback start event and a callback end event.
可选地,优化初始分割阈值的方法可以是启发式优化算法或求解器优化方法,启发式优化算法可以是遗传算法、蚁群算法等,优化结束条件可以根据具体的优化方法决定,例如当优化方法是遗传算法时,优化结束条件可以是满足迭代次数等,本实施例对此不做具体限定。Optionally, the method for optimizing the initial segmentation threshold can be a heuristic optimization algorithm or a solver optimization method, and the heuristic optimization algorithm can be a genetic algorithm, an ant colony algorithm, etc., and the optimization end condition can be determined according to a specific optimization method, for example, when optimizing When the method is a genetic algorithm, the optimization end condition may be the number of iterations satisfied, etc., which is not specifically limited in this embodiment.
可选地,可以使用聚类算法对第m个线程的时间记录进行切分,即将第m个线程的时间记录离散化为单位时间的时序点,按照时间记录转化的时序点之间的距离对第m个线程的时间记录进行聚类,当两个子簇的距离超过预设阈值时停止聚类,当之前已经聚合的子簇满足约束条件时,将已经聚合的子簇作为一个时间片段,获得至少一个时间片段,否则重新进行聚类,直到聚合的子簇均满足约束条件为止,约束条件为业务节点的至少一条第二融合日志条目中的一条或多条第二融合日志条目的时间信息在聚合的子簇所包括的时间范围内,并且该一条或多条第二融合日志条目的身份信息中的进程号与该聚合的子簇中包含的每条第一融合日志条目的身份信息的进程号相同。Optionally, a clustering algorithm can be used to segment the time records of the mth thread, that is, to discretize the time records of the mth thread into time series points per unit time, and the distance between the time series points transformed by the time records is The time records of the mth thread are clustered. When the distance between the two sub-clusters exceeds the preset threshold, the clustering is stopped. When the previously aggregated sub-clusters meet the constraint conditions, the aggregated sub-clusters are used as a time segment to obtain At least one time segment, otherwise re-clustering until the aggregated sub-clusters all meet the constraint condition, the constraint condition is that the time information of one or more second fusion log entries in at least one second fusion log entry of the service node is in Within the time range included in the aggregated subcluster, and the process number in the identity information of the one or more second fusion log entries is the same as the process number of the identity information of each first fusion log entry contained in the aggregated subcluster same number.
例如,对每个线程的时间记录进行切分的可视化示意图如图12所示。For example, a visual schematic diagram of splitting the time records of each thread is shown in FIG. 12 .
图12是根据本申请实施例的融合日志中多条第一融合日志条目的时间信息可视化示意图。Fig. 12 is a schematic diagram of visualized time information of multiple first fusion log entries in the fusion log according to an embodiment of the present application.
图12中t 1至t 18是融合日志中多条身份信息相同的第一融合日志条目的时间信息对应的可视化时序点,即同一线程的时间记录。图12中T 1至T 9是该线程的实际执行时间的可视化时序片段。图12中的时间片段1、时间片段2和时间片段3是对图12中线程的时间记录按照步骤S331切分后获得的时间片段。其中,时间片段1包括时序片段T 1、T 2、T 3和T 4,即时间片段1包括时序点t 1至t 8。时间片段2包括时序片段T 5和T 6,即时间片段2包括时序点t 9至t 12。时间片段3包括时序片段T 7、T 8和T 9,即时间片段3包括时序点t 13至t 18In FIG. 12 , t1 to t18 are the visual timing points corresponding to the time information of the first fusion log entry with the same identity information in the fusion log, that is, the time records of the same thread. T 1 to T 9 in FIG. 12 are visual timing fragments of the actual execution time of the thread. Time slice 1, time slice 2 and time slice 3 in FIG. 12 are the time slices obtained after dividing the time record of the thread in FIG. 12 according to step S331. Wherein, time segment 1 includes time sequence segments T 1 , T 2 , T 3 and T 4 , that is, time segment 1 includes time sequence points t 1 to t 8 . Time segment 2 includes timing segments T 5 and T 6 , that is, time segment 2 includes timing points t 9 to t 12 . Time segment 3 includes timing segments T 7 , T 8 and T 9 , that is, time segment 3 includes timing points t 13 to t 18 .
应理解的是,按照步骤S331进行切分时,若实际执行时间之间的间隔小于分割阈值,则不进行切分。如图12所示,t 2与t 3之间的差值小于分割阈值,即T 1与T 2之间的间隔小于分割阈值,因此T 1与T 2不进行切分,即T 1与T 2在同一时间片段内。若实际执行时间之间的间隔大于分割阈值,则进行切分。如图12所示,t 8与t 9之间的差值大于分割阈值,即T 4与T 5之间的间隔大于分割阈值,因此T 4与T 5进行切分,即T 4与T 5在不同的时间片段内。 It should be understood that when splitting is performed according to step S331, if the interval between actual execution times is smaller than the splitting threshold, splitting is not performed. As shown in Figure 12, the difference between t 2 and t 3 is smaller than the segmentation threshold, that is, the interval between T 1 and T 2 is smaller than the segmentation threshold, so T 1 and T 2 are not segmented, that is, T 1 and T 2 in the same time slice. If the interval between actual execution times is greater than the split threshold, splitting is performed. As shown in Figure 12, the difference between t 8 and t 9 is greater than the segmentation threshold, that is, the interval between T 4 and T 5 is greater than the segmentation threshold, so T 4 and T 5 are segmented, that is, T 4 and T 5 in different time segments.
还应理解的是,图12中,时序片段T 1至T 4对应的时间之和为该线程的时间片段1的执行时间,t 1与t 8对应的时间之差为该线程的时间片段1的运行时间。时序片段T 1至T 9对应的时间之和为该线程的执行时间,t 1与t 18对应的时间之差为该线程的运行时间。 It should also be understood that, in FIG. 12 , the sum of the times corresponding to timing segments T 1 to T 4 is the execution time of time segment 1 of the thread, and the difference between the times corresponding to t 1 and t 8 is time segment 1 of the thread running time. The sum of the times corresponding to timing segments T 1 to T 9 is the execution time of the thread, and the difference between the times corresponding to t 1 and t 18 is the running time of the thread.
应理解,图12中对时序点、时序片段、时间片段的编号命名仅是出于标识的目的,并不应理解为对本申请实施例的限制。It should be understood that the numbering and naming of timing points, timing segments, and time segments in FIG. 12 is only for the purpose of identification, and should not be construed as limiting the embodiment of the present application.
应理解的是,对业务节点包含的M个线程中的每个线程均执行步骤S331,获得每个线程的至少一个切分好的时间片段。It should be understood that step S331 is executed for each of the M threads included in the service node, and at least one segmented time segment of each thread is obtained.
应理解的是,本申请实施例对融合日志条目的时间信息的切分方法不做具体限定,可以对融合日志中对应于调度信息的身份信息相同的融合日志条目的时间信息进行切分,且使业务节点的至少一条第二融合日志条目中的一条或多条第二融合日志条目的时间点包含在切分的时间片段中的方法,均为本申请实施例保护的方法。It should be understood that the embodiment of the present application does not specifically limit the time information segmentation method of the fusion log entry, and the time information of the fusion log entry corresponding to the same identity information as the scheduling information in the fusion log can be segmented, and The method of including the time point of one or more second fusion log entries in the at least one second fusion log entry of the service node in the segmented time segment is the method protected by the embodiment of the present application.
S332,根据至少一个时间片段,确定N组融合日志条目集合。S332. Determine N groups of fusion log entry sets according to at least one time segment.
由于业务节点的每个行为包含多个线程,因此需要根据至少一个时间片段,确定N组融合日志条目集合,其中N组融合日志条目集合中的每组融合日志条目集合包括至少一个融合日志条目集合,至少一个融合日志条目集合中的每个融合日志条目集合包括至少一条第一融合日志条目和至少一条第二融合日志条目,每个融合日志条目集合包括的第二融合日志条目的时间信息在每个融合日志条目集合包括的第一融合日志条目的时间信息的范围内。Since each behavior of a business node includes multiple threads, it is necessary to determine N sets of fusion log entry sets according to at least one time segment, wherein each set of fusion log entry sets in the N sets of fusion log entry sets includes at least one fusion log entry set , each fusion log entry set in at least one fusion log entry set includes at least one first fusion log entry and at least one second fusion log entry, and the time information of the second fusion log entry included in each fusion log entry set within the range of the time information of the first fused log entry included in the set of fused log entries.
可选地,可以对步骤S331获得的业务节点的M个线程中一个进程中每个线程的时间片段进行聚合,获得至少一个簇,至少一个簇中的每个簇包括至少一个时间片段中的一个或多个时间片段,即至少一个簇中的每个簇包括至少一个线程的至少一个时间片段。Optionally, the time segments of each thread in a process among the M threads of the service node obtained in step S331 may be aggregated to obtain at least one cluster, and each cluster in the at least one cluster includes at least one of the time segments or multiple time segments, that is, each cluster in at least one cluster includes at least one time segment of at least one thread.
可选地,对M个线程的时间片段进行聚合的方法可以是:Optionally, the method of aggregating time slices of M threads may be:
(1)将每个线程的时间片段离散化为单位时间的时序点,使得每个线程的时间片段转换为一维点阵数据。例如,M个线程中第m个线程的其中一个时间片段为2ms至4ms的时间片段,将该时间片段转化为单位时间为0.5ms的时序点,获得5个时序点,分别是2ms,2.5ms,3ms,3.4ms,4ms。(1) The time segment of each thread is discretized into timing points of unit time, so that the time segment of each thread is converted into one-dimensional lattice data. For example, one of the time segments of the m-th thread among the M threads is a time segment from 2ms to 4ms, convert this time segment into a timing point with a unit time of 0.5ms, and obtain 5 timing points, which are 2ms and 2.5ms respectively , 3ms, 3.4ms, 4ms.
(2)将每个线程的时间片段的离散时序点映射到二维空间中,形成二维点阵。例如,计算每个线程的离散时序点的数量,找到离散时序点数量最多的线程T i,将T i的离散时序点全部映射到二维平面的y=0轴上;然后计算线程T j到T i的距离d ij,将线程T j的离散时序点映射到y=d ij上。其中d ij的计算方法是d ij=D-|<T i,T j>|,其中i≠j,|<T i,T j>|为线程T i和T j的离散时序点中重合的离散时序点数量,D为经验值。 (2) Map the discrete timing points of the time segments of each thread into a two-dimensional space to form a two-dimensional lattice. For example, calculate the number of discrete timing points of each thread, find the thread T i with the largest number of discrete timing points, and map all the discrete timing points of T i to the y=0 axis of the two-dimensional plane; then calculate the thread T j to The distance d ij of T i maps the discrete timing points of thread T j to y=d ij . The calculation method of d ij is d ij =D-|<T i , T j >|, where i≠j, |<T i, T j >| is coincident in the discrete timing points of threads T i and T j The number of discrete timing points, D is the empirical value.
(3)根据聚类算法将二维点阵中的数据聚集为一个大簇,即自底向上的将所有二维 点阵中的点逐渐聚集为一个大簇,使该簇呈现树的结构,每次当两个子簇聚集时的距离大于第一阈值或者距离环比大于第二阈值时,停止聚类。(3) According to the clustering algorithm, the data in the two-dimensional lattice is gathered into a large cluster, that is, the points in all the two-dimensional lattice are gradually gathered into a large cluster from bottom to top, so that the cluster presents a tree structure, Clustering is stopped each time when the distance between two sub-clusters is greater than the first threshold or the distance ratio is greater than the second threshold.
应理解的是,第一阈值和第二阈值均为预设阈值。两个子簇之间的距离可以是欧氏距离、闵可夫斯基距离、或者切比雪夫距离等,本申请实施例对此不做具体限定。两个子簇聚集时的距离环比可以是上一次子簇聚集时的阈值与本次子簇聚集时的阈值的比值,或者可以是根据上一次子簇聚集时的阈值与本次子簇聚集时的阈值获得的其他函数关系的值,本申请实施例对此不做具体限定。It should be understood that both the first threshold and the second threshold are preset thresholds. The distance between two subclusters may be Euclidean distance, Minkowski distance, or Chebyshev distance, etc., which is not specifically limited in this embodiment of the present application. The distance ring ratio when two subclusters are gathered can be the ratio of the threshold when the last subcluster was gathered to the threshold when the subcluster was gathered this time, or it can be based on the threshold when the last subcluster was gathered and the threshold when the subcluster was gathered this time. The values of other functional relationships obtained by the threshold are not specifically limited in this embodiment of the present application.
可选地,聚类算法可以是层次聚类(Hierarchical Clustering)算法,或者划分法等聚类算法,本申请实施例对此不做具体限定。Optionally, the clustering algorithm may be a hierarchical clustering (Hierarchical Clustering) algorithm, or a clustering algorithm such as a partition method, which is not specifically limited in this embodiment of the present application.
应理解的是,可以将业务节点的M个线程的时间记录聚合为至少一个簇,每个簇中包含的时间记录可以属于同一线程,也可以属于不同线程。It should be understood that the time records of M threads of the service node may be aggregated into at least one cluster, and the time records contained in each cluster may belong to the same thread or different threads.
可选地,可以根据获得的至少一个簇中的每个簇包括的时间片段,确定至少一个融合日志条目集合。其中至少一个融合日志条目集合中的每个融合日志条目集合包含至少两条第一融合日志条目和至少一条第二融合日志条目。至少一个融合日志条目集合与至少一个簇一一对应。每个融合日志条目集合包括的第一融合日志条目的时间信息位于对应的簇包括的时间片段内。每个融合日志条目集合包括的第二融合日志条目的时间信息在每个融合日志条目集合包括的第一融合日志条目的时间信息的范围内。Optionally, at least one fusion log entry set may be determined according to the obtained time segment included in each cluster of the at least one cluster. Each fusion log entry set in the at least one fusion log entry set includes at least two first fusion log entries and at least one second fusion log entry. At least one fusion log entry set is in one-to-one correspondence with at least one cluster. The time information of the first fused log entry included in each fused log entry set is located within the time segment included in the corresponding cluster. The time information of the second fusion log entry included in each fusion log entry set is within the range of the time information of the first fusion log entry included in each fusion log entry set.
在一些实施例中,可以直接根据融合日志条目的时间信息和确定的至少一个时间片段,确定至少一个融合日志条目集合,其中每个融合日志条目集合包括至少两条第一融合日志条目和至少一条第二融合日志条目。In some embodiments, at least one fusion log entry set may be determined directly according to the time information of the fusion log entry and the determined at least one time segment, wherein each fusion log entry set includes at least two first fusion log entries and at least one Second fusion log entry.
在另一些实施例中,可以根据确定的至少一个时间片段,确定至少一个第一融合日志条目集合,其中至少一个第一融合日志条目集合与至少一个时间片段一一对应。每个第一融合日志条目集合中包含的一条或多条第一融合日志条目的时间信息在对应的时间片段内。根据确定的至少一个第一融合日志条目集合,确定至少一个第二融合日志条目集合。其中至少一个第二融合日志条目集合与至少一个第一融合日志条目集合一一对应。每个第二融合日志条目集合中包含的一条或多条第二融合日志条目的时间信息在对应的第一融日志条目集合的时间范围内。根据确定的至少一个第一融合日志条目集合和对应的至少一个第二融合日志条目集合,确定至少一个融合日志条目集合。其中,每个融合日志条目集合中包含一个第一融合日志条目集合和一个第二融合日志条目集合,该第二融合日志条目集合中包含的一条或多条第二融合日志条目的时间信息在该第一融日志条目集合的时间范围内。In some other embodiments, at least one first fusion log entry set may be determined according to the determined at least one time segment, where the at least one first fusion log entry set corresponds to the at least one time segment one by one. The time information of one or more first fusion log entries included in each first fusion log entry set is within a corresponding time segment. According to the determined at least one first fusion log entry set, at least one second fusion log entry set is determined. Wherein at least one second fusion log entry set is in one-to-one correspondence with at least one first fusion log entry set. The time information of one or more second fusion log entries included in each second fusion log entry set is within the time range of the corresponding first fusion log entry set. According to the determined at least one first fusion log entry set and the corresponding at least one second fusion log entry set, at least one fusion log entry set is determined. Wherein, each fusion log entry set includes a first fusion log entry set and a second fusion log entry set, and the time information of one or more second fusion log entries contained in the second fusion log entry set is in the The time range of the first fusion log entry collection.
应理解的是,由于聚合的是M个线程中每个线程的至少一个时间片段,M为大于或等于1的正整数,即聚合的是至少一个线程中每个线程的至少一个时间记录。因此根据获得的至少一个簇包括的时间片段,可以确定至少一个簇中每个簇包括的至少一个线程的至少一个时间记录,即确定每个簇中对应包括的至少一条第一融合日志条目。还应理解的是,在步骤S331中,由于使用了一条或多条第二融合日志条目来确定至少一个时间片段,因此至少一个时间片段中的每个时间片段可以对应于至少两条第一融合日志条目和至少一条第二融合日志条目。综上所述,根据获得的至少一个簇包括的时间片段,可以确定每个簇对应的至少两条第一融合日志条目和至少一条第二融合日志条目。即可以确定每个簇对应的融合日志条目集合,每个融合日志条目集合中包含一个第一融合日志条目集合和一个 第二融合日志条目集合。It should be understood that since at least one time segment of each of the M threads is aggregated, and M is a positive integer greater than or equal to 1, that is, at least one time record of each of the at least one thread is aggregated. Therefore, according to the obtained time segment included in at least one cluster, at least one time record of at least one thread included in each cluster in at least one cluster can be determined, that is, at least one first fusion log entry correspondingly included in each cluster can be determined. It should also be understood that, in step S331, since at least one time segment is determined using one or more second fusion log entries, each time segment in the at least one time segment may correspond to at least two first fusion log entries log entry and at least one second fused log entry. In summary, according to the obtained time segment included in at least one cluster, at least two first fusion log entries and at least one second fusion log entry corresponding to each cluster can be determined. That is, the fusion log entry set corresponding to each cluster can be determined, and each fusion log entry set includes a first fusion log entry set and a second fusion log entry set.
由于在自动驾驶业务运行期间,业务节点的行为会多次重复运行,因此在融合日志中会包含一个行为多次运行的时间记录。Since the behavior of the business node will run repeatedly during the operation of the autonomous driving business, the time record of a behavior running multiple times will be included in the fusion log.
根据获得的至少一个融合日志条目集合中的每个融合日志条目集合中每条融合日志条目的身份信息,可以获得每个融合日志条目集合对应的线程的编号的集合。根据每个融合日志条目集合对应的线程的编号的集合,可以确定N组融合日志条目集合。其中N组中的第n组融合日志条目集合中的每个融合日志条目集合对应的线程的编号的集合相同。换句话说,第n组融合日志条目集合中可以仅包含一个融合日志条目集合,也可以包含多个对应的线程的编号的集合相同的融合日志条目集合。According to the obtained identity information of each fusion log entry in each fusion log entry set in at least one fusion log entry set, a set of thread numbers corresponding to each fusion log entry set can be obtained. According to the set of thread numbers corresponding to each fusion log entry set, N sets of fusion log entry sets may be determined. The number sets of threads corresponding to each fusion log entry set in the nth group of fusion log entry sets in the N groups are the same. In other words, the nth group of fused log entry sets may contain only one fused log entry set, or may include multiple fused log entry sets with the same set of corresponding thread numbers.
S333,分别根据N组融合日志条目集合,确定业务节点的N个行为的信息。S333. Determine N pieces of behavior information of the service node according to the N sets of merged log entry sets respectively.
根据步骤S332获得的N组融合日志条目集合,可以确定业务节点的N个行为。即业务节点的N个行为中的第n个行为对应N组中的第n组融合日志条目集合。换句话说,业务节点的N个行为中第n个行为可以仅对应一个融合日志条目集合,也可以对应多个融合日志条目集合,并且多个融合日志条目集合中每个融合日志条目集合对应的线程的编号的集合相同。根据业务节点的N个行为中第n个行为对应的Q个融合日志条目集合,可以确定业务节点的N个行为中第n个行为的信息,Q为大于或等于1的正整数。According to the N groups of fusion log entry sets obtained in step S332, N behaviors of the service node can be determined. That is, the nth behavior among the N behaviors of the service node corresponds to the nth group of fusion log entry sets in the N groups. In other words, the nth behavior among the N behaviors of the business node may only correspond to one fusion log entry set, or may correspond to multiple fusion log entry sets, and each fusion log entry set in the multiple fusion log entry sets corresponds to The same set of thread numbers. According to the set of Q fusion log entries corresponding to the nth behavior among the N behaviors of the service node, the information of the nth behavior among the N behaviors of the business node can be determined, and Q is a positive integer greater than or equal to 1.
业务节点的N个行为中每个行为的信息包括:每个行为中包含的线程的数量、每个行为的运行时间、每个行为的运行时间的平均值和运行时间的概率、每个行为的执行时间、每个行为的执行时间的平均值和执行时间的概率、每个行为中每个线程的运行时间、执行时间、平均运行时间和平均执行时间、每个行为中的事件的名称、每个行为中的事件的时间点的平均值或事件的时间点的概率分布模型。每个行为中的事件包括每个行为中的接收事件、每个行为中的发送事件、每个行为中的回调开始事件和每个行为中的回调结束事件。每个行为中的事件的时间点包括事件的绝对时间点或事件的相对时间点。The information of each behavior in the N behaviors of the business node includes: the number of threads contained in each behavior, the running time of each behavior, the average running time of each behavior and the probability of running time, the Execution time, average and probability of execution time for each behavior, execution time for each thread in each behavior, execution time, average and average execution time, names of events in each behavior, The average of the time points of events in a behavior or the probability distribution model of the time points of events. Events in each behavior include receive events in each behavior, send events in each behavior, callback start events in each behavior, and callback end events in each behavior. The time point of the event in each behavior includes an absolute time point of the event or a relative time point of the event.
应理解的是,可以通过第n个行为对应的Q个融合日志条目集合中第q个融合日志条目集合包含的至少两条第一融合日志条目获得以下信息:第n个行为中包含的线程的数量、第n个行为的运行时间、第n个行为的运行时间的平均值和运行时间的概率、第n个行为的执行时间、第n个行为的执行时间的平均值和执行时间的概率、第n个行为中每个线程的运行时间、执行时间、平均运行时间和平均执行时间。其中,q=1,......,Q。可以通过第n个行为对应的Q个融合日志条目集合中第q个融合日志条目集合包含的至少一条第二融合日志条目,获得以下信息:第n个行为中的事件的名称的集合、第n个行为中的事件的时间点的集合。事件的时间点可以是相对时间点,也可以是绝对时间点,本申请实施例对此不做具体限定。It should be understood that the following information can be obtained from at least two first fusion log entries contained in the Q fusion log entry set corresponding to the nth behavior: Quantity, running time of the nth behavior, average and probability of running time of the nth behavior, execution time of the nth behavior, average and probability of execution time of the nth behavior, The running time, execution time, average running time, and average execution time of each thread in the nth behavior. Wherein, q=1, . . . , Q. The following information can be obtained through at least one second fusion log entry included in the Q fusion log entry set corresponding to the nth behavior: the set of event names in the nth behavior, the nth A collection of time points for events in a behavior. The time point of the event may be a relative time point or an absolute time point, which is not specifically limited in this embodiment of the present application.
还应理解的是,可以根据获得的第n个行为中的事件的名称的集合,确定第n个行为中包含的事件的名称。若第n个行为仅运行一次,则可以通过第n个行为中的事件的时间点的集合,确定第n个行为中事件的时间点。若第n个行为会重复运行多次,则可以通过第n个行为中的事件的时间点的集合,确定第n个行为中事件的时间点的平均值或概率分布模型。It should also be understood that the name of the event included in the nth behavior may be determined according to the obtained set of names of events in the nth behavior. If the nth behavior runs only once, the time point of the event in the nth behavior can be determined through the set of time points of the events in the nth behavior. If the nth behavior will run repeatedly for many times, the average value or probability distribution model of the time points of the events in the nth behavior can be determined through the set of time points of the events in the nth behavior.
还应理解的是,若事件的时间点的集合中记录的是相对时间点,则直接根据事件的相对时间点的集合计算事件的相对时间点的平均值或相对时间点的概率分布模型。若事件的时间点的集合中记录的是绝对时间点,则将集合中的绝对时间点转化为相对时间点后,计 算事件的相对时间点的平均值或相对时间点的概率分布模型。It should also be understood that if the set of event time points records relative time points, the average value of the event relative time points or the probability distribution model of the relative time points can be directly calculated based on the set of event time points. If the set of event time points records absolute time points, after converting the absolute time points in the set into relative time points, calculate the average value of the relative time points of events or the probability distribution model of relative time points.
还应理解的是,由于业务节点的行为是由线程聚合而成的,因此业务节点的每个行为均包含一个或多个线程中每个线程的一个或多个时间片段。通过对第n个行为包含的线程的时间片段的信息进行统计,可以获得第n个行为的信息。It should also be understood that since the behavior of a service node is aggregated by threads, each behavior of a service node includes one or more time segments of each thread in one or more threads. The information of the nth behavior can be obtained by making statistics on the time segment information of the threads included in the nth behavior.
还应理解的是,若业务节点的第n个行为会重复运行多次,即第n个行为对应多个融合日志条目集合,则对第n个行为对应的每个融合日志条目集合中的时间信息进行统计,即对每个融合日志条目集合中包含的线程的时间片段的信息进行统计,从而获得第n个行为的信息。It should also be understood that if the nth behavior of the business node will be repeated multiple times, that is, the nth behavior corresponds to multiple fusion log entry sets, then the time in each fusion log entry set corresponding to the nth behavior The information is collected, that is, the information of the time segment of the thread contained in each fusion log entry set is collected, so as to obtain the information of the nth behavior.
具体而言,第n个行为中包含的线程的数量为该行为中包含的时间片段所属的线程的数量。第n个行为内的第m个线程的运行时间为:第n个行为中包含的属于第m个线程的时间片段的运行时间,即该时间片段中包含的最先开始的第一融合日志条目的时间信息和最后结束的第一融合日志条目的时间信息的差值。例如图12所示的t 1与t 18对应的时间之差为该线程的运行时间。第n个行为内的第m个线程的执行时间为:第n个行为中包含的属于第m个线程的时间片段的执行时间,即该时间片段内所有实际执行时间的和。实际执行时间为两条时间相邻的、记录线程开始执行和线程结束执行的第一融合日志条目的时间信息的差值。例如图12所示的时序片段T 1至T 9对应的时间之和为该线程的执行时间。 Specifically, the number of threads included in the nth behavior is the number of threads to which the time segment included in the behavior belongs. The running time of the mth thread in the nth behavior is: the running time of the time segment belonging to the mth thread contained in the nth behavior, that is, the first fusion log entry that is included in the time segment The difference between the time information of and the time information of the first fusion log entry that ended last. For example, the difference between the times corresponding to t1 and t18 shown in FIG. 12 is the running time of the thread. The execution time of the mth thread in the nth behavior is: the execution time of the time segment belonging to the mth thread included in the nth behavior, that is, the sum of all actual execution times in the time segment. The actual execution time is the difference between the time information of the first merged log entry that records the execution of the thread and the execution of the thread that are adjacent to each other in time. For example, the sum of the times corresponding to the timing segments T 1 to T 9 shown in FIG. 12 is the execution time of the thread.
第n个行为的运行时间为:第n个行为包含的一个或多个时间片段中,最先开始的第一融合日志条目的时间信息和最后结束的第一融合日志条目的时间信息的差值。第n个行为的执行时间为:第n个行为中包含的线程的执行时间的平均值,即第n个行为包含的线程的执行时间之和除以第n个行为包含的线程的数量。The running time of the nth behavior is: the difference between the time information of the first fusion log entry that starts first and the time information of the first fusion log entry that ends in one or more time segments included in the nth behavior . The execution time of the nth behavior is: the average execution time of the threads included in the nth behavior, that is, the sum of the execution times of the threads included in the nth behavior divided by the number of threads included in the nth behavior.
还应理解的是,由于在自动驾驶业务运行期间,业务节点的行为会多次重复运行,并且同一行为重复运行时获得的线程的执行时间、运行时间、该行为的执行时间和运行时间均可能不一致。因此可以根据获得的该行为所包含的多个线程的执行时间和多个运行时间,计算该线程的平均执行时间和平均运行时间,即计算该线程的执行时间的平均值和运行时间的平均值。根据获得的该行为的多个运行时间和多个执行时间,计算该行为的运行时间的平均值、运行时间的概率、执行时间的平均值和执行时间的概率。该行为的运行时间的概率是该行为的每个运行时间数值在所有运行时间数值中出现的概率。该行为的执行时间的概率是该行为的每个执行时间数值在所有执行时间数值中出现的概率。It should also be understood that during the operation of the autonomous driving business, the behavior of the business node will be repeatedly run, and the execution time, running time, and execution time and running time of the thread obtained when the same behavior is repeatedly run may be Inconsistent. Therefore, the average execution time and average running time of the thread can be calculated according to the execution time and multiple running times of multiple threads included in the obtained behavior, that is, the average value of the execution time and the average running time of the thread can be calculated . According to the obtained multiple running times and multiple execution times of the behavior, the average running time, the probability of running time, the average execution time and the probability of execution time of the behavior are calculated. The probability of the behavior's runtime is the probability that each runtime value of the behavior occurs among all the runtime values. The execution time probability of the behavior is the probability that each execution time value of the behavior occurs in all execution time values.
通过步骤S331至步骤S333对融合日志中对应于调度信息的融合日志条目和对应于调用事件的融合日志条目进行分析处理,可以获得业务节点的行为的信息、业务节点行为所包含的线程的运行行为等信息,便于后续对业务节点的信息和业务节点包含的线程的信息进行进一步处理,从而支持为业务节点的运行行为建立较为准确的运行行为模型。Through step S331 to step S333, the fusion log entry corresponding to the scheduling information and the fusion log entry corresponding to the invocation event in the fusion log are analyzed and processed, and the behavior information of the service node and the running behavior of the thread included in the service node behavior can be obtained and other information, which is convenient for subsequent further processing of the information of the service node and the information of the thread contained in the service node, thereby supporting the establishment of a more accurate operation behavior model for the operation behavior of the service node.
图13是根据本申请另一实施例的自动驾驶业务的业务节点的建模方法的示意性流程图。图13中的建模方法包括如下内容:Fig. 13 is a schematic flowchart of a modeling method for a service node of an automatic driving service according to another embodiment of the present application. The modeling method in Figure 13 includes the following:
S610,监控依赖关系有向图是否发生变化。S610. Monitor whether the directed graph of dependency relationship changes.
根据步骤S410中获得的业务节点的依赖关系,构建业务节点的依赖关系有向图,监控依赖关系有向图是否发生变化,即监控依赖关系有向图中的任一个或多个节点的位置或节点数量是否发生变化。若发生变化,则进入步骤S620;若未发生变化,则进入步骤S630。According to the dependency relationship of the business nodes obtained in step S410, construct the dependency relationship directed graph of the business node, and monitor whether the dependency relationship directed graph changes, that is, monitor the positions or positions of any one or more nodes in the dependency relationship directed graph Whether the number of nodes has changed. If there is a change, go to step S620; if not, go to step S630.
可选地,监控依赖关系有向图是否发生变化时,可以通过搜索算法在节点依赖关系有 向图中找到最长路径,作为监控的关键路径,监控关键路径中的节点是否发生变化,或者监控依赖关系有向图或最长路径是否发生变化。Optionally, when monitoring whether the directed graph of dependencies changes, a search algorithm can be used to find the longest path in the directed graph of node dependencies as the critical path for monitoring, and monitor whether the nodes in the critical path change, or monitor Whether the directed graph or longest path of dependencies changes.
可选地,可以使用最大生成树算法、动态规划算法或者拓扑排序算法等寻找依赖关系有向图中的最长路径。Optionally, a maximum spanning tree algorithm, a dynamic programming algorithm, or a topological sorting algorithm may be used to find the longest path in the directed dependency graph.
可选地,可以实时监控依赖关系有向图是否发生变化,或者可以每隔固定周期检查依赖关系有向图是否发生变化。Optionally, it is possible to monitor in real time whether the directed graph of dependencies changes, or to check whether the directed graph of dependencies changes at regular intervals.
可选地,步骤S610可以由监控模块222执行。Optionally, step S610 may be executed by the monitoring module 222 .
S620,通过重新获取融合日志,更新业务节点的运行行为模型。S620. Update the running behavior model of the service node by reacquiring the fusion log.
若在步骤S610中监控到以下变化,则重新从步骤S310开始获得业务节点的融合日志,并根据获得的融合日志,通过步骤S320和步骤S330更新业务节点的运行行为模型:If the following changes are monitored in step S610, then start to obtain the fusion log of the service node from step S310 again, and update the operating behavior model of the service node through steps S320 and S330 according to the obtained fusion log:
(1)依赖关系有向图中减少了一个或多个节点;(1) One or more nodes are reduced in the directed graph of dependencies;
(2)依赖关系有向图中增加了一个或多个节点;(2) One or more nodes are added to the directed graph of dependencies;
(3)依赖关系有向图中一个或多个节点的位置发生了变化;(3) The positions of one or more nodes in the dependency directed graph have changed;
(4)依赖关系有向图中的最长路径增长;(4) The longest path growth in the directed graph of dependencies;
(5)依赖关系有向图中的最长路径缩短;(5) The longest path in the directed graph of dependencies is shortened;
(6)依赖关系有向图中组成最长路径中的节点发生了变化;(6) The nodes in the longest path in the dependency directed graph have changed;
(7)依赖关系有向图中组成最长路径的一个或多个节点的位置发生了变化。(7) The position of one or more nodes that make up the longest path in the directed graph of dependencies has changed.
在更新业务节点的运行行为模型后继续执行步骤S610,构造新的依赖关系有向图,监控新的依赖关系有向图是否发生变化。After the operating behavior model of the service node is updated, continue to execute step S610, construct a new directed graph of dependencies, and monitor whether the new directed graph of dependencies changes.
S630,监控业务节点的行为数据变化是否超出阈值。S630, monitor whether the behavior data change of the service node exceeds a threshold.
在获得业务节点的运行行为模型后,监控业务节点的行为数据变化是否超出阈值,业务节点的行为数据包括业务节点的接收消息的频率、业务节点的发送消息的频率、业务节点的回调处理的时延、业务节点包含的进程的数量、业务节点的至少一个行为中每个行为包含的线程的数量中的任一项或多项。若数据变化超出阈值,则进入步骤S640,更新业务节点的运行行为模型的行为数据,否则进入步骤S650。After obtaining the operation behavior model of the service node, monitor whether the change of the behavior data of the service node exceeds the threshold value. The behavior data of the service node includes the frequency of receiving messages of the service node, the frequency of sending messages of the service node, and the callback processing time of the service node. delay, the number of processes included in the business node, and the number of threads included in each behavior of at least one behavior of the business node. If the data change exceeds the threshold, go to step S640 to update the behavior data of the operation behavior model of the service node, otherwise go to step S650.
可选地,可以在根据步骤S610监控依赖关系有向图是否发生变化的同时,监控业务节点的行为数据的变化是否超出阈值,即在监控到依赖关系有向图未发生变化时,继续监控业务节点的行为数据的变化是否超出阈值。Optionally, while monitoring whether the directed graph of dependency relationship changes according to step S610, it is possible to monitor whether the change of the behavior data of the service node exceeds the threshold, that is, when it is monitored that the directed graph of dependency relationship does not change, continue to monitor the business Whether the change of the node's behavior data exceeds the threshold.
可选地,在监控到依赖关系有向图的节点的调度策略发生变化时,若变化后的节点的调度策略导致节点的行为数据发生变化,且变化超出阈值时,根据步骤S640更新业务节点的行为数据。Optionally, when it is monitored that the scheduling policy of the node in the dependency directed graph changes, if the changed scheduling policy of the node causes the behavior data of the node to change, and the change exceeds the threshold, update the service node's behavioral data.
S640,通过算法更新业务节点的运行行为模型中的行为数据。S640. Update the behavior data in the running behavior model of the service node through an algorithm.
在监控到所述业务节点的行为数据的变化超出阈值的情况下,通过算法更新业务节点的运行行为模型中的行为数据。在更新行为数据后,继续执行步骤S610,监控依赖关系有向图是否发生变化。In a case where it is monitored that the change of the behavior data of the service node exceeds the threshold, the behavior data in the operation behavior model of the service node is updated through an algorithm. After the behavior data is updated, step S610 is continued to monitor whether the directed graph of dependencies changes.
可选的,更新行为数据的算法可以是:滑动平均算法、简单移动平均、加权移动平均、自回归滑动平均模型算法等,本申请实施例不做具体限定。Optionally, the algorithm for updating the behavior data may be: a moving average algorithm, a simple moving average, a weighted moving average, an autoregressive moving average model algorithm, etc., which are not specifically limited in this embodiment of the present application.
S650,是否处于自驾状态。S650, whether it is in self-driving state.
当监测到车辆仍处于自动驾驶模式时,重复步骤S610至步骤S640,继续监控业务节点的依赖关系有向图是否发生了变化,或业务节点的行为数据变化是否超出阈值;当监测 到车辆退出自动驾驶模式时,结束步骤S610至S640的监测。When it is detected that the vehicle is still in the automatic driving mode, repeat steps S610 to S640, and continue to monitor whether the directed graph of dependencies of the service nodes has changed, or whether the behavior data of the service nodes has changed beyond the threshold; In the driving mode, the monitoring of steps S610 to S640 ends.
可选地,监控行为可以由监控模块222执行。Optionally, the monitoring action can be performed by the monitoring module 222 .
图14是根据本申请另一实施例的自动驾驶业务的业务节点的建模方法的示意性流程图。图14中的建模方法包括如下内容:Fig. 14 is a schematic flowchart of a modeling method for a service node of an automatic driving service according to another embodiment of the present application. The modeling method in Figure 14 includes the following:
S710,根据业务节点的通信数据,确定业务节点的关联业务节点和依赖关系。步骤S710的具体实现方式与步骤S410相同,此处不再赘述。S710. According to the communication data of the service nodes, determine the associated service nodes and the dependencies of the service nodes. The specific implementation manner of step S710 is the same as that of step S410, and will not be repeated here.
S720,调整业务节点和关联业务节点的调度策略,获得调整后的调度策略。步骤S720的具体实现方式与步骤S420相同,此处不再赘述。S720. Adjust the scheduling policy of the service node and the associated service node, and obtain the adjusted scheduling policy. The specific implementation manner of step S720 is the same as that of step S420, and will not be repeated here.
S730,根据调整后的调度策略运行自动驾驶业务,采集自动驾驶业务的通信数据和调度数据,获得节点级通信日志和线程级调度日志。步骤S730的具体实现方式与步骤S430或步骤S301相同,此处不再赘述。S730. Run the automatic driving service according to the adjusted scheduling strategy, collect communication data and scheduling data of the automatic driving service, and obtain node-level communication logs and thread-level scheduling logs. The specific implementation manner of step S730 is the same as that of step S430 or step S301, and will not be repeated here.
S740,对节点级通信日志和线程级调度日志进行融合,获得融合日志。步骤S740的具体实现方式与步骤S302相同,此处不再赘述。S740, merging the node-level communication log and the thread-level scheduling log to obtain the fused log. The specific implementation manner of step S740 is the same as that of step S302, and will not be repeated here.
S750,根据融合日志获得业务节点的N个行为的信息,N为大于或等于1的正整数。步骤S750的具体实现方式与步骤S320相同,此处不再赘述。S750. Obtain information on N behaviors of service nodes according to the fusion log, where N is a positive integer greater than or equal to 1. The specific implementation manner of step S750 is the same as that of step S320, and will not be repeated here.
S760,对业务节点的N个行为的信息进行分析,获得用于描述业务节点的运行行为的运行行为模型。步骤S760的具体实现方式与步骤S330相同,此处不再赘述。S760. Analyze the information on the N behaviors of the service node to obtain an operation behavior model used to describe the operation behavior of the service node. The specific implementation manner of step S760 is the same as that of step S330, and will not be repeated here.
S770,根据所述业务节点的依赖关系,构建所述业务节点的依赖关系有向图。S770. Construct a directed graph of dependency relationships of the service nodes according to the dependency relationships of the service nodes.
根据步骤S710获取到的多个业务节点的通信数据,可以确定每个业务节点与除自身外其他业务节点的接收、发送关系,将该业务节点与除自身外其他业务节点当做有向图的节点,业务节点间的收发关系当做从发送节点指向接收节点的有向连线,从而可以根据该接收、发送关系生成业务节点的依赖关系有向图。According to the communication data of multiple service nodes obtained in step S710, the receiving and sending relationship between each service node and other service nodes except itself can be determined, and the service node and other service nodes except itself can be regarded as nodes of the directed graph , the sending and receiving relationship between service nodes is regarded as a directed connection from the sending node to the receiving node, so that a directed graph of dependency relationships of service nodes can be generated according to the receiving and sending relationship.
S780,在监控到业务节点的行为数据的变化超出阈值的情况下,更新业务节点的运行行为模型中的行为数据。步骤S780的具体实现方式与步骤S640相同,此处不再赘述。S780. Update the behavior data in the operation behavior model of the service node when it is monitored that the change of the behavior data of the service node exceeds the threshold. The specific implementation manner of step S780 is the same as that of step S640, and will not be repeated here.
S790,在监控到所述业务节点的依赖关系有向图发生了变化的情况下,重新获取业务节点的融合日志,更新业务节点的运行行为模型。步骤S790的具体实现方式与步骤S620相同,此处不再赘述。S790. Re-acquire the fusion log of the service node and update the operation behavior model of the service node when it is monitored that the directed graph of the dependency relationship of the service node has changed. The specific implementation manner of step S790 is the same as that of step S620, and will not be repeated here.
根据本申请实施例提供的自动驾驶业务的业务节点的建模方法,可以获得用于描述自动驾驶业务的业务节点的运行行为的运行行为模型,该运行行为模型可以为设计人员和开发人员提供反向开发指导,也可以通过模拟仿真等方式计算出自动驾驶业务的业务节点在硬件资源上的运行行为状态,检查业务节点在硬件资源上的运行行为状态是否符合设计预期,还可以在发生自动驾驶场景切换或自动驾驶业务更新时,监控到运行行为模型的变化,从而重新更新该运行行为模型。因此本申请实施例的业务节点的运行行为模型具有反馈指导和辅助设计的重要价值,同时本申请实施例的业务节点的运行行为模型可以作为后续自动驾驶业务代码的模拟、仿真和优化的输入,为后续自动驾驶业务代码的模拟、仿真和优化提供高精度保障。According to the modeling method of the service node of the autonomous driving service provided in the embodiment of the present application, the operation behavior model used to describe the operation behavior of the service node of the automatic driving service can be obtained, and the operation behavior model can provide feedback for designers and developers. To guide the development, it is also possible to calculate the running behavior status of the business nodes of the autonomous driving business on the hardware resources through simulation and other methods, and check whether the running behavior status of the business nodes on the hardware resources meets the design expectations. When the scene is switched or the automatic driving business is updated, the change of the operating behavior model is monitored, so as to re-update the operating behavior model. Therefore, the operating behavior model of the service node in the embodiment of the present application has important value for feedback guidance and auxiliary design. At the same time, the operating behavior model of the service node in the embodiment of the present application can be used as the input for the simulation, simulation and optimization of the subsequent automatic driving business code. Provide high-precision guarantee for the simulation, simulation and optimization of subsequent autonomous driving business codes.
以上描述了根据本申请实施例的自动驾驶业务的业务节点的建模方法,下面分别结合图15和图16描述根据本申请实施例的自动驾驶业务的业务节点的建模装置和设备。The above describes the modeling method of the service node of the automatic driving service according to the embodiment of the present application. The following describes the modeling device and equipment of the service node of the automatic driving service according to the embodiment of the present application in conjunction with FIG. 15 and FIG. 16 respectively.
本申请实施例还提供了一种计算机存储介质,该计算机存储介质中存储有程序指令,所述程序执行时可包括如图3-14对应实施例中的自动驾驶业务的业务节点的建模方法的 部分或全部步骤。The embodiment of the present application also provides a computer storage medium, the computer storage medium stores program instructions, and when the program is executed, it may include the modeling method of the service node of the automatic driving service in the corresponding embodiment as shown in Fig. 3-14 some or all of the steps.
图15是根据本申请一个实施例的自动驾驶业务的业务节点的建模装置的结构示意图。建模装置800包括获取模块810,处理模块820和监控模块830。Fig. 15 is a schematic structural diagram of a modeling device for a service node of an automatic driving service according to an embodiment of the present application. The modeling device 800 includes an acquisition module 810 , a processing module 820 and a monitoring module 830 .
获取模块810用于获取自动驾驶业务的业务节点的融合日志,执行图3的方法中的步骤S310、图4的方法、图6的方法、图9的方法、图14的方法中的步骤S710至S740中的部分或全部步骤。The obtaining module 810 is used to obtain the fusion log of the service node of the automatic driving service, and execute step S310 in the method of FIG. 3, the method of FIG. 4, the method of FIG. 6, the method of FIG. Some or all of the steps in S740.
处理模块820用于根据融合日志,获得用于描述所述业务节点的运行行为的运行行为模型,执行图3的方法中的步骤S320、步骤S330、图11的方法、图14的方法中的步骤S750、步骤S760中的部分或全部步骤。The processing module 820 is used to obtain an operation behavior model for describing the operation behavior of the service node according to the fusion log, and execute steps S320, S330, the method in FIG. 11 , and the method in FIG. 14 in the method of FIG. 3 S750, part or all of the steps in step S760.
监控模块830用于监控业务节点依赖关系有向图是否发生变化或业务节点的行为数据变化是否超出阈值,根据依赖关系有向图发生的变化重新建立业务节点的运行行为模型,或者根据业务节点的行为数据的变化更新运行行为模型中的行为数据,执行图13的方法、图14的方法中的步骤S770至S790。The monitoring module 830 is used to monitor whether the directed graph of the dependency relationship of the service node changes or whether the change of the behavior data of the service node exceeds the threshold value, and re-establish the operation behavior model of the service node according to the change of the directed graph of the dependency relationship, or according to the change of the behavior data of the service node Changes in the behavior data update the behavior data in the running behavior model, and execute steps S770 to S790 in the method of FIG. 13 and the method of FIG. 14 .
图16是根据本申请实施例提供的IO设备的结构框图。图16所示的IO设备900包括:处理器901、存储器902和通信接口903,处理器901、存储器902和通信接口903通过总线904相通信。接收器905用于接收来自于主机的待处理请求,发送器906用于将存储器902中存储的待处理请求发送至计算集群中的另一计算设备。Fig. 16 is a structural block diagram of an IO device provided according to an embodiment of the present application. The IO device 900 shown in FIG. 16 includes: a processor 901 , a memory 902 and a communication interface 903 , and the processor 901 , the memory 902 and the communication interface 903 communicate through a bus 904 . The receiver 905 is used to receive pending requests from the host, and the sender 906 is used to send the pending requests stored in the memory 902 to another computing device in the computing cluster.
上述本发明实施例揭示的方法可以应用于处理器901中,或者由处理器901实现。处理器901可以是中央处理器(central processing unit,CPU),还可以是其他通用处理器、数字信号处理器(digital signal processor,DSP)、专用集成电路(application specific integrated circuit,ASIC)、现场可编程门阵列(field programmable gate array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者是任何常规的处理器等。在实现过程中,上述方法的各步骤可以通过处理器901中的硬件的集成逻辑电路或者软件形式的指令完成。可以实现或者执行本发明实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本发明实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于存储器902中,该存储器902可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(read-only memory,ROM)、可编程只读存储器(programmable ROM,PROM)、可擦除可编程只读存储器(erasable PROM,EPROM)、电可擦除可编程只读存储器(electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(random access memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(static RAM,SRAM)、动态随机存取存储器(DRAM)、同步动态随机存取存储器(synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(double data date SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(direct rambus RAM,DR RAM)处理器901读取存储器902中的指令,结合其硬件完成上述方法的步骤。The methods disclosed in the foregoing embodiments of the present invention may be applied to the processor 901 or implemented by the processor 901 . Processor 901 can be a central processing unit (central processing unit, CPU), and can also be other general processors, digital signal processors (digital signal processor, DSP), application specific integrated circuits (application specific integrated circuit, ASIC), on-site Programmable gate array (field programmable gate array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general purpose processor may be a microprocessor or any conventional processor or the like. In the implementation process, each step of the above method may be completed by an integrated logic circuit of hardware in the processor 901 or instructions in the form of software. Various methods, steps and logic block diagrams disclosed in the embodiments of the present invention may be implemented or executed. A general-purpose processor may be a microprocessor, or the processor may be any conventional processor, or the like. The steps of the methods disclosed in the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. Software modules may be located in memory 902, which may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. Among them, the non-volatile memory can be read-only memory (read-only memory, ROM), programmable read-only memory (programmable ROM, PROM), erasable programmable read-only memory (erasable PROM, EPROM), electrically programmable Erases programmable read-only memory (electrically EPROM, EEPROM) or flash memory. Volatile memory can be random access memory (RAM), which acts as external cache memory. By way of illustration and not limitation, many forms of RAM are available such as static random access memory (static RAM, SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (synchronous DRAM, SDRAM), Double data rate synchronous dynamic random access memory (double data date SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (enhanced SDRAM, ESDRAM), synchronous connection dynamic random access memory (synchlink DRAM, SLDRAM) and direct A memory bus random access memory (direct rambus RAM, DR RAM) processor 901 reads instructions in the memory 902, and completes the steps of the above method in combination with its hardware.
存储器902可以存储用于执行上述实施例中IO设备执行的方法的指令。处理器901 可以执行存储器902中存储的指令结合其他硬件(例如接收器905和发送器906)完成上述实施例中IO设备的步骤,具体工作过程和有益效果可以上述实施例中的描述。The memory 902 may store instructions for executing the method performed by the IO device in the foregoing embodiments. The processor 901 can execute the instructions stored in the memory 902 and combine with other hardware (such as the receiver 905 and the transmitter 906) to complete the steps of the IO device in the above embodiment, and the specific working process and beneficial effects can be described in the above embodiment.
存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(read-only memory,ROM)、可编程只读存储器(programmable ROM,PROM)、可擦除可编程只读存储器(erasable PROM,EPROM)、电可擦除可编程只读存储器(electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(random access memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(static RAM,SRAM)、动态随机存取存储器(dynamic RAM,DRAM)、同步动态随机存取存储器(synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(double data rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(direct rambus RAM,DR RAM)。应注意,本文描述的系统和方法的存储器旨在包括但不限于这些和任意其它适合类型的存储器。Memory can be volatile memory or nonvolatile memory, or can include both volatile and nonvolatile memory. Among them, the non-volatile memory can be read-only memory (read-only memory, ROM), programmable read-only memory (programmable ROM, PROM), erasable programmable read-only memory (erasable PROM, EPROM), electrically programmable Erases programmable read-only memory (electrically EPROM, EEPROM) or flash memory. Volatile memory can be random access memory (RAM), which acts as external cache memory. By way of illustration and not limitation, many forms of RAM are available such as static random access memory (static RAM, SRAM), dynamic random access memory (dynamic RAM, DRAM), synchronous dynamic random access memory (synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (double data rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (enhanced SDRAM, ESDRAM), synchronous connection dynamic random access memory (synchlink DRAM, SLDRAM ) and direct memory bus random access memory (direct rambus RAM, DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but not be limited to, these and any other suitable types of memory.
总线904除包括数据总线之外,还可以包括电源总线、控制总线和状态信号总线等。但是为了清楚说明起见,在图中将各种总线都标为总线904。In addition to the data bus, the bus 904 may also include a power bus, a control bus, a status signal bus, and the like. However, for clarity of illustration, the various buses are labeled as bus 904 in the figure.
本申请实施例还提供了一种芯片系统,该芯片系统包括逻辑电路,该逻辑电路用于与输入/输出接口耦合,通过该输入/输出接口传输数据,以执行上述实施例中IO设备执行的各个步骤。The embodiment of the present application also provides a chip system, the chip system includes a logic circuit, the logic circuit is used to couple with the input/output interface, and transmit data through the input/output interface, so as to execute the IO device in the above embodiment various steps.
根据本申请实施例提供的方法,本申请还提供一种计算机程序产品,该计算机程序产品包括:计算机程序代码,当该计算机程序代码在计算机上运行时,使得该计算机执行上述实施例中的各个步骤。According to the methods provided in the embodiments of the present application, the present application also provides a computer program product, the computer program product including: computer program code, when the computer program code is run on the computer, the computer is made to execute each of the above-mentioned embodiments. step.
根据本申请实施例提供的方法,本申请还提供一种计算机可读介质,该计算机可读介质存储有程序代码,当该程序代码在计算机上运行时,使得该计算机执行上述实施例中的各个步骤。According to the methods provided in the embodiments of the present application, the present application also provides a computer-readable medium, the computer-readable medium stores program codes, and when the program codes are run on a computer, the computer is made to execute each of the above-mentioned embodiments. step.
在实现过程中,上述方法的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令或程序代码完成。结合本申请实施例所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法的步骤。为避免重复,这里不再详细描述。In the implementation process, each step of the above-mentioned method can be completed by an integrated logic circuit of hardware in a processor or an instruction or program code in the form of software. The steps of the methods disclosed in connection with the embodiments of the present application may be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in the processor. The software module can be located in a mature storage medium in the field such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, register. The storage medium is located in the memory, and the processor reads the information in the memory, and completes the steps of the above method in combination with its hardware. To avoid repetition, no detailed description is given here.
应注意,本申请实施例中的处理器可以是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法实施例的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令或程序代码完成。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法的步骤。It should be noted that the processor in the embodiment of the present application may be an integrated circuit chip, which has a signal processing capability. In the implementation process, each step of the above-mentioned method embodiments may be implemented by an integrated logic circuit of hardware in a processor or instructions or program codes in the form of software. A general-purpose processor may be a microprocessor, or the processor may be any conventional processor, or the like. The steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module can be located in a mature storage medium in the field such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, register. The storage medium is located in the memory, and the processor reads the information in the memory, and completes the steps of the above method in combination with its hardware.
本申请的实施例提供了自动驾驶业务的业务节点的建模方法、装置和设备。对于本领 域技术人员将会显而易见的是,本申请可以不受限制地使用其他类型的自动驾驶车辆平台,本发明的实施例可以应用于各种类型的自动驾驶车辆平台。Embodiments of the present application provide a modeling method, device and equipment for a service node of an automatic driving service. It will be obvious to those skilled in the art that the present application can use other types of self-driving vehicle platforms without limitation, and the embodiments of the present invention can be applied to various types of self-driving vehicle platforms.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those skilled in the art can appreciate that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present application.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the above-described system, device and unit can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods may be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the functions described above are realized in the form of software function units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disc and other media that can store program codes. .
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above is only a specific implementation of the application, but the scope of protection of the application is not limited thereto. Anyone familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the application. Should be covered within the protection scope of this application. Therefore, the protection scope of the present application should be determined by the protection scope of the claims.

Claims (21)

  1. 一种自动驾驶业务的建模方法,其特征在于,包括:A modeling method for an automatic driving service, comprising:
    获得自动驾驶业务的业务节点的融合日志,所述融合日志用于记录所述业务节点的调用事件和线程的调度信息,所述线程由所述业务节点运行;Obtaining the fusion log of the service node of the automatic driving service, the fusion log is used to record the calling event of the service node and the scheduling information of the thread, and the thread is run by the service node;
    根据所述融合日志获得所述业务节点的N个行为的信息,N为大于或等于1的正整数;Obtain information on N behaviors of the service node according to the fusion log, where N is a positive integer greater than or equal to 1;
    对所述业务节点的N个行为的信息进行分析,获得用于描述所述业务节点的运行行为的运行行为模型。The information on the N behaviors of the service node is analyzed to obtain an operation behavior model for describing the operation behavior of the service node.
  2. 根据权利要求1所述的方法,其特征在于,所述获得自动驾驶业务的业务节点的融合日志,包括:The method according to claim 1, wherein said obtaining the fusion log of the service node of the automatic driving service comprises:
    获得所述业务节点的节点级通信日志和线程级调度日志,所述节点级通信日志用于记录所述业务节点的调用事件,所述线程级调度日志用于记录所述线程的调度信息;Obtaining a node-level communication log and a thread-level scheduling log of the service node, the node-level communication log is used to record the invocation event of the service node, and the thread-level scheduling log is used to record the scheduling information of the thread;
    对所述节点级通信日志和所述线程级调度日志进行融合,获得融合日志,所述融合日志中的每条融合日志条目对应于所述节点级通信日志中的一条通信日志条目或者所述线程级调度日志中的一条调度日志条目,所述至少两条融合日志条目中的每条融合日志条目用于记录对应的日志条目的内容。Fusing the node-level communication log and the thread-level scheduling log to obtain a fusion log, where each fusion log entry in the fusion log corresponds to a communication log entry in the node-level communication log or the thread One scheduling log entry in the level scheduling log, each of the at least two fusion log entries is used to record the content of the corresponding log entry.
  3. 根据权利要求2所述的方法,其特征在于,所述获得所述业务节点的节点级通信日志和线程级调度日志,包括:The method according to claim 2, wherein the obtaining the node-level communication log and the thread-level scheduling log of the service node comprises:
    根据所述业务节点的通信数据,确定所述业务节点的关联业务节点和依赖关系,所述关联业务节点包括所述业务节点的祖先节点或者所述业务节点的子孙节点中的至少一个;According to the communication data of the service node, determine the associated service node and the dependency relationship of the service node, the associated service node includes at least one of the ancestor node of the service node or the descendant node of the service node;
    调整所述业务节点和所述关联业务节点的调度策略,获得调整后的调度策略;Adjusting the scheduling strategy of the service node and the associated service node to obtain the adjusted scheduling strategy;
    根据所述调整后的调度策略运行所述自动驾驶业务,采集所述业务节点的通信数据和调度数据,获得所述节点级通信日志和所述线程级调度日志。Running the automatic driving service according to the adjusted scheduling policy, collecting communication data and scheduling data of the service node, and obtaining the node-level communication log and the thread-level scheduling log.
  4. 根据权利要求1至3中任一项所述的方法,其特征在于,所述根据所述融合日志获得所述业务节点的N个行为的信息,包括:The method according to any one of claims 1 to 3, wherein the obtaining information on the N behaviors of the service node according to the fusion log includes:
    根据所述融合日志中的融合日志条目,确定至少一个时间片段,其中所述至少一个时间片段中的每个时间片段对应于至少两条第一融合日志条目和至少一条第二融合日志条目,所述第一融合日志条目为所述融合日志中对应于所述调度信息的融合日志条目,所述第二融合日志条目为所述融合日志中对应于所述调用事件的融合日志条目,所述每个时间片段对应的融合日志条目的时间信息在所述每个时间片段内;According to the fusion log entry in the fusion log, at least one time segment is determined, wherein each time segment in the at least one time segment corresponds to at least two first fusion log entries and at least one second fusion log entry, so The first fusion log entry is a fusion log entry corresponding to the scheduling information in the fusion log, the second fusion log entry is a fusion log entry corresponding to the call event in the fusion log, and each The time information of the fusion log entry corresponding to each time segment is within each time segment;
    根据所述至少一个时间片段,确定N组融合日志条目集合,所述N组融合日志条目集合中的每组融合日志条目集合包括至少一个融合日志条目集合,所述至少一个融合日志条目集合中的每个融合日志条目集合包括至少一条第一融合日志条目和至少一条第二融合日志条目,所述每个融合日志条目集合包括的第二融合日志条目的时间信息在所述每个融合日志条目集合包括的第一融合日志条目的时间信息的范围内;According to the at least one time segment, determine N sets of fusion log entry sets, each set of fusion log entry sets in the N sets of fusion log entry sets includes at least one fusion log entry set, and the at least one fusion log entry set Each fusion log entry set includes at least one first fusion log entry and at least one second fusion log entry, and the time information of the second fusion log entry included in each fusion log entry set is included in each fusion log entry set Include within the time information of the first fusion log entry;
    分别根据所述N组融合日志条目集合确定所述业务节点的N个行为的信息。Determine N pieces of behavior information of the service node according to the N groups of fusion log entry sets respectively.
  5. 根据权利要求4所述的方法,其特征在于,所述根据所述融合日志中的融合日志条目,确定至少一个时间片段,包括:The method according to claim 4, wherein said determining at least one time segment according to the fusion log entry in the fusion log comprises:
    根据所述融合日志包括的第一融合日志条目的时间信息和身份信息与所述融合日志 条目包括的第二融合日志条目的时间信息和身份信息,确定所述至少一个时间片段,其中所述每个时间片段对应的至少两条第一融合日志条目的身份信息相同,所述每个时间片段对应的至少两条第一融合日志条目中时间相邻的两条第一融合日志条目的时间间隔小于分割阈值,所述每个时间片段对应的至少一条第二融合日志条目的进程号与所述每个时间片段对应的至少两条第一融合日志条目的进程号相同。Determine the at least one time segment according to the time information and identity information of the first fusion log entry included in the fusion log and the time information and identity information of the second fusion log entry included in the fusion log entry, wherein each The identity information of at least two first fusion log entries corresponding to each time segment is the same, and the time interval between the two first fusion log entries adjacent in time among the at least two first fusion log entries corresponding to each time segment is less than The segmentation threshold, the process number of the at least one second fusion log entry corresponding to each time segment is the same as the process number of the at least two first fusion log entries corresponding to each time segment.
  6. 根据权利要求1至5中任一项所述的方法,其特征在于,所述对所述业务节点的N个行为的信息进行分析,获得用于描述所述业务节点的运行行为的运行行为模型,包括:The method according to any one of claims 1 to 5, wherein the information on the N behaviors of the service node is analyzed to obtain an operation behavior model for describing the operation behavior of the service node ,include:
    根据第一行为的信息和与所述业务节点存在收发关系的业务节点的行为的信息,获得所述第一行为的触发关系,所述第一行为为所述业务节点的N个行为中的任一个行为,所述与所述业务节点存在收发关系的业务节点包括:向所述业务节点发送消息的业务节点,或接收所述业务节点发送的消息的业务节点中的一个或多个;Obtain the trigger relationship of the first behavior according to the information of the first behavior and the behavior information of the service node that has a transceiving relationship with the service node, and the first behavior is any of the N behaviors of the service node. In one behavior, the service node that has a sending and receiving relationship with the service node includes: one or more of the service node that sends a message to the service node, or one or more of the service nodes that receive the message sent by the service node;
    根据所述第一行为的信息和所述第一行为的触发关系,获得触发所述第一行为的每个行为对应的接收事件的消息通道,所述第一行为的运行行为模型包括所述触发所述第一行为的每个行为对应的接收事件的消息通道。According to the information of the first behavior and the trigger relationship of the first behavior, obtain the message channel for receiving events corresponding to each behavior that triggers the first behavior, and the running behavior model of the first behavior includes the trigger Each behavior of the first behavior corresponds to a message channel for receiving events.
  7. 根据权利要求1至5中任一项所述的方法,其特征在于,所述对所述业务节点的N个行为的信息进行分析,获得用于描述所述业务节点的运行行为的运行行为模型,包括:The method according to any one of claims 1 to 5, wherein the information on the N behaviors of the service node is analyzed to obtain an operation behavior model for describing the operation behavior of the service node ,include:
    将第一行为对应的一个或多个第一融合日志条目集合中包含的每条第一融合日志条目的时间信息转换为频域数据,所述第一行为为所述业务节点的N个行为中的任一个行为,所述第一融合日志条目为所述融合日志中对应于所述调度信息的融合日志条目;converting the time information of each first fusion log entry contained in one or more first fusion log entry sets corresponding to the first behavior into frequency domain data, the first behavior being the N behaviors of the service node Any one of the behaviors, the first fusion log entry is a fusion log entry corresponding to the scheduling information in the fusion log;
    确定所述频域数据中是否存在一个或多个超出所述频域数据的平均值的频率值;determining whether there are one or more frequency values in the frequency domain data that exceed the average value of the frequency domain data;
    若是,则根据所述一个或多个超出所述频域数据的平均值的频率值,确定所述第一行为的至少一个时间触发周期,所述第一行为的运行行为模型包括所述第一行为的至少一个时间触发周期。If so, at least one time-triggered period of the first behavior is determined based on the one or more frequency values exceeding the average value of the frequency domain data, the operating behavior model of the first behavior includes the first Behavior with at least one time-triggered period.
  8. 根据权利要求1至5中任一项所述的方法,其特征在于,所述对所述业务节点的N个行为的信息进行分析,获得用于描述所述业务节点的运行行为的运行行为模型,包括:The method according to any one of claims 1 to 5, wherein the information on the N behaviors of the service node is analyzed to obtain an operation behavior model for describing the operation behavior of the service node ,include:
    根据第一行为对应的一个或多个第一融合日志条目集合中包含的至少两条第一融合日志条目的时间信息的间隔,获得所述第一行为运行的时间概率模型,所述第一行为的运行行为模型包括所述第一行为运行的时间概率模型,其中所述第一行为为所述业务节点的N个行为中的任一个行为,所述第一融合日志条目为所述融合日志中对应于所述调度信息的融合日志条目。According to the interval of the time information of at least two first fusion log entries contained in one or more first fusion log entry sets corresponding to the first behavior, the time probability model of the operation of the first behavior is obtained, and the first behavior The operation behavior model includes the time probability model of the operation of the first behavior, wherein the first behavior is any one of the N behaviors of the service node, and the first fusion log entry is the A fusion log entry corresponding to the scheduling information.
  9. 根据权利要求1至8中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 8, further comprising:
    在监控到所述业务节点的依赖关系有向图发生了变化的情况下,更新所述业务节点的运行行为模型;或者,In the case of monitoring that the directed graph of dependencies of the service nodes has changed, updating the operation behavior model of the service nodes; or,
    在监控到所述业务节点的行为数据的变化超出阈值的情况下,更新所述业务节点的运行行为模型中的行为数据。In a case where it is monitored that the change of the behavior data of the service node exceeds a threshold, the behavior data in the operation behavior model of the service node is updated.
  10. 一种计算机装置,其特征在于,包括:A computer device, characterized in that it includes:
    获取模块,用于获得自动驾驶业务的业务节点的融合日志,所述融合日志用于记录所述业务节点的调用事件和线程的调度信息,所述线程由所述业务节点运行;An acquisition module, configured to obtain a fusion log of a service node of an automatic driving service, where the fusion log is used to record the calling event of the service node and scheduling information of a thread, and the thread is run by the service node;
    处理模块,用于根据所述融合日志获得所述业务节点的N个行为的信息,N为大于或等于1的正整数;A processing module, configured to obtain information on N behaviors of the service node according to the fusion log, where N is a positive integer greater than or equal to 1;
    所述处理模块,还用于对所述业务节点的N个行为的信息进行分析,获得用于描述所述业务节点的运行行为的运行行为模型。The processing module is further configured to analyze information on the N behaviors of the service node, and obtain an operation behavior model for describing the operation behavior of the service node.
  11. 根据权利要求10所述的计算机装置,其特征在于,所述获取模块,具体用于获得所述业务节点的节点级通信日志和线程级调度日志,所述节点级通信日志用于记录所述业务节点的调用事件,所述线程级调度日志用于记录所述线程的调度信息;The computer device according to claim 10, wherein the obtaining module is specifically configured to obtain a node-level communication log and a thread-level scheduling log of the service node, and the node-level communication log is used to record the service An invocation event of a node, the thread-level scheduling log is used to record the scheduling information of the thread;
    所述获取模块,还用于对所述节点级通信日志和所述线程级调度日志进行融合,获得融合日志,所述融合日志中的每条融合日志条目对应于所述节点级通信日志中的一条通信日志条目或者所述线程级调度日志中的一条调度日志条目,所述至少两条融合日志条目中的每条融合日志条目用于记录对应的日志条目的内容。The acquiring module is further configured to fuse the node-level communication log and the thread-level scheduling log to obtain a fusion log, and each fusion log entry in the fusion log corresponds to an entry in the node-level communication log A communication log entry or a scheduling log entry in the thread-level scheduling log, each of the at least two fusion log entries is used to record the content of the corresponding log entry.
  12. 根据权利要求11所述的计算机装置,其特征在于,所述获取模块,具体用于根据所述业务节点的通信数据,确定所述业务节点的关联业务节点和依赖关系,所述关联业务节点包括所述业务节点的祖先节点或者所述业务节点的子孙节点中的至少一个;The computer device according to claim 11, wherein the acquisition module is specifically configured to determine the associated service nodes and dependencies of the service nodes according to the communication data of the service nodes, and the associated service nodes include At least one of the ancestor node of the service node or the descendant node of the service node;
    所述获取模块,还用于调整所述业务节点和所述关联业务节点的调度策略,获得调整后的调度策略;The obtaining module is further configured to adjust the scheduling strategy of the service node and the associated service node, and obtain the adjusted scheduling strategy;
    所述获取模块,还用于根据所述调整后的调度策略运行所述自动驾驶业务,采集所述业务节点的通信数据和调度数据,获得所述节点级通信日志和所述线程级调度日志。The acquiring module is further configured to run the automatic driving service according to the adjusted scheduling strategy, collect communication data and scheduling data of the service node, and obtain the node-level communication log and the thread-level scheduling log.
  13. 根据权利要求10至12中任一项所述的计算机装置,其特征在于,所述处理模块,具体用于根据所述融合日志中的融合日志条目,确定至少一个时间片段,其中所述至少一个时间片段中的每个时间片段对应于至少两条第一融合日志条目和至少一条第二融合日志条目,所述第一融合日志条目为所述融合日志中对应于所述调度信息的融合日志条目,所述第二融合日志条目为所述融合日志中对应于所述调用事件的融合日志条目,所述每个时间片段对应的融合日志条目的时间信息在所述每个时间片段内;The computer device according to any one of claims 10 to 12, wherein the processing module is specifically configured to determine at least one time segment according to fusion log entries in the fusion log, wherein the at least one Each time segment in the time segment corresponds to at least two first fusion log entries and at least one second fusion log entry, and the first fusion log entry is a fusion log entry corresponding to the scheduling information in the fusion log , the second fusion log entry is a fusion log entry corresponding to the call event in the fusion log, and the time information of the fusion log entry corresponding to each time segment is within each time segment;
    所述处理模块,具体用于根据所述至少一个时间片段,确定N组融合日志条目集合,所述N组融合日志条目集合中的每组融合日志条目集合包括至少一个融合日志条目集合,所述至少一个融合日志条目集合中的每个融合日志条目集合包括至少一条第一融合日志条目和至少一条第二融合日志条目,所述每个融合日志条目集合包括的第二融合日志条目的时间信息在所述每个融合日志条目集合包括的第一融合日志条目的时间信息的范围内;The processing module is specifically configured to determine N sets of fusion log entry sets according to the at least one time segment, each set of fusion log entry sets in the N sets of fusion log entry sets includes at least one fusion log entry set, the Each fusion log entry set in at least one fusion log entry set includes at least one first fusion log entry and at least one second fusion log entry, and the time information of the second fusion log entry included in each fusion log entry set is at Within the range of the time information of the first fusion log entry included in each collection of fusion log entries;
    所述处理模块,具体用于分别根据所述N组融合日条目集合确定所述业务节点的N个行为的信息。The processing module is specifically configured to determine information on N behaviors of the service node according to the N sets of fusion day entry sets respectively.
  14. 根据权利要求13所述的计算机装置,其特征在于,所述处理模块,具体用于根据所述融合日志包括的第一融合日志条目的时间信息和身份信息与所述融合日志条目包括的第二融合日志条目的时间信息和身份信息,确定所述至少一个时间片段,其中所述每个时间片段对应的至少两条第一融合日志条目的身份信息相同,所述每个时间片段对应的至少两条第一融合日志条目中时间相邻的两条第一融合日志条目的时间间隔小于分割阈值,所述每个时间片段对应的至少一条第二融合日志条目的进程号与所述每个时间片段对应的至少两条第一融合日志条目的进程号相同。The computer device according to claim 13, wherein the processing module is specifically configured to combine the time information and identity information of the first fusion log entry included in the fusion log with the second fusion log entry included in the fusion log. Fusing the time information and identity information of log entries to determine the at least one time segment, wherein the identity information of at least two first fusion log entries corresponding to each time segment is the same, and at least two of the first fusion log entries corresponding to each time segment The time interval between two first fusion log entries adjacent in time among the first fusion log entries is less than the segmentation threshold, and the process number of at least one second fusion log entry corresponding to each time segment is the same as the process number of each time segment The process IDs of at least two corresponding first fusion log entries are the same.
  15. 根据权利要求10至14中任一项所述的计算机装置,其特征在于,所述处理模块,具体用于根据第一行为的信息和与所述业务节点存在收发关系的业务节点的行为的信息,获得所述第一行为的触发关系,所述第一行为为所述业务节点的N个行为中的任一个行为,所述与所述业务节点存在收发关系的业务节点包括:向所述业务节点发送消息的业务节点, 或接收所述业务节点发送的消息的业务节点中的一个或多个;The computer device according to any one of claims 10 to 14, wherein the processing module is specifically configured to use the first behavior information and the behavior information of the service node that has a transceiving relationship with the service node , to obtain the trigger relationship of the first behavior, the first behavior is any one of the N behaviors of the service node, and the service node that has a sending and receiving relationship with the service node includes: sending to the service node A service node sending a message from a node, or one or more of service nodes receiving a message sent by the service node;
    所述处理模块,具体用于根据所述第一行为的信息和所述第一行为的触发关系,获得触发所述第一行为的每个行为对应的接收事件的消息通道,所述第一行为的运行行为模型包括所述触发所述第一行为的每个行为对应的接收事件的消息通道。The processing module is specifically configured to obtain, according to the information of the first behavior and the trigger relationship of the first behavior, a message channel for receiving an event corresponding to each behavior that triggers the first behavior, and the first behavior The running behavior model includes a message channel for receiving events corresponding to each behavior that triggers the first behavior.
  16. 根据权利要求10至14中任一项所述的计算机装置,其特征在于,所述处理模块,具体用于将第一行为对应的一个或多个第一融合日志条目集合中包含的每条第一融合日志条目的时间信息转换为频域数据,所述第一行为为所述业务节点的N个行为中的任一个行为,所述第一融合日志条目为所述融合日志中对应于所述调度信息的融合日志条目;The computer device according to any one of claims 10 to 14, wherein the processing module is specifically configured to convert each entry contained in the one or more first fusion log entry sets corresponding to the first line to The time information of a fusion log entry is converted into frequency domain data, the first behavior is any one of the N behaviors of the service node, and the first fusion log entry is corresponding to the Fusion log entries for scheduling information;
    所述处理模块,具体用于确定所述频域数据中是否存在一个或多个超出所述频域数据的平均值的频率值,若是,则根据所述一个或多个超出所述频域数据的平均值的频率值,确定所述第一行为的至少一个时间触发周期,所述第一行为的运行行为模型包括所述第一行为的至少一个时间触发周期。The processing module is specifically configured to determine whether there are one or more frequency values exceeding the average value of the frequency domain data in the frequency domain data, and if so, according to the one or more frequency values exceeding the average value of the frequency domain data The frequency value of the average value of the first behavior determines at least one time-triggered period of the first behavior, and the running behavior model of the first behavior includes at least one time-triggered period of the first behavior.
  17. 根据权利要求10至14中任一项所述的计算机装置,其特征在于,所述处理模块,具体用于根据第一行为对应的一个或多个第一融合日志条目集合中包含的至少两条第一融合日志条目的时间信息的间隔,获得所述第一行为运行的时间概率模型,所述第一行为的运行行为模型包括所述第一行为的时间概率模型,其中所述第一行为为所述业务节点的N个行为中的任一个行为,所述第一融合日志条目为所述融合日志中对应于所述调度信息的融合日志条目。The computer device according to any one of claims 10 to 14, wherein the processing module is specifically configured to include at least two entries contained in one or more first fusion log entry sets corresponding to the first behavior. The interval of the time information of the first fusion log entry to obtain the time probability model of the operation of the first behavior, the operation behavior model of the first behavior includes the time probability model of the first behavior, wherein the first behavior is For any one of the N behaviors of the service node, the first fusion log entry is a fusion log entry corresponding to the scheduling information in the fusion log.
  18. 根据权利要求10至17中任一项所述的计算机装置,其特征在于,所述计算机装置,还包括:监控模块,具体用于在监控到所述业务节点的依赖关系有向图发生了变化的情况下,更新所述业务节点的运行行为模型;或者,The computer device according to any one of claims 10 to 17, characterized in that the computer device further comprises: a monitoring module, specifically configured to monitor changes in the directed graph of dependencies of the service nodes In the case of , update the operating behavior model of the service node; or,
    所述监控模块,具体用于在监控到所述业务节点的行为数据的变化超出阈值的情况下,更新所述业务节点的运行行为模型中的行为数据。The monitoring module is specifically configured to update the behavior data in the operation behavior model of the service node when it is monitored that the change of the behavior data of the service node exceeds a threshold.
  19. 一种计算机设备,其特征在于,包括:处理器,所述处理器用于与存储器耦合,读取并执行所述存储器中的指令和/或程序代码,以执行如权利要求1-9中任一项所述的方法。A computer device, characterized in that it comprises: a processor, configured to be coupled to a memory, to read and execute instructions and/or program codes in the memory, so as to perform any one of claims 1-9 method described in the item.
  20. 一种芯片系统,其特征在于,包括:逻辑电路,所述逻辑电路用于与输入/输出接口耦合,通过所述输入/输出接口传输数据,以执行如权利要求1-9中任一项所述的方法。A system on a chip, characterized in that it includes: a logic circuit, the logic circuit is used to couple with an input/output interface, and transmit data through the input/output interface, so as to perform the operation described in any one of claims 1-9. described method.
  21. 一种计算机可读介质,其特征在于,所述计算机可读介质存储有程序代码,当所述计算机程序代码在计算机上运行时,使得计算机执行如权利要求1-9中任一项所述的方法。A computer-readable medium, characterized in that the computer-readable medium stores program codes, and when the computer program codes run on a computer, the computer executes the method described in any one of claims 1-9. method.
PCT/CN2022/120747 2021-11-26 2022-09-23 Modeling method for self-driving service and related device WO2023093257A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111424208.2 2021-11-26
CN202111424208.2A CN116186955A (en) 2021-11-26 2021-11-26 Modeling method of automatic driving business and related equipment

Publications (1)

Publication Number Publication Date
WO2023093257A1 true WO2023093257A1 (en) 2023-06-01

Family

ID=86451024

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/120747 WO2023093257A1 (en) 2021-11-26 2022-09-23 Modeling method for self-driving service and related device

Country Status (2)

Country Link
CN (1) CN116186955A (en)
WO (1) WO2023093257A1 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110825801A (en) * 2019-11-06 2020-02-21 卡斯柯信号(成都)有限公司 Train signal system vehicle-mounted log analysis system and method based on distributed architecture
US20200134379A1 (en) * 2018-10-30 2020-04-30 Toyota Research Institute, Inc. Auto-labeling of driving logs using analysis-by-synthesis and unsupervised domain adaptation
CN112650220A (en) * 2020-12-04 2021-04-13 东风汽车集团有限公司 Automatic vehicle driving method, vehicle-mounted controller and system
CN113342495A (en) * 2021-06-24 2021-09-03 山东理工大学 Cross-organization multi-instance subprocess model mining method and system
CN113516301A (en) * 2021-06-22 2021-10-19 中国联合网络通信集团有限公司 Task scheduling method facing automatic driving, terminal equipment and storage medium
CN113536054A (en) * 2021-07-15 2021-10-22 中国工商银行股份有限公司 Business monitoring method, device, equipment and storage medium based on graph data

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200134379A1 (en) * 2018-10-30 2020-04-30 Toyota Research Institute, Inc. Auto-labeling of driving logs using analysis-by-synthesis and unsupervised domain adaptation
CN110825801A (en) * 2019-11-06 2020-02-21 卡斯柯信号(成都)有限公司 Train signal system vehicle-mounted log analysis system and method based on distributed architecture
CN112650220A (en) * 2020-12-04 2021-04-13 东风汽车集团有限公司 Automatic vehicle driving method, vehicle-mounted controller and system
CN113516301A (en) * 2021-06-22 2021-10-19 中国联合网络通信集团有限公司 Task scheduling method facing automatic driving, terminal equipment and storage medium
CN113342495A (en) * 2021-06-24 2021-09-03 山东理工大学 Cross-organization multi-instance subprocess model mining method and system
CN113536054A (en) * 2021-07-15 2021-10-22 中国工商银行股份有限公司 Business monitoring method, device, equipment and storage medium based on graph data

Also Published As

Publication number Publication date
CN116186955A (en) 2023-05-30

Similar Documents

Publication Publication Date Title
CN111526060B (en) Method and system for processing service log
Rabkin et al. Aggregation and Degradation in {JetStream}: Streaming Analytics in the Wide Area
Kamburugamuve et al. Survey of distributed stream processing for large stream sources
CN108920153B (en) Docker container dynamic scheduling method based on load prediction
Zhang et al. New agent-based proactive migration method and system for big data environment (BDE)
US9378053B2 (en) Generating map task output with version information during map task execution and executing reduce tasks using the output including version information
CN114268640B (en) Intelligent routing system of industrial Internet of things with cloud edge cooperation
CN109922315A (en) A kind of real-time video behavior analysis method based on Spark and OpenCV
US9524184B2 (en) Open station canonical operator for data stream processing
JP2017527024A (en) Event stream conversion
CN112751726B (en) Data processing method and device, electronic equipment and storage medium
US11228512B2 (en) Cross silo time stitching
CN110046041B (en) Data acquisition method based on battery scheduling framework
CN108874524A (en) Big data distributed task dispatching system
Arkian et al. Model-based stream processing auto-scaling in geo-distributed environments
CN110874272A (en) Resource allocation method and device, computer readable storage medium and electronic device
CN112148578A (en) IT fault defect prediction method based on machine learning
US9003054B2 (en) Compressing null columns in rows of the tabular data stream protocol
WO2023093257A1 (en) Modeling method for self-driving service and related device
CN116502162A (en) Abnormal computing power federal detection method, system and medium in edge computing power network
TWI654528B (en) System and method for automatic construction and horizontal extension of service elements based on dynamic clustering rule template
CN113886111A (en) Workflow-based data analysis model calculation engine system and operation method
Long et al. An improved topology schedule algorithm for storm system
KR101878291B1 (en) Big data management system and management method thereof
Stanford Geo-distributed stream processing

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22897343

Country of ref document: EP

Kind code of ref document: A1