Processing method and apparatus, and vehicle

WO2026165918A1PCT designated stage Publication Date: 2026-08-13YINWANG INTELLIGENT TECHNOLOGIES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-02-08
Publication Date
2026-08-13

Smart Images

  • Figure CN2025076543_13082026_PF_FP_ABST
    Figure CN2025076543_13082026_PF_FP_ABST
Patent Text Reader

Abstract

A processing method and apparatus, and a vehicle. The method comprises: reading a first moment of a local clock while acquiring a second moment of an external device; acquiring a first scheduling parameter of a first network service, the first scheduling parameter comprising a third moment at which an N-th gating cycle for transmission of a packet of the first network service by a vehicle starts, and N being a positive integer; when the second moment is earlier than the first moment, and a difference between the first moment and the second moment is greater than or equal to a first threshold, adjusting the first scheduling parameter on the basis of a clock compensation value, and obtaining a second scheduling parameter, wherein the clock compensation value is determined on the basis of the difference between the second moment and the first moment; and transmitting the packet of the first network service according to the second scheduling parameter. By using above method, the starting moment of the gating cycle when transmitting the packet of the first network service can be adjusted, thereby reducing a time difference between the starting moment of the gating cycle and a time synchronization moment.
Need to check novelty before this filing date? Find Prior Art

Description

Processing method, device and vehicle TECHNICAL FIELD

[0001] The present application relates to the field of intelligent vehicles, and more particularly, to a processing method, device and vehicle. BACKGROUND

[0002] Time sensitive network (TSN) is a new generation of network standard based on Ethernet, which can guarantee the smooth transmission of information with high real-time requirements in different scenarios of standard Ethernet. Among them, Qbv (queue gate control based on time, IEEE 802.1Qbv) is a key scheduling mechanism under the TSN framework. Qbv controls the switching of data queues through a pre-set gate control list (GCL), and allocates specific time windows for different types of data streams in each cycle to ensure that time-sensitive data with high priority can be transmitted within a strict time range.

[0003] However, the scheduling mechanism of Qbv is highly dependent on the external clock synchronization result at runtime, especially in the whole vehicle network. If the external clock synchronization is abnormal, it may cause the data stream to be unable to be sent or received within the predetermined time window, thereby affecting the gate scheduling of Qbv. In serious cases, the abnormality of clock synchronization not only destroys the real-time and determinacy of data stream, but also may cause long-time interruption of business (flow interruption phenomenon). SUMMARY

[0004] The present application provides a processing method, device and vehicle, which can adjust the start time of the gate cycle when transmitting the message of the first network service, so as to shorten the time difference between the start time of the gate cycle and the time synchronization time, thereby avoiding the phenomenon of long-time interruption of business of the vehicle.

[0005] In a first aspect, a processing method is provided, which comprises: obtaining a second time of an external device at the same time, and reading a first time of a local clock; obtaining a first scheduling parameter of a first network service, the first scheduling parameter comprising a third time of the start of an Nth gate cycle when the vehicle transmits a message of the first network service, N being a positive integer; in the case that the second time is earlier than the first time, and the difference between the first time and the second time is greater than or equal to a first threshold value, adjusting the first scheduling parameter according to a clock compensation value to obtain a second scheduling parameter, the clock compensation value being determined based on the difference between the second time and the first time; transmitting the message of the first network service according to the second scheduling parameter.

[0006] In a possible implementation, the second time point being earlier than the first time point can mean that the vehicle has a "backoff" in time synchronization, that is, the time point stored locally by the vehicle needs to be forcibly adjusted to an earlier time point.

[0007] In a possible implementation, the "backoff" can be caused by the following factors: the clock synchronization signal in the network has large jitter or error, or the upstream clock source of the vehicle has switched or failed.

[0008] In a possible implementation, the first network service can be a time-sensitive network service or a non-time-sensitive network service. When the first network service is a time-sensitive network service, the first network service can include critical services for vehicle safety (for example, automatic driving control signals, vehicle sensor data transmission, brake control instructions, etc.).

[0009] In a possible implementation, the first threshold can also be referred to as a clock jump threshold. The first threshold can be flexibly configured according to actual services. For example, the first threshold can be greater than or equal to 10 microseconds and less than or equal to 100 microseconds.

[0010] In the embodiments of the present application, when the vehicle has a "backoff" in time synchronization, the starting time point of the Nth gating period can be adjusted based on the clock compensation value, and the packet of the first network service can be transmitted based on the adjusted scheduling parameter. In this way, the time difference between the starting time point of the gating period and the time synchronization time point can be shortened, the scheduling process can be highly matched with the result of clock synchronization, and the risk of Qbv scheduling abnormality caused by clock synchronization deviation can be reduced. On the other hand, this processing method can ensure that the critical service traffic of the vehicle can be efficiently scheduled according to the predetermined period, avoid long interruption of the service, and improve the stability and reliability of the vehicle system. In addition, since the clock synchronization of the vehicle can have a small jump in normal cases, the error of the jump can be maintained at the nanosecond level, and the transmission of the first network service is less affected. The above processing method adjusts the starting time point of the Nth gating period based on the clock compensation value when the error of the clock synchronization is greater than or equal to the first threshold. This can avoid adjusting the starting time point of the gating period when the time synchronization has a small jump, reduce the waste of computing resources, and better support data transmission and service processing in the first network service. In addition, the above processing method is especially suitable for the transmission of time-sensitive network services, can avoid unacceptable negative effects on the vehicle when performing time-sensitive network services due to clock synchronization deviation, and further improves the driving safety of users.

