CN117440497A - Method and device for determining time synchronization precision, vehicle and storage medium - Google Patents

Method and device for determining time synchronization precision, vehicle and storage medium Download PDF

Info

Publication number
CN117440497A
CN117440497A CN202311610925.3A CN202311610925A CN117440497A CN 117440497 A CN117440497 A CN 117440497A CN 202311610925 A CN202311610925 A CN 202311610925A CN 117440497 A CN117440497 A CN 117440497A
Authority
CN
China
Prior art keywords
time synchronization
vehicle
clock
tested
synchronization precision
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311610925.3A
Other languages
Chinese (zh)
Inventor
孙林尧
周金龙
杨波涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chongqing Changan Automobile Co Ltd
Original Assignee
Chongqing Changan Automobile Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chongqing Changan Automobile Co Ltd filed Critical Chongqing Changan Automobile Co Ltd
Priority to CN202311610925.3A priority Critical patent/CN117440497A/en
Publication of CN117440497A publication Critical patent/CN117440497A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W56/00Synchronisation arrangements
    • H04W56/0035Synchronisation arrangements detecting errors in frequency or phase
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/30Services specially adapted for particular environments, situations or purposes
    • H04W4/40Services specially adapted for particular environments, situations or purposes for vehicles, e.g. vehicle-to-pedestrians [V2P]
    • H04W4/48Services specially adapted for particular environments, situations or purposes for vehicles, e.g. vehicle-to-pedestrians [V2P] for in-vehicle communication

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)

Abstract

The application relates to a method and a device for determining time synchronization precision, a vehicle and a storage medium, and relates to the technical field of vehicle testing. The method comprises the following steps: the method comprises the steps of obtaining a first clock frequency of each preset time and a second clock frequency of each preset time in 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. And determining first time synchronization precision according to the first clock frequency of each preset time and the second clock frequency of each preset time, wherein the first time synchronization precision is the time synchronization precision of the server. And if the first time synchronization precision is smaller than the preset precision threshold, determining the second time synchronization precision based on the time synchronization information between the server and the vehicle-mounted equipment to be tested. Therefore, the server with the time synchronization precision meeting the test requirement is used for testing the time synchronization precision of the vehicle-mounted equipment to be tested, and the accuracy of the time synchronization precision of the vehicle-mounted equipment to be tested can be improved.

Description

