Scheduling method, device and vehicle of Qbv mechanism of vehicle-mounted embedded system

By allocating multiple processors in the vehicle embedded system and combining Qbv and gptp protocol stacks, the problem of time uncertainty in the interaction between the data link layer and the upper layer of service data is solved, and the deterministic transmission of time-sensitive data is realized, which improves the Real-time communication capabilities of vehicle-mounted systems.

CN116248609BActive Publication Date: 2024-11-05CHONGQING CHANGAN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310179203.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-28
Publication Date
2024-11-05
Estimated Expiration
2043-02-28

AI Technical Summary

Technical Problem

The existing Qbv protocol can only ensure time certainty at the data link layer, and cannot ensure time certainty of upper-level business data interaction, resulting in uncertainty in the time when data arrives from the application layer at the bottom of the data link.

Method used

By allocating multiple processors in the on-board embedded system, processing time-sensitive and non-time-sensitive data respectively, and deploying the Qbv protocol stack in the second processor, combining the gptp protocol stack for time synchronization, ensuring that the data link layer and the upper layer are upper. The application's scheduling time is consistent, bypassing the TCP/IP protocol stack, and directly distributing data on the Qbv protocol stack.

Benefits of technology

It realizes time matching scheduling from the application layer to the data link layer, ensures the time certainty of the data link layer's transmission and upper-level data interaction, avoids the risk of time uncontrollable TCP/IP protocol, and improves the on-board system Real-time communication capability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116248609B_ABST
    Figure CN116248609B_ABST
Patent Text Reader

Abstract

The present application relates to a scheduling method, device and vehicle of a Qbv mechanism of an in-vehicle embedded system, wherein the method includes: determining a first processor that processes non-time-sensitive data and a second processor that processes time-sensitive data among multiple processors; obtaining the business data of the current application, and determining whether the business data of the current application is time-sensitive data; if the business data of the current application is time-sensitive data, then planning the scheduling time of the business data of the current application based on the second processor, and synchronizing the starting point of the MAC layer in the current application and the second processor based on the scheduling time, and then transmitting the business data of the current application; otherwise, transmitting the business data of the current application through the first processor based on a preset scheduling strategy. Thus, the problem of uncertainty in the time when data arrives at the bottom layer of the data link from the application layer is solved, so that Qbv can obtain a time-deterministic transmission effect in the in-vehicle embedded system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of vehicle technology, and in particular to a scheduling method, device and vehicle for a Qbv mechanism of an on-vehicle embedded system. Background Art

[0002] Ethernet is gradually being used as the backbone network for in-vehicle communications due to its advantages such as high bandwidth, protocol diversity, and mature applications. Due to the particularity of in-vehicle applications, in-vehicle Ethernet communications have high requirements for real-time performance, but due to the best-effort nature of Ethernet itself, it cannot guarantee the real-time performance of communications. In order to solve the real-time problem, the industry has proposed a time-sensitive network protocol. The combination of the TSN (Time Sensitive Network)-AS protocol and the TSN-Qbv protocol can ensure the time determinism of key message transmission and reception to solve the real-time problem of Ethernet communications.

[0003] In response to the real-time problem of Ethernet ring network communication, the relevant technology discloses a frame output scheduling method that supports the Qbv mechanism in a time-sensitive network. Based on the Qbv protocol mechanism, an Ethernet data frame scheduling method is defined, which can support the scheduling of data plane output ports and the design of upper-layer planning algorithms.

[0004] However, if the Qbv protocol is implemented only from the underlying data link layer, the relevant technology can only ensure the time certainty of sending and receiving data at the data link layer, but cannot ensure the time certainty of upper-layer business data interaction. Summary of the invention

[0005] The present application provides a scheduling method, device and vehicle for the Qbv mechanism of an in-vehicle embedded system to solve the problem of uncertainty in the time when data reaches the bottom layer of a data link from an application layer, so that the transmission from a data source to a data link layer and the transmission of the data link layer to the outside can be matched and scheduled based on time, so that Qbv can obtain a time-deterministic transmission effect in the in-vehicle embedded system.

