Methods, devices, vehicles, and storage media for determining time synchronization accuracy

By acquiring the clock frequencies of the server and the reference clock, the time synchronization accuracy between the server and the on-board device under test is determined, thus solving the problem of inconsistent clock values ​​of on-board devices in intelligent connected vehicles and improving the accuracy of time synchronization and clock selection.

CN117440497BActive Publication Date: 2026-07-17CHONGQING CHANGAN TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHONGQING CHANGAN TECH CO LTD
Filing Date
2023-11-28
Publication Date
2026-07-17

Smart Images

  • Figure CN117440497B_ABST
    Figure CN117440497B_ABST
Patent Text Reader

Abstract

This application relates to a method, apparatus, vehicle, and storage medium for determining time synchronization accuracy, and pertains to the field of vehicle testing technology. The method includes: acquiring a first clock frequency and a second clock frequency for each of a plurality of preset times, wherein the first clock frequency is the clock frequency of a server, and the second clock frequency is the clock frequency of a reference clock. Based on the first clock frequency and the second clock frequency for each preset time, a first time synchronization accuracy is determined, which is the time synchronization accuracy of the server. If the first time synchronization accuracy is less than a preset accuracy threshold, a second time synchronization accuracy is determined based on the time synchronization information between the server and the vehicle-mounted device under test. Therefore, using a server with time synchronization accuracy meeting the testing requirements to test the time synchronization accuracy of the vehicle-mounted device under test can improve the accuracy of the time synchronization accuracy of the device under test.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of vehicle testing technology, specifically to a method, apparatus, vehicle, and storage medium for determining time synchronization accuracy. Background Technology

[0002] In the communication network of intelligent connected vehicles, each on-board device has its own clock. Due to differences in clock frequency, manufacturing processes, and changes in the network environment, the clock value of each communication device may deviate, leading to inconsistencies in clock values ​​among multiple on-board devices in the communication network. Time synchronization technology can be used to adjust the clock value of each on-board device, ensuring that the clock values ​​of multiple on-board devices are consistent.

[0003] Currently, time synchronization accuracy can be determined by measuring the message response time between the test equipment and the on-board equipment under test. However, the clock value of the test system may have errors, leading to inaccurate determination of time synchronization accuracy. Summary of the Invention

[0004] This application provides a method, apparatus, vehicle, and storage medium for determining time synchronization accuracy, to at least solve the technical problem in related technologies where clock values ​​in test systems may contain errors, leading to inaccurate time synchronization accuracy. The technical solution of this application is as follows:

[0005] According to a first aspect of this application, a method for determining time synchronization accuracy is provided. The method includes: acquiring a first clock frequency and a second clock frequency for each of a plurality of preset times, wherein the first clock frequency is the clock frequency of a server, and the second clock frequency is the clock frequency of a reference clock. A first time synchronization accuracy is determined based on the first clock frequency and the second clock frequency for each preset time, and the first time synchronization accuracy is the time synchronization accuracy of the server. If the first time synchronization accuracy is less than a preset accuracy threshold, a second time synchronization accuracy is determined based on the time synchronization information between the server and the vehicle-mounted device under test, and the second time synchronization accuracy is the time synchronization accuracy of the vehicle-mounted device under test.

[0006] Based on the above technical means, this application determines the first time synchronization accuracy. If the first time synchronization accuracy is less than the preset accuracy threshold, it indicates that the time synchronization accuracy of the server meets the test requirements. Using a server with higher time synchronization accuracy to test the time synchronization accuracy of the vehicle-mounted device under test can improve the accuracy of the time synchronization accuracy of the vehicle-mounted device under test.

[0007] In one possible implementation, the above-mentioned "determining the second time synchronization accuracy based on the time synchronization information between the server and the vehicle-mounted device under test" includes: acquiring multiple first moments and a second moment corresponding to each first moment, wherein the first moment is the moment when time synchronization information is sent to the vehicle-mounted device under test, and the second moment is the moment when the vehicle-mounted device under test receives the time synchronization information. The second time synchronization accuracy is then determined based on the multiple first moments and the second moment corresponding to each first moment.

[0008] Based on the aforementioned technical means, this application determines the second time synchronization accuracy by repeatedly obtaining the time when the server sends time synchronization information to the vehicle-mounted device under test and the time when the vehicle-mounted device under test receives the time synchronization information. This can improve the accuracy of the second time synchronization accuracy, that is, improve the accuracy of the time synchronization accuracy of the vehicle-mounted device under test.

[0009] In one possible implementation, there are multiple second time synchronization accuracies. The method for determining the time synchronization accuracies further includes: determining a first error based on the multiple second time synchronization accuracies; for each second time synchronization accuracies, determining a second error corresponding to the second time synchronization accuracies based on the second time synchronization accuracies, the first time synchronization accuracies, and a preset influence factor; and determining a target error corresponding to each second time synchronization accuracies based on the first error, the second error corresponding to the second time synchronization accuracies, and the preset influence factor, thereby determining the target error for each second time synchronization accuracies, whereby the target error indicates the accuracy of the second time synchronization accuracies.

[0010] Based on the above technical means, this application can determine the target error of the second time synchronization accuracy by detecting the measurement inaccuracy of the second time synchronization accuracy, so as to ensure the accuracy of the second time synchronization accuracy.

[0011] In one possible implementation, the method for determining time synchronization accuracy further includes: acquiring clock information from multiple slave clocks, the clock information including a clock identifier and a third time synchronization accuracy. Based on the third time synchronization accuracy of each slave clock, a first master clock is determined from the multiple slave clocks. A clock identifier from a second master clock of the vehicle-mounted device under test (V2D) is received, the second master clock being the master clock determined by the V2D from the multiple slave clocks. If the clock identifier of the second master clock is the same as the clock identifier of the first master clock, first test information is determined, the first test information indicating that the V2D has passed the master clock selection test. If the clock identifier of the second master clock is different from the clock identifier of the first master clock, second test information is determined, the second test information indicating that the V2D has not passed the master clock selection test.

[0012] Based on the aforementioned technical means, this application can detect the accuracy of the master clock selection of the vehicle-mounted device under test (V2D) by determining whether it passes the master clock selection test. If the V2D passes the master clock selection test, it indicates that the accuracy of its master clock selection is high; if it fails the test, it indicates that the accuracy of its master clock selection is low.

[0013] In one possible implementation, the method for determining time synchronization accuracy further includes: sending a first number of delay request messages to the vehicle-mounted device under test (V2D). Obtaining a second number, which is the number of delay response messages received from the V2D. Adjusting the first number according to a target rule to obtain an updated first number, and sending the updated first number of delay request messages to the V2D to re-obtain the second number. Adjusting the updated first number according to the target rule and re-obtaining the second number, until the last obtained updated first number is duplicated, stopping the adjustment of the first number and stopping the sending of delay request messages, and determining a target number, which indicates the maximum number of slave clocks that the V2D can support when the V2D is the master clock. The target rule includes: increasing the first number when the second number is the same as the first number; or decreasing the first number when the second number is different from the first number.

[0014] Based on the above technical means, this application can determine the maximum number of slave clocks that the vehicle-mounted device under test can support when it is the master clock by continuously adjusting the first quantity through multiple simulation tests.

[0015] According to a second aspect provided in this application, a time synchronization accuracy determination apparatus is provided, the apparatus comprising: an acquisition unit, a processing unit, and a transmission unit.

[0016] The acquisition unit is used to acquire a first clock frequency and a second clock frequency for each of multiple preset times, wherein the first clock frequency is the clock frequency of the server and the second clock frequency is the clock frequency of the reference clock. The processing unit is used to determine a first time synchronization accuracy based on the first clock frequency and the second clock frequency for each preset time, wherein the first time synchronization accuracy is the time synchronization accuracy of the server. The processing unit is also used to determine a second time synchronization accuracy based on the time synchronization information between the server and the vehicle-mounted device under test if the first time synchronization accuracy is less than a preset accuracy threshold, wherein the second time synchronization accuracy is the time synchronization accuracy of the vehicle-mounted device under test.

[0017] In one possible implementation, the acquisition unit is specifically used to acquire a plurality of first moments and a second moment corresponding to each first moment, wherein the first moment is the moment when time synchronization information is sent to the vehicle-mounted device under test, and the second moment is the moment when the vehicle-mounted device under test receives the time synchronization information. The processing unit is specifically used to determine the second time synchronization accuracy based on the plurality of first moments and the second moment corresponding to each first moment.

[0018] In one possible implementation, there are multiple second time synchronization accuracies. The acquisition unit is further configured to acquire multiple second time synchronization accuracies. The processing unit is further configured to determine a first error based on the multiple second time synchronization accuracies. For each second time synchronization accuracies, the processing unit is further configured to determine a second error corresponding to the second time synchronization accuracies based on the second time synchronization accuracies, the first time synchronization accuracies, and a preset influence factor. The processing unit is further configured to determine a target error corresponding to the second time synchronization accuracies based on the first error, the second error corresponding to the second time synchronization accuracies, and the preset influence factor, thereby determining a target error corresponding to each second time synchronization accuracies. The target error is used to indicate the accuracy of the second time synchronization accuracies.

[0019] In one possible implementation, the acquisition unit is further configured to acquire clock information of multiple slave clocks, the clock information including a clock identifier and a third time synchronization accuracy. The processing unit is further configured to determine a first master clock from the multiple slave clocks based on the third time synchronization accuracy of each slave clock. The acquisition unit is further configured to receive a clock identifier from a second master clock of the vehicle-mounted device under test (V2D), the second master clock being the master clock determined by the V2D from the multiple slave clocks. The processing unit is further configured to determine first test information if the clock identifier of the second master clock is the same as the clock identifier of the first master clock, the first test information being used to instruct the V2D to pass the master clock selection test. The processing unit is further configured to determine second test information if the clock identifier of the second master clock is different from the clock identifier of the first master clock, the second test information being used to indicate that the V2D failed the master clock selection test.

[0020] In one possible implementation, the sending unit is configured to send a first number of delay request messages to the vehicle-mounted device under test (V2D). The acquisition unit is further configured to acquire a second number, which is the number of delay response messages received from the V2D. The processing unit is further configured to adjust the first number according to a target rule to obtain an updated first number. The sending unit is further configured to send the updated first number of delay request messages to the V2D to reacquire the second number. The processing unit is further configured to adjust the updated first number according to the target rule and reacquire the second number until the last updated first number is duplicated, at which point the adjustment of the first number is stopped. The sending unit is further configured to stop sending delay request messages. The processing unit is further configured to determine a target number, which indicates the maximum number of slave clocks supported by the V2D when the V2D is the master clock. The target rule includes: increasing the first number when the second number is the same as the first number; or decreasing the first number when the second number is different from the first number.

[0021] According to a third aspect provided in this application, a vehicle is provided, comprising: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute instructions to implement the method of the first aspect described above and any possible implementation thereof.

[0022] According to a fourth aspect provided in this application, a computer-readable storage medium is provided that, when the instructions in the computer-readable storage medium are executed by a processor of a vehicle, enables the vehicle to perform the methods described in the first aspect and any possible implementation thereof.

[0023] According to the fifth aspect provided in this application, a computer program product is provided, the computer program product including computer instructions that, when executed on a vehicle, cause the vehicle to perform the method described in the first aspect and any possible implementation thereof.

[0024] Therefore, the above-mentioned technical features of this application have the following beneficial effects:

[0025] (1) By determining the first time synchronization accuracy, if the first time synchronization accuracy is less than the preset accuracy threshold, it indicates that the time synchronization accuracy of the server meets the test requirements. Using a server with higher time synchronization accuracy to test the time synchronization accuracy of the vehicle device under test can improve the accuracy of the time synchronization accuracy of the vehicle device under test.

[0026] (2) By detecting the measurement inaccuracy of the second time synchronization accuracy, the target error of the second time synchronization accuracy is determined to ensure the accuracy of the second time synchronization accuracy.

[0027] (3) The accuracy of the vehicle-mounted device under test in selecting the master clock is detected by determining whether the device under test passes the master clock selection test. If the device under test passes the master clock selection test, it indicates that the accuracy of the device under test in selecting the master clock is high; if the device under test fails the master clock selection test, it indicates that the accuracy of the device under test in selecting the master clock is low.

[0028] (4) Through multiple simulation tests, the first quantity is continuously adjusted to determine the maximum number of slave clocks that the vehicle-mounted device under test can support when it is the master clock.

[0029] It should be noted that the technical effects of any of the implementation methods in aspects two through five can be found in the technical effects of the corresponding implementation methods in aspect one, and will not be repeated here.

[0030] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description

[0031] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application, and do not constitute an undue limitation of this application.

[0032] Figure 1 This is a schematic diagram of the architecture of a system for determining time synchronization accuracy according to an exemplary embodiment;

[0033] Figure 2 This is a flowchart illustrating a method for determining time synchronization accuracy according to an exemplary embodiment;

[0034] Figure 3 This is a flowchart illustrating a method for determining a second time synchronization accuracy according to an exemplary embodiment;

[0035] Figure 4 This is a flowchart illustrating another method for determining time synchronization accuracy according to an exemplary embodiment;

[0036] Figure 5 This is a block diagram illustrating a time synchronization accuracy determination device according to an exemplary embodiment;

[0037] Figure 6 This is a block diagram illustrating a vehicle according to an exemplary embodiment. Detailed Implementation

[0038] To enable those skilled in the art to better understand the technical solutions of this application, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.

[0039] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0040] Before providing a detailed description of the method for determining the time synchronization accuracy in the embodiments of this application, the implementation environment and application scenarios of the embodiments of this application will be introduced first.

[0041] In the communication network of intelligent connected vehicles, each on-board device has its own clock. Due to differences in clock frequency, manufacturing processes, and changes in the network environment, the clock value of each communication device may deviate, leading to inconsistencies in clock values ​​among multiple on-board devices in the communication network. Time synchronization technology can be used to adjust the clock value of each on-board device, ensuring that the clock values ​​of multiple on-board devices are consistent.

[0042] Currently, time synchronization accuracy can be determined by measuring the message response time between the test equipment and the vehicle-mounted device under test. However, the clock value of the test system may contain errors, leading to inaccurate determinations of time synchronization accuracy. Furthermore, the automotive field lacks unified clock synchronization testing and verification standards and platforms, making it difficult for physical equipment to verify the effectiveness of clock synchronization technology.

[0043] To address the aforementioned issues, this application provides a method for determining time synchronization accuracy. The method includes: a server acquiring a first clock frequency and a second clock frequency for each of multiple preset times, where the first clock frequency is the server's clock frequency and the second clock frequency is the clock frequency of a reference clock. The server determines a first time synchronization accuracy based on the first and second clock frequencies for each preset time, and this first time synchronization accuracy is the server's time synchronization accuracy. If the first time synchronization accuracy is less than a preset accuracy threshold, the server can determine a second time synchronization accuracy based on the time synchronization information between the server and the vehicle-mounted device under test (V2D), and this second time synchronization accuracy is the V2D ...

[0044] The implementation environment of the embodiments of this application is described below.

[0045] Figure 1 This is a schematic diagram illustrating the architecture of a system for determining time synchronization accuracy according to an exemplary embodiment, such as... Figure 1 As shown, the system for determining the time synchronization accuracy includes: a server 101, a reference clock 102, an on-board device under test 103, a data management terminal 104, and a display 105. The server 101 communicates with the reference clock 102 via wired / wireless communication, with the on-board device under test 103 via wired / wireless communication, with the data management terminal 104 via wired / wireless communication, and with the display 105 via wired / wireless communication.

[0046] The server 101 can be a single physical server, or a server cluster consisting of multiple servers. Alternatively, the server cluster can be a distributed cluster. Alternatively, the server can be a cloud server. This application does not limit the specific implementation of the server.

[0047] Server 101 is equipped with a testing system, which is physically connected to the vehicle-mounted device under test. Server 101 can use the testing system to perform tasks such as clock synchronization accuracy testing, optimal master clock selection testing, slave clock scale testing, and measurement result accuracy evaluation on the vehicle-mounted device under test.

[0048] The reference clock 102 can be a rubidium clock, which can be used to provide a comparison reference clock signal for the server when measuring the clock synchronization accuracy of the on-board equipment under test.

[0049] The data management terminal 104 can be used for physical connection with the server 101 and the display 105.

[0050] The display 105 can be physically connected to the data management terminal. The display 105 can be used to display information such as test dynamic execution process information, test process monitoring information, and test result information.

[0051] In this embodiment of the application, the test system in the server may include: a clock synchronization accuracy test module, an optimal master clock selection test module, a slave clock scale support test module, a test result accuracy evaluation module, and a data management module.

[0052] The clock synchronization accuracy test module can be used to measure the time synchronization accuracy of the vehicle-mounted device under test and the time synchronization accuracy of the server.

[0053] The optimal master clock selection module can be used to perform optimal master clock selection tests when the on-board device under test is acting as a slave clock device, as well as to perform erroneous clock switching tests (reselecting the optimal master clock) in the event of a failure of the optimal master clock.

[0054] The slave clock scale test module can be used to determine the maximum number of slave clocks that the vehicle under test can support when the vehicle under test is used as the master clock device.

[0055] The data management module can be used to connect with the on-board equipment under test, send and receive clock synchronization test data, monitor the test process, automatically analyze test results, and print test result reports.

[0056] For ease of understanding, the method for determining the time synchronization accuracy provided in this application will be described in detail below with reference to the accompanying drawings. Figure 2 This is a flowchart illustrating a method for determining time synchronization accuracy according to an exemplary embodiment, such as... Figure 2 As shown, the method includes the following steps:

[0057] S201. The server obtains the first clock frequency and the second clock frequency of each preset time from multiple preset times.

[0058] The first clock frequency is the server's clock frequency, and the second clock frequency is the reference clock frequency.

[0059] In one possible implementation, for each of a plurality of preset times, the server can obtain the server's clock frequency at the preset time and the clock frequency of the reference clock at the preset time, i.e., obtain the first clock frequency and the second clock frequency, so as to obtain the first clock frequency and the second clock frequency for each preset time.

[0060] It should be noted that the reference clock is not limited in the embodiments of this application. For example, the reference clock can be a rubidium clock. Another example is a cesium atomic clock. Yet another example is a regional reference clock source.

[0061] S202. The server determines the first time synchronization accuracy based on the first clock frequency and the second clock frequency at each preset time.

[0062] Among them, the first time synchronization accuracy is the time synchronization accuracy of the server.

[0063] In one possible implementation, for each of a plurality of preset times, the server can determine a first time difference based on a first clock frequency and a second clock frequency, thereby determining a plurality of first time differences. The server can then determine a first time synchronization accuracy based on the plurality of first time differences.

[0064] In one possible design, the first time deviation can be represented by Equation 1.

[0065]

[0066] Where b represents the first time deviation, f1 represents the first clock frequency, and f2 represents the second clock frequency.

[0067] The second time synchronization accuracy can be expressed by formulas two and three.

[0068]

[0069]

[0070] Where X represents the first-time synchronization precision. The value is used to represent the average of multiple first time deviations, where m represents the number of first time deviations, and b... i Used to represent the i-th first time deviation among multiple first time deviations.

[0071] S203. The server determines whether the synchronization accuracy at the first moment is less than the preset accuracy threshold.

[0072] In one possible implementation, the server can compare the first time synchronization accuracy with a preset accuracy threshold to determine whether the first time synchronization accuracy is less than the preset accuracy threshold.

[0073] It should be noted that the preset accuracy threshold is not limited in this embodiment. For example, the preset accuracy threshold can be 80 nanoseconds. Another example is that the preset accuracy threshold can be 100 nanoseconds. Yet another example is that the preset accuracy threshold can be 90 nanoseconds.

[0074] In one possible design, if the synchronization accuracy at the first moment is greater than or equal to the preset accuracy threshold, the server can correct the deviation based on the reference clock and re-execute S201-S203.

[0075] In other words, if the initial synchronization accuracy is greater than or equal to a preset accuracy threshold, the server can correct the skewness based on the reference clock, re-acquire the first clock frequency and the second clock frequency for each of the multiple preset times, and determine the updated initial synchronization accuracy. The server can then determine whether the updated initial synchronization accuracy is less than the preset accuracy threshold.

[0076] In another possible design, if the synchronization accuracy at the first moment is less than a preset accuracy threshold, the server can execute S204.

[0077] It should be noted that, in this embodiment, if the first time synchronization accuracy is less than the preset accuracy threshold, it indicates that the server's time synchronization accuracy meets the test requirements, meaning the test system's time synchronization accuracy meets the test requirements. Using a test system with higher time synchronization accuracy to test the time synchronization accuracy of the vehicle-mounted device under test can improve the accuracy of the device's time synchronization. In this embodiment, the smaller the value of the first time synchronization accuracy, the smaller the time deviation from the reference clock, and the higher the time synchronization accuracy; conversely, the larger the value of the first time synchronization accuracy, the larger the time deviation from the reference clock, and the lower the time synchronization accuracy.

[0078] S204. The server determines the second time synchronization accuracy based on the time synchronization information between the server and the on-board device under test.

[0079] The second time synchronization accuracy refers to the time synchronization accuracy of the on-board equipment under test.

[0080] In one possible implementation, the server can obtain multiple first moments and a corresponding second moment for each first moment. The first moment is the moment when the server sends time synchronization information to the vehicle-mounted device under test, and the second moment is the moment when the vehicle-mounted device under test receives the time synchronization information.

[0081] In one possible design, for each of multiple first moments, the server can send time synchronization information to the vehicle-mounted device under test (V2D) via the test system and obtain the first moment, i.e., the moment the server sends the time synchronization information to the V2D. The V2D can receive the time synchronization information from the server and obtain the second moment corresponding to the first moment, i.e., the moment the V2D receives the time synchronization information. The V2D can send the second moment corresponding to the first moment to the server. The server can receive the second moment corresponding to the first moment from the V2D to obtain the second moment corresponding to the first moment. The server can obtain multiple first moments and the second moment corresponding to each first moment.

[0082] In this embodiment of the application, the server can determine the second time synchronization accuracy based on multiple first moments and the second moment corresponding to each first moment.

[0083] Specifically, for each first moment, the server can determine a second time deviation based on the first moment and its corresponding second moment, thus determining multiple second time deviations. The server can then determine the second time synchronization accuracy based on these multiple second time deviations.

[0084] In one possible design, the second time deviation can be represented by Equation 4.

[0085] d = t2 - t1 (Formula 4)

[0086] Where d represents the second time deviation, t1 represents the first time, and t2 represents the second time corresponding to the first time.

[0087] The second time synchronization accuracy can be expressed by formulas five and six.

[0088]

[0089]

[0090] Where Y represents the second time synchronization precision. The value is used to represent the average of multiple second time deviations, where n represents the number of second time deviations, and d represents the average value. i Used to represent the i-th second time deviation among multiple second time deviations.

[0091] Understandably, the server can acquire a first clock frequency and a second clock frequency for each of multiple preset times. The first clock frequency is the server's clock frequency, and the second clock frequency is the reference clock frequency. The server can determine a first time synchronization accuracy based on these two frequencies; this first time synchronization accuracy is the server's time synchronization accuracy. If the first time synchronization accuracy is less than a preset accuracy threshold, the server can determine a second time synchronization accuracy based on the time synchronization information between the server and the vehicle-mounted device under test (V2D). This second time synchronization accuracy is the V2D's time synchronization accuracy. Therefore, if the first time synchronization accuracy is less than the preset accuracy threshold, it indicates that the server's time synchronization accuracy meets the testing requirements. Using a server with higher time synchronization accuracy to test the V2D's time synchronization accuracy can improve the accuracy of the V2D's time synchronization.

[0092] The determination of the second time synchronization accuracy by the server in this application will be described below with reference to specific embodiments. For example... Figure 3The diagram illustrates a flowchart of a method for determining the second time synchronization accuracy. A server can send time synchronization information to the vehicle-mounted device under test (V2D) at time t1 using a test system. The V2D can receive the time synchronization information from the server at time t2. The server can collect the time information at t1 and t2 using the test system. The server can calculate the difference between the time information at t1 and t2 using the test system, and use this difference as the second time deviation. The server can calculate the standard deviation of the second time deviation using the test system. Based on the second time deviation, the server can determine the second time synchronization accuracy using the test system.

[0093] In some embodiments, to ensure the accuracy of the second time synchronization precision, the measurement inaccuracy of the second time synchronization precision can be assessed by detecting it. The inaccuracy assessment of measurement items is mainly divided into Type A uncertainty assessment and Type B uncertainty assessment. Type A uncertainty assessment involves statistically analyzing a series of observations to calculate the standard uncertainty, while Type B uncertainty assessment determines the uncertainty based on the characteristics and performance of the test equipment (server) or general knowledge, i.e., the measurement error related to the measurement item inherent to the equipment itself. For example... Figure 4 As shown, the method for determining time synchronization accuracy may also include the following steps: S401.

[0094] S401, The server obtains multiple second time synchronization precisions.

[0095] In one possible implementation, the server can acquire multiple second time synchronization precisions, so that the number of second time synchronization precisions is multiple.

[0096] It should be noted that, in this embodiment of the application, the description of the server obtaining multiple second time synchronization accuracies can be found in S204, which describes the server determining the second time synchronization accuracies. In other words, the server can execute S204 multiple times to obtain multiple second time synchronization accuracies.

[0097] For example, as shown in Table 1, several second time synchronization accuracies are illustrated. The number of tests for each second time synchronization accuracies is 15.

[0098] Table 1. Multiple Second Time Synchronization Accuracy

[0099]

[0100] That is, when the number of tests is 1, the second time synchronization accuracy is 500.5 nanoseconds. When the number of tests is 2, the second time synchronization accuracy is 500.5 nanoseconds. When the number of tests is 3, the second time synchronization accuracy is 502.5 nanoseconds. In the embodiments of this application, the description of the number of tests from 4 to 15 can be referred to the description of the number of tests from 1 to 3, and will not be repeated here.

[0101] In this embodiment of the application, when there are multiple second time synchronization accuracies, the server can execute S402-S404.

[0102] S402. The server determines the first error based on multiple second time synchronization accuracies.

[0103] In one possible implementation, the server can determine the first error based on multiple second time synchronization accuracies using Bessel's formula.

[0104] In one possible design, the first error can be represented by Equations 7 and 8.

[0105]

[0106]

[0107] Among them, S(Y k ) is used to represent the first error. Y is used to represent the average of multiple second time synchronization accuracies. i The second time synchronization precision is used to represent the i-th second time synchronization precision among multiple second time synchronization precisions, and k is used to represent the number of tests for the second time synchronization precision.

[0108] It should be noted that, in this embodiment, the number of tests for the second time synchronization accuracy is greater than or equal to 10. S(Y k Let be the experimental standard deviation of the k-th second time synchronization accuracy, used to represent the dispersion of the k-th second time synchronization accuracy. Therefore, the Type A uncertainty of the k-th second time synchronization accuracy is S(Y). k Since the experimental test involves a single measurement, the Type A standard uncertainty u1(Y) introduced by measurement repeatability... k ) can be S(Y k ), that is, the first error is S(Y) k ).

[0109] For example, referring to Table 1, if the number of tests for multiple second time synchronization accuracies is 15, then S 2 ≈1.37 nanoseconds, S≈1.17 nanoseconds.

[0110] In the embodiments of this application, for each second time synchronization precision, the server can execute S403-S404.

[0111] S403. The server determines the second error based on the second time synchronization accuracy, the first time synchronization accuracy, and the preset influence factor.

[0112] In one possible implementation, the server can determine the system error based on the first time synchronization accuracy. The server can then determine the actual error based on the system error and the second time synchronization accuracy. Finally, the server can determine the second error based on the actual error and a preset influencing factor.

[0113] For example, if the system error is ±0.1% and the second time synchronization accuracy is 500.5, then the actual error can be ±(500.5 × 0.1%) = ±0.5005 nanoseconds. If the preset influence factor is 2, then the second error can be expressed as...

[0114] It should be noted that, in the embodiments of this application, the Type B uncertainty is the second error, that is, the Type B uncertainty is u2(Y). k This application does not limit the preset impact factor. For example, the preset impact factor can be 2, representing an inclusion probability of approximately 95%. Another example is that the preset impact factor can be 3. Yet another example is that the preset impact factor can be 4.