[0011] In some implementations of the first aspect, the method further includes obtaining first configuration information of the first network service before the first time of the local clock is read, and before the first scheduling parameter is adjusted based on the clock compensation value to obtain the second scheduling parameter, the method further includes determining that a clock compensation enabling flag bit is in an active state.

[0012] In a possible implementation, the active state of the clock compensation enabling flag bit can be a True state, and correspondingly, the inactive state of the clock compensation enabling flag bit can be a False state.

[0013] In a possible implementation, the clock compensation enabling flag bit can be a bit, and when the bit is 1, the clock compensation enabling flag bit is in the active state; and when the bit is 0, the clock compensation enabling flag bit is in the inactive state.

[0014] In the embodiments of the present application, when the clock compensation enabling flag bit is in the active state, the start time of the gating period can be adjusted based on the clock compensation value, and in this way, the accuracy of Qbv scheduling can be improved, which is beneficial to further ensure that the traffic of the first network service can be efficiently scheduled according to the predetermined period.

[0015] In some implementations of the first aspect, the first configuration information further includes a gating clock reference time and a configuration change flag, the gating clock reference time is used to indicate the start time of the time-based queue gating, and before the first scheduling parameter is adjusted based on the clock compensation value to obtain the second scheduling parameter, the method further includes determining that the configuration change flag is in an inactive state and the gating clock reference time is earlier than the second time.

[0016] In a possible implementation, the active state of the configuration change flag can be a True state, which can indicate that a new Qbv configuration in the vehicle is being processed or has not yet taken effect; and correspondingly, the inactive state of the configuration change flag can be a False state, which can indicate that there is no Qbv configuration to be processed in the vehicle, or the new Qbv configuration has taken effect.

[0017] In the embodiments of the present application, the start time of the gating period can be adjusted without the gating clock reference time being reached. In this way, not only can unnecessary complexity and waste of computing resources caused by early adjustment be effectively avoided, but also the adjustment of the gating period is ensured to be performed only under necessary conditions, thereby optimizing the accuracy and efficiency of Qbv scheduling.

[0018] In some implementations of the first aspect, the first configuration information further includes the gating period, a gating period extension value, a configuration change flag, and a configuration change effective time; and before the adjusting the first scheduling parameter according to the clock compensation value to obtain the second scheduling parameter, the method further includes: determining that the configuration change flag is in an active state and the configuration change effective time is later than a fourth time, the fourth time being the second time, the sum of the gating period and the gating period extension value.

[0019] In the embodiments of the present application, in the case where there is a configuration change and the configuration change effective time has not yet arrived, the start time of the gating period is adjusted based on the clock compensation value, which can ensure that the new configuration takes effect as planned after the current scheduling period is completed, avoiding interrupting the transmission of existing services.

[0020] In some implementations of the first aspect, the second scheduling parameter includes a fifth time at which the Nth gating period starts when the vehicle transmits the message of the first network service, the fifth time being earlier than the third time.

[0021] In the embodiments of the present application, when the vehicle has a "backoff" in the time synchronization process, the start time of the Nth gating period can be adjusted based on the clock compensation value, so as to advance the start time of the Nth gating period, thereby shortening the time difference between the start time of the gating period and the time synchronization time, and ensuring that the Qbv scheduling process and the clock synchronization result are highly matched.

[0022] In a second aspect, a processing apparatus is provided, which includes an acquisition unit and a processing unit. The acquisition unit is configured to: acquire a second time of an external device, and read a first time of a local clock at the same time; and acquire a first scheduling parameter of a first network service, the first scheduling parameter including a third time at which an Nth gating period starts when a vehicle transmits a message of the first network service, N being a positive integer. The processing unit is configured to: in a case where the second time is earlier than the first time and the difference between the first time and the second time is greater than or equal to a first threshold value, adjust the first scheduling parameter according to a clock compensation value to obtain a second scheduling parameter, the clock compensation value being determined based on the difference between the second time and the first time; and transmit the message of the first network service according to the second scheduling parameter.

[0023] The beneficial effects of the second aspect can be referred to the description of the beneficial effects of the first aspect, and will not be repeated here.

[0024] In some implementations of the second aspect, in conjunction with the second aspect, the obtaining unit is further configured to obtain first configuration information of the first network service, the first configuration information comprising a clock enable compensation flag bit; and the processing unit is further configured to determine that the clock enable compensation flag bit is in an active state.

[0025] In some implementations of the second aspect, in conjunction with the second aspect, the first configuration information further comprises a gated clock reference time and a configuration change flag, the gated clock reference time being used to indicate a start time of time-based queue gating; and the processing unit is further configured to determine that the configuration change flag is in an inactive state and the gated clock reference time is earlier than the second time.

[0026] In some implementations of the second aspect, in conjunction with the second aspect, the first configuration information further comprises a gated clock reference time, the gating period, a gating period extension value, and a configuration change flag, the gated clock reference time being used to indicate a start time of time-based queue gating; and the processing unit is further configured to determine that the configuration change flag is in an active state and the gated clock reference time is later than a fourth time, the fourth time being the second time, the sum of the gating period and the gating period extension value.

[0027] In some implementations of the second aspect, in conjunction with the second aspect, the second scheduling parameter comprises a fifth time at which the Nth gating period starts when the vehicle transmits the packet of the first network service, the fifth time being earlier than the third time.

[0028] In a third aspect, a processing apparatus is provided, comprising at least one processor and a memory, the at least one processor coupled with the memory and configured to read and execute instructions in the memory so that the apparatus implements the method in any of the implementations of the first aspect.

[0029] In a fourth aspect, a computer readable storage medium is provided, the computer readable storage medium storing a computer program code which, when executed on a computer, causes the computer to perform the method in any of the implementations of the first aspect.

[0030] In a fifth aspect, a chip is provided, the chip comprising circuitry configured to perform the method in any of the implementations of the first aspect.

[0031] In a sixth aspect, a computer program product is provided, the computer program product comprising a computer program which, when executed by a processor, causes the method in any of the implementations of the first aspect to be performed.

[0032] In a seventh aspect, a vehicle is provided, comprising the processing apparatus in any implementation form of the second aspect or the third aspect. BRIEF DESCRIPTION OF DRAWINGS

[0033] Fig. 1 is a functional schematic diagram of a vehicle according to an embodiment of the present application;

[0034] Fig. 2 is a schematic diagram of a transmission gate control based on a gating list according to an embodiment of the present application;

[0035] Fig. 3 is a schematic flowchart of starting a gating period according to an embodiment of the present application;

[0036] Fig. 4 is a schematic diagram of a glitch phenomenon caused by a time rollback of a local clock domain according to an embodiment of the present application;

[0037] Fig. 5 is a schematic flowchart of a processing method according to an embodiment of the present application;

[0038] Fig. 6 is a schematic flowchart of another processing method according to an embodiment of the present application;

[0039] Fig. 7 is a schematic diagram of a processing apparatus according to an embodiment of the present application;

[0040] Fig. 8 is a schematic diagram of another processing apparatus according to an embodiment of the present application. DETAILED DESCRIPTION

[0041] In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" herein only means a description of the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B, which can mean: A exists alone, A and B exist together, and B exists alone. In the present application, "at least one" means one or more, and "multiple" means two or more. "At least one of the following" or the like means any combination of these items, including any combination of single item (s) or multiple items. For example, at least one of a, b, or c can mean a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, and c can be single or multiple.

[0042] In the embodiments of the present application, the prefix words such as "first", "second" are only used to distinguish different description objects, and have no limiting effect on the position, order, priority, quantity or content of the described objects. The use of ordinal words such as ordinal words in the embodiments of the present application does not limit the described objects, and the description of the described objects should be referred to the description of the context in the claims or embodiments, and should not be limited by the use of such prefix words.

[0043] The technical solutions in the present application will be described below with reference to the drawings.

[0044] FIG. 1 is a functional schematic diagram of a vehicle according to an embodiment of the present application.

[0045] As shown in FIG. 1, the vehicle 100 according to the present application can include a plurality of subsystems, such as a perception system 120, a computing platform 130, and a clock synchronization module 140. Alternatively, the vehicle 100 can include more or fewer subsystems, and each subsystem can include one or more components. In addition, each subsystem and component of the vehicle 100 can be interconnected by wired or wireless means.

[0046] The perception system 120 can include a number of sensors for sensing information about the environment surrounding the vehicle 100. For example, the perception system 120 can include a positioning system, which can be a global positioning system (GPS), a Beidou system, or other positioning system. The perception system 120 can include one or more of an inertial measurement unit (IMU), a rain sensor, a wet temperature sensor, a laser radar, a millimeter wave radar, an ultrasonic radar, and a camera.

[0047] Some or all of the functionality of the vehicle 100 can be controlled by the computing platform 130. The computing platform 130 can include processors 131-13n (n is a positive integer), which are circuits having a processing capability for signals. In one implementation, the processors can be circuits having an instruction reading and running capability, such as a central processing unit (CPU), a microprocessor, a graphics processing unit (GPU) (which can be understood as a kind of microprocessor), or a digital signal processor (DSP), etc. In another implementation, the processors can be circuits having a certain function implemented by a logic relationship of hardware circuits, which is fixed or can be reconfigured, such as an application-specific integrated circuit (ASIC) or a programmable logic device (PLD) implemented hardware circuit, such as an FPGA. In the reconfigurable hardware circuit, the processor loads the configuration document to implement the hardware circuit configuration process, which can be understood as the process of the processor loading instructions to implement the functions of the above part or all units. In addition, the processor can also be a hardware circuit designed for artificial intelligence, which can be understood as a kind of ASIC, such as a neural network processing unit (NPU), a tensor processing unit (TPU), a deep learning processing unit (DPU), etc. In addition, the computing platform 130 can also include a memory for storing instructions, and some or all of the processors 131-13n can call the instructions in the memory to implement corresponding functions.

[0048] The computing platform 130 can control the functionality of the vehicle 100 based on inputs received from various subsystems (e.g., the perception system 120). In some embodiments, the computing platform 130 can be used to provide control over many aspects of the vehicle 100 and its subsystems.

[0049] The clock synchronization module 140 can ensure the time consistency between electronic control units and sensors in the vehicle, providing a foundation for real-time communication and precise control. This module can be synchronized and calibrated with external clock sources (such as GNSS or network synchronization clocks) through communication protocols to eliminate clock bias and drift between different modules or units in the vehicle.

[0050] Optionally, the above components are only an example, and in actual application, components in each module above can be added or deleted according to actual needs.

[0051] The vehicle 100 in the present application can include: a road vehicle, a water vehicle, an air vehicle, an industrial device, an agricultural device, or an entertainment device, etc. For example, the vehicle 100 can be a vehicle (such as a commercial vehicle, a passenger vehicle, a motorcycle, a flying vehicle, a train, etc.), an industrial vehicle (such as a forklift, a trailer, a tractor, etc.), an engineering vehicle (such as an excavator, a bulldozer, a crane, etc.), an agricultural device (such as a mower, a harvester, etc.), a recreational device, a toy vehicle, etc. The type of the vehicle is not limited in the embodiments of the present application.