[0006] The first aspect of the present application provides a scheduling method for a Qbv mechanism of an in-vehicle embedded system, comprising the following steps: determining a first processor for processing non-time-sensitive data and a second processor for processing time-sensitive data among the multiple processors; deploying a first application corresponding to the non-time-sensitive data in the first processor, and deploying a second application corresponding to the time-sensitive data in the second processor; and transmitting the business data of the first application based on a first preset scheduling strategy through the first processor, and planning the business data scheduling time of the second application through the second processor, and aligning the starting point of the business data scheduling time of the second application with the starting point of the PTP clock of the MAC layer in the second processor, and then transmitting the business data from the business layer to the MAC layer according to the second preset scheduling strategy.

[0007] Based on the above-mentioned technical means, the present application can solve the problem of uncertainty in the time when data reaches the bottom layer of the data link from the application layer, so that the transmission from the data source to the data link layer and the transmission of the data link layer to the outside can be matched and scheduled based on the same time, so that Qbv can obtain a time-deterministic transmission effect in the vehicle-mounted embedded system.

[0008] Optionally, in some embodiments, planning the business data scheduling time of the second application through the second processor includes: obtaining the business type and current business running time of the business data of the second application; decomposing and dividing in a preset order based on the business type, the business running time and a preset scheduling relationship, and at the same time obtaining the time when the protocol middleware in the second processor sends the business data of the second application through testing; dividing the Qbv scheduling time slice according to the priority of the business data of the current application, the business data time division of the second application and the handling time of the business data of the second application by the protocol middleware, so that the business data of the current application arrives at the queue corresponding to the Qbv protocol stack according to the preset time.

[0009] According to the above-mentioned technical means, since the original TCP / IP (Transmission Control Protocol / Internet Protocol Address) protocol stack itself has time uncontrollability, the communication framework in this application directly combines the protocol middleware with the Qbv protocol stack, bypassing the TCP / IP protocol and avoiding the time uncertainty risk of TCP / IP. That is, the data link layer communication of time-sensitive related systems is scheduled based on the Qbv protocol stack, and the Qbv protocol stack directly receives the data stream transmitted by the upper-layer communication middleware and distributes data to the corresponding communication queue based on the preset scheduling table.

[0010] Optionally, in some embodiments, after planning the service data scheduling time of the current application based on the second processor, it also includes: initializing the MAC layer; and performing time synchronization with a preset external system based on a gptp (general precise time protocol) protocol stack in the second processor.

[0011] According to the above-mentioned technical means, the sending of data link layer messages needs to be based on the time after time synchronization with the external system, and the time is continuously and dynamically adjusted during the operation of the system, while the task scheduling of the embedded system itself needs to be scheduled based on the system time. When the time of the two is not unified, the present application proposes to actively align the task scheduling time of the embedded system with the time synchronization time after system initialization, so that the two run at the same starting time, providing a time basis for Qbv scheduling and upper-layer data sending scheduling.

[0012] Optionally, in some embodiments, the scheduling method of the Qbv mechanism of the above-mentioned vehicle-mounted embedded system, wherein the gptp protocol stack and the Qbv protocol stack perform corresponding actions based on the time of the MAC layer clock synchronization; the task scheduling of the vehicle-mounted embedded system is executed based on the system time of the vehicle-mounted embedded system.

[0013] According to the above technical means, the upper-layer application data sending scheduling and the underlying data link layer sending scheduling based on the Qbv protocol stack are based on the same time starting point and the task scheduling process of the embedded system itself, and a unified task scheduling time division is performed from top to bottom, so that the upper-layer application data can arrive at the queue on time when the Qbv protocol stack opens the gated queue.

[0014] Optionally, in some embodiments, the first processor and the second processor operate independently.

[0015] Based on the above technical means, the present application can ensure the isolation of time-sensitive data and non-time-sensitive data in the same system, so that they will not affect each other during the iteration of time-sensitive related business or system and the iteration of non-time-sensitive related business or system.

[0016] The second aspect of the present application provides a scheduling device for the Qbv mechanism of an on-vehicle embedded system, including: the on-vehicle embedded system includes multiple processors, and the device includes: a determination module, used to determine a first processor that processes non-time-sensitive data and a second processor that processes time-sensitive data among the multiple processors; a deployment module, used to deploy a first application corresponding to non-time-sensitive data in the first processor, and deploy a second application corresponding to time-sensitive data in the second processor; and a transmission module, used to transmit the business data of the first application based on a first preset scheduling strategy through the first processor, and plan the business data scheduling time of the second application through the second processor, and after aligning the starting point of the business data scheduling time of the second application with the starting point of the MAC layer PTP clock in the second processor, transmit the business data from the business layer to the MAC layer according to the second preset scheduling strategy.

[0017] Optionally, in some embodiments, the transmission module is also used to: obtain the business type and business running time of the business data of the second application; decompose and divide the business data in a preset order based on the business type, the business running time and the preset scheduling relationship, and obtain the time when the protocol middleware in the second processor sends the business data of the second application through testing; divide the Qbv scheduling time slice according to the priority of the business data of the current application, the time division of the business data of the second application and the handling time of the business data of the second application by the protocol middleware, so that the business data of the current application arrives at the queue corresponding to the Qbv protocol stack according to the preset time.

[0018] Optionally, in some embodiments, after planning the service data scheduling time of the current application based on the second processor, the transmission module is also used to: initialize the MAC layer; and perform time synchronization with a preset external system based on the gptp protocol stack in the second processor.

[0019] Optionally, in some embodiments, the scheduling device of the Qbv mechanism of the above-mentioned vehicle-mounted embedded system, wherein the gptp protocol stack and the Qbv protocol stack perform corresponding actions based on the time of the MAC layer clock synchronization; the task scheduling of the vehicle-mounted embedded system is executed based on the system time of the vehicle-mounted embedded system.

[0020] Optionally, in some embodiments, the first processor and the second processor operate independently.

[0021] The third aspect of the present application provides a vehicle, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the scheduling method of the Qbv mechanism of the vehicle-mounted embedded system as described in the above embodiment.

[0022] The fourth aspect of the present application provides a computer-readable storage medium on which a computer program is stored. The program is executed by a processor to implement the scheduling method of the Qbv mechanism of the vehicle-mounted embedded system as described in the above embodiment.

[0023] Therefore, by determining the first processor that processes non-time-sensitive data and the second processor that processes time-sensitive data among multiple processors; obtaining the business data of the current application, and determining whether the business data of the current application is time-sensitive data; if the business data of the current application is time-sensitive data, then planning the business data scheduling time of the current application based on the second processor, and synchronizing the starting point of the MAC layer in the current application and the second processor based on the scheduling time, the business data of the current application is transmitted; otherwise, the business data of the current application is transmitted through the first processor based on a preset scheduling strategy. Thus, the problem of uncertainty in the time when data arrives at the bottom layer of the data link from the application layer is solved, so that the transmission from the data source to the data link layer and the transmission of the data link layer to the outside can be matched and scheduled based on time, so that Qbv can obtain a time-deterministic transmission effect in the vehicle-mounted embedded system.

[0024] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0026] Figure 1 It is a flowchart of a scheduling method of a Qbv mechanism of an in-vehicle embedded system provided according to an embodiment of the present application;

[0027] Figure 2 A schematic diagram of a vehicle-mounted embedded system provided according to a specific embodiment of the present application;

[0028] Figure 3 It is a block diagram of a scheduling device of a Qbv mechanism of an in-vehicle embedded system provided according to an embodiment of the present application;

[0029] Figure 4 A schematic diagram of an electronic device provided according to an embodiment of the present application.

[0030] Explanation of the reference numerals: 10 - a scheduling device of a vehicle-mounted embedded system Qbv mechanism, 100 - a determination module, 200 - an acquisition module and 300 - a transmission module. DETAILED DESCRIPTION

[0031] Embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.

[0032] The following describes the scheduling method, device, vehicle and storage medium of the vehicle embedded system Qbv mechanism of the embodiment of the present application with reference to the accompanying drawings. In view of the problem of uncertainty in the time when data reaches the bottom layer of the data link from the application layer mentioned in the above background technology, the present application provides a scheduling method for the Qbv mechanism of the vehicle embedded system, in which a first processor that processes non-time-sensitive data and a second processor that processes time-sensitive data are determined among multiple processors, and the business data of the current application is obtained, and it is determined whether the business data of the current application is time-sensitive data. If the business data of the current application is time-sensitive data, the business data scheduling time of the current application is planned based on the second processor, and the starting point of the MAC layer in the current application and the second processor is synchronized based on the scheduling time, and the business data of the current application is transmitted; otherwise, the business data of the current application is transmitted by the first processor based on a preset scheduling strategy. Thus, the uncertainty of the time when data reaches the bottom layer of the data link from the application layer is solved, so that the transmission from the data source to the data link layer and the transmission of the data link layer to the outside can be matched and scheduled based on time, so that Qbv can obtain a time-deterministic transmission effect in the vehicle embedded system.