[0115] S404. The server determines the target error based on the first error, the second error, and the preset influence factor.

[0116] The target error is used to indicate the accuracy of the second time synchronization precision, with one target error corresponding to one second time synchronization precision.

[0117] In one possible implementation, the server can determine the composite error based on the first error and the second error. The server can then determine the target error based on the composite error and a preset influence factor.

[0118] In one possible design, the synthesis error can be represented by Equation 9.

[0119]

[0120] Among them, U C Y is used to represent the synthesis error. k Used to represent the k-th second time synchronization precision among multiple second time synchronization precisions, u1(Y) k ) is used to represent the first error, u2(Y k ) is used to represent the second error.

[0121] It should be noted that, in the embodiments of this application, w is used to represent the number of error categories used to calculate the composite error, u i (x) represents the error of the i-th category among multiple error categories. The combined standard uncertainty is the combined error, i.e., the combined standard uncertainty is U. C .

[0122] The target error can be expressed by Formula 10.

[0123] L=q×U C Formula 10.

[0124] Where L represents the target error, q represents the preset influence factor, and U C Used to represent synthesis error.

[0125] For example, if the first error (i.e., Type A uncertainty) is 1.17 nanoseconds and the second error (i.e., Type B uncertainty) is 0.25 nanoseconds, then the combined error (i.e., combined standard uncertainty) is 1.2 nanoseconds. If the preset influence factor is 2, then the target error (expanded uncertainty) is 2.4 nanoseconds.

[0126] It should be noted that, in this embodiment, for each target error corresponding to a second time synchronization precision, the server can execute S303 for each second time synchronization precision to determine the second error for each second time synchronization precision. Then, the server can execute S304 for each second time synchronization precision to determine the target error for each second time synchronization precision.

[0127] In some embodiments, for each second time synchronization precision, the server can determine the accurate value of the second time synchronization precision based on the target error corresponding to the second time synchronization precision and the second time synchronization precision.

[0128] For example, if the second time synchronization accuracy is 500.5 nanoseconds and the target error corresponding to the second time synchronization accuracy is ±2.4 nanoseconds, then the accurate value of the second time synchronization accuracy is (500.5 ± 2.4) nanoseconds.

[0129] It is understandable that there are multiple second time synchronization accuracies. The server can determine a first error based on these multiple second time synchronization accuracies. For each second time synchronization accuracies, the server can determine a second error corresponding to that second time synchronization accuracies based on the second time synchronization accuracies, the first time synchronization accuracies, and a preset influence factor. For each second time synchronization accuracies, the server can determine a target error based on the first error, the corresponding second error, and the preset influence factor. This results in multiple target errors, which indicate the accuracy of the second time synchronization accuracies. In this way, the server can determine the target error of the second time synchronization accuracies by detecting the measurement inaccuracies, thereby ensuring the accuracy of the second time synchronization accuracies.

[0130] It should be noted that, in this embodiment of the application, the accuracy of the second time synchronization accuracy can be determined not only by evaluating the inaccuracy of the measurement items, but also by determining the accuracy of the server's time synchronization accuracy (first time synchronization accuracy). Furthermore, when the on-board device under test is the master clock, the maximum number of slave clocks that can be supported can also be determined by evaluating the inaccuracy of the measurement items to determine the accuracy of the test results.

[0131] In some embodiments, to detect the accuracy of the master clock selection by the vehicle-mounted device under test (V2D), the method for determining the time synchronization accuracy may further include: a server acquiring clock information from multiple slave clocks, the clock information including a clock identifier and a third time synchronization accuracy. The server can determine a first master clock from the multiple slave clocks based on the third time synchronization accuracy of each slave clock. The server can receive a clock identifier from a second master clock of the V2D ...

[0132] In one possible implementation, the server can simulate multiple slave clocks using a test system. For each slave clock, the server can send time synchronization information to the vehicle-to-device (V2D) device using the simulated slave clock and send a first time point to the V2D device, where the first time point is the moment the time synchronization information is sent to the V2D device. The V2D device can receive the time synchronization information from the server and determine a second time point, where the second time point is the moment the V2D device receives the time synchronization information. Based on the first and second times points, the V2D device can determine the time synchronization accuracy of the slave clocks, thus determining the time synchronization accuracy of each slave clock among the multiple slave clocks. Based on the time synchronization accuracy of each slave clock, the V2D device can determine a second master clock. The V2D device can send the clock identifier of the second master clock to the server. The server can receive the clock identifier of the second master clock from the V2D device.

[0133] In this embodiment of the application, the server can determine whether the clock identifier of the first master clock is the same as the clock identifier of the second master clock.

[0134] In one possible design, if the clock identifier of the first master clock is the same as the clock identifier of the second master clock, the server can determine the first test information, which is used to instruct the on-board device under test to select the test through the master clock.

[0135] For example, suppose the server simulates multiple slave clocks through the test system, including slave clock 1, slave clock 2, and slave clock 3. The time synchronization accuracy of slave clock 1 is higher than that of slave clock 2 and slave clock 3, and the time synchronization accuracy of slave clock 1, slave clock 2, and slave clock 3 is higher than that of the vehicle-mounted device under test. After executing the optimal master clock selection test command, the test begins. If the first master clock determined by the server and the second master clock determined by the vehicle-mounted device under test are both slave clock 1, then the vehicle-mounted device under test passes the master clock selection test.

[0136] In this embodiment of the application, if the second master clock determined by the vehicle device under test fails during the selection of the master clock, the vehicle device under test can select the best master clock from multiple slave clocks other than the second master clock.

[0137] For example, suppose the server simulates multiple slave clocks through the test system, including slave clock 1, slave clock 2, and slave clock 3. The time synchronization accuracy of slave clock 1 is higher than that of slave clock 2 and slave clock 3, the time synchronization accuracy of slave clock 2 is higher than that of slave clock 3, and the time synchronization accuracy of slave clock 1, slave clock 2, and slave clock 3 is higher than that of the vehicle-mounted device under test. After executing the optimal master clock selection test command, the test begins. If the first master clock determined by the server and the second master clock determined by the vehicle-mounted device under test are both slave clock 1, but clock 1 fails, then both the first master clock determined by the server and the second master clock determined by the vehicle-mounted device can be slave clock 2.

[0138] In another possible design, if the clock sign of the first master clock is different from that of the second master clock, the server can determine the second test information, which is used to indicate that the on-board device under test has failed the master clock selection test.

[0139] For example, suppose the server simulates multiple slave clocks through the test system, including slave clock 1, slave clock 2, and slave clock 3. The time synchronization accuracy of slave clock 1 is higher than that of slave clock 2 and slave clock 3, and the time synchronization accuracy of slave clock 1, slave clock 2, and slave clock 3 is higher than that of the vehicle-mounted device under test. After executing the optimal master clock selection test command, the test begins. If the server determines slave clock 1 as the first master clock, and the vehicle-mounted device under test determines slave clock 2 as the second master clock, then the vehicle-mounted device under test fails the master clock selection test.

[0140] It should be noted that, in the embodiments of this application, the server can simulate multiple sets of slave clocks with different time synchronization accuracies through the test system and perform multiple sets of tests to determine whether the vehicle-mounted device under test has passed the master clock selection test.

[0141] Understandably, the server can obtain clock information from multiple slave clocks, including clock identifiers and third clock synchronization precision. Based on the third clock synchronization precision of each slave clock, the server determines a first master clock from among the multiple slave clocks. The server can receive the clock identifier of a second master clock from the vehicle device under test (VDT), which is the master clock determined by the VDT from among the multiple slave clocks. If the clock identifier of the second master clock is the same as that of the first master clock, the server can determine first test information, which indicates that the VDT has passed the master clock selection test. If the clock identifier of the second master clock is different from that of the first master clock, the server can determine second test information, which indicates that the VDT has failed the master clock selection test. Thus, the server can detect the accuracy of the VDT's master clock selection by determining whether the VDT has passed the master clock selection test. If the VDT passes the master clock selection test, it indicates that the accuracy of the VDT's master clock selection is high; if the VDT fails the master clock selection test, it indicates that the accuracy of the VDT's master clock selection is low.

[0142] In some embodiments, to determine the maximum number of slave clocks that the vehicle-mounted device under test (V2D) can support when acting as the master clock, the method for determining time synchronization accuracy may further include: the server may send a first number of delay request messages to the V2D. The server may obtain a second number, which is the number of delay response messages received from the V2D.

[0143] In one possible implementation, the server can simulate a first number of slave clocks using a test system. For each slave clock simulated by the test system, the server can send delay request messages to the vehicle-to-device (V2D) device under test (V2D) via the test system, thus sending the first number of delay request messages. The V2D device under test can receive the first number of delay request messages from the server. In response to the first number of delay request messages, the V2D device under test can send a second number of delay response messages to the server. The server can receive the second number of delay response messages from the V2D device under test, determine the second number, and obtain the second quantity.

[0144] In this embodiment, the server can determine whether the first quantity and the second quantity are the same. The server can adjust the first quantity according to the target rule to obtain the updated first quantity, and send a delay request message for the updated first quantity to the vehicle-mounted device under test to reacquire the second quantity.

[0145] Afterwards, the server can determine whether the updated first quantity is the same as the re-acquired second quantity. The server can adjust the updated first quantity according to preset rules and re-acquire the second quantity until the last updated first quantity is duplicated. At this point, the server stops adjusting the first quantity, stops sending delayed request messages, and determines the target quantity.

[0146] The target number is the largest of several first numbers that are identical to the second number. The target number indicates the maximum number of slave clocks that the on-board device under test can support.

[0147] In one possible design, the objective rule includes: if the second quantity is the same as the first quantity, then increase the first quantity; or, if the second quantity is different from the first quantity, then decrease the first quantity.

[0148] In other words, if the first quantity is the same as the second quantity, the server can increase the first quantity to obtain the updated first quantity. If the first quantity is different from the second quantity, the server can decrease the first quantity to obtain the updated first quantity.

[0149] It should be noted that, in this embodiment, if the second quantity is the same as the first quantity, it indicates that the vehicle-mounted device under test can support the first quantity of slave clocks. In this case, the first quantity is increased to determine whether the vehicle-mounted device under test can support a larger number of slave clocks. If the second quantity is different from the first quantity, it indicates that the vehicle-mounted device under test cannot support the first quantity of slave clocks. In this case, the first quantity is decreased to determine whether the vehicle-mounted device under test can support a smaller number of slave clocks.

[0150] As exemplified in Table 2, a target rule is shown. This target rule includes: the number of tests, the number of slave clocks simulated by the test server through the test system in each test, and the test result. It should be noted that if the first number and the second number are the same, the test result is a pass, meaning the vehicle-mounted device under test can support the first number of slave clocks; if the first number and the second number are different, the test result is a failure, meaning the vehicle-mounted device under test cannot support the first number of slave clocks.

[0151] Table 2 Target Rules

[0152] Number of tests Number of clocks in simulation Test Results 1 10 pass 2 2*10 fail … … pass n 2*(n-1)*10 fail n+1 2*(n-1)*10*(1-10%) fail n+2 <![CDATA[2*(n-1)*10*(1-10%) 2 ]]> fail … … fail n+m <![CDATA[2*(n-1)*10*(1-10%) m ]]> pass n+m+1 <![CDATA[2*(n-1)*10*(1-10%) m (1+5%)]]> pass n+m+2 <![CDATA[2*(n-1)*10*(1-10%) m (1+5%) 2 ]]> fail

[0153] In other words, with one test run, the server simulates 10 slave clocks through the test system, and the test result is a pass. With two test runs, the number of slave clocks simulated by the server through the test system can be increased to 2*10, and the test result is a failure. With n+1 test runs, the number of slave clocks simulated by the server through the test system can be reduced to 2*(n-1)*10*(1-10%), and the test result is a failure. In the embodiments of this application, the description of other test runs can be referred to the description of test run 1, test run 2, and test run n+1, and will not be repeated here.

[0154] The following describes, with reference to specific embodiments, a method for determining the maximum number of slave clocks that the vehicle-mounted device under test can support when it is used as the master clock.

[0155] For example, referring to Table 2, in the first test, the server can simulate 10 slave clocks through the test system. After performing the slave clock scale test, the simulated slave clocks can select the master clock, all selecting the vehicle device under test as the master clock. Then, each simulated slave clock device can send a delay request message to the master clock. If all 10 simulated slave clocks reach slave device status, that is, the number of delay request messages sent by the simulated slave clocks (first quantity) equals the number of delay response messages received (second quantity), it indicates that the maximum number of slave clocks supported by the vehicle device under test is greater than or equal to 10. Then, the number of simulated slave clocks is increased to twice 10, i.e., 20 slave clocks are simulated, and the above test process is repeated. If all 20 slave clocks reach slave device status, that is, the number of delay request messages sent by the simulated slave clocks (first quantity) equals the number of delay response messages received (second quantity), it indicates that the maximum number of slave clocks supported by the vehicle device under test is greater than or equal to 20. The number of simulated slave clocks is increased to twice the original 20, i.e., simulating 40 slave clocks. The above test process is repeated. If only a portion of the 40 slave clocks reach the slave device state (i.e., the number of delay request messages sent by the simulated slave clocks (first quantity) is not equal to the number of delay response messages received (second quantity), it indicates that the maximum number of slave clocks supported by the under-test vehicle device is less than 40. The number of simulated slave clocks is then decreased to 40 minus 40 multiplied by 10%, i.e., simulating 36 slave clocks. The above test process is repeated. If only a portion of the 36 slave clocks reaches the slave device state (i.e., the number of delay request messages sent by the simulated slave clocks (first quantity) is not equal to the number of delay response messages received (second quantity), it indicates that the maximum number of slave clocks supported by the under-test vehicle device is less than 36. Then reduce the number of simulated slave clocks to 36 minus 36 multiplied by 10%, i.e., simulate 32 slave clocks. Repeat the above test process. If all 32 slave clocks reach the slave device state, i.e., the number of delay request messages sent by the simulated slave clocks (first quantity) equals the number of delay response messages received (second quantity), it indicates that the maximum number of slave clocks supported by the vehicle device under test is greater than or equal to 32. Then increase the number of simulated slave clocks to 32 plus 32 multiplied by 5%, i.e., simulate 34 slave clocks. Repeat the above test process. If only some of the 34 slave clocks reach the slave device state, i.e., the number of delay request messages sent by the simulated slave clocks (first quantity) does not equal the number of delay response messages received (second quantity), it indicates that the maximum number of slave clocks supported by the vehicle device under test is less than 34.The number of simulated slave clocks is reduced to 33, meaning 33 slave clocks are simulated. The above test process is repeated. If only a portion of the 33 slave clocks reach the slave device state (i.e., the number of delayed request messages sent by the simulated slave clocks (first quantity) is not equal to the number of delayed response messages received (second quantity), it indicates that the maximum number of slave clocks supported by the under-test vehicle device is less than 33. The number of simulated slave clocks is then reduced to 32, meaning 32 slave clocks are simulated. Since 32 slave clocks have already been tested, indicating a duplication of the first quantity, the adjustment of the first quantity is stopped. Ultimately, the maximum number of slave clocks supported by the under-test vehicle device is 32.

[0156] Understandably, the server can send a first number of delay request messages to the vehicle-mounted device under test (V2D). The server can then obtain a second number, representing the number of delay response messages received from the V2D. The server can adjust the first number according to a target rule, repeatedly obtaining the second number until the last updated first number is repeated. At this point, the server stops adjusting the first number and determines a target number, which is the largest of several first numbers that are identical to the second number. The target rule includes: increasing the first number when the second number is the same as the first number; or decreasing the first number when the second number is different from the first number. In this way, the server can continuously adjust the first number through multiple simulation tests to determine the maximum number of slave clocks that the V2D can support.

[0157] The foregoing mainly describes the solutions provided by the embodiments of this application from a methodological perspective. To achieve the above functions, the time synchronization accuracy determination device or vehicle includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should readily recognize that, based on the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware 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.

[0158] This application embodiment can, based on the above method, exemplarily divide the time synchronization accuracy determination device or vehicle into functional modules. For example, the time synchronization accuracy determination device or vehicle may include various functional modules corresponding to each functional division, or two or more functions may be integrated into one processing module. The integrated module can be implemented in hardware or as a software functional module. It should be noted that the module division in this application embodiment is illustrative and only represents one logical functional division; in actual implementation, there may be other division methods.

[0159] Figure 5 This is a block diagram illustrating a time synchronization accuracy determination device according to an exemplary embodiment. (Refer to...) Figure 5 The time synchronization accuracy determination device is used to perform... Figure 2 , Figure 3 and Figure 4 The method shown. The device for determining the time synchronization accuracy includes: an acquisition unit 501, a processing unit 502, and a transmission unit 503.

[0160] Acquisition unit 501 is used to acquire a first clock frequency and a second clock frequency for each preset time from multiple preset times, wherein the first clock frequency is the clock frequency of the server and the second clock frequency is the clock frequency of the reference clock. Processing unit 502 is used to determine a first time synchronization accuracy based on the first clock frequency and the second clock frequency for each preset time, wherein the first time synchronization accuracy is the time synchronization accuracy of the server. Processing unit 502 is further used to determine a second time synchronization accuracy based on the time synchronization information between the server and the vehicle-mounted device under test if the first time synchronization accuracy is less than a preset accuracy threshold, wherein the second time synchronization accuracy is the time synchronization accuracy of the vehicle-mounted device under test.

[0161] In one possible implementation, the acquisition unit 501 is specifically used to acquire a plurality of first moments and a second moment corresponding to each first moment, wherein the first moment is the moment when time synchronization information is sent to the vehicle-mounted device under test, and the second moment is the moment when the vehicle-mounted device under test receives the time synchronization information. The processing unit 502 is specifically used to determine the second time synchronization accuracy based on the plurality of first moments and the second moment corresponding to each first moment.

[0162] In one possible implementation, there are multiple second time synchronization accuracies. The processing unit 502 is further configured to determine a first error based on the multiple second time synchronization accuracies. For each second time synchronization accuracies, the processing unit 502 is further configured to determine a second error corresponding to the second time synchronization accuracies based on the second time synchronization accuracies, the first time synchronization accuracies, and a preset influence factor. The processing unit 502 is further configured to determine a target error corresponding to each second time synchronization accuracies based on the first error, the second error corresponding to the second time synchronization accuracies, and the preset influence factor, thereby determining a target error for each second time synchronization accuracies. The target error is used to indicate the accuracy of the second time synchronization accuracies.

[0163] In one possible implementation, the acquisition unit 501 is further configured to acquire clock information of multiple slave clocks, the clock information including a clock identifier and a third time synchronization precision. The processing unit 502 is further configured to determine a first master clock from the multiple slave clocks based on the third time synchronization precision of each slave clock. The acquisition unit 501 is further configured to receive a clock identifier from a second master clock of the vehicle-mounted device under test, the second master clock being the master clock determined by the vehicle-mounted device under test from the multiple slave clocks. The processing unit 502 is further configured to determine first test information if the clock identifier of the second master clock is the same as the clock identifier of the first master clock, the first test information being used to instruct the vehicle-mounted device under test to pass the master clock selection test. The processing unit 502 is further configured to determine second test information if the clock identifier of the second master clock is different from the clock identifier of the first master clock, the second test information being used to indicate that the vehicle-mounted device under test has not passed the master clock selection test.

[0164] In one possible implementation, the sending unit 503 is configured to send a first number of delay request messages to the vehicle-mounted device under test. The acquisition unit 501 is further configured to acquire a second number, which is the number of delay response messages received from the vehicle-mounted device under test. The processing unit 502 is further configured to adjust the first number according to a target rule to obtain an updated first number. The sending unit 503 is further configured to send the updated first number of delay request messages to the vehicle-mounted device under test to reacquire the second number. The processing unit 502 is further configured to adjust the updated first number according to the target rule and reacquire the second number until the last updated first number is duplicated, at which point the adjustment of the first number is stopped. The sending unit 503 is further configured to stop sending delay request messages. The processing unit 502 is further configured to determine a target number, which is the largest of multiple first numbers that are the same as the second number. The target rule includes: increasing the first number when the second number is the same as the first number; or decreasing the first number when the second number is different from the first number.

[0165] Regarding the apparatus in the above embodiments, the specific manner in which each unit performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0166] Figure 6 This is a block diagram illustrating a vehicle according to an exemplary embodiment. Figure 6 As shown, vehicle 600 includes, but is not limited to, processor 601 and memory 602.

[0167] The memory 602 described above is used to store the executable instructions of the processor 601. It is understood that the processor 601 is configured to execute instructions to implement the method for determining the time synchronization accuracy in the above embodiments.

[0168] It should be noted that those skilled in the art will understand that Figure 6 The vehicle structure shown does not constitute a limitation on the vehicle; a vehicle may include, but is not limited to, other types of vehicles. Figure 6 This may indicate more or fewer components, or combinations of certain components, or different component arrangements.

[0169] The processor 601 is the control center of the vehicle, connecting various parts of the vehicle through various interfaces and lines. It performs various vehicle functions and processes data by running or executing software programs and / or modules stored in the memory 602, and by calling data stored in the memory 602, thereby providing overall vehicle monitoring. The processor 601 may include one or more processing units. Optionally, the processor 601 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, while the modem processor mainly handles wireless communication. It is understood that the modem processor may also not be integrated into the processor 601.

[0170] The memory 602 can be used to store software programs and various data. The memory 602 may primarily include a program storage area and a data storage area, wherein the program storage area may store the operating system, application programs (such as processing units) required by at least one functional module, etc. Furthermore, the memory 602 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0171] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory 602 including instructions, which can be executed by a processor 601 of a vehicle 600 to implement the method for determining the time synchronization accuracy in the above embodiments.

[0172] In actual implementation, Figure 5The functions of the acquisition unit 501 and the processing unit 502 can both be provided by Figure 6 The processor 601 calls the computer program stored in the memory 602 to implement the process. The specific execution process can be found in the description of the time synchronization accuracy determination method in the previous embodiment, and will not be repeated here.

[0173] Optionally, the computer-readable storage medium may be a non-transitory computer-readable storage medium, such as a read-only memory (ROM), a random access memory (RAM), a CD-ROM, magnetic tape, a floppy disk, and an optical data storage device.

[0174] In an exemplary embodiment, this application also provides a computer program product including one or more instructions, which can be executed by the vehicle's processor to complete the method for determining the time synchronization accuracy in the above embodiments.

[0175] It should be noted that when one or more instructions in the computer-readable storage medium or computer program product are executed by the vehicle's processor, they implement the various processes of the above-described method for determining time synchronization accuracy, and can achieve the same technical effect as the above-described method for determining time synchronization accuracy. To avoid repetition, they will not be described again here.

[0176] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0177] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or 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 apparatus, or some features may be ignored or not executed. Furthermore, the mutual 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.

[0178] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0179] Furthermore, 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. The integrated unit can be implemented in hardware or as a software functional unit.

[0180] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, essentially, or the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods of 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, ROM, RAM, magnetic disks, or optical disks.

[0181] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope 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 method for determining time synchronization accuracy, characterized in that, Applied to a server, the method includes: Obtain the first clock frequency and the second clock frequency of each preset time from a plurality of preset times, wherein the first clock frequency is the clock frequency of the server and the second clock frequency is the clock frequency of the reference clock; A first time synchronization accuracy is determined based on the first clock frequency and the second clock frequency at each preset time, wherein the first time synchronization accuracy is the time synchronization accuracy of the server. If the first time synchronization accuracy is less than a preset accuracy threshold, then multiple first moments and a second moment corresponding to each first moment are obtained. The first moment is the moment when the time synchronization information is sent to the vehicle device under test, and the second moment is the moment when the vehicle device under test receives the time synchronization information. Based on the plurality of first moments and the second moment corresponding to each first moment, the difference between the first moment and the second moment is taken as the second time deviation, and the standard deviation of the second time deviation is calculated to determine the second time synchronization accuracy. The second time synchronization accuracy is the time synchronization accuracy of the vehicle-mounted device under test; there are multiple second time synchronization accuracies. The first error is determined based on multiple second time synchronization accuracies; For each second time synchronization precision, a second error corresponding to the second time synchronization precision is determined based on the second time synchronization precision, the first time synchronization precision, and a preset influence factor; Based on the first error, the second error corresponding to the second time synchronization accuracy, and the preset influence factor, the target error corresponding to the second time synchronization accuracy is determined, so as to determine the target error corresponding to each second time synchronization accuracy. The target error is used to indicate the accuracy of the second time synchronization accuracy.

2. The method according to claim 1, characterized in that, The method further includes: Obtain clock information from multiple slave clocks, the clock information including: clock identifier and third time synchronization accuracy; A first master clock is determined from the plurality of slave clocks based on the third time synchronization accuracy of each slave clock; Receive a clock identifier from the second master clock of the vehicle-mounted device under test, wherein the second master clock is the master clock determined by the vehicle-mounted device under test from the plurality of slave clocks; If the clock identifier of the second master clock is the same as the clock identifier of the first master clock, then the first test information is determined. The first test information is used to instruct the vehicle device under test to select the test through the master clock. If the clock identifier of the second master clock is different from the clock identifier of the first master clock, then second test information is determined. The second test information is used to indicate that the vehicle-mounted device under test has failed the master clock selection test.

3. The method according to claim 1, characterized in that, The method further includes: Send a first number of delay request messages to the vehicle-mounted device under test; Obtain a second quantity, which is the number of delayed response messages received from the on-board device under test; According to the target rules, the first quantity is adjusted to obtain the updated first quantity, and a delay request message for the updated first quantity is sent to the on-board device under test to reacquire the second quantity; The updated first quantity is adjusted according to the target rule, and the second quantity is reacquired until the last updated first quantity is duplicated. Then, the adjustment of the first quantity is stopped and the delay request message is stopped. The target quantity is determined, which indicates the maximum number of slave clocks that the vehicle under test can support when the vehicle under test is the master clock. The target rule includes: increasing the first quantity when the second quantity is the same as the first quantity; or decreasing the first quantity when the second quantity is different from the first quantity.

4. A device for determining time synchronization accuracy, characterized in that, Applied to a server, the device includes: The acquisition unit is used to acquire a first clock frequency and a second clock frequency for each preset time in a plurality of preset times, wherein the first clock frequency is the clock frequency of the server and the second clock frequency is the clock frequency of the reference clock. The processing unit is configured to determine a first time synchronization accuracy based on a first clock frequency and a second clock frequency at each preset time, wherein the first time synchronization accuracy is the time synchronization accuracy of the server. The processing unit is further configured to, if the first time synchronization accuracy is less than a preset accuracy threshold, acquire multiple first moments and a second moment corresponding to each first moment, wherein the first moment is the moment when the time synchronization information is sent to the vehicle-mounted device under test, and the second moment is the moment when the vehicle-mounted device under test receives the time synchronization information; Based on the plurality of first moments and the second moment corresponding to each first moment, the difference between the first moment and the second moment is taken as the second time deviation, and the standard deviation of the second time deviation is calculated to determine the second time synchronization accuracy. The second time synchronization accuracy is the time synchronization accuracy of the vehicle-mounted device under test; there are multiple second time synchronization accuracies. The processing unit is further configured to determine a first error based on a plurality of second time synchronization accuracies; The processing unit is further configured to, for each second time synchronization precision, determine a second error corresponding to the second time synchronization precision based on the second time synchronization precision, the first time synchronization precision, and a preset influence factor; The processing unit is further configured to determine a target error corresponding to the second time synchronization accuracy based on the first error, the second error corresponding to the second time synchronization accuracy, and the preset influence factor, so as to determine multiple target errors, wherein the target errors are used to indicate the accuracy of the second time synchronization accuracy.

5. A vehicle, characterized in that, include: processor; A memory for storing processor-executable instructions; wherein the processor is configured to execute the instructions to implement the method as described in any one of claims 1 to 3.

6. A computer-readable storage medium, characterized in that, When the computer-executable instructions stored in the computer-readable storage medium are executed by the vehicle's processor, the vehicle is able to perform the method as described in any one of claims 1 to 3.