Delay test method and device, electronic equipment and storage medium
Obtaining and matching the identifier and timestamp information of the target signal through the protocol stack solves the problem of low accuracy of delay testing under the SOA architecture and improves the accuracy of delay information, thus improving system performance and reliability.
Patent Information
- Application Number
- CN202410707616.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-03
- Publication Date
- 2024-08-23
AI Technical Summary
Under the new SOA architecture, the signal transmission method introduces Ethernet signals as a new transmission link, resulting in data transmission delays. Especially when the network load is high, the accuracy of the delay test is low.
Obtain the identifier and timestamp information of the target signal through the protocol stack, process and match it to determine the delay information, and improve the accuracy of the delay information.
Improves the accuracy of determining delay information, helping to improve system performance and reliability.
Smart Images

Figure CN118540246A
Abstract
Description
Technical Field
[0001] The present application relates to the field of testing technology, and in particular to a delay testing method and device, an electronic device and a storage medium. Background Art
[0002] Under the new SOA architecture, the signal transmission method introduces Ethernet signals as a new transmission link, which may cause data transmission delays. Especially when the network load is high, the accuracy of the delay test may be low.
[0003] In summary, the technical problems existing in the relevant technologies need to be improved. Summary of the invention
[0004] The main purpose of the embodiments of the present application is to propose a delay testing method and device, an electronic device and a storage medium, aiming to improve the accuracy of the delay.
[0005] To achieve the above object, an embodiment of the present application provides a delay testing method, which includes the following steps:
[0006] Acquire a first identifier of the first target signal and first timestamp information of the first target signal through the protocol stack, wherein the first identifier is an identifier acquired when the protocol stack transmits the first target signal to the transmission protocol layer of the central speed control system base, and the first timestamp information records the reception time of the transmission protocol layer of the first target signal transmitted to the central speed control system base;
[0007] Acquire a second identifier of the first target signal and second timestamp information of the first target signal through the protocol stack, wherein the second identifier is an identifier acquired when the protocol stack transmits the first target signal to the central speed control system interface layer, and the second timestamp information records the reception time when the first target signal is transmitted to the central speed control system interface layer;
[0008] Processing the first target signal to obtain a second target signal, where the second target signal is an advanced control interface signal;
[0009] Acquire a third identifier of the second target signal and third timestamp information of the second target signal, wherein the third identifier is used to identify the second target signal, and the second timestamp information records a receiving time of the second target signal;
[0010] Matching the third identifier, the second identifier and the first identifier to obtain a matching result;
[0011] If the matching result is that the third identifier, the second identifier and the first identifier match successfully, delay information is determined according to the first timestamp information, the second timestamp information and the third timestamp information.
[0012] In some embodiments, the method further comprises:
[0013] Sending a subscription signal to the vehicle dynamics control system via the central speed control system base;
[0014] determining a first target signal according to the subscription signal by a vehicle dynamics control system;
[0015] The first target signal is sent through a vehicle dynamics control system.
[0016] In some embodiments, acquiring, through a protocol stack, a first identifier of the first target signal and first timestamp information of the first target signal includes:
[0017] The first target signal is transmitted to the transmission protocol layer of the central speed control system base through the protocol stack, and a first identifier of the first target signal and a first timestamp information of the first target signal are obtained.
[0018] In some embodiments, the acquiring, through the protocol stack, a second identifier of the first target signal and second timestamp information of the first target signal includes:
[0019] The first target signal is transmitted to the central speed control system interface layer through the protocol stack, and a second identifier of the first target signal and second timestamp information of the first target signal are obtained.
[0020] In some embodiments, the processing the first target signal to obtain the second target signal includes:
[0021] The first target signal is converted and processed by the central speed control system interface layer to obtain a second target signal.
[0022] In some embodiments, the acquiring the third identifier of the second target signal and the third timestamp information of the second target signal includes:
[0023] receiving, by an instrument application, the second target signal;
[0024] An operating system log is obtained through an instrument application, where the operating system log includes a third identifier of the second target signal and third timestamp information of the second target signal.
[0025] In some embodiments, the method further comprises:
[0026] determining a storage location of the first timestamp information according to the first target signal;
[0027] The first timestamp information is stored according to a storage location.
[0028] To achieve the above object, another aspect of an embodiment of the present application provides a delay testing device, the device comprising:
[0029] A first acquisition module is used to acquire a first identifier of the first target signal and first timestamp information of the first target signal through a protocol stack, wherein the first identifier is an identifier acquired when the protocol stack transmits the first target signal to a transmission protocol layer of a central speed control system base, and the first timestamp information records a reception time when the first target signal is transmitted to the transmission protocol layer of the central speed control system base;
[0030] A second acquisition module is used to acquire a second identifier of the first target signal and second timestamp information of the first target signal through the protocol stack, wherein the second identifier is an identifier acquired when the protocol stack transmits the first target signal to the central speed control system interface layer, and the second timestamp information records the reception time when the first target signal is transmitted to the central speed control system interface layer;
[0031] A generating module, configured to process the first target signal to obtain a second target signal;
[0032] a third acquisition module, configured to acquire a third identifier of the second target signal and third timestamp information of the second target signal, wherein the third identifier is used to identify the second target signal, and the second timestamp information records a receiving time of the second target signal;
[0033] a matching module, configured to match the third identifier, the second identifier and the first identifier to obtain a matching result;
[0034] A delay determination module is used to determine delay information according to the first timestamp information, the second timestamp information and the third timestamp information if the matching result is that the third identifier, the second identifier and the first identifier match successfully.
[0035] To achieve the above-mentioned purpose, another aspect of an embodiment of the present application provides an electronic device, the electronic device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the above-mentioned method when executing the computer program.
[0036] To achieve the above objective, another aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described above is implemented.
[0037] The embodiments of the present application include at least the following beneficial effects: the present application provides a delay testing method and device, an electronic device and a storage medium, the scheme obtains a first identifier of a first target signal and a first timestamp information of the first target signal through a protocol stack; obtains a second identifier of the first target signal and a second timestamp information of the first target signal through a protocol stack; processes the first target signal to obtain a second target signal; obtains a third identifier of the second target signal and a third timestamp information of the second target signal, preparing for the calculation and analysis of the delay information; matches the third identifier, the second identifier and the first identifier to obtain a matching result; if the matching result is that the third identifier, the second identifier and the first identifier match successfully, determines the delay information according to the first timestamp information, the second timestamp information and the third timestamp information, thereby improving the accuracy of the delay information determination and helping to improve the performance and reliability of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 is a flowchart of a delay testing method provided in an embodiment of the present application;
[0039] Figure 2 is another flow chart of the delay testing method provided in the embodiment of the present application;
[0040] Figure 3 is a flow chart of the present application method applied to a CSC base;
[0041] Figure 4 It is a schematic diagram of an application scenario provided by an embodiment of the present application;
[0042] Figure 5 It is a schematic diagram of the SomeIP protocol stack provided in an embodiment of the present application;
[0043] Figure 6 This is a schematic diagram of a TCP log provided in an embodiment of the present application;
[0044] Figure 7 This is a schematic diagram of a protocol stack log provided in an embodiment of the present application;
[0045] Figure 8 This is a schematic diagram of a QNX log provided in an embodiment of the present application;
[0046] Fig. 9 is a schematic diagram of the structure of a delay test device provided in an embodiment of the present application;
[0047] Fig.10It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0048] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described in detail below in conjunction with the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the embodiments of the present application. They are only examples of devices and methods consistent with some aspects of the embodiments of the present application as detailed in the attached claims.
[0049] It is understood that the terms "first", "second", etc. used in this application can be used to describe various concepts in this article, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another concept. For example, without departing from the scope of the embodiment of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" and "if" as used herein can be interpreted as "at the time of" or "when" or "in response to determination".
[0050] The terms "at least one", "multiple", "each", "any", etc. used in this application, at least one includes one, two or more, multiple includes two or more, each refers to each of the corresponding multiple, and any refers to any one of the multiple.
[0051] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0052] Before describing the embodiments of the present application in detail, some nouns and terms involved in the embodiments of the present application are first described. The nouns and terms involved in the embodiments of the present application are subject to the following explanations.
[0053] 1) Central Speed Control (CSC), one or more subsystems of the vehicle used to control the speed of the vehicle, including cruise control, cruise control, speed limit and other functions.
[0054] 2) Vehicle Dynamic Control (VDC), a safety system that improves vehicle stability and traction by controlling the dynamic behavior of the vehicle.
[0055] Under the new SOA architecture, the signal transmission method introduces Ethernet signals as a new transmission link, which may cause data transmission delays. Especially when the network load is high, the accuracy of the delay test may be low.
[0056] In summary, the technical problems existing in the relevant technologies need to be improved.
[0057] In view of this, a delay testing method, apparatus, device and medium are provided in an embodiment of the present application. The scheme obtains a first identifier of a first target signal and a first timestamp information of the first target signal through a protocol stack; obtains a second identifier of the first target signal and a second timestamp information of the first target signal through a protocol stack; processes the first target signal to obtain a second target signal; obtains a third identifier of the second target signal and a third timestamp information of the second target signal, thereby preparing for the calculation and analysis of the delay information; matches the third identifier, the second identifier and the first identifier to obtain a matching result; if the matching result is that the third identifier, the second identifier and the first identifier match successfully, determines the delay information according to the first timestamp information, the second timestamp information and the third timestamp information, thereby improving the accuracy of the delay information determination and helping to improve the performance and reliability of the system.
[0058] The delay testing method provided in the embodiment of the present application relates to the field of testing technology. The delay testing method provided in the embodiment of the present application can be applied to a terminal, can be applied to a server, or can be software running in a terminal or a server. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, and a car terminal, etc., but is not limited to this; the server side can be configured as an independent physical server, or it can be configured as a server cluster or distributed system composed of multiple physical servers, and can also be configured to provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms and other basic cloud computing services. The cloud server, the server can also be a node server in the blockchain network; the software can be an application that implements the delay testing method, etc., but is not limited to the above forms.
[0059] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0060] Figure 1 is an optional flowchart of the delay testing method provided in an embodiment of the present application. Figure 1 The method may include but is not limited to steps S101 to S106.
[0061] Step S101, obtaining a first identifier of a first target signal and first timestamp information of the first target signal through a protocol stack;
[0062] Specifically, the first identifier is an identifier obtained when the protocol stack transmits the first target signal to the transmission protocol layer of the central speed control system base, and the first timestamp information records the reception time of the first target signal transmitted to the transmission protocol layer of the central speed control system base.
[0063] The present application does not make any specific limitation on the first target signal, and it can be flexibly selected in combination with actual test needs. For example, the first target signal can be a turn signal or a vehicle control signal.
[0064] It should be noted that first, a subscription signal is sent to the vehicle dynamic control system through the central speed control system base; the vehicle dynamic control system determines the first target signal according to the subscription signal; and the vehicle dynamic control system sends the first target signal to the central speed control system base transmission protocol layer.
[0065] It can be understood that the vehicle dynamic control system sends the first target signal to the central speed control system base transmission protocol layer, transmits the first target signal to the central speed control system base transmission protocol layer through the protocol stack, and obtains the first identifier of the first target signal and the first timestamp information of the first target signal. The first timestamp information is the time information when the vehicle dynamic control system sends the first target signal to the central speed control system base transmission protocol layer and the protocol stack receives the first target signal.
[0066] In this embodiment, the first identifier of the first target signal and the first timestamp information of the first target signal are obtained through the protocol stack, so as to prepare for the subsequent determination of the delay.
[0067] Step S102, obtaining a second identifier of the first target signal and second timestamp information of the first target signal through a protocol stack;
[0068] Specifically, the second identifier is an identifier obtained when the protocol stack transmits the first target signal to the central speed control system interface layer, and the second timestamp information records the reception time when the first target signal is transmitted to the central speed control system interface layer.
[0069] In some embodiments, the central speed control system base transmission protocol layer sends a first target signal to the central speed control system interface layer, transmits the first target signal to the central speed control system interface layer through the protocol stack, and obtains a second identifier of the first target signal and a second timestamp information of the first target signal. The second timestamp information is the time information when the central speed control system base transmission protocol layer sends the first target signal to the central speed control system interface layer and the protocol stack receives the first target signal.
[0070] In this embodiment, the second identifier of the first target signal and the second timestamp information of the first target signal are obtained through the protocol stack, so as to prepare for the subsequent determination of the delay.
[0071] Step S103, processing the first target signal to obtain a second target signal;
[0072] Specifically, the second target signal adopts an advanced control interface signal.
[0073] In some embodiments, the first target signal is processed by the central speed control system interface layer to obtain the second target signal.
[0074] It can be understood that the first target signal is converted and processed by the HQ-API layer to obtain the high-level control interface signal.
[0075] In this embodiment, the first target signal is processed to obtain the second target signal, which prepares for the subsequent acquisition of the third identifier and the third timestamp information.
[0076] Step S104, acquiring a third identifier of the second target signal and third timestamp information of the second target signal;
[0077] Specifically, the operating system log includes a third identifier of the second target signal and third timestamp information of the second target signal, the third timestamp information is time information when the instrument application receives the second target signal, and the third identifier is the identifier of the second target signal in the operating system log.
[0078] In some embodiments, the second target signal is received through the instrument application; and the operating system log is obtained through the instrument application to obtain the third identifier of the second target signal and the third timestamp information of the second target signal.
[0079] In this embodiment, the third identifier of the second target signal and the third timestamp information of the second target signal are acquired, so as to prepare for the subsequent matching of the identifiers and determination of the delay.
[0080] Step S105, matching the third identifier, the second identifier and the first identifier to obtain a matching result;
[0081] It can be understood that the third identifier, the second identifier and the first identifier are matched to determine that there is a corresponding relationship among the third timestamp information, the second timestamp information and the first timestamp information.
[0082] In some embodiments, a matching algorithm is written, and the third identifier, the second identifier and the first identifier are compared by the matching algorithm to obtain a matching result.
[0083] Exemplarily, the third identifier, the second identifier and the first identifier are compared. If the third identifier, the second identifier and the first identifier are completely identical, the matching result is that the third identifier, the second identifier and the first identifier match successfully.
[0084] In this embodiment, the third identifier, the second identifier and the first identifier are matched to obtain a matching result, and the relationship between the first target signal and the second target signal and the third timestamp information, the second timestamp information and the first timestamp information is determined, preparing for the subsequent calculation of the first timestamp information, the second timestamp information and the third timestamp information to determine the delay information.
[0085] Step S106: If the matching result is that the third identifier, the second identifier and the first identifier match successfully, the delay information is determined according to the first timestamp information, the second timestamp information and the third timestamp information.
[0086] In some embodiments, the delay information is calculated according to the first timestamp information, the second timestamp information and the third timestamp information.
[0087] The present application does not make any specific limitation on the delay information, and it can be flexibly selected in combination with actual test needs. For example, the delay information can include a single delay time or multiple delay times.
[0088] It is understandable that the delay information may include at least one of a first time difference between the first timestamp information and the second timestamp information, a second time difference between the second timestamp information and the third timestamp information, or a third time difference between the first timestamp information and the third timestamp information.
[0089] In this embodiment, if the matching result is that the third identifier, the second identifier and the first identifier match successfully, the delay information is determined according to the first timestamp information, the second timestamp information and the third timestamp information, thereby improving the accuracy of the delay information determination and helping to improve the performance and reliability of the system.
[0090] In steps S101 to S106 shown in the embodiment of the present application, a first identifier of a first target signal and first timestamp information of the first target signal are obtained through a protocol stack; a second identifier of the first target signal and second timestamp information of the first target signal are obtained through a protocol stack; the first target signal is processed to obtain a second target signal; a third identifier of the second target signal and third timestamp information of the second target signal are obtained, so as to prepare for the calculation and analysis of delay information; the third identifier, the second identifier and the first identifier are matched to obtain a matching result; if the matching result is that the third identifier, the second identifier and the first identifier match successfully, the delay information is determined according to the first timestamp information, the second timestamp information and the third timestamp information, so as to improve the accuracy of the delay information determination and help improve the performance and reliability of the system.
[0091] Figure 2 is an optional flowchart of the delay testing method provided in an embodiment of the present application. Figure 2 The method may include but is not limited to steps S201 to S212:
[0092] Step S201, sending a subscription signal to the vehicle dynamics control system through the central speed control system base.
[0093] Specifically, the subscription signal is used to inform the vehicle dynamic control system of the first target signal that the central speed control system base wants to receive.
[0094] In step S201 of some embodiments, the central speed control system base and the vehicle dynamics control system adopt a message subscription mechanism.
[0095] Optionally, the central speed control system base sends a subscription signal to the vehicle dynamics control system through an underlying communication protocol to inform the vehicle dynamics control system of the first target signal it wishes to receive.
[0096] In this embodiment, the subscription signal is sent by the central speed control system base to the vehicle dynamic control system, thereby enabling the central speed control system base to subscribe to the first target signal.
[0097] Step S202: determining a first target signal according to the subscription signal through the vehicle dynamics control system.
[0098] In step S202 of some embodiments, after receiving the subscription signal sent by the central speed control system base, the vehicle dynamics control system determines the first target signal according to the subscription signal.
[0099] In this embodiment, the first target signal is determined according to the subscription signal by the vehicle dynamic control system, so as to prepare for the subsequent signal delay test.
[0100] Step S203: sending a first target signal through the vehicle dynamics control system.
[0101] In step S203 of some embodiments, after the vehicle dynamics control system determines the first target signal, the first target signal is sent to the central speed control system base through the underlying communication protocol.
[0102] Optionally, the vehicle dynamics control system packages the first target signal into a message and sends it to the central speed control system base.
[0103] In this embodiment, the first target signal is sent through the vehicle dynamic control system to prepare for the subsequent signal delay test.
[0104] Step S204: transmit the first target signal to the central speed control system base transmission protocol layer through the protocol stack, and obtain the first identifier of the first target signal and the first timestamp information of the first target signal.
[0105] The present application does not make any specific limitation on the protocol stack, and it can be flexibly selected in combination with actual test needs. Exemplarily, the protocol stack may include a network protocol (TCP / IP), and the protocol stack may also include a communication protocol (HTTP, MQTT).
[0106] In step S204 of some embodiments, after receiving the first target signal, the central speed control system base transmits the first target signal to the transmission protocol layer through the protocol stack, and extracts the first identifier and the first timestamp information therefrom.
[0107] Optionally, the received message is parsed through a protocol stack and the first identifier and the first timestamp information are extracted.
[0108] Furthermore, the central speed control system base may introduce a data verification mechanism to improve the integrity and correctness of the received first target signal.
[0109] In this embodiment, the first target signal is transmitted to the central speed control system base transmission protocol layer through the protocol stack, and the first identifier of the first target signal and the first timestamp information of the first target signal are obtained, thereby realizing information extraction of the first target signal and preparing for subsequent delay testing.
[0110] Step S205: determining a storage location of the first timestamp information according to the first target signal.
[0111] In step S205 of some embodiments, the storage location of the first timestamp information is determined according to the first identifier in the first target signal.
[0112] Optionally, the first identifier is mapped to a corresponding storage address through a data mapping or indexing mechanism.
[0113] In this embodiment, the storage location of the first timestamp information is determined according to the first target signal, which is beneficial to data persistence and subsequent delay testing.
[0114] Step S206: store the first timestamp information according to the storage location.
[0115] In step S206 of some embodiments, the present application does not specifically limit the storage location, and it can be flexibly selected in combination with actual test needs. Exemplarily, the storage location can be a memory, a database, or a cloud storage.
[0116] In this embodiment, the first timestamp information is stored according to the storage location to achieve data persistence and facilitate subsequent analysis.
[0117] Step S207: transmitting the first target signal to the central speed control system interface layer through the protocol stack, and acquiring the second identifier of the first target signal and the second timestamp information of the first target signal.
[0118] In step S207 of some embodiments, the central speed control system base transmission protocol layer transmits the first target signal to the central speed control system interface layer through the protocol stack, and extracts the second identifier and the second timestamp information therefrom.
[0119] Optionally, the received message is parsed through a protocol stack and the second identifier and the second timestamp information are extracted.
[0120] In this embodiment, the first target signal is transmitted to the central speed control system interface layer through the protocol stack, and the second identifier of the first target signal and the second timestamp information of the first target signal are obtained, thereby realizing information extraction of the second identifier and the second timestamp information, and preparing for subsequent delay testing.
[0121] Step S208: Process the first target signal through the central speed control system interface layer to obtain a second target signal.
[0122] In step S208 of some embodiments, the central speed control system interface layer processes the first target signal to obtain a second target signal.
[0123] The present application does not impose any specific limitation on the second target signal, and the second target signal can be flexibly selected in combination with actual test requirements. For example, the second target signal can adopt a new data format, and can also include new information.
[0124] Optionally, the central speed control system interface layer obtains the second target signal by performing data conversion, filtering and verification on the first target signal.
[0125] In this embodiment, the first target signal is processed by the central speed control system interface layer to obtain the second target signal, which prepares for the subsequent delay test.
[0126] Step S209: receiving a second target signal through the instrument application.
[0127] In step S209 of some embodiments, the instrument application may receive the signal via a network, a bus, or the like.
[0128] Exemplarily, if the second target signal is the HQ-API signal of the turn signal, the second target signal is received through the instrument application, and the turn signal is displayed on the instrument HMI.
[0129] In this embodiment, the second target signal is received through the instrument application, which prepares for the subsequent acquisition of the operating system log.
[0130] Step S210, obtaining operating system logs through the instrument application.
[0131] Specifically, the operating system log includes a third identifier of the second target signal and third timestamp information of the second target signal.
[0132] In step S210 of some embodiments, the instrument application generates a log for the QNX operating system after receiving the second target signal.
[0133] In this embodiment, the operating system log is obtained through the instrument application, and then the third identifier and the third timestamp information are obtained, which prepares for subsequent matching and delay calculation.
[0134] Step S211, matching the third identifier, the second identifier and the first identifier to obtain a matching result.
[0135] Step S212: if the matching result is that the third identifier, the second identifier and the first identifier match successfully, determine the delay information according to the first timestamp information, the second timestamp information and the third timestamp information.
[0136] See also Figure 3 In some embodiments, the method of the present application is applied to a CSC base. Figure 3 The method may include but is not limited to steps S301 to S304:
[0137] Step S301, verify whether the sending end is synchronized.
[0138] Specifically, the transmitting end sends a first target signal, and the first target signal includes a turn signal.
[0139] Reference Figure 4 , Figure 4 Schematic diagram of an application scenario provided in an embodiment of the present application is shown. Among them, the VDC base (i.e., the sending end) and the CSC base use the SomeIP protocol stack to communicate. For example, the SomeIP protocol stack schematic diagram is as follows Figure 5 As shown in the figure, the instrument HMI, AR-HUD and other applications interact through HQ-API. HQ-API connects CAN communication service, SOA communication service, data storage communication service and some other underlying services. SOA communication service includes SomelP protocol stack.
[0140] It should be noted that CSC (i.e. central speed control system) uses Ethernet link. When it is transmitted from VDC to CSC, CSC is a data communication subscription after integrating SOME / IP protocol stack. VDC (i.e. vehicle dynamic control system) sends the first target signal after receiving the subscription signal, and CSC will receive the signal first target signal at the transport layer protocol layer. Among them, the first target signal reaches the CSC base through the outgoing soa signal, through the protocol stack.
[0141] It can be understood that the first target signal is transmitted from the VDC to the CSC base transmission protocol layer through the protocol stack, and the first identifier of the first target signal and the first timestamp information of the first target signal are obtained.
[0142] In step S301 of some embodiments, the sending service end (i.e., CSC base) signal is confirmed, wherein the signal and data to be sent (i.e., subscription signal) are determined, including the turn signal (i.e., the first target signal) or other signals to be monitored, and then the signal is sent from the sending end to the receiving end using an appropriate communication protocol or interface.
[0143] It can be understood that the CSC base correctly sends the subscription signal, and the VDC correctly receives and determines the first target signal according to the subscription signal.
[0144] In some embodiments, the return result (ie, the first target signal) is intercepted. Optionally, a listener or monitoring tool is set at the receiving end or the interception point to intercept the return result (ie, the first target signal).
[0145] Optionally, the signal information and transmission time are obtained through the log intercepted by TCP dump. For example, the TCP log diagram is as follows Figure 6 shown.
[0146] In some embodiments, signal timestamp information is obtained. The timestamp information of the signal is extracted from the captured return result. The timestamp records the sending time and receiving time of the first target signal (i.e., the first timestamp information). Optionally, the timestamp information is associated with the first target signal so as to be used for subsequent analysis.
[0147] In some embodiments, the receiving timestamp of the subscription signal and the sending timestamp of the turn signal signal (i.e., the first target signal) are obtained, and it is determined that the time difference between them is within a preset range. It is understandable that the preset range is a preset time difference range, and if the time difference is within the preset range, it is considered that the sender is synchronized.
[0148] In some embodiments, the time stamp information is stored. The first time stamp information is stored in a suitable database, log file or data structure for subsequent use. Optionally, a time stamp storage location is set for each signal so that data can be easily retrieved and analyzed in the future.
[0149] Step S302, determine whether the CSC base receiving time is consistent.
[0150] In step S302 of some embodiments, the timestamps of sending and receiving the turn signal (i.e., the first target signal) are recorded in the logs of the VDC and the CSC base, and it is determined that the time difference between them is within a preset range. The receiving timestamp of the turn signal is the first timestamp information, and the sending timestamp of the turn signal is the timestamp information of the VDC sending the first target signal.
[0151] It can be understood that the preset range is a preset time difference range. If the time difference is within the preset range, it is considered that the CSC base receiving time is consistent.
[0152] Step S303, determining whether the protocol stack transmission is consistent.
[0153] In step S303 of some embodiments, the first target signal is transmitted from the CSC base TCP layer (ie, the transport protocol layer) to the CSC HQ-API layer through the protocol stack, and the second identifier of the first target signal and the second timestamp information of the first target signal are obtained.
[0154] It should be noted that after the transmission protocol layer, it passes through the protocol stack. Set a listener or monitoring point at an appropriate position in the protocol stack. When the protocol stack receives the first target signal, it triggers the corresponding event handler or callback function, matches the received signal identifier (i.e., the second identifier) with the signal identifier in the previous step (i.e., the first identifier) and records the signal timestamp information. For example, the protocol stack log diagram is as follows: Figure 7 shown.
[0155] In some embodiments, the consistency of the protocol stack transmission may be improved by checking the first target signal data packet during the protocol stack transmission process.
[0156] Step S304: Summarize and analyze the delay differences.
[0157] Optionally, the first target signal is processed by a CSC HQ-API layer (ie, an interface layer) to obtain a second target signal.
[0158] In step S304 of some embodiments, an operating system log (ie, a QNX log) is obtained through an instrument application, and then a third identifier and a third timestamp information of the second target signal are obtained.
[0159] It should be noted that a unique signal identifier HQ-API is assigned to the signal in both the QNX log and the protocol stack. Further, use a text search tool on QNX, such as grep, to search for signal keywords in the log file, such as "turn signal" or related identifiers. Once the QNX log record related to the turn signal signal is found, extract the timestamp information therein. Then, compare it with the timestamp of the same signal in the protocol stack. For example, the QNX log diagram is as follows: Figure 8 shown.
[0160] In step S304 of some embodiments, it is determined that the matching result of the third identifier, the second identifier and the first identifier is correct, and the delay difference is calculated according to the first timestamp information, the second timestamp information and the third timestamp information.
[0161] See also Fig. 9 The embodiment of the present application further provides a delay test device, which can implement the above delay test method, and the device includes:
[0162] A first acquisition module 901 is used to acquire a first identifier of the first target signal and first timestamp information of the first target signal through a protocol stack, wherein the first identifier is an identifier acquired when the protocol stack transmits the first target signal to a transmission protocol layer of a central speed control system base, and the first timestamp information records a reception time when the first target signal is transmitted to the transmission protocol layer of the central speed control system base;
[0163] A second acquisition module 902 is used to acquire a second identifier of the first target signal and second timestamp information of the first target signal through the protocol stack, wherein the second identifier is an identifier acquired when the protocol stack transmits the first target signal to the central speed control system interface layer, and the second timestamp information records the reception time when the first target signal is transmitted to the central speed control system interface layer;
[0164] A generating module 903, configured to process the first target signal to obtain a second target signal;
[0165] A third acquisition module 904 is used to acquire a third identifier of the second target signal and third timestamp information of the second target signal, wherein the third identifier is used to identify the second target signal, and the second timestamp information records a receiving time of the second target signal;
[0166] A matching module 905, configured to match the third identifier, the second identifier and the first identifier to obtain a matching result;
[0167] The delay determination module 906 is configured to determine delay information according to the first timestamp information, the second timestamp information and the third timestamp information if the matching result is that the third identifier, the second identifier and the first identifier match successfully.
[0168] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0169] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above delay test method when executing the computer program. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.
[0170] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0171] See also Fig.10 , Fig.10 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:
[0172] The processor 1001 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0173] The memory 1002 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1002 can store an operating system and other applications. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 1002, and the processor 1001 calls and executes the delay test method of the embodiment of the present application;
[0174] Input / output interface 1003, used to implement information input and output;
[0175] The communication interface 1004 is used to realize the communication interaction between the device and other devices. The communication can be realized through a wired manner (such as USB, network cable, etc.) or a wireless manner (such as mobile network, WIFI, Bluetooth, etc.);
[0176] A bus 1005 , which transmits information between various components of the device (e.g., the processor 1001 , the memory 1002 , the input / output interface 1003 , and the communication interface 1004 );
[0177] The processor 1001 , the memory 1002 , the input / output interface 1003 and the communication interface 1004 are connected to each other in communication within the device via the bus 1005 .
[0178] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned delay testing method is implemented.
[0179] It can be understood that the contents of the above method embodiments are all applicable to the present storage medium embodiments, the functions specifically implemented by the present storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0180] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0181] The delay testing method, delay testing device, electronic device and storage medium provided in the embodiments of the present application obtain a first identifier of a first target signal and first timestamp information of the first target signal through a protocol stack; obtain a second identifier of the first target signal and second timestamp information of the first target signal through a protocol stack; process the first target signal to obtain a second target signal; obtain a third identifier of the second target signal and third timestamp information of the second target signal, so as to prepare for the calculation and analysis of the delay information; match the third identifier, the second identifier and the first identifier to obtain a matching result; if the matching result is that the third identifier, the second identifier and the first identifier match successfully, determine the delay information according to the first timestamp information, the second timestamp information and the third timestamp information, so as to improve the accuracy of the delay information determination and help improve the performance and reliability of the system.
[0182] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0183] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0184] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0185] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0186] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0187] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0188] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0189] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0190] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0191] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.
[0192] The preferred embodiments of the present application are described above with reference to the accompanying drawings, but the scope of the rights of the present application is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present application should be within the scope of the rights of the present application.
Claims
1. A delay testing method, It is characterized in that The method comprises the following steps: Acquire a first identifier of the first target signal and first timestamp information of the first target signal through the protocol stack, wherein the first identifier is an identifier acquired when the protocol stack transmits the first target signal to the transmission protocol layer of the central speed control system base, and the first timestamp information records the reception time of the transmission protocol layer of the first target signal transmitted to the central speed control system base; Acquire a second identifier of the first target signal and second timestamp information of the first target signal through the protocol stack, wherein the second identifier is an identifier acquired when the protocol stack transmits the first target signal to the central speed control system interface layer, and the second timestamp information records the reception time when the first target signal is transmitted to the central speed control system interface layer; Processing the first target signal to obtain a second target signal, where the second target signal is an advanced control interface signal; Acquire a third identifier of the second target signal and third timestamp information of the second target signal, wherein the third identifier is used to identify the second target signal, and the second timestamp information records a receiving time of the second target signal; Matching the third identifier, the second identifier and the first identifier to obtain a matching result; If the matching result is that the third identifier, the second identifier and the first identifier match successfully, delay information is determined according to the first timestamp information, the second timestamp information and the third timestamp information.
2. The method according to claim 1, It is characterized in that The method further comprises: Sending a subscription signal to the vehicle dynamics control system via the central speed control system base; determining a first target signal according to the subscription signal by a vehicle dynamics control system; The first target signal is sent through a vehicle dynamics control system.
3. The method according to claim 1, It is characterized in that The acquiring, through the protocol stack, a first identifier of the first target signal and first timestamp information of the first target signal includes: The first target signal is transmitted to the transmission protocol layer of the central speed control system base through the protocol stack, and a first identifier of the first target signal and a first timestamp information of the first target signal are obtained.
4. The method according to claim 1, It is characterized in that The acquiring, through the protocol stack, a second identifier of the first target signal and second timestamp information of the first target signal includes: The first target signal is transmitted to the central speed control system interface layer through the protocol stack, and a second identifier of the first target signal and second timestamp information of the first target signal are obtained.
5. The method according to claim 4, It is characterized in that The processing of the first target signal to obtain a second target signal includes: The first target signal is converted and processed by the central speed control system interface layer to obtain a second target signal.
6. The method according to claim 1, It is characterized in that The acquiring the third identifier of the second target signal and the third timestamp information of the second target signal includes: receiving, by an instrument application, the second target signal; An operating system log is obtained through an instrument application, where the operating system log includes a third identifier of the second target signal and third timestamp information of the second target signal.
7. The method according to claim 1, It is characterized in that The method further comprises: determining a storage location of the first timestamp information according to the first target signal; The first timestamp information is stored according to a storage location.
8. A delay test device, It is characterized in that The device comprises: A first acquisition module is used to acquire a first identifier of the first target signal and first timestamp information of the first target signal through a protocol stack, wherein the first identifier is an identifier acquired when the protocol stack transmits the first target signal to a transmission protocol layer of a central speed control system base, and the first timestamp information records a reception time when the first target signal is transmitted to the transmission protocol layer of the central speed control system base; A second acquisition module is used to acquire a second identifier of the first target signal and second timestamp information of the first target signal through the protocol stack, wherein the second identifier is an identifier acquired when the protocol stack transmits the first target signal to the central speed control system interface layer, and the second timestamp information records the reception time when the first target signal is transmitted to the central speed control system interface layer; A generating module, configured to process the first target signal to obtain a second target signal; a third acquisition module, configured to acquire a third identifier of the second target signal and third timestamp information of the second target signal, wherein the third identifier is used to identify the second target signal, and the second timestamp information records a receiving time of the second target signal; a matching module, configured to match the third identifier, the second identifier and the first identifier to obtain a matching result; A delay determination module is used to determine delay information according to the first timestamp information, the second timestamp information and the third timestamp information if the matching result is that the third identifier, the second identifier and the first identifier match successfully.
9. An electronic device, It is characterized in that The electronic device comprises a memory and a processor, the memory stores a computer program, and the processor implements the method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium storing a computer program. It is characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