[0033] Specifically, Figure 1 A flowchart of a scheduling method for a Qbv mechanism of an in-vehicle embedded system provided in an embodiment of the present application.

[0034] like Figure 1 As shown, the scheduling method of the Qbv mechanism of the vehicle-mounted embedded system includes the following steps:

[0035] In step S101, a first processor for processing non-time-sensitive data and a second processor for processing time-sensitive data are determined among a plurality of processors.

[0036] It should be noted that in order to ensure the isolation of time-sensitive data and non-time-sensitive data in the same system so that they will not affect each other during the iteration of time-sensitive related businesses or systems and the iteration of non-time-sensitive related businesses or systems, the embodiment of the present application can use an independent MCU (Microcontroller Unit) core to deploy applications, protocol middleware, and data link layer for time-sensitive related businesses, and the remaining CPU (Central Processing Unit) cores can deploy businesses without time-sensitive requirements.

[0037] Specifically, multiple processors of the vehicle embedded system can be composed of multiple MCU cores, such as Figure 2 As shown, the vehicle-mounted embedded system of the embodiment of the present application can be a vehicle-mounted embedded system composed of two MCU cores A and B. Among them, the A core deploys non-time-sensitive applications, corresponding protocol middleware, and TCP / IP protocol stack. The A core retains the original embedded communication framework, and the SWC (Software Control) is used to execute non-time-sensitive applications, such as body control, lighting control, etc., and the application data is still based on the original protocol middleware and TCP / IP Ethernet transmission mechanism for transmission; the B core deploys time-sensitive applications, corresponding protocol middleware, Qbv protocol stack, and time synchronization gptp protocol stack, and the two run independently. The B core independently deploys time-sensitive network applications, and the SWC is used to execute time-sensitive applications, such as driving control, sensor data forwarding, etc. The application data is based on the original protocol middleware, bypassing the TCP / IP protocol and directly sending data through the scheduling of the second-layer Qbv protocol stack.

[0038] In step S102, a first application corresponding to non-time-sensitive data is deployed in the first processor, and a second application corresponding to time-sensitive data is deployed in the second processor.

[0039] It should be noted that in order to ensure the isolation of time-sensitive data and non-time-sensitive data in the same system so that they will not affect each other during the iteration of time-sensitive related business or system and the iteration of non-time-sensitive related business or system, the embodiment of the present application can deploy a first application corresponding to non-time-sensitive data in the first processor and a second application corresponding to time-sensitive data in the second processor.

[0040] In step S103, the business data of the first application is transmitted through the first processor based on a first preset scheduling strategy, and the business data scheduling time of the second application is planned through the second processor, and after the starting point of the business data scheduling time of the second application is aligned with the starting point of the MAC layer PTP clock in the second processor, the business data is transmitted from the business layer to the MAC layer according to the second preset scheduling strategy.

[0041] Optionally, in some embodiments, the business data scheduling time of the second application is planned by the second processor, including: obtaining the business type and business running time of the business data of the second application; decomposing and dividing the business data in a preset order based on the business type, business running time and a preset scheduling relationship, and obtaining the time when the protocol middleware in the second processor sends the business data of the second application through testing; dividing the Qbv scheduling time slice according to the priority of the business data of the current application, based on the business data time division of the second application and the protocol middleware's handling time for the business data of the second application, so that the business data of the current application arrives at the queue corresponding to the Qbv protocol stack at the preset time.

[0042] Specifically, the vehicle embedded system can be divided into four parts according to the implementation of Qbv, namely application layer, protocol middleware layer, data link layer, and physical layer. Figure 2 The sending and scheduling of time-sensitive business data in the application layer needs to be planned in advance. The plan needs to be broken down and divided in time sequence based on the type of business, business trial time and system scheduling relationship. At the same time, the protocol middleware needs to estimate / test the time it takes to receive business data and process and send it after receiving it.

[0043] After the application layer time-sensitive business data sending scheduling execution time and the protocol middleware forwarding scheduling execution time are divided, it is necessary to divide the Qbv scheduling time slice according to the priority of the business data based on the lower-layer Qbv scheduling expectations and rules. Qbv will implement the scheduling of the gated queue based on this time slice. Therefore, during the design, it is necessary to ensure that the business data can arrive at the queue corresponding to the Qbv protocol stack according to the preset time; in the process of designing the Qbv scheduling time slice, a certain redundancy must be considered simultaneously to ensure that the corresponding data can be sent within a time slice.

[0044] Optionally, in some embodiments, after planning the service data scheduling time of the current application based on the second processor, it also includes: initializing the MAC layer; and performing time synchronization with a preset external system based on the gptp protocol stack in the second processor.

[0045] Optionally, in some embodiments, the gptp protocol stack and the Qbv protocol stack perform corresponding actions based on the time of MAC layer clock synchronization; the task scheduling of the vehicle embedded system is executed based on the system time of the vehicle embedded system.

[0046] After initialization, the B core MAC layer performs time synchronization with the external system based on the gptp protocol stack. After the time synchronization is completed, the upper-layer application is notified to align the time starting point to ensure that the upper and lower layer task scheduling and data transmission scheduling are executed at the same time starting point. The above time alignment can be achieved by assigning the MAC layer time synchronization result to the MCU task scheduling system time. The B core gptp protocol stack and Qbv protocol stack are executed based on the time synchronized with the MAC layer time, and the task scheduling of the entire system is still executed based on the system time.

[0047] Figure 2 After the MAC layer of the middle B core is synchronized with the time starting point of the upper application, the time-sensitive application data starts to run, and the execution of its tasks will be scheduled according to the scheduling division of S3, and will arrive at the Qbv scheduling queue at the preset time and send the data out through Qbv gating scheduling. The transmission of data within the embedded system will not cause delays in the data transmission process within the system due to the time matching between the upper and lower layers, thereby better realizing the application of the Qbv protocol in embedded systems.

[0048] Optionally, in some embodiments, the first processor and the second processor operate independently.

[0049] Specifically, in the embedded system of the embodiment of the present application, an independent MCU core is used to deploy applications, protocol middleware, and data link layer for time-sensitive related services, and the remaining CPU cores are used to deploy services without time-sensitive requirements, thereby ensuring the isolation of time-sensitive data and non-time-sensitive data in the same system, so that they will not affect each other during the iteration of time-sensitive related services or systems and the iteration of non-time-sensitive related services or systems.

[0050] According to the scheduling method of the Qbv mechanism of the vehicle-mounted embedded system proposed in the embodiment of the present application, by determining the first processor that processes non-time-sensitive data and the second processor that processes time-sensitive data among multiple processors; obtaining the business data of the current application, and judging whether the business data of the current application is time-sensitive data; if the business data of the current application is time-sensitive data, then planning the business data scheduling time of the current application based on the second processor, and synchronizing the starting point of the MAC layer in the current application and the second processor based on the scheduling time, and then transmitting the business data of the current application; otherwise, transmitting the business data of the current application through the first processor based on the preset scheduling strategy. . Thus, the uncertainty of the time when data arrives at the bottom layer of the data link from the application layer is solved, so that the transmission from the data source to the data link layer and the transmission of the data link layer to the outside can be matched and scheduled based on time, so that Qbv can obtain the time-deterministic transmission effect in the vehicle-mounted embedded system.

[0051] Next, the scheduling device of the Qbv mechanism of the vehicle-mounted embedded system proposed in the embodiment of the present application is described with reference to the accompanying drawings.

[0052] Figure 3 It is a block diagram of a scheduling device of the Qbv mechanism of the vehicle-mounted embedded system according to an embodiment of the present application.

[0053] like Figure 3 As shown, the scheduling device 10 of the Qbv mechanism of the vehicle-mounted embedded system includes: a determination module 100, an acquisition module 200 and a transmission module 300.

[0054] Among them, the determination module 100 is used to determine a first processor for processing non-time-sensitive data and a second processor for processing time-sensitive data among multiple processors; the acquisition module 200 is used to deploy a first application corresponding to the non-time-sensitive data in the first processor and a second application corresponding to the time-sensitive data in the second processor; and the deployment module 300 is used to transmit the business data of the first application based on a first preset scheduling strategy through the first processor, and plan the business data scheduling time of the second application through the second processor, and after aligning the starting point of the business data scheduling time of the second application with the starting point of the MAC layer PTP clock in the second processor, transmit the business data from the business layer to the MAC layer according to the second preset scheduling strategy.

[0055] Optionally, in some embodiments, the transmission module 300 is further used to: obtain the business type and business running time of the business data of the second application; decompose and divide the business data in a preset order based on the business type, business running time and a preset scheduling relationship, and obtain the time when the protocol middleware in the second processor sends the business data of the second application through testing; divide the Qbv scheduling time slice according to the priority of the business data of the current application, the time division of the business data of the second application and the handling time of the business data of the second application by the protocol middleware, so that the business data of the current application arrives at the queue corresponding to the Qbv protocol stack at the preset time.

[0056] Optionally, in some embodiments, after planning the service data scheduling time of the current application based on the second processor, the transmission module 300 is further used to: initialize the MAC layer; and perform time synchronization with a preset external system based on the gptp protocol stack in the second processor.

[0057] Optionally, in some embodiments, the gptp protocol stack and the Qbv protocol stack perform corresponding actions based on the time of MAC layer clock synchronization; the task scheduling of the vehicle embedded system is executed based on the system time of the vehicle embedded system.

[0058] Optionally, in some embodiments, the first processor and the second processor operate independently.

[0059] It should be noted that the above explanation of the embodiment of the scheduling method of the Qbv mechanism of the vehicle-mounted embedded system is also applicable to the scheduling device of the Qbv mechanism of the vehicle-mounted embedded system of this embodiment, and will not be repeated here.

[0060] According to the scheduling device of the Qbv mechanism of the vehicle-mounted embedded system proposed in the embodiment of the present application, by determining the first processor that processes non-time-sensitive data and the second processor that processes time-sensitive data among multiple processors; obtaining the business data of the current application, and judging whether the business data of the current application is time-sensitive data; if the business data of the current application is time-sensitive data, then planning the scheduling time of the business data of the current application based on the second processor, and synchronizing the starting point of the MAC layer in the current application and the second processor based on the scheduling time, and then transmitting the business data of the current application; otherwise, the business data of the current application is transmitted through the first processor based on the preset scheduling strategy. Thus, the uncertainty of the time when data arrives at the bottom layer of the data link from the application layer is solved, so that the transmission from the data source to the data link layer and the transmission of the data link layer to the outside can be matched and scheduled based on time, so that Qbv can obtain a time-deterministic transmission effect in the vehicle-mounted embedded system.

[0061] Figure 4 A schematic diagram of the structure of a vehicle provided in an embodiment of the present application. The vehicle may include:

[0062] Memory 401 , processor 402 , and a computer program stored in the memory 401 and executable on the processor 402 .

[0063] When the processor 402 executes the program, the scheduling method of the Qbv mechanism of the vehicle-mounted embedded system provided in the above embodiment is implemented.

[0064] Furthermore, the vehicle also includes:

[0065] The communication interface 403 is used for communication between the memory 401 and the processor 402 .

[0066] The memory 401 is used to store computer programs that can be executed on the processor 402 .

[0067] The memory 401 may include a high-speed RAM (Random Access Memory) memory, and may also include a non-volatile memory, such as at least one disk memory.

[0068] If the memory 401, the processor 402 and the communication interface 403 are implemented independently, the communication interface 403, the memory 401 and the processor 402 can be connected to each other through a bus and communicate with each other. The bus can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0069] Optionally, in a specific implementation, if the memory 401, the processor 402 and the communication interface 403 are integrated on a chip, the memory 401, the processor 402 and the communication interface 403 can communicate with each other through an internal interface.

[0070] The processor 402 may be a CPU (Central Processing Unit), or an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present application.

[0071] An embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the scheduling method of the Qbv mechanism of the vehicle-mounted embedded system as described above is implemented.

[0072] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms are not necessarily directed to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or N embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0073] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0074] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.

[0075] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiment, the N steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array, a field programmable gate array, etc.

[0076] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0077] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations on the present application. Ordinary technicians in the field can change, modify, replace and modify the above embodiments within the scope of the present application.

Claims

1. A scheduling method for the Qbv mechanism of an in-vehicle embedded system, It is characterized in that The vehicle-mounted embedded system includes multiple processors, and the method includes the following steps: determining a first processor that processes non-time-sensitive data and a second processor that processes time-sensitive data among the plurality of processors; deploying a first application corresponding to non-time-sensitive data in the first processor and a second application corresponding to time-sensitive data in the second processor; and The business data of the first application is transmitted through the first processor based on a first preset scheduling strategy, and the business data scheduling time of the second application is planned through the second processor, and the starting point of the business data scheduling time of the second application is aligned with the starting point of the MAC layer PTP clock in the second processor, and then the business data is transmitted from the business layer to the MAC layer according to the second preset scheduling strategy.

2. The method according to claim 1, It is characterized in that The planning of the service data scheduling time of the second application program by the second processor includes: Acquire the service type and service running time of the service data of the second application program; Based on the service type, the service running time and the preset scheduling relationship, the service data of the second application program is divided and separated in a preset order, and at the same time, the time when the protocol middleware in the second processor sends the service data of the second application program is obtained through testing; According to the priority of the business data of the current application, the Qbv scheduling time slice is divided based on the time division of the business data of the second application and the time for the protocol middleware to transport the business data of the second application, so that the business data of the current application arrives at the queue corresponding to the Qbv protocol stack according to the preset time.

3. The method according to claim 2, It is characterized in that After planning the service data scheduling time of the current application based on the second processor, the method further includes: Initializing the MAC layer; Time synchronization is performed based on the gptp protocol stack in the second processor and a preset external system.

4. The method according to claim 3, It is characterized in that in, The gptp protocol stack and the Qbv protocol stack perform corresponding actions based on the time of the MAC layer clock synchronization; The task scheduling of the vehicle-mounted embedded system is performed based on the system time of the vehicle-mounted embedded system.

5. The method according to any one of claims 1 to 4, It is characterized in that The first processor and the second processor operate independently.

6. A scheduling device for the Qbv mechanism of an on-vehicle embedded system, It is characterized in that The vehicle-mounted embedded system includes multiple processors, and the device includes: a determination module, configured to determine a first processor that processes non-time-sensitive data and a second processor that processes time-sensitive data among the plurality of processors; a deployment module, configured to deploy a first application corresponding to the non-time-sensitive data in the first processor and a second application corresponding to the time-sensitive data in the second processor; and A transmission module is used to transmit the business data of the first application through the first processor based on a first preset scheduling strategy, and to plan the business data scheduling time of the second application through the second processor, and after aligning the starting point of the business data scheduling time of the second application with the starting point of the MAC layer PTP clock in the second processor, transmit the business data from the business layer to the MAC layer according to the second preset scheduling strategy.

7. The device according to claim 6, It is characterized in that The transmission module is further used for: Acquire the business type and business running time of the business data of the second application program; Based on the service type, the service running time and the preset scheduling relationship, the service data of the second application program is divided and separated in a preset order, and at the same time, the time when the protocol middleware in the second processor sends the service data of the second application program is obtained through testing; The Qbv scheduling time slice is divided according to the priority of the business data of the current application, the time division of the business data of the second application and the transportation time of the business data of the second application by the protocol middleware, so that the business data of the current application arrives at the queue corresponding to the Qbv protocol stack according to the preset time.

8. The device according to claim 7, It is characterized in that After planning the service data scheduling time of the current application based on the second processor, the transmission module is further used to: Initializing the MAC layer; Time synchronization is performed based on the gptp protocol stack in the second processor and a preset external system.

9. A vehicle, It is characterized in that include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the scheduling method of the Qbv mechanism of the vehicle-mounted embedded system as described in any one of claims 1 to 5.

10. A computer-readable storage medium having a computer program stored thereon, It is characterized in that The program is executed by a processor to implement the scheduling method of the Qbv mechanism of the vehicle-mounted embedded system as described in any one of claims 1-5.