[0052] The traditional Ethernet adopts a carrier sense multiple access / collision detection mechanism. When two workstations (nodes in the network) collide, the message must be retransmitted after a certain time delay. When congestion occurs, some messages may not be able to be issued again within a short time, causing uncertainty in communication time. In order to realize the real-time and deterministic requirements of part of the data transmission, time-sensitive data and non-time-sensitive data often need to be transmitted through two networks, that is, all controllers deploy two network interfaces, one is a real-time Ethernet and the other is a standard Ethernet. The real-time Ethernet is used to transmit time-sensitive data, which is usually deterministic, ensuring the real-time and low delay of data transmission, suitable for industrial control, autonomous driving and other applications; the standard Ethernet is used to transmit non-time-sensitive data (for example, ordinary communication and office data), and this network is best effort, and data transmission may have delay or jitter. The above processing method can ensure the transmission requirements of real-time data to a certain extent, but it needs to deploy two independent network infrastructures, which increases the complexity, construction cost and maintenance difficulty of the system, and reduces the utilization rate of network resources.

[0053] In order to solve the above problems, TSN not only can ensure the real-time and deterministic transmission of time-sensitive data flow, but also can integrate the transmission of time-sensitive data and non-time-sensitive data in the same network. This means that TSN can provide precise bandwidth allocation and transmission scheduling for data flows of different priorities and different real-time requirements in a unified network architecture, so as to realize the collaborative transmission of various types of data. In the implementation process, Qbv is a key scheduling mechanism under the TSN framework. Qbv controls the switching of data queues through a preset GCL, and allocates specific time windows for different types of data flow in each cycle to ensure that high-priority time-sensitive data can be transmitted within a strict time range, so as to realize the precise scheduling control of messages based on time.

[0054] For example, as shown in Figure 2, a single Qbv scheduling can include multiple gating cycles. T00 to T79 in the gating list constitute one gating cycle, and the next gating cycle can begin after each gating cycle ends. Qbv scheduling periodically controls the on / off state of all traffic queues according to time, isolating real-time and non-real-time traffic into different gating time slots (corresponding to T00 to T79 in Figure 2), thereby enabling time-sensitive and non-time-sensitive data to be transmitted in the same network without interference. In T00 to T79, C indicates a closed transmission gate, and o indicates an open transmission gate. For example, for gating time slot T05: CoCCoCCC, it means that traffic queues #0, #1, #2, #4, #5, and #7 are closed, while traffic queues #3 and #6 are open.

[0055] Qbv's scheduling mechanism is highly dependent on external clock synchronization during operation, especially in the vehicle network. If external clock synchronization fails, data streams may fail to be sent or received within the predetermined time window, affecting Qbv's gating scheduling. In severe cases, clock synchronization anomalies can not only disrupt the real-time performance and determinism of data streams but also lead to prolonged service interruptions (stream outages). This situation poses a significant risk to safety-critical services (e.g., autonomous driving control signals, onboard sensor data transmission, braking control commands), impacting the normal operation and safety performance of the entire vehicle.

[0056] The consequences of clock synchronization anomalies are explained in detail below with reference to Figures 3 and 4.

[0057] Figure 3 is a schematic flowchart of a gating cycle initiation method provided in an embodiment of this application. Method 300 may include steps S301 to S303.

[0058] S301 calculates the start time of the gating cycle based on the gating clock reference time.

[0059] For example, before the start of each gating cycle, the start time of the gating cycle can be recalculated based on the door clock base time. The start time of the gating cycle can be calculated based on formula (1-1): CycleStartTime=(OperBaseTime+N×OperCycleTime) (1-1)

[0060] Where CycleStartTime is the start time of the gating cycle, OperaBaseTime is the gating clock base time, i.e. the start time of Qbv scheduling; OperaCycleTime is the gating cycle, N indicates that the current is the Nth gating cycle, and N is a positive integer.

[0061] S302 determines whether the start time of the gating cycle is earlier than or equal to the time in the local clock domain.

[0062] For example, the start time of the gating cycle can be compared with the time of the local clock domain. When the start time of the gating cycle is earlier than or equal to the time of the local clock domain, step S303 can be performed, which is equivalent to "starting the gating cycle at the appointed time"; otherwise, the gating cycle can be not started.

[0063] S303, initiate the gating cycle.

[0064] In method 300, since the start time of the gating cycle is calculated according to formula (1-1), the start time of the Nth cycle is a fixed value, while the time of the local clock domain is a dynamic value that depends on the clock result obtained from the external device. If the local clock domain time is backtracked due to clock synchronization, the condition that the start time of the gating cycle is earlier than or equal to the time of the local clock domain may not be met, causing the gating cycle to fail to start because the time has not arrived, thus resulting in the interruption phenomenon.

[0065] For example, as shown in Figure 4, at time T1 of the current gating cycle, the local clock domain time rolls back to time T1'; the start time of the next gating cycle is time T2. At this point, it is necessary to wait for time t2 to initiate the next gating schedule, where t2 = T2 - T1'. During the time period t2, Qbv traffic may experience interruptions, meaning that Qbv scheduling cannot initiate a new gating cycle, resulting in the inability to schedule service data flow on time and interrupting data transmission.

[0066] This application provides a processing method, apparatus, and vehicle that can adjust the start time of the gating cycle when transmitting packets of a first network service to shorten the time difference between the start time of the gating cycle and the time synchronization time, thereby avoiding long-term service interruptions in the vehicle.

[0067] Figure 5 is a schematic flowchart of a processing method provided in an embodiment of this application. The execution subject of method 500 can be a vehicle. When the execution subject of method 500 is vehicle 100, it can be executed by computing platform 130 in vehicle 100, or by system-on-chip (SoC) in computing platform 130, or by processor in computing platform 130. The following describes method 500 with vehicle as the execution subject. Method 500 can include steps S501 to S504.

[0068] S501 acquires the second time from the external device while simultaneously reading the first time from the local clock.

[0069] S502, obtain the first scheduling parameters of the first network service.

[0070] The first scheduling parameter includes the third moment at the start of the Nth gating cycle when the vehicle transmits the message of the first network service, where N is a positive integer.

[0071] In one possible implementation, the first network service can be either a time-sensitive network service or a non-time-sensitive network service. When the first network service is a time-sensitive network service, it can include vehicle safety-critical services (e.g., autonomous driving control signals, onboard sensor data transmission, braking control commands, etc.). Time-sensitive network services can refer to network services that have high requirements for the real-time performance, determinism, and reliability of clock synchronization results. When the vehicle's clock synchronization deviates, executing time-sensitive network services may have unacceptable negative impacts on the vehicle, potentially threatening the personal safety of users.

[0072] In one possible implementation, before step S502, the vehicle can obtain first configuration information for the first network service, which includes a gating clock reference time and a gating period. The gating clock reference time is used to indicate the start time of Qbv. The vehicle can then determine the first scheduling parameters based on the gating clock reference time, the value of N, and the gating period. For example, the first scheduling parameters can be determined using formula (1-1).

[0073] S503, if the second time is earlier than the first time and the difference between the first time and the second time is greater than or equal to the first threshold, the first scheduling parameter is adjusted according to the clock compensation value to obtain the second scheduling parameter.

[0074] The clock compensation value is determined based on the difference between the second time point and the first time point. The fact that the second time point is earlier than the first time point can be understood as the vehicle experiencing a "rollback" during time synchronization, meaning that the vehicle's locally stored time needs to be forcibly adjusted to an earlier point in time. This "rollback" can be caused by factors such as large jitter or error in the network's clock synchronization signal, or a switch or failure of the vehicle's upstream clock source.

[0075] For example, Qbv scheduling involves a total of 10 gating cycles. The current gating cycle is the second gating cycle, and a "rollback" phenomenon occurs within the second gating cycle. In step S503, the start time of at least one gating cycle from the third to the tenth gating cycle can be adjusted based on the clock compensation value.

[0076] Alternatively, the clock compensation value can be determined using formula (1-2). OperBaseTimeExtension = CurrentTimeNew - CurrentTime (1-2)

[0077] Among them, OperaBaseTimeExtension is the clock compensation value, CurrentTimeNew is the second time point, and CurrentTime is the first time point.

[0078] Alternatively, if multiple clock compensations have been performed before the first moment, the clock compensation value can be determined using formula (1-3). OperBaseTimeExtension=A+(CurrentTimeNew-CurrentTime) (1-3)

[0079] Where A is the sum of the clock compensation values ​​from the previous multiple clock compensations.

[0080] Optionally, the first threshold can also be called the clock change threshold TimeChangeThreshold. The first threshold can be flexibly configured according to the actual business. For example, the first threshold can be greater than or equal to 10 microseconds and less than or equal to 100 microseconds.

[0081] Further optionally, if the transition error exceeds the normal clock synchronization range (e.g., nanosecond-level clock synchronization) and produces an error of x (x > 10) microseconds, then the first threshold can be set to x microseconds; if the transition error exceeds the maximum duration of traffic interruption that the service can accept, for example, if the vehicular network service allows network latency of less than 1 millisecond and jitter of no more than 10%, then the first threshold can be set to 100 microseconds.

[0082] S504, according to the second scheduling parameters, transmit the message of the first network service.

[0083] In one possible implementation, the second scheduling parameter includes the fifth moment at the start of the Nth gating cycle when the vehicle transmits a message for the first network service, and the fifth moment is earlier than the third moment.

[0084] According to the above processing method, when a vehicle experiences a "rollback" during time synchronization, the start time of the Nth gated cycle can be adjusted based on the clock compensation value, and the packets of the first network service can be transmitted based on the adjusted scheduling parameters. This shortens the time difference between the start time of the gated cycle and the time synchronization time, ensuring a high degree of match between the scheduling process and the clock synchronization result, thereby reducing the risk of Qbv scheduling anomalies caused by clock synchronization deviations. On the other hand, this processing method ensures that the vehicle's critical service traffic can be efficiently scheduled according to the predetermined cycle, avoiding prolonged service interruptions and improving the stability and reliability of the vehicle system. Furthermore, since the vehicle's clock synchronization may experience slight jumps under normal circumstances, the error of these jumps can be maintained at the nanosecond level, having a minimal impact on the transmission of the first network service. The above processing method adjusts the start time of the Nth gated cycle based on the clock compensation value when the clock synchronization error is greater than or equal to a first threshold. This avoids adjusting the start time of the gated cycle in the event of slight jumps in time synchronization, reducing the waste of computing resources while better supporting data transmission and service processing in the first network service. Furthermore, the above processing method is particularly suitable for the transmission of time-sensitive network services, which can avoid unacceptable negative impacts on vehicles when time-sensitive network services are executed due to clock synchronization deviations, thereby improving the driving safety of users.

[0085] According to some embodiments, before step S502, the vehicle obtains first configuration information, and the first configuration information includes a clock enable compensation flag bit. Then, in step S503, before adjusting the first scheduling parameter according to the clock compensation value to obtain the second scheduling parameter, method 500 further includes: determining that the clock enable compensation flag bit is in an active state.

[0086] Based on the above processing method, when the clock enable flag is active, the start time of the gating cycle can be adjusted based on the clock compensation value. In this way, the accuracy of Qbv scheduling can be improved, which is conducive to further ensuring that the traffic of the first network service can be efficiently scheduled according to the predetermined cycle.

[0087] Optionally, the clock enable flag being active can be in an enabled (True) state, and correspondingly, the clock enable flag being inactive can be in a disabled (False) state.

[0088] Alternatively, the clock enable flag can be a bit, where the clock enable flag is active when the bit is 1 and inactive when the bit is 0.

[0089] According to some embodiments, the first configuration information includes: gating clock reference time and configuration change flag. Then, in step S503, before adjusting the first scheduling parameter according to the clock compensation value to obtain the second scheduling parameter, method 500 further includes: determining that the configuration change flag is inactive and that the gating clock reference time is earlier than the second moment.

[0090] Based on the above processing method, the start time of the gating cycle can be adjusted before the gating clock reference time arrives. This approach not only effectively avoids unnecessary complexity and wasted computational resources caused by premature adjustments, but also ensures that gating cycle adjustments are only made when necessary, thereby optimizing the accuracy and efficiency of Qbv scheduling.

[0091] Optionally, the configuration change flag being active can be True, indicating that a new Qbv configuration in the vehicle is being processed or has not yet taken effect; correspondingly, the configuration change flag being inactive can be False, indicating that there is no pending Qbv configuration in the vehicle, or that a new Qbv configuration has taken effect.

[0092] According to some embodiments, the first configuration information further includes: gating period, gating period extension value, configuration change flag, and configuration change effective time; then before adjusting the first scheduling parameter according to the clock compensation value to obtain the second scheduling parameter, the method 500 further includes: determining that the configuration change flag is in an active state and that the gating clock reference time is later than the fourth time, the fourth time being the sum of the second time, the gating period, and the gating period extension value.

[0093] According to the above processing method, when there is a configuration change and the configuration change has not yet taken effect, adjusting the start time of the gating cycle based on the clock compensation value can ensure that the new configuration takes effect as planned after the current scheduling cycle is completed, thus avoiding interruption of the transmission of existing services.

[0094] It should be noted that the `ConfigChangeTime` parameter, which specifies the exact time when the new configuration takes effect, ensures that the configuration change does not interfere with running traffic scheduling or other real-time tasks. Configuration changes can include updating or modifying parameters related to traffic scheduling, time synchronization, or resource allocation. When a configuration change is marked as active (e.g., `true`), it indicates that a configuration change exists but is not yet complete. When a configuration change is marked as inactive (e.g., `False`), it indicates that there is no configuration change or that the configuration change has been completed.

[0095] It should also be noted that the gating cycle extension value, OperaCycleTimeExtension, can be an additional time added to the gating cycle to compensate for vehicle processing delays, network jitter, or other uncertainties, in order to ensure the robustness of Qbv scheduling.

[0096] Figure 6 is a schematic flowchart of another processing method provided in the embodiment of this application. Method 600 can be a detailed description of steps S501 to S503 in method 500. Method 600 can include the following steps.

[0097] S601, obtain the first configuration information of the first network service.

[0098] The first configuration information includes the gating clock base time, gating period, gating period extension value, configuration change effective time, configuration, configuration change flag, clock transition threshold, and clock enable flag. For a description of these parameters, please refer to Method 500; they will not be repeated here.

[0099] S602, while acquiring the second time from the external device, reads the first time from the local clock.

[0100] S603, determine whether the difference between the first time point and the second time point is greater than or equal to the clock transition threshold.

[0101] For example, if the second time step is earlier than the first time step, and the difference between the first and second time steps is greater than or equal to the clock transition threshold, step S604 can be performed; otherwise, method 600 can be terminated. This is because, when the second time step is later than the first time step, according to the current Qbv clock gating scheduling mechanism, no interruption will occur, therefore, there is no need to consider a clock compensation mechanism.

[0102] Optionally, the vehicle's clock synchronization may experience minor jumps under normal conditions, with errors maintained at the nanosecond level, having minimal impact on the transmission of the first network service. If the jump error exceeds the normal clock synchronization range (e.g., nanosecond-level clock synchronization), resulting in an error of x (x > 10) microseconds, the clock jump threshold can be set to x seconds. If the jump error exceeds the maximum acceptable duration of traffic interruption for the service, for example, if the vehicular network service allows network latency of less than 1 microsecond and jitter of no more than 10%, the clock jump threshold can be set to 100 microseconds.

[0103] S604 determines the clock compensation value.

[0104] For example, the clock compensation value can be determined based on formula (1-2) or formula (1-3).

[0105] S605 determines whether to perform clock compensation based on different scenarios.

[0106] Specifically, it can include the following four scenarios.

[0107] Scenario 1: No configuration changes and the gated clock base time has not yet arrived.

[0108] For example, when the configuration change is marked as inactive (False) and the gated clock base time is later than or equal to the second moment, time compensation may or may not be performed, i.e.:

[0109] CycleStartTime=OperBaseTime+OperBaseTimeExtension, or CycleStartTime=OperBaseTime (1-4)

[0110] Where CycleStartTime is the start time of the gated cycle, OperaBaseTimeExtension is the clock compensation value, and OperaBaseTime is the gated clock base time.

[0111] Scenario 2: No configuration changes and the gated clock reference time has just arrived or has already passed.

[0112] For example, when the configuration change flag is inactive (False), the clock enable flag is active (true), and the gating clock base time is earlier than the second moment, time compensation is performed, that is: CycleStartTime=OperBaseTime+OperBaseTimeExtension+N×OperCycleTime (1-5)

[0113] Where CycleStartTime is the start time of the gated cycle, OperaBaseTime is the gated clock base time, OperaBaseTimeExtension is the clock compensation value, OperaCycleTime is the gated cycle, N is the smallest integer that satisfies CycleStartTime≥CurrentTime, and CurrentTime is the second time.

[0114] Scenario 3: There are configuration changes and the configuration changes have not yet taken effect.

[0115] For example, when the configuration change flag is active (True), the clock enable flag is active (true), and the configuration change takes effect later than the fourth time, time compensation is performed. Here, the fourth time is the sum of the second time, the gating period, and the gating period extension value. That is, at this time, the start time of the gating period can be referred to formula (1-5).

[0116] Scenario 4: There are configuration changes and the effective time of the configuration changes has arrived or has passed.

[0117] For example, when the configuration change is marked as active (True) and the configuration change takes effect after the fourth time, no clock compensation is performed, that is: CycleStartTime = ConfigChangeTime (1-6)

[0118] Where CycleStartTime is the start time of the gating cycle and ConfigChangeTime is the time when the configuration change takes effect.

[0119] In this embodiment, when a vehicle experiences a "rollback" during time synchronization, compensation for the start time of the gating cycle can be determined based on different scenarios. Compensation for the start time of the gating cycle shortens the time difference between the start time and the time synchronization time, ensuring a high degree of match between the scheduling process and the clock synchronization result, thereby reducing the risk of Qbv scheduling anomalies caused by clock synchronization deviations. Furthermore, this approach ensures that the vehicle's critical business traffic can be efficiently scheduled according to a predetermined cycle, significantly reducing long-term business interruptions and improving the stability and reliability of the vehicle system.

[0120] It should be understood that, in the various embodiments of this application, unless otherwise specified or in case of logical conflict, the terms and / or descriptions between the various embodiments are consistent and can be referenced by each other, and the technical features in different embodiments can be combined to form new embodiments according to their inherent logical relationships.

[0121] Figure 7 is a schematic diagram of a processing device provided in an embodiment of this application. The device 700 may include an acquisition unit 710, a storage unit 720, and a processing unit 730. The acquisition unit 710 is used to acquire instructions and / or data, the storage unit 720 is used to implement corresponding storage functions and store corresponding instructions and / or data, and the processing unit 730 is used to perform data processing so that the device 700 can implement the aforementioned processing method.

[0122] According to some embodiments, the apparatus 700 includes: an acquisition unit 710, configured to: acquire a second time from an external device while reading a first time from a local clock; acquire a first scheduling parameter for a first network service, the first scheduling parameter including a third time at the start of the Nth gating cycle when the vehicle transmits a packet of the first network service, where N is a positive integer; and a processing unit 730, configured to: adjust the first scheduling parameter according to a clock compensation value to obtain a second scheduling parameter when the second time is earlier than the first time and the difference between the first time and the second time is greater than or equal to a first threshold, the clock compensation value being determined based on the difference between the second time and the first time; and transmit a packet of the first network service according to the second scheduling parameter.

[0123] In one possible implementation, the acquisition unit 710 is further configured to acquire first configuration information of the first network service, the first configuration information including a clock enable compensation flag bit; the processing unit 730 is further configured to determine that the clock enable compensation flag bit is in an active state.

[0124] In one possible implementation, the first configuration information further includes: a gating clock reference time and a configuration change flag, wherein the gating clock reference time is used to indicate the start time of time-based queue gating; the processing unit 730 is also used to determine that the configuration change flag is inactive and that the gating clock reference time is earlier than the second time.

[0125] In one possible implementation, the first configuration information further includes: a gating clock reference time, a gating period, a gating period extension value, and a configuration change flag. The gating clock reference time is used to indicate the start time of time-based queue gating. The processing unit 730 is also used to determine that the configuration change flag is in an active state and that the gating clock reference time is later than the fourth time, where the fourth time is the sum of the second time, the gating period, and the gating period extension value.

[0126] In one possible implementation, the processing unit 730 is further configured to determine the first scheduling parameters based on the gating clock reference time, the value of N, and the gating period.

[0127] In one possible implementation, the second scheduling parameter includes the fifth moment at the start of the Nth gating cycle when the vehicle transmits a message for the first network service, and the fifth moment is earlier than the third moment.

[0128] Figure 8 is a schematic diagram of another processing device provided in an embodiment of this application.

[0129] The device 800 includes a memory 810, a processor 820, and a communication interface 830. The memory 810, processor 820, and communication interface 830 are connected via an internal connection path. The memory 810 stores instructions, and the processor 820 executes the instructions stored in the memory 810 to control the communication interface 830 to acquire information, enabling the device 800 to implement the aforementioned processing method. Optionally, the memory 810 can be coupled to the processor 820 via an interface, or it can be integrated with the processor 820.

[0130] It should be noted that the communication interface 830 described above uses a transceiver device, such as, but not limited to, a transceiver. The communication interface 830 may also include an input / output interface.

[0131] The processor 820 stores one or more computer programs, which include instructions. When the instructions are executed by the processor 820, the processing device 800 performs the processing methods described in the above embodiments.

[0132] In implementation, each step of the above method can be completed by the integrated logic circuits in the hardware of the processor 820 or by instructions in software form. The method disclosed in the embodiments of this application can be directly implemented by the hardware processor, or by a combination of hardware and software modules in the processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory 810, and the processor 820 reads the information in memory 810 and, in conjunction with its hardware, completes the steps of the above method. To avoid repetition, detailed descriptions are not provided here.

[0133] Optionally, the memory 810 in FIG8 can implement the storage unit 720 in FIG7, the processor 820 in FIG8 can implement the processing unit 730 in FIG7, and the communication interface 830 in FIG8 can implement the acquisition unit 710 in FIG7.

[0134] This application also provides a computer-readable storage medium storing program code that, when executed on a computer, causes the computer to perform the processing method shown in FIG5 or FIG6.

[0135] This application also provides a computer program product, which includes a computer program that, when run, causes the computer to perform the processing method shown in FIG5 or FIG6.

[0136] This application also provides a chip, including: a circuit for performing the processing method shown in FIG5 or FIG6 above.

[0137] This application also provides a vehicle, which includes a processing device as shown in FIG7 or FIG8.

[0138] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0139] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0140] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0141] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0142] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0143] If the aforementioned functions are implemented as software functional 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 this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0144] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A processing method, characterized in that, The method includes: While acquiring the second time from the external device, read the first time from the local clock; Obtain the first scheduling parameters of the first network service, wherein the first scheduling parameters include the third moment at the start of the Nth gating cycle when the vehicle transmits the message of the first network service, where N is a positive integer; If the second time is earlier than the first time, and the difference between the first time and the second time is greater than or equal to the first threshold, the first scheduling parameter is adjusted according to the clock compensation value to obtain the second scheduling parameter. The clock compensation value is determined based on the difference between the second time and the first time. The packets of the first network service are transmitted according to the second scheduling parameters.

2. The method as described in claim 1, characterized in that, Before reading the first moment from the local clock while simultaneously acquiring the second moment from the external device, the method further includes: Obtain the first configuration information of the first network service, wherein the first configuration information includes a clock enable compensation flag bit; Before adjusting the first scheduling parameter according to the clock compensation value to obtain the second scheduling parameter, the method further includes: Determine that the clock enable compensation flag is in an active state.

3. The method as described in claim 2, characterized in that, The first configuration information also includes: a gating clock reference time and a configuration change flag, wherein the gating clock reference time is used to indicate the start time of time-based queue gating; Before adjusting the first scheduling parameter according to the clock compensation value to obtain the second scheduling parameter, the method further includes: It is determined that the configuration change flag is inactive and that the gating clock reference time is earlier than the second moment.

4. The method as described in claim 2, characterized in that, The first configuration information also includes: the gating period, the gating period extension value, the configuration change flag, and the effective time of the configuration change; Before adjusting the first scheduling parameter according to the clock compensation value to obtain the second scheduling parameter, the method further includes: The configuration change is marked as active and the configuration change takes effect later than the fourth time, where the fourth time is the sum of the second time, the gating period, and the gating period extension value.

5. The method according to any one of claims 1 to 4, characterized in that, The second scheduling parameter includes the fifth moment at the start of the Nth gating cycle when the vehicle transmits the message of the first network service, and the fifth moment is earlier than the third moment.

6. A processing apparatus, characterized in that, The device includes: an acquisition unit and a processing unit; The acquisition unit is used for: While acquiring the second time from the external device, read the first time from the local clock; Obtain the first scheduling parameters of the first network service, wherein the first scheduling parameters include the third moment at the start of the Nth gating cycle when the vehicle transmits the message of the first network service, where N is a positive integer; The processing unit is used for: If the second time is earlier than the first time, and the difference between the first time and the second time is greater than or equal to the first threshold, the first scheduling parameter is adjusted according to the clock compensation value to obtain the second scheduling parameter. The clock compensation value is determined based on the difference between the second time and the first time. The packets of the first network service are transmitted according to the second scheduling parameters.

7. The apparatus as claimed in claim 6, characterized in that, The acquisition unit is further configured to acquire first configuration information of the first network service, wherein the first configuration information includes a clock enable compensation flag bit. The processing unit is also configured to determine that the clock enable compensation flag is in an active state.

8. The apparatus as claimed in claim 7, characterized in that, The first configuration information also includes: a gating clock reference time and a configuration change flag, wherein the gating clock reference time is used to indicate the start time of time-based queue gating; The processing unit is further configured to determine that the configuration change flag is inactive and that the gating clock reference time is earlier than the second moment.

9. The apparatus as claimed in claim 7, characterized in that, The first configuration information also includes: the gating period, the gating period extension value, the configuration change flag, and the effective time of the configuration change; The processing unit is further configured to determine that the configuration change is marked as active and that the configuration change takes effect later than a fourth time, wherein the fourth time is the sum of the second time, the gating period, and the gating period extension value.

10. The apparatus according to any one of claims 6 to 9, characterized in that, The second scheduling parameter includes the fifth moment at the start of the Nth gating cycle when the vehicle transmits the message of the first network service, and the fifth moment is earlier than the third moment.

11. A processing apparatus, characterized in that, The device includes a processor and a memory, the processor being coupled to the memory, the memory being used to store computer programs or instructions, and the processor being used to execute the computer programs or instructions in the memory, such that the method of any one of claims 1 to 5 is performed.

12. A chip, characterized in that, The chip includes circuitry for performing the method as described in any one of claims 1 to 5.

13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores program code that, when executed on a computer, causes the computer to perform the method as described in any one of claims 1 to 5.

14. A computer program product, characterized in that, The computer product includes a computer program that, when run, causes the computer to perform the method as described in any one of claims 1 to 5.

15. A vehicle, characterized in that, The processing apparatus includes any one of claims 6 to 11.