Method and device for determining time synchronization precision, vehicle and storage medium
Technical Field
The application relates to the technical field of vehicle testing, in particular to a method and a device for determining time synchronization precision, a vehicle and a storage medium.
Background
Each vehicle-mounted device in the communication network of the intelligent network-connected automobile has a clock. Due to clock frequency differences, production processes, network environment changes, etc., the clock value of each communication device may deviate, resulting in inconsistent clock values among a plurality of vehicle-mounted devices in the communication network. The clock value of each vehicle-mounted device can be adjusted by adopting a time synchronization technology, so that the clock values of a plurality of vehicle-mounted devices are kept consistent.
Currently, the time synchronization accuracy can be determined by determining the message response time between the test equipment and the tested vehicle-mounted equipment. However, the clock value of the test system may be subject to errors, resulting in inaccurate time synchronization accuracy of the determination.
Disclosure of Invention
The application provides a method, a device, a vehicle and a storage medium for determining time synchronization precision, which at least solve the technical problem that the determined time synchronization precision is inaccurate due to the fact that errors can exist in clock values of a test system in the related technology. The technical scheme of the application is as follows:
according to a first aspect of the present application, there is provided a method for determining time synchronization accuracy, the method comprising: the method comprises the steps of obtaining a first clock frequency of each preset time and a second clock frequency of each preset time in 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. And determining first time synchronization precision according to the first clock frequency of each preset time and the second clock frequency of each preset time, wherein the first time synchronization precision is the time synchronization precision of the server. If the first time synchronization precision is smaller than the preset precision threshold, determining a second time synchronization precision based on time synchronization information between the server and the vehicle-mounted equipment to be detected, wherein the second time synchronization precision is the time synchronization precision of the vehicle-mounted equipment to be detected.
According to the technical means, the time synchronization precision of the server is proved to meet the test requirement by determining the first time synchronization precision, and the server with higher time synchronization precision is used for testing the time synchronization precision of the vehicle-mounted equipment to be tested under the condition that the first time synchronization precision is smaller than the preset precision threshold value, so that the accuracy of the time synchronization precision of the vehicle-mounted equipment to be tested can be improved.
In one possible implementation manner, the determining the second time synchronization accuracy based on the time synchronization information between the server and the on-vehicle device to be tested includes: and acquiring a plurality of first moments and second moments corresponding to each first moment, wherein the first moments are the moments when the time synchronization information is sent to the vehicle-mounted equipment to be tested, and the second moments are the moments when the time synchronization information is received by the vehicle-mounted equipment to be tested. And determining the second time synchronization precision according to the plurality of first moments and the second moment corresponding to each first moment.
According to the technical means, the second time synchronization precision is determined by acquiring the time when the server sends the time synchronization information to the vehicle-mounted equipment to be detected and the time when the vehicle-mounted equipment to be detected receives the time synchronization information for a plurality of times, so that the accuracy of the second time synchronization precision can be improved, namely the accuracy of the time synchronization precision of the vehicle-mounted equipment to be detected is improved.
In one possible embodiment, the number of second time synchronization accuracies is a plurality. The method for determining the time synchronization accuracy further comprises the following steps: the first error is determined based on a plurality of second time synchronization accuracies. And for each second time synchronization precision, determining a second error corresponding to the second time synchronization precision according to the second time synchronization precision, the first time synchronization precision and a preset influence factor. And determining a target error corresponding to the second time synchronization precision according to the first error, the second error corresponding to the second time synchronization precision and a preset influence factor so as to determine the target error corresponding to each second time synchronization precision, wherein the target error is used for indicating the accuracy degree of the second time synchronization precision.
According to the technical means, the target error of the second time synchronization precision can be determined by detecting the measurement inaccuracy of the second time synchronization precision, so that the accuracy of the second time synchronization precision is ensured.
In one possible implementation manner, the method for determining the time synchronization accuracy further includes: acquiring clock information of a plurality of slave clocks, wherein the clock information comprises: clock identification and third time synchronization accuracy. The first master clock is determined from the plurality of slave clocks based on the third time synchronization accuracy of each slave clock. And receiving a clock identification of a second master clock from the vehicle-mounted device to be tested, wherein the second master clock is a master clock determined by the vehicle-mounted device to be tested from a plurality of slave clocks. If the clock identification of the second master clock is the same as that of the first master clock, determining first test information, wherein the first test information is used for indicating the vehicle-mounted equipment to be tested to pass the master clock selection test. If the clock identification of the second master clock is different from that of the first master clock, determining second test information, wherein the second test information is used for indicating that the vehicle-mounted equipment to be tested does not pass the master clock selection test.
According to the technical means, the accuracy of the vehicle-mounted equipment to be tested in selecting the master clock can be detected by determining whether the vehicle-mounted equipment to be tested passes the master clock selection test. If the vehicle-mounted equipment to be tested passes the master clock selection test, the accuracy of the master clock selection of the vehicle-mounted equipment to be tested is higher; if the vehicle-mounted equipment to be tested does not pass the master clock selection test, the fact that the accuracy of the master clock selection of the vehicle-mounted equipment to be tested is lower is indicated.
In one possible implementation manner, the method for determining the time synchronization accuracy further includes: and sending a first number of delay request messages to the vehicle-mounted equipment to be tested. And obtaining a second number, wherein the second number is the number of delay response messages received from the vehicle-mounted equipment to be tested. And according to the target rule, adjusting the first quantity to obtain the updated first quantity, and sending the updated delay request message of the first quantity to the vehicle-mounted equipment to be tested so as to acquire the second quantity again. And adjusting the updated first quantity according to the target rule, and re-acquiring the second quantity until the updated first quantity obtained finally is repeated, stopping adjusting the first quantity, stopping sending the delay request message, and determining the target quantity, wherein the target quantity is used for indicating the quantity of slave clocks which can be supported by the vehicle-mounted equipment to be tested at most under the condition that the vehicle-mounted equipment to be tested is a master clock. The target rules include: increasing the first number when the second number is the same as the first number; alternatively, the first number is decreased when the second number is different from the first number.
According to the technical means, the first quantity can be continuously adjusted through multiple simulation tests, and the quantity of the slave clocks which can be supported at most when the vehicle-mounted equipment to be tested is determined to be the master clock can be determined.
According to a second aspect provided by the present application, there is provided a determining apparatus of time synchronization accuracy, the apparatus comprising: the device comprises an acquisition unit, a processing unit and a sending unit.
The device comprises an acquisition unit, a reference clock and a control unit, wherein the acquisition unit is used for acquiring a first clock frequency of each preset time and a second clock frequency of each preset time in a plurality of preset times, the first clock frequency is the clock frequency of the server, and the second clock frequency is the clock frequency of the reference clock. And the processing unit is used for determining first time synchronization precision according to the first clock frequency of each preset time and the second clock frequency of each preset time, wherein the first time synchronization precision is the time synchronization precision of the server. And the processing unit is further used for determining a second time synchronization precision based on the time synchronization information between the server and the vehicle-mounted equipment to be detected if the first time synchronization precision is smaller than a preset precision threshold, wherein the second time synchronization precision is the time synchronization precision of the vehicle-mounted equipment to be detected.
In one possible implementation manner, the acquiring unit is specifically configured to acquire a plurality of first moments and second moments corresponding to each first moment, where the first moments are moments when time synchronization information is sent to the vehicle-mounted device to be tested, and the second moments are moments when the vehicle-mounted device to be tested receives the time synchronization information. The processing unit is specifically configured to determine a second time synchronization precision according to the plurality of first moments and a second moment corresponding to each first moment.
In one possible embodiment, the number of second time synchronization accuracies is a plurality. The acquiring unit is further configured to acquire a plurality of second time synchronization accuracies. The processing unit is further configured to determine a first error according to a plurality of second time synchronization accuracies. For each second time synchronization precision, the processing unit is further configured to determine a second error corresponding to the second time synchronization precision according to 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 precision according to the first error, the second error corresponding to the second time synchronization precision, and a preset influence factor, so as to determine a target error corresponding to each second time synchronization precision, where the target error is used to indicate an accuracy degree of the second time synchronization precision.
In one possible implementation manner, the acquiring unit is further configured to acquire clock information of a plurality of slave clocks, where the clock information includes: clock identification and third time synchronization accuracy. The processing unit is further configured to determine the first master clock from the plurality of slave clocks according to the third time synchronization accuracy of each slave clock. The acquiring unit is further configured to receive a clock identifier from a second master clock of the vehicle-mounted device to be tested, where the second master clock is a master clock determined from a plurality of slave clocks by the vehicle-mounted device to be tested. 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, where the first test information is used to instruct the vehicle-mounted device to be tested 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, where the second test information is used to indicate that the vehicle-mounted device to be tested fails the master clock selection test.
In one possible embodiment, the sending unit is configured to send a first number of delay request messages to the vehicle-mounted device under test. The acquiring unit is further configured to acquire a second number, where the second number is the number of delay response messages received from the vehicle-mounted device to be tested. The processing unit is further configured to adjust the first number according to the 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 vehicle-mounted device to be tested, so as to reacquire the second number. And the processing unit is also used for adjusting the updated first quantity according to the target rule, and reacquiring the second quantity until the finally obtained updated first quantity is repeated, and stopping adjusting the first quantity. The sending unit is further configured to stop sending the delay request message. The processing unit is further configured to determine a target number, where the target number is used to indicate a number of slave clocks that are supported by the vehicle-mounted device to be tested at most when the vehicle-mounted device to be tested is a master clock. The target rules include: increasing the first number when the second number is the same as the first number; alternatively, the first number is decreased when the second number is different from the first number.
According to a third aspect provided herein, there is provided a vehicle 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 and any of its possible embodiments described above.
According to a fourth aspect provided herein, there is provided a computer readable storage medium, which when executed by a processor of a vehicle, enables the vehicle to perform the method of any one of the above-mentioned first aspects and any one of its possible embodiments.
According to a fifth aspect provided herein, there is provided a computer program product comprising computer instructions which, when run on a vehicle, cause the vehicle to perform the method of the first aspect and any one of its possible embodiments.
Therefore, the technical characteristics of the application have the following beneficial effects:
(1) By determining the first time synchronization precision, under the condition that the first time synchronization precision is smaller than a preset precision threshold, the time synchronization precision of the server is proved to meet the test requirement, and the server with higher time synchronization precision is used for testing the time synchronization precision of the vehicle-mounted equipment to be tested, so that the accuracy of the time synchronization precision of the vehicle-mounted equipment to be tested can be improved.
(2) And determining a target error of the second time synchronization precision by detecting measurement inaccuracy of the second time synchronization precision so as to ensure the accuracy of the second time synchronization precision.
(3) And detecting the accuracy of the vehicle-mounted equipment to be detected in selecting the master clock by determining whether the vehicle-mounted equipment to be detected passes the master clock selection test. If the vehicle-mounted equipment to be tested passes the master clock selection test, the accuracy of the master clock selection of the vehicle-mounted equipment to be tested is higher; if the vehicle-mounted equipment to be tested does not pass the master clock selection test, the fact that the accuracy of the master clock selection of the vehicle-mounted equipment to be tested is lower is indicated.
(4) And continuously adjusting the first quantity through multiple simulation tests, and determining the quantity of the slave clocks which can be supported at most when the vehicle-mounted equipment to be tested is the master clock.
It should be noted that, the technical effects caused by any implementation manner of the second aspect to the fifth aspect may refer to the technical effects caused by the corresponding implementation manner in the first aspect, which are not described herein.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application and do not constitute an undue limitation on the application.
FIG. 1 is a schematic diagram of an architecture of a system for determining time synchronization accuracy, according to an exemplary embodiment;
FIG. 2 is a flow chart illustrating a method of determining time synchronization accuracy according to an exemplary embodiment;
FIG. 3 is a flowchart illustrating a method of determining a second time synchronization accuracy in accordance with an exemplary embodiment;
FIG. 4 is a flowchart illustrating another method of determining time synchronization accuracy according to an exemplary embodiment;
FIG. 5 is a block diagram illustrating a time synchronization accuracy determination apparatus according to an exemplary embodiment;
FIG. 6 is a block diagram of a vehicle, according to an exemplary embodiment.
Detailed Description
In order to enable those skilled in the art to better understand the technical solutions of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that embodiments of the present application described herein may be implemented in sequences other than those illustrated or otherwise described herein. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present application as detailed in the accompanying claims.
Before describing the method for determining the time synchronization accuracy of the embodiments of the present application in detail, the implementation environment and application field Jing Jinhang of the embodiments of the present application will be described.
Each vehicle-mounted device in the communication network of the intelligent network-connected automobile has a clock. Due to clock frequency differences, production processes, network environment changes, etc., the clock value of each communication device may deviate, resulting in inconsistent clock values among a plurality of vehicle-mounted devices in the communication network. The clock value of each vehicle-mounted device can be adjusted by adopting a time synchronization technology, so that the clock values of a plurality of vehicle-mounted devices are kept consistent.
Currently, the time synchronization accuracy can be determined by determining the message response time between the test equipment and the tested vehicle-mounted equipment. However, the clock value of the test system may be subject to errors, resulting in inaccurate time synchronization accuracy of the determination. And the vehicle-mounted field lacks a unified clock synchronization test verification standard and platform, and the validity of the clock synchronization technology is difficult to verify by entity equipment.
In order to solve the above-mentioned problem, an embodiment of the present application provides a method for determining time synchronization accuracy, including: the server may obtain a first clock frequency at each preset time and a second clock frequency at each preset time in the plurality of preset times, where the first clock frequency is a clock frequency of the server and the second clock frequency is a clock frequency of the reference clock. The server may determine a first time synchronization accuracy according to the first clock frequency at each preset time and the second clock frequency at each preset time, where the first time synchronization accuracy is a time synchronization accuracy of the server. If the first time synchronization precision is smaller than the preset precision threshold, the server can determine a second time synchronization precision based on time synchronization information between the server and the vehicle-mounted equipment to be detected, wherein the second time synchronization precision is the time synchronization precision of the vehicle-mounted equipment to be detected. Therefore, if the first time synchronization precision is smaller than the preset precision threshold, the time synchronization precision of the server is required to meet the test requirement, and the server with higher time synchronization precision is used for testing the time synchronization precision of the vehicle-mounted equipment to be tested, so that the accuracy of the time synchronization precision of the vehicle-mounted equipment to be tested can be improved.
The following describes an implementation environment of an embodiment of the present application.
Fig. 1 is a schematic architecture diagram of a time synchronization accuracy determining system according to an exemplary embodiment, and as shown in fig. 1, the time synchronization accuracy determining system includes: server 101, reference clock 102, in-vehicle device to be tested 103, data management terminal 104, display 105. The server 101 performs wired/wireless communication with the reference clock 102, the server 101 performs wired/wireless communication with the in-vehicle device under test 103, the server 101 performs wired/wireless communication with the data management terminal 104, and the data management terminal 104 performs wired/wireless communication with the display 105.
The server 101 may be a single physical server, or may be a server cluster formed of a plurality of servers. Alternatively, the server cluster may also be a distributed cluster. Alternatively, the server may be a cloud server. The embodiment of the application does not limit the specific implementation manner of the server.
The server 101 is deployed with a test system, which is physically connected to the vehicle-mounted device to be tested. The server 101 can perform clock synchronization precision test, optimal master clock selection test, slave clock scale test support, measurement result accuracy assessment and other works on the vehicle-mounted equipment to be tested through the test system.
The reference clock 102 may be a rubidium clock, which may be used to provide a comparison reference clock signal for the server when measuring clock synchronization accuracy of the vehicle-mounted device under test.
The data management terminal 104 may be used to physically connect with the server 101 and the display 105.
The display 105 may be physically connected to the data management terminal. The display 105 may be used to display test dynamic execution process information, test process monitoring information, test result information, and the like.
In an embodiment of the present application, a test system in a server may include: the system comprises a clock synchronization precision test module, an optimal master clock selection test module, a slave clock scale support test module, a test result accuracy assessment module and a data management module.
The clock synchronization precision testing module can be used for measuring time synchronization precision of the vehicle-mounted equipment to be tested and time synchronization precision of the server.
The optimal master clock selection module may be configured to perform an optimal master clock selection test when the vehicle-mounted device to be tested is used as a slave clock device, and perform an error clock switching test (reselecting the optimal master clock) when the optimal master clock fails.
The supporting slave clock scale test module can be used for determining the number of slave clocks which can be supported by the vehicle-mounted device to be tested at most when the vehicle-mounted device to be tested is used as the master clock device.
The data management module can be used for being connected with the vehicle-mounted equipment to be tested, sending and receiving clock synchronous test data, monitoring the test process and automatically analyzing the test result and printing a test result report.
For easy understanding, the method for determining the time synchronization accuracy provided in the present application is specifically described below with reference to the accompanying drawings. Fig. 2 is a flowchart illustrating a method of determining time synchronization accuracy according to an exemplary embodiment, as shown in fig. 2, the method including the steps of:
s201, the server acquires a first clock frequency of each preset time and a second clock frequency of each preset time in a plurality of preset times.
The first clock frequency is the clock frequency of the server, and the second clock frequency is the clock frequency of the reference clock.
In one possible implementation, for each of the plurality of preset times, the server may obtain a clock frequency of the server in the case of the preset time and a clock frequency of the reference clock in the case of the preset time, i.e. obtain the first clock frequency and the second clock frequency, to obtain the first clock frequency of each preset time and the second clock frequency of each preset time.
In the embodiment of the present application, the reference clock is not limited. For example, the reference clock may be a rubidium clock. For another example, the reference clock may be a cesium atomic clock. For another example, the reference clock may be a regional reference clock source.
S202, the server determines first time synchronization precision according to the first clock frequency of each preset time and the second clock frequency of each preset time.
The first time synchronization precision is the time synchronization precision of the server.
In one possible implementation, for each of a plurality of preset times, the server may determine a first time difference value from the first clock frequency and the second clock frequency to determine a plurality of first time difference values. The server may determine a first time synchronization accuracy based on the plurality of first time differences.
In one possible design, the first time offset may be represented by equation one.
Wherein b is used to represent a first time offset, f 1 For indicating the first clock frequency, f 2 For representing the second clock frequency.
The second time synchronization accuracy can be expressed by the formula two and the formula three.
Wherein X is used to represent a first time synchronization accuracy, For representing an average of a plurality of first time deviations, m for representing the number of first time deviations, b i For representing an ith first time offset of the plurality of first time offsets.
S203, the server determines whether the first time synchronization precision is smaller than a preset precision threshold.
In one possible implementation, the server may compare the first time synchronization accuracy to a preset accuracy threshold to determine whether the first time synchronization accuracy is less than the preset accuracy threshold.
In the embodiment of the present application, the preset precision threshold is not limited. For example, the preset precision threshold may be 80 nanoseconds. For another example, the preset precision threshold may be 100 nanoseconds. For another example, the preset precision threshold may be 90 nanoseconds.
In one possible design, if the first time synchronization accuracy is greater than or equal to the preset accuracy threshold, the server may rectify the error according to the reference clock, and re-execute S201-S203.
That is, if the first time synchronization accuracy is greater than or equal to the preset accuracy threshold, the server may correct the deviation according to the reference clock, re-acquire the first clock frequency at each preset time and the second clock frequency at each preset time in the plurality of preset times, and determine the updated first time synchronization accuracy. The server may determine whether the updated first time synchronization accuracy is less than a preset accuracy threshold.
In another possible design, the server may execute S204 if the first time synchronization accuracy is less than the preset accuracy threshold.
It should be noted that in the embodiment of the present application, if the first time synchronization precision is less than the preset precision threshold, it is indicated that the time synchronization precision of the server meets the test requirement, that is, the time synchronization precision of the test system meets the test requirement, and the test system with higher time synchronization precision is used to test the time synchronization precision of the vehicle-mounted device to be tested, so that the accuracy of the time synchronization precision of the vehicle-mounted device to be tested can be improved. In the embodiment of the application, the smaller the value of the first time synchronization precision is, the smaller the time deviation between the first time synchronization precision and the reference clock is, and the higher the time synchronization precision is; 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.
S204, the server determines second time synchronization precision based on time synchronization information between the server and the vehicle-mounted equipment to be detected.
The second time synchronization precision is the time synchronization precision of the vehicle-mounted equipment to be detected.
In one possible implementation, the server may obtain a plurality of first moments and a second moment corresponding to each first moment. The first moment is the moment when the server sends the time synchronization information to the vehicle-mounted equipment to be tested, and the second moment is the moment when the vehicle-mounted equipment to be tested receives the time synchronization information.
In one possible design, for each of the plurality of first moments, the server may send time synchronization information to the vehicle-mounted device under test through the test system, and obtain the first moment, that is, the moment when the server sends the time synchronization information to the vehicle-mounted device under test. The vehicle-mounted device to be tested can receive the time synchronization information from the server and acquire a second moment corresponding to the first moment, namely the moment when the vehicle-mounted device to be tested receives the time synchronization information. The vehicle-mounted device to be tested can send the second moment corresponding to the first moment to the server. The server may receive a second time corresponding to the first time from the vehicle-mounted device to be tested, so as to obtain the second time corresponding to the first time. The server may obtain a plurality of first moments and second moments corresponding to each first moment.
In this embodiment of the present application, the server may determine the second time synchronization accuracy according to the plurality of first moments and the second moment corresponding to each first moment.
Specifically, for each first time, the server may determine the second time offset according to the first time and a second time corresponding to the first time, so as to determine a plurality of second time offsets. The server may determine a second time synchronization accuracy based on the plurality of second time offsets.
In one possible design, the second time offset may be represented by equation four.
d=t 2 -t 1 Equation four.
Wherein d is used to represent a second time offset, t 1 For indicating the first moment, t 2 For representing a second moment corresponding to the first moment.
The second time synchronization accuracy can be expressed by the formula five and the formula six.
Wherein Y is used to represent a second time synchronization accuracy,for representing an average of a plurality of second time deviations, n for representing the number of second time deviations, d i For representing an ith second time offset of the plurality of second time offsets.
It can be appreciated that the server may obtain a first clock frequency at each of a plurality of preset times and a second clock frequency at each preset time, where 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 server may determine a first time synchronization accuracy according to the first clock frequency at each preset time and the second clock frequency at each preset time, where the first time synchronization accuracy is a time synchronization accuracy of the server. If the first time synchronization precision is smaller than the preset precision threshold, the server can determine a second time synchronization precision based on time synchronization information between the server and the vehicle-mounted equipment to be detected, wherein the second time synchronization precision is the time synchronization precision of the vehicle-mounted equipment to be detected. Therefore, if the first time synchronization precision is smaller than the preset precision threshold, the time synchronization precision of the server is required to meet the test requirement, and the server with higher time synchronization precision is used for testing the time synchronization precision of the vehicle-mounted equipment to be tested, so that the accuracy of the time synchronization precision of the vehicle-mounted equipment to be tested can be improved.
The determination of the second time synchronization accuracy by the server of the present application is described below in connection with specific embodiments. As shown in fig. 3, a flowchart of a method of determining the accuracy of the second time synchronization is shown. The server can send time synchronization information to the vehicle-mounted equipment to be tested at time t1 through the test system. The vehicle-mounted device to be tested can receive time synchronization information from the server at t 2. The server can collect t1 time information and t2 time information through the test system. The server may calculate a difference between the t1 time information and the t2 time information through the test system, and take the difference between the t1 time information and the t2 time information as the second time deviation. The server may calculate a standard deviation of the second time offset via the test system. The server may determine a second time synchronization accuracy from the second time offset via the test system.
In some embodiments, to ensure accuracy of the second time synchronization accuracy, the measurement inaccuracy of the second time synchronization accuracy may be assessed by detecting. Inaccuracy assessment of measurement items is largely divided into class a uncertainty assessment and class B uncertainty assessment. The class A uncertainty assessment is to perform statistical analysis on a series of observed values to calculate standard uncertainty, and the class B uncertainty assessment is to determine the uncertainty according to the characteristics, performance or general knowledge of the test equipment (server), namely the measurement error of the equipment itself related to the measurement items. As shown in fig. 4, the method for determining the time synchronization accuracy may further include the steps of: s401.
S401, the server acquires a plurality of second time synchronization accuracies.
In one possible implementation, the server may obtain a plurality of second time synchronization accuracies such that the number of second time synchronization accuracies is a plurality.
Note that, in the embodiment of the present application, for the description of the server obtaining the plurality of second time synchronization accuracy, reference may be made to the description of the server determining the second time synchronization accuracy in S204. That is, the server may perform S204 a plurality of times to acquire a plurality of second time synchronization accuracies.
Illustratively, as shown in table 1, a plurality of second time synchronization accuracies are shown. The number of times of testing the second time synchronization accuracy is 15.
TABLE 1 multiple second time synchronization precision
That is, when the number of tests is 1, the second time synchronization accuracy is 500.5 nanoseconds. At a test number of 2, the second time synchronization accuracy was 500.5 nanoseconds. At a test number of 3, the second time synchronization accuracy was 502.5 nanoseconds. In the embodiment of the present application, the description of the number of tests from 4 to 15 may be referred to the description of the number of tests from 1 to 3, which is not repeated here.
In the embodiment of the present application, in the case where the number of the second time synchronization accuracy is a plurality, the server may perform S402 to S404.
S402, the server determines a first error according to a plurality of second time synchronization accuracies.
In one possible implementation, the server may determine the first error from a plurality of second time synchronization accuracies through a bessel formula.
In one possible design, the first error may be represented by equation seven and equation eight.
Wherein S (Y) k ) For the purpose of indicating a first error, and,mean value for representing a plurality of second time synchronization accuracies, Y i For indicating an ith second time synchronization accuracy among the plurality of second time synchronization accuracy, and k for indicating the number of times of testing of the second time synchronization accuracy.
It should be noted that, in the embodiment of the present application, the number of times of testing the second time synchronization accuracy is greater than or equal to 10.S (Y) k ) An experimental standard deviation of the kth second time synchronization accuracy is used to represent the dispersibility of the kth second time synchronization accuracy, so that the class a uncertainty of the kth second time synchronization accuracy is S (Y k ). Because of single measurement in experimental detection, the uncertainty u of the class A standard introduced by the repeatability is measured 1 (Y k ) Can be S (Y k ) I.e. the first error is S (Y k )。
Exemplary, in combination with Table 1, if the number of times of testing the plurality of second time synchronization accuracy is 15, S 2 Approximately 1.37 nanoseconds and approximately 1.17 nanoseconds.
In the embodiment of the present application, the server may perform S403 to S404 for each second time synchronization accuracy.
S403, the server determines a second error according to the second time synchronization precision, the first time synchronization precision and a preset influence factor.
In one possible implementation, the server may determine the systematic error based on the first time synchronization accuracy. The server may determine the actual error based on the systematic error and the second time synchronization accuracy. The server may determine the second error based on the actual error and a preset impact factor.
For example, if the systematic error is ±0.1% and the second time synchronization accuracy is 500.5, the actual error may be ± (500.5X 0.1%) = ±0.5005 nanoseconds. If the predetermined influence factor is 2, the second error may be expressed as
In the embodiment of the present application, the class B uncertainty is the second error, i.e., the class B uncertainty is u 2 (Y k ). The preset influence factors are not limited in the application. For example, the preset influence factor may be 2, representing an inclusion probability of about 95%. For another example, the preset influence factor may be 3. For another example, the preset influence factor may be 4.
S404, the server determines a target error according to the first error, the second error and a preset influence factor.
The target errors are used for indicating the accuracy degree of the second time synchronization precision, and one second time synchronization precision corresponds to one target error.
In one possible implementation, the server may determine the composite error based on the first error and the second error. The server may determine the target error based on the composite error and a preset impact factor.
In one possible design, the resultant error may be represented by equation nine.
Wherein U is C For indicating the resultant error, Y k For representing a kth second time synchronization precision of the plurality of second time synchronization precision, u 1 (Y k ) For representing the first error, u 2 (Y k ) For representing the second error.
It should be noted that, in the embodiment of the present application,w is used to represent the number of error categories for calculating the composite error, u i (x) For representing the ith category of a plurality of error categoriesIs a function of the error of (a). The uncertainty of the synthesis criterion is the synthesis error, i.e. the uncertainty of the synthesis criterion is U C
The target error can be expressed by the formula ten.
L=q×U C Formula ten.
Wherein L is used for representing a target error, q is used for representing a preset influence factor, U C For representing the resultant error.
By way of example, if the first error (i.e., class A uncertainty) is 1.17 nanoseconds and the second error (i.e., class B uncertainty) is 0.25 nanoseconds, then the composite error (i.e., composite standard uncertainty) is 1.2 nanoseconds. If the preset influence factor is 2, the target error (expansion uncertainty) is 2.4 nanoseconds.
In this embodiment of the present application, the server may execute S303 on each second time synchronization precision for the target error corresponding to each second time synchronization precision, and determine the second error of each second time synchronization precision. Thereafter, the server may perform S304 for each second time synchronization accuracy, determining a target error for each second time synchronization accuracy.
In some embodiments, for each second time synchronization precision, the server may determine an 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.
For example, if the second time synchronization accuracy is 500.5 ns, the second time synchronization accuracy corresponds to a target error of ±2.4 ns, and the second time synchronization accuracy has an accurate value of (500.5 ±2.4) ns.
It is understood that the number of second time synchronization accuracy is plural. The server may determine the first error based on a plurality of second time synchronization accuracies. For each second time synchronization precision, the server may determine a second error corresponding to the second time synchronization precision according to the second time synchronization precision, the first time synchronization precision, and a preset influence factor, so as to determine the second error corresponding to each second time synchronization precision. For each second time synchronization precision, the server may determine a target error according to the first error, a second error corresponding to the second time synchronization precision, and a preset influence factor, so as to determine a plurality of target errors, where the target error is used to indicate an accuracy degree of the second time synchronization precision. In this way, the server can determine the target error of the second time synchronization precision by detecting the measurement inaccuracy of the second time synchronization precision, so as to ensure the accuracy of the second time synchronization precision.
It should be noted that, in the embodiment of the present application, not only the accuracy of the second time synchronization accuracy, but also the accuracy of the time synchronization accuracy (the first time synchronization accuracy) of the server may be determined by measuring the inaccuracy evaluation method of the item, and then, when the vehicle-mounted device to be measured is the master clock, the number of slave clocks that can be supported at most may also be determined by measuring the inaccuracy evaluation method of the item.
In some embodiments, in order to detect the accuracy of selecting the master clock by the vehicle-mounted device to be tested, the method for determining the time synchronization accuracy may further include: the server acquires clock information of a plurality of slave clocks, the clock information including: clock identification and third time synchronization accuracy. The server may determine the first master clock from the plurality of slave clocks based on the third time synchronization accuracy of each slave clock. The server may receive a clock identification from a second master clock of the vehicle-mounted device to be tested, where the second master clock is a master clock determined from the plurality of slave clocks by the vehicle-mounted device to be tested.
In one possible implementation, the server may simulate multiple slave clocks through the test system. For each slave clock, the server can send time synchronization information to the vehicle-mounted equipment to be tested through the slave clock simulated by the test system, and send a first moment to the vehicle-mounted equipment to be tested, wherein the first moment is the moment of sending the time synchronization information to the vehicle-mounted equipment to be tested. The vehicle-mounted device to be tested can receive the time synchronization information from the server and determine a second moment, wherein the second moment is the moment when the vehicle-mounted device to be tested receives the time synchronization information. The vehicle-mounted device to be tested can determine the time synchronization precision of the slave clocks according to the first time and the second time so as to determine the time synchronization precision of each slave clock in the plurality of slave clocks. The vehicle-mounted device to be tested can determine the second master clock according to the time synchronization precision of each slave clock. The vehicle-mounted device to be tested can send the clock identification of the second master clock to the server. The server may receive a clock identification from a second master clock of the vehicle-mounted device under test.
In the embodiment of the application, the server may determine whether the clock identifier of the first master clock is the same as the clock identifier of the second master clock.
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 may determine first test information, where the first test information is used to instruct the vehicle-mounted device to be tested to pass the master clock selection test.
Illustratively, the plurality of slave clocks that the server emulates by the test system, if it comprises: the time synchronization precision of the slave clock 1, the slave clock 2 and the slave clock 3 is higher than that of the slave clock 2 and the slave clock 3, and the time synchronization precision of the slave clock 1, the slave clock 2 and the slave clock 3 is higher than that of the vehicle-mounted device to be tested. And after executing the optimal master clock selection test command, starting the test, and if the first master clock determined by the server and the second master clock determined by the vehicle-mounted equipment to be tested are both slave clocks 1, selecting the test by the vehicle-mounted equipment to be tested through the master clocks.
In the embodiment of the application, in the process of selecting the master clock by the vehicle-mounted device to be tested, if the second master clock determined by the vehicle-mounted device to be tested fails, the vehicle-mounted device to be tested can select the optimal master clock from the plurality of slave clocks except for the second master clock.
Illustratively, the plurality of slave clocks that the server emulates by the test system, if it comprises: the time synchronization precision of the slave clock 1, the slave clock 2 and the slave clock 3 is higher than that of the slave clock 2 and the slave clock 3, the time synchronization precision of the slave clock 2 is higher than that of the slave clock 3, and the time synchronization precision of the slave clock 1, the slave clock 2 and the slave clock 3 is higher than that of the vehicle-mounted device to be tested. After executing the optimal master clock selection test command, starting the test, and if the first master clock determined by the server and the second master clock determined by the vehicle-mounted device to be tested are both slave clocks 1, but the clock 1 fails, both the first master clock determined by the server and the second master clock determined by the vehicle-mounted device can be slave clocks 2.
In another possible design, if the clock identifier of the first master clock is different from the clock identifier of the second master clock, the server may determine second test information, where the second test information is used to indicate that the vehicle device to be tested fails the master clock selection test.
Illustratively, the plurality of slave clocks that the server emulates by the test system, if it comprises: the time synchronization precision of the slave clock 1, the slave clock 2 and the slave clock 3 is higher than that of the slave clock 2 and the slave clock 3, and the time synchronization precision of the slave clock 1, the slave clock 2 and the slave clock 3 is higher than that of the vehicle-mounted device to be tested. And after executing the optimal master clock selection test command, starting the test, and if the first master clock determined by the server is the slave clock 1 and the second master clock determined by the vehicle-mounted equipment to be tested is the slave clock 2, failing the master clock selection test.
It should be noted that, in the embodiment of the present application, the server may simulate multiple sets of slave clocks with different time synchronization accuracy through the test system, and perform multiple sets of tests to determine whether the vehicle-mounted device to be tested passes the master clock selection test.
It will be appreciated that the server may obtain clock information for a plurality of slave clocks, the clock information including: clock identification and third clock synchronization accuracy. The server may determine the first master clock from the plurality of slave clocks based on the third time synchronization accuracy of each slave clock. The server may receive a clock identification from a second master clock of the vehicle-mounted device to be tested, where the second master clock is a master clock determined from a plurality of slave clocks by the vehicle-mounted device to be tested. If the clock identification of the second master clock is the same as the clock identification of the first master clock, the server can determine first test information, and the first test information is used for indicating that the vehicle-mounted equipment to be tested passes the master clock selection test. If the clock identification of the second master clock is different from the clock identification of the first master clock, the server can determine second test information, wherein the second test information is used for indicating that the vehicle-mounted equipment to be tested fails the master clock selection test. Therefore, the server can detect the accuracy of the vehicle-mounted equipment to be detected in selecting the master clock by determining whether the vehicle-mounted equipment to be detected passes the master clock selection test. If the vehicle-mounted equipment to be tested passes the master clock selection test, the accuracy of the master clock selection of the vehicle-mounted equipment to be tested is higher; if the vehicle-mounted equipment to be tested does not pass the master clock selection test, the fact that the accuracy of the master clock selection of the vehicle-mounted equipment to be tested is lower is indicated.
In some embodiments, in order to determine the number of slave clocks that the vehicle-mounted device to be tested can support at most when the vehicle-mounted device to be tested is used as a 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 vehicle-mounted device under test. The server may obtain a second number, the second number being the number of delayed response messages received from the vehicle-mounted device under test.
In one possible implementation, the server may emulate a first number of slave clocks through the test system. For each slave clock simulated by the test system, the server can send delay request messages to the vehicle-mounted device to be tested through the test system so as to send a first number of delay request messages. The vehicle-mounted device under test may receive a first number of latency request messages from the server. In response to the first number of delay request messages, the vehicle-mounted device to be tested can send a second number of delay response messages to the server. The server may receive a second number of delayed response messages from the vehicle-mounted device under test and determine the second number to obtain the second number.
In an embodiment of the present application, the server may determine whether the first number is the same as the second number. The server may adjust the first number according to the target rule, obtain the updated first number, and send a delay request message of the updated first number to the vehicle-mounted device to be tested, so as to reacquire the second number.
The server may then determine whether the updated first number is the same as the reacquired second number. The server can adjust the updated first quantity according to a preset rule, reacquire the second quantity, stop adjusting the first quantity and stop sending the delay request message until the finally obtained updated first quantity is repeated, and determine the target quantity.
Wherein the target number is a largest first number of the plurality of first numbers identical to the second number. The target number is used for indicating the number of slave clocks which can be supported by the vehicle-mounted device to be tested at most.
In one possible design, the target rules include: increasing the first number when the second number is the same as the first number; alternatively, the first number is decreased when the second number is different from the first number.
That is, if the first number is the same as the second number, the server may increase the first number to obtain the updated first number. If the first number is different from the second number, the server may reduce the first number to obtain the updated first number.
It should be noted that, in the embodiment of the present application, if the second number is the same as the first number, it is indicated that the vehicle-mounted device to be tested can support the first number of slave clocks, and the first number is increased to determine whether the vehicle-mounted device to be tested can support more slave clocks. If the second number is different from the first number, the first number is reduced, and whether the vehicle-mounted equipment to be tested can support the smaller number of the slave clocks is determined.
Illustratively, as shown in Table 2, one target rule is shown. Wherein the target rule includes: the number of tests, the number of slave clocks simulated by the test server through the test system each time, and the test result. It should be noted that if the first number is the same as the second number, the test result is passed, that is, the vehicle-mounted device to be tested can support the slave clocks of the first number; if the first number is different from the second number, the test result is failure, namely the vehicle-mounted equipment to be tested cannot support the slave clocks of the first number.
TABLE 2 target rules
Number of tests Simulated slave clock quantity Test results
1 10 By passing through
2 2*10 Failure of
By passing through
n 2*(n-1)*10 Failure of
n+1 2*(n-1)*10*(1-10%) Failure of
n+2 2*(n-1)*10*(1-10%) 2 Failure of
Failure of
n+m 2*(n-1)*10*(1-10%) m By passing through
n+m+1 2*(n-1)*10*(1-10%) m (1+5%) By passing through
n+m+2 2*(n-1)*10*(1-10%) m (1+5%) 2 Failure of
That is, in the case where the number of tests is 1, the number of slave clocks simulated by the server through the test system is 10, and the test result is passed. Under the condition that the test times are 2, the number of slave clocks simulated by the server through the test system can be increased to 2 x 10, and the test result is failure. Under the condition that the test frequency is n+1, 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 failure. In the embodiment of the present application, for description of other test times, reference may be made to description of test times 1, test times 2 and test times n+1, which are not repeated here.
The method for determining the number of slave clocks that can be supported by the vehicle-mounted device to be tested at most when the vehicle-mounted device to be tested is used as a master clock in the application is described below with reference to specific embodiments.
By way of example, in connection with table 2, for the first test, the server may simulate 10 slave clocks by the test system, and after performing the slave clock scale test, the simulated slave clocks may perform master clock selection, and each of the simulated slave clocks selects the vehicle-mounted device to be tested as the master clock. Each slave clock device of the analog simulation may then send a delay request message to the master clock. If all the 10 simulated slave clocks reach the slave device state, that is, the number (first number) of delay request messages sent by the simulated slave clocks is equal to the number (second number) of received delay response messages, the maximum number of the slave clocks which can be supported by the vehicle-mounted device to be tested is larger than or equal to 10. And increasing the number of the simulated slave clocks to 2 times of 10, namely simulating 20 slave clocks, repeating the test process, and if the 20 slave clocks reach the slave device state, namely the number (first number) of delay request messages sent by the simulated slave clocks is equal to the number (second number) of received delay response messages, indicating that the maximum number of the slave clocks which can be supported by the vehicle-mounted device to be tested is greater than or equal to 20. And increasing the number of the simulated slave clocks to 2 times of 20, namely simulating 40 slave clocks, repeating the test process, and if only part of the 40 slave clocks reach the slave device state, namely the number (first number) of delay request messages sent by the simulated slave clocks is not equal to the number (second number) of received delay response messages, indicating that the maximum number of slave clocks which can be supported by the vehicle-mounted device to be tested is smaller than 40. And reducing the number of the simulated slave clocks to 40 minus 40 multiplied by 10%, namely simulating 36 slave clocks, repeating the test process, and if only part of the 36 slave clocks reach the slave device state, namely the number (first number) of delay request messages sent by the simulated slave clocks is not equal to the number (second number) of received delay response messages, indicating that the maximum number of the slave clocks which can be supported by the vehicle-mounted device to be tested is smaller than 36. The number of the simulated slave clocks is reduced to 36 minus 36 multiplied by 10%, namely, 32 slave clocks are simulated, the test process is repeated, and if the 32 slave clocks all reach the slave device state, namely, the number (first number) of delay request messages sent by the simulated slave clocks is equal to the number (second number) of received delay response messages, the maximum number of the slave clocks which can be supported by the vehicle-mounted device to be tested is larger than or equal to 32. And increasing the number of the simulated slave clocks to 32 plus 32 multiplied by 5%, namely simulating 34 slave clocks, repeating the test process, and if only part of the 34 slave clocks reach the slave device state, namely the number (first number) of delay request messages sent by the simulated slave clocks is not equal to the number (second number) of received delay response messages, indicating that the maximum number of the slave clocks which can be supported by the vehicle-mounted device to be tested is smaller than 34. And reducing the number of the simulated slave clocks to 33, namely simulating 33 slave clocks, repeating the test process, and if only part of the 33 slave clocks reach the slave device state, namely the number (first number) of delay request messages sent by the simulated slave clocks is not equal to the number (second number) of received delay response messages, indicating that the maximum number of the slave clocks which can be supported by the vehicle-mounted device to be tested is smaller than 33. The number of simulated slave clocks is reduced to 32, i.e. the simulated 32 slave clocks, and the adjustment of the first number is stopped since the simulated 32 slave clocks have been tested, i.e. the first number is repeated. And finally, the number of slave clocks which can be supported by the vehicle-mounted equipment to be tested is 32 at most.
It is understood that the server may send a first number of delay request messages to the vehicle-mounted device under test. The server may obtain a second number of delayed response messages from the vehicle-mounted device under test. The server may adjust the first number according to the target rule, re-acquire the second number until the last updated first number is repeated, stop adjusting the first number, and determine the target number, where the target number is the largest first number of the first numbers identical to the second number. The target rules include: increasing the first number when the second number is the same as the first number; alternatively, the first number is decreased when the second number is different from the first number. Therefore, the server can continuously adjust the first quantity through multiple simulation tests, and the quantity of slave clocks which can be supported by the vehicle-mounted equipment to be tested at most is determined.
The foregoing description of the solution provided in the embodiments of the present application has been mainly presented in terms of a method. In order to achieve the above functions, the time synchronization accuracy determining device or the vehicle includes a hardware structure and/or a software module for performing the respective functions. Those of skill in the art will readily appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is implemented as hardware or computer software driven hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The embodiment of the application may divide the functional modules according to the above method by using an exemplary time synchronization accuracy determining device or vehicle, for example, the time synchronization accuracy determining device or vehicle may include each functional module corresponding to each functional division, or may integrate two or more functions into one processing module. The integrated modules may be implemented in hardware or in software functional modules. It should be noted that, in the embodiment of the present application, the division of the modules is schematic, which is merely a logic function division, and other division manners may be implemented in actual implementation.
Fig. 5 is a block diagram illustrating a determination apparatus of time synchronization accuracy according to an exemplary embodiment. Referring to fig. 5, the time synchronization accuracy determining apparatus is used to perform the methods shown in fig. 2, 3 and 4. The device for determining the time synchronization accuracy comprises: an acquisition unit 501, a processing unit 502, and a transmission unit 503.
An obtaining unit 501, configured to obtain a first clock frequency at each preset time of the plurality of preset times and a second clock frequency at each preset time, where the first clock frequency is a clock frequency of the server, and the second clock frequency is a clock frequency of the reference clock. The processing unit 502 is configured to determine a first time synchronization precision according to the first clock frequency at each preset time and the second clock frequency at each preset time, where the first time synchronization precision is a time synchronization precision of the server. The processing unit 502 is further configured to determine, based on time synchronization information between the server and the vehicle-mounted device to be tested, a second time synchronization precision, where the second time synchronization precision is the time synchronization precision of the vehicle-mounted device to be tested, if the first time synchronization precision is less than a preset precision threshold.
In a possible implementation manner, the obtaining unit 501 is specifically configured to obtain a plurality of first moments and second moments corresponding to each first moment, where the first moment is a moment when time synchronization information is sent to the vehicle-mounted device to be tested, and the second moment is a moment when the vehicle-mounted device to be tested receives the time synchronization information. The processing unit 502 is specifically configured to determine the second time synchronization accuracy according to the plurality of first moments and the second moment corresponding to each first moment.
In one possible embodiment, the number of second time synchronization accuracies is a plurality. The processing unit 502 is further configured to determine a first error according to a plurality of second time synchronization accuracies. For each second time synchronization precision, the processing unit 502 is further configured to determine a second error corresponding to the second time synchronization precision according to the second time synchronization precision, the first time synchronization precision, and a preset impact factor. The processing unit 502 is further configured to determine a target error corresponding to the second time synchronization precision according to the first error, the second error corresponding to the second time synchronization precision, and a preset influence factor, so as to determine a target error corresponding to each second time synchronization precision, where the target error is used to indicate an accuracy degree of the second time synchronization precision.
In a possible implementation manner, the obtaining unit 501 is further configured to obtain clock information of a plurality of slave clocks, where the clock information includes: clock identification and third time synchronization accuracy. The processing unit 502 is further configured to determine the first master clock from the plurality of slave clocks according to the third time synchronization accuracy of each slave clock. The obtaining unit 501 is further configured to receive a clock identifier from a second master clock of the vehicle-mounted device to be tested, where the second master clock is a master clock determined from a plurality of slave clocks by the vehicle-mounted device to be tested. 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, where the first test information is used to instruct the vehicle-mounted device to be tested 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, where the second test information is used to indicate that the vehicle-mounted device to be tested fails the master clock selection test.
In a possible implementation manner, the sending unit 503 is configured to send a first number of delay request messages to the vehicle device under test. The obtaining unit 501 is further configured to obtain a second number, where the second number is the number of delay response messages received from the vehicle-mounted device to be tested. The processing unit 502 is further configured to adjust the first number according to the 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 to be tested, so as 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 finally obtained updated first number is repeated, and stop adjusting the first number. The sending unit 503 is further configured to stop sending the delay request message. The processing unit 502 is further configured to determine a target number, where the target number is a largest first number of a plurality of first numbers that are the same as the second number. The target rules include: increasing the first number when the second number is the same as the first number; alternatively, the first number is decreased when the second number is different from the first number.
The specific manner in which the individual units perform the operations in relation to the apparatus of the above embodiments has been described in detail in relation to the embodiments of the method and will not be described in detail here.
FIG. 6 is a block diagram of a vehicle, according to an exemplary embodiment. As shown in fig. 6, vehicle 600 includes, but is not limited to: a processor 601 and a memory 602.
The memory 602 is used for storing executable instructions of the processor 601. It will be appreciated that the processor 601 is configured to execute instructions to implement the method of determining time synchronization accuracy in the above embodiments.
It should be noted that the vehicle structure shown in fig. 6 is not limiting of the vehicle, and the vehicle may include more or fewer components than shown in fig. 6, or may combine certain components, or a different arrangement of components, as will be appreciated by those skilled in the art.
The processor 601 is a control center of the vehicle and utilizes various interfaces and lines to connect various parts of the entire vehicle, and by running or executing software programs and/or modules stored in the memory 602 and invoking data stored in the memory 602, performs various functions of the vehicle and processes the data, thereby performing overall monitoring of the vehicle. The processor 601 may include one or more processing units. Alternatively, the processor 601 may integrate an application processor that primarily handles operating systems, user interfaces, applications, etc., and a modem processor that primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 601.
The memory 602 may be used to store software programs as well as various data. The memory 602 may include primarily a program storage area and a data storage area, wherein the program storage area may store an operating system, application programs (such as a processing unit) required for at least one functional module, and the like. In addition, the memory 602 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
In an exemplary embodiment, a computer readable storage medium is also provided, such as a memory 602, comprising instructions executable by the processor 601 of the vehicle 600 to implement the method of determining time synchronization accuracy in the above embodiments.
In actual implementation, the functions of the acquisition unit 501 and the processing unit 502 in fig. 5 may be implemented by the processor 601 in fig. 6 calling a computer program stored in the memory 602. For the specific execution, reference may be made to the description of the method for determining the time synchronization accuracy in the above embodiment, and the description is omitted here.
Alternatively, the computer readable storage medium may be a non-transitory computer readable storage medium, for example, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
In an exemplary embodiment, the present application also provides a computer program product comprising one or more instructions executable by a processor of a vehicle to perform the method of determining time synchronization accuracy in the above-described embodiments.
It should be noted that, when the instructions in the computer readable storage medium or one or more instructions in the computer program product are executed by the processor of the vehicle, the respective processes of the embodiment of the method for determining time synchronization accuracy are implemented, and the technical effects same as those of the method for determining time synchronization accuracy can be achieved, so that repetition is avoided, and no further description is given here.
From the foregoing description of the embodiments, it will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of functional modules is illustrated, and in practical application, the above-described functional allocation may be implemented by different functional modules according to needs, i.e. the internal structure of the apparatus is divided into different functional modules to implement all or part of the functions described above.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of modules or units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another apparatus, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and the parts shown as units may be one physical unit or a plurality of physical units, may be located in one place, or may be distributed in a plurality of different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a readable storage medium. Based on such understanding, the technical solution of the embodiments of the present application may be essentially or a part contributing to the prior art or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, including several instructions to cause a device (may be a single-chip microcomputer, a chip or the like) or a processor (processor) to perform all or part of the steps of the methods of the embodiments of the present application. And the aforementioned storage medium includes: a usb disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk, etc.
The foregoing is merely a specific embodiment of the present application, but the protection scope of the present application is not limited thereto, and any changes or substitutions within the technical scope of the present disclosure should be covered in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A method for determining time synchronization accuracy, applied to a server, the method comprising:
acquiring a first clock frequency of each preset time and a second clock frequency of 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 a reference clock;
determining first time synchronization precision according to the first clock frequency of each preset time and the second clock frequency of each preset time, wherein the first time synchronization precision is the time synchronization precision of the server;
if the first time synchronization precision is smaller than a preset precision threshold, determining a second time synchronization precision based on time synchronization information between the server and the vehicle-mounted equipment to be detected, wherein the second time synchronization precision is the time synchronization precision of the vehicle-mounted equipment to be detected.
2. The method of claim 1, wherein determining a second time synchronization accuracy based on time synchronization information between the server and the on-board device under test comprises:
acquiring a plurality of first moments and second moments corresponding to each first moment, wherein the first moments are moments when the time synchronization information is sent to the vehicle-mounted equipment to be tested, and the second moments are moments when the time synchronization information is received by the vehicle-mounted equipment to be tested;
and determining the second time synchronization precision according to the plurality of first moments and the second moment corresponding to each first moment.
3. The method of claim 2, wherein the number of second time synchronization accuracies is a plurality, the method further comprising:
determining a first error according to a plurality of the second time synchronization accuracies;
for each second time synchronization precision, determining a second error corresponding to the second time synchronization precision according to the second time synchronization precision, the first time synchronization precision and a preset influence factor;
and determining a target error corresponding to the second time synchronization precision according to the first error, the second error corresponding to the second time synchronization precision and the preset influence factor, so as to determine a target error corresponding to each second time synchronization precision, wherein the target error is used for indicating the accuracy degree of the second time synchronization precision.
4. A method according to any one of claims 1-3, characterized in that the method further comprises:
acquiring clock information of a plurality of slave clocks, wherein the clock information comprises: clock identification and third time synchronization accuracy;
determining a first master clock from the plurality of slave clocks according to a third time synchronization accuracy of each of the slave clocks;
receiving a clock identification of a second master clock from the vehicle-mounted device to be tested, wherein the second master clock is a master clock determined by the vehicle-mounted device to be tested from the plurality of slave clocks;
if the clock identification of the second master clock is the same as the clock identification of the first master clock, determining first test information, wherein the first test information is used for indicating that the vehicle-mounted equipment to be tested passes the master clock selection test;
and if the clock identification of the second master clock is different from that of the first master clock, determining second test information, wherein the second test information is used for indicating that the vehicle-mounted equipment to be tested does not pass the master clock selection test.
5. A method according to any one of claims 1-3, characterized in that the method further comprises:
sending a first number of delay request messages to the vehicle-mounted equipment to be tested;
Acquiring a second number, wherein the second number is the number of delay response messages received from the vehicle-mounted equipment to be tested;
according to a target rule, the first quantity is adjusted to obtain updated first quantity, and delay request information of the updated first quantity is sent to the vehicle-mounted equipment to be detected so as to acquire the second quantity again;
according to the target rule, adjusting the updated first quantity, and re-acquiring the second quantity until the updated first quantity obtained finally is repeated, stopping adjusting the first quantity and stopping sending the delay request message, and determining a target quantity, wherein the target quantity is used for indicating the quantity of slave clocks which can be supported by the vehicle-mounted equipment to be tested at most under the condition that the vehicle-mounted equipment to be tested is a master clock;
the target rule includes: increasing the first number when the second number is the same as the first number; alternatively, the first number is decreased when the second number is different from the first number.
6. A time synchronization accuracy determining apparatus, applied to a server, comprising:
An obtaining unit, configured to obtain a first clock frequency of each preset time and a second clock frequency of each preset time in a plurality of preset times, where the first clock frequency is a clock frequency of the server, and the second clock frequency is a clock frequency of a reference clock;
the processing unit is used for determining first time synchronization precision according to the first clock frequency of each preset time and the second clock frequency of each preset time, wherein the first time synchronization precision is the time synchronization precision of the server;
and the processing unit is further configured to determine a second time synchronization precision based on time synchronization information between the server and the vehicle-mounted device to be tested if the first time synchronization precision is less than a preset precision threshold, where the second time synchronization precision is the time synchronization precision of the vehicle-mounted device to be tested.
7. The apparatus of claim 6, wherein the device comprises a plurality of sensors,
the acquiring unit is specifically configured to acquire a plurality of first moments and second moments corresponding to each first moment, where the first moments are moments when the time synchronization information is sent to the vehicle-mounted device to be tested, and the second moments are moments when the time synchronization information is received by the vehicle-mounted device to be tested;
The processing unit is specifically configured to determine the second time synchronization precision according to the plurality of first moments and second moments corresponding to each first moment.
8. The apparatus of claim 7, wherein the second time synchronization accuracy is a plurality of times;
the processing unit is further used for determining a first error according to a plurality of second time synchronization precision;
the processing unit is further configured to determine, for each of the second time synchronization precision, a second error corresponding to the second time synchronization precision according to 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 precision according to the first error, the second error corresponding to the second time synchronization precision, and the preset influence factor, so as to determine a plurality of target errors, where the target error is used to indicate an accuracy degree of the second time synchronization precision.
9. A vehicle, characterized by comprising: a processor; a memory for storing the processor-executable instructions; wherein the processor is configured to execute the instructions to implement the method of any one of claims 1 to 5.
10. A computer readable storage medium, characterized in that, when computer-executable instructions stored in the computer readable storage medium are executed by a processor of a vehicle, the vehicle is capable of performing the method of any one of claims 1 to 5.
CN202311610925.3A 2023-11-28 2023-11-28 Method and device for determining time synchronization precision, vehicle and storage medium Pending CN117440497A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311610925.3A CN117440497A (en) 2023-11-28 2023-11-28 Method and device for determining time synchronization precision, vehicle and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311610925.3A CN117440497A (en) 2023-11-28 2023-11-28 Method and device for determining time synchronization precision, vehicle and storage medium

Publications (1)

Publication Number Publication Date
CN117440497A true CN117440497A (en) 2024-01-23

Family

ID=89546146

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311610925.3A Pending CN117440497A (en) 2023-11-28 2023-11-28 Method and device for determining time synchronization precision, vehicle and storage medium

Country Status (1)

Country Link
CN (1) CN117440497A (en)

Similar Documents

Publication Publication Date Title
CN113485931B (en) Test method, test device, electronic equipment and computer readable storage medium
CN103675022A (en) TDS (total dissolved solids) detection method, device and system
CN112034412A (en) Intelligent electric energy meter misalignment analysis method and system based on intelligent isolating switch
CN112967424A (en) Simulation method and device of vehicle-mounted Bluetooth key
CN114089153A (en) Integrated circuit chip testing method, device and storage medium
US7206710B2 (en) Incremental generation of calibration factors for automated test equipment
CN109557515B (en) Detection method and detection device of range finder, terminal equipment and storage medium
CN110765005B (en) Software reliability evaluation method and device
CN107677290B (en) Testing method and device for precision evaluation of inertial navigation system
CN117440497A (en) Method and device for determining time synchronization precision, vehicle and storage medium
CN111157906B (en) SOC precision testing method, device and system
CN201348514Y (en) Testing signal generator for sequence of event
CN112540290A (en) Test method and device for clock frequency calibration, storage medium and terminal
CN112985460A (en) Intelligent center control positioning precision testing method and device, electronic equipment and storage medium
CN110971478B (en) Pressure measurement method and device for cloud platform service performance and computing equipment
CN109286461B (en) Method for adapting time stamps in the detection of sensor data
CN110208727B (en) Processing method, processing device and system for precision verification test of fault indicator
CN108269004B (en) Product life analysis method and terminal equipment
CN113381910B (en) Multi-star coarse timing integrity analysis method and device, computer equipment and medium
CN116070972B (en) Method and device for spot inspection of automobile parts, electronic equipment and storage medium
CN107103003B (en) Method for acquiring data in link, acquisition equipment, processing equipment and system
CN112633093B (en) Equipment state detection method and system
CN112578336B (en) Positioning result calibration method, device and equipment
CN112798784B (en) Method and system for batch detection of blood glucose test strips, electronic equipment and storage medium
CN116208294A (en) Communication matching method, master communication device, slave communication device and communication matching system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination