Communication connection detection method, test end and tested end
By sending test network management messages between the test end and the tested end, the wake-up time of the tested end is detected, the problem of stability detection of the internal communication connection of the vehicle is solved, the detection efficiency and accuracy of the communication connection are improved, and the vehicle function is ensured. Stability and traffic safety.
Patent Information
- Application Number
- CN202411370002.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-01-14
AI Technical Summary
The prior art is difficult to effectively detect and ensure the stability of the internal communication connection of the vehicle, especially when the measured end enters a sleep state and wakes up, it affects the response ability of the communication connection, resulting in vehicle functional stability and traffic safety issues.
By sending test network management messages between the test end and the measured end, the duration required for the measured end to wake up from the sleep state, and evaluating the threshold based on the preset time limit, so as to realize the detection of the communication connection and optimization of wake-up process.
It improves the efficiency and accuracy of the detection of the measured end and the communication connection, ensures the communication efficiency between the electronic controllers inside the vehicle, and reduces traffic safety hazards.
Smart Images

Figure CN119316331A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication detection technology, and in particular to a communication connection detection method, a test end, and a tested end. Background Art
[0002] With the development of society and the advancement of transportation technology, more and more users choose to buy private cars for transportation, and the demand for vehicle production has risen accordingly. The increase in the number of private cars has also brought pressure to traffic. If the stability of various functions of the vehicle is poor, it is more likely to cause vehicle problems and then cause traffic accidents.
[0003] In order to ensure the stability of various functions of the vehicle, the communication capabilities of the vehicle's internal hardware and software must be guaranteed. Therefore, technicians in related fields have made ensuring the normal communication of various components inside the vehicle one of their research focuses. Summary of the invention
[0004] In view of this, the purpose of the present application is to provide a communication connection detection method, a test end and a tested end.
[0005] According to the first aspect of the present application, the present application provides a method for detecting a communication connection, which is applied to a test end and includes:
[0006] In response to the tested end stopping feeding back the tested network management message, sending at least one test network management message to the tested end at a preset time interval, so that the tested end resumes feeding back the tested network management message according to the test network management message;
[0007] Determine the time it takes for the tested end to recover and feed back the tested network management message;
[0008] According to a preset duration evaluation threshold, the detection result of the recovery duration is determined. According to the second aspect embodiment of the present application, the present application also provides another communication connection detection method, which is applied to the tested end and includes:
[0009] Stop feeding back the tested network management message to the test end, so that the test end sends at least one test network management message to the tested end according to a preset time interval;
[0010] The test network management message is received and, based on the test network management message, the tested network management message is restored to the test end, so that the test end determines the detection result of the restoration time length of the restored feedback tested network management message according to a preset time length evaluation threshold.
[0011] The purpose of the first aspect of the present application is the same as that of the embodiment of the first aspect of the present application. The third aspect of the present application provides a communication connection detection device, which is applied to a test end, including:
[0012] A test message sending module, configured to send at least one test network management message to the tested end at a preset time interval in response to the tested end stopping feeding back the tested network management message, so that the tested end resumes feeding back the tested network management message according to the test network management message;
[0013] A recovery time determination module, used to determine the recovery time of the tested end to recover and feed back the tested network management message;
[0014] The communication connection detection module is used to determine the detection result of the recovery time according to a preset time evaluation threshold.
[0015] The purpose of the second aspect of the present application is the same as that of the embodiment of the second aspect of the present application. The fourth aspect of the present application provides another communication connection detection device, which is applied to the tested end and includes:
[0016] A message feedback stopping module, used for stopping feeding back the tested network management message to the test end, so that the test end sends at least one test network management message to the tested end according to a preset time interval;
[0017] The message feedback recovery module is used to receive and, based on the test network management message, recover and feed back the tested network management message to the test end, so that the test end determines the detection result of the recovery time of recovering and feeding back the tested network management message based on the preset time evaluation threshold.
[0018] Based on the same purpose of the above-mentioned embodiments, the present application also provides a testing end and a tested end.
[0019] The test end includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the communication connection detection method as described in the first aspect of the embodiment is implemented.
[0020] The tested end includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and is characterized in that when the processor executes the program, the communication connection detection method as described in the second aspect embodiment is implemented.
[0021] From the above, it can be seen that the technical solution of the embodiment of the present application, the tested end stops feeding back the tested network management message, so that the test end can promptly determine whether the tested end has entered the sleep state, thereby reasonably arranging the subsequent wake-up process; sending at least one test network management message to the tested end at a preset time interval, so that the tested end can restore the feedback of the tested network management message according to the test network management message, and wake up the tested end by sending multiple test network management messages at intervals, so as to directly or indirectly determine the time required for the tested end to wake up and recover; the communication connection is detected according to the recovery time, and the response capability of the tested end to be awakened from sleep is effectively determined, thereby improving the efficiency and accuracy of the detection of the tested end and the communication connection. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions in the present application or related technologies, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0023] Figure 1 A flow chart of a method for detecting a communication connection provided in an embodiment of the present application;
[0024] Figure 2 A flowchart of another communication connection detection method provided in an embodiment of the present application;
[0025] Figure 3A An interactive schematic diagram of a communication connection detection process provided in an embodiment of the present application;
[0026] Figure 3B A hardware connection diagram for communication connection detection provided in an embodiment of the present application;
[0027] Figure 4 A schematic diagram of the structure of a communication connection detection device provided in an embodiment of the present application;
[0028] Figure 5 A schematic diagram of the structure of another communication connection detection device provided in an embodiment of the present application;
[0029] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0030] In order to make the objectives, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.
[0031] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present application should be the usual meanings understood by people with ordinary skills in the field to which the present application belongs. The "first", "second" and similar words used in the embodiments of the present application do not represent any order, quantity or importance, but are only used to distinguish different components. "Including" or "comprising" and similar words mean that the elements or objects appearing in front of the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0032] Figure 1 A communication connection detection method provided in an embodiment of the present application can be applied to communication connection detection situations. The communication connection detection method provided in an embodiment of the present application can be performed by a communication connection detection device, which can be integrated into the test end in the form of hardware and / or software. Figure 1 , the method provided in the embodiment of the present application comprises the following steps:
[0033] S110 . In response to the tested end stopping feeding back the tested network management message, sending at least one test network management message to the tested end at a preset time interval, so that the tested end resumes feeding back the tested network management message according to the test network management message.
[0034] Among them, the tested end can be any electronic controller, especially an electronic controller applied to the interior of the vehicle. The test end can be other hardware and software devices for testing the communication performance of the tested end, for example, it can be an electronic controller specifically used for testing, or it can be a simulation controller simulated by a host computer, and the embodiment of the present application does not limit this. The test network management message can be a network management message for testing, and the test end wakes up the tested end by sending the test network management message to the tested end that enters the sleep state. After receiving the test network management message, the tested end needs to feedback the tested network management message (another network management message for responding to the test network management message of the test end) to the test end. It can be understood that as long as the test end sends the test network management message to the tested end, the tested end will definitely feedback the tested network management message in the wake-up state; on the contrary, once the test end stops sending the test network management message to the tested end (that is, no longer waking up the tested end), the tested end will stop feedback the tested network management message accordingly, thereby entering the sleep mode.
[0035] Therefore, when the tested end no longer feeds back the tested network management message to the test end, it is determined that the tested end enters the sleep mode. In order to detect the time length used by the tested end from the sleep state to the awakening process, it is necessary to reawaken the tested end in the sleep state. The awakening method can still be to send a test network management message to the tested end. Among them, the preset time interval can be the time interval for the test end to send the test network management message to the tested end, for example, once every 100ms. It can be understood that waking up the tested end requires a certain time response, so continuously sending the test network management message to the tested end according to the set time interval until the tested end feeds back the tested network management message, which can be used for timing. If the tested end receives the test network management message sent by the test end and resumes feeding back the tested network management message to the test end, the tested end is reawakened thereby.
[0036] S120: Determine the recovery time length for the tested end to recover and feed back the tested network management message.
[0037] Among them, the recovery time can be the time from the tested end stopping to feed back the tested network management message to the test end to the time from feeding back the tested network management message to the test end again. It is understandable that this recovery time determines the response time of the tested end from sleep to wake-up, which also reflects the response ability of the tested end. It is conceivable that if the response ability of a certain component in the vehicle is too poor, it will affect the communication efficiency between different electronic controllers in the vehicle, and then affect the function realization, thereby bringing hidden dangers to the vehicle and troubles to the user.
[0038] Of course, the above-mentioned method for determining the recovery time length can be timing by a preset timer, or it can be recording according to a preset time interval. The embodiment of the present application does not limit the method for determining the recovery time length.
[0039] S130: Determine a detection result of the recovery duration according to a preset duration evaluation threshold.
[0040] Among them, the preset duration evaluation threshold can be the basis for judging the recovery duration of the measured end. It can be understood that if the recovery duration meets the duration evaluation threshold, it is considered that there is no problem with the response ability of the measured end to be awakened from the sleep state, and there is no impact on the communication connection; conversely, if the recovery duration does not meet the duration evaluation threshold, it is considered that the response ability of the measured end to be awakened from the sleep state does not meet the requirements, and there is a negative impact on the communication connection. Based on this basis, the response of the communication connection between the electronic controllers is detected. In a specific example, the recovery time of the electronic controller set in the vehicle is generally around 1800-2200ms.
[0041] According to the technical solution of the embodiment of the present application, the tested end stops feeding back the tested network management message, so that the test end can promptly determine whether the tested end has entered a sleep state, thereby reasonably arranging the subsequent wake-up process; at least one test network management message is sent to the tested end at a preset time interval, so that the tested end can resume feeding back the tested network management message according to the test network management message, and the tested end is awakened by sending multiple test network management messages at intervals, so that the time required for the tested end to wake up and recover can be directly or indirectly determined; the communication connection is detected according to the recovery time, and the response capability of the tested end to be awakened from sleep is effectively determined, thereby improving the efficiency and accuracy of the detection of the tested end and the communication connection.
[0042] In an optional implementation manner, determining the recovery time length for the tested end to recover and feed back the tested network management message in S120 may include:
[0043] The recovery duration is calculated according to the stop feedback time when the tested end stops feeding back the tested network management message and the recovery feedback time when the tested end resumes feeding back the tested network management message.
[0044] Among them, the stop feedback moment can be the time node when the tested end stops feeding back the tested network management message; correspondingly, the recovery feedback moment can be the time node when the tested end re-sends the tested network management message to the test end after being awakened. Both the stop feedback moment and the recovery feedback moment can be recorded by the event timer inherent in the test end. For example, when the test end stops sending the test network management message to the tested end, the tested end will also stop feeding back the tested network management message to the test end. When the tested end sends each frame message to the test end, the sending time of the frame message can be recorded accordingly. When the tested end no longer feeds back the tested network management message, the time of the last frame message sent by it can be used as the stop feedback moment. The time length obtained by subtracting the stop feedback moment from the recovery feedback moment can be used as the recovery time length used to characterize the response ability of the tested end from the sleep state to being awakened.
[0045] In the above implementation mode, during the interaction between the test end and the tested end, the moment when the tested end enters a sleep state and stops feeding back the tested network management message is recorded, as well as the moment when the tested end is awakened from the sleep state and again feeds back the tested network management message is recorded, so as to calculate the recovery time. This provides a practical solution for calculating the recovery time for the present application, and can very accurately calculate the time consumed in the process from the tested end entering a sleep state to being reawakened, and can accurately reflect the recovery response capability of the tested end, thereby helping to improve the accuracy and efficiency of communication connection detection.
[0046] In another optional implementation manner, determining the recovery time length for the tested end to recover and feed back the tested network management message in S120 may also include:
[0047] The recovery time is calculated according to the preset time interval and the number of test network management messages sent to the tested end before the tested end recovers to feed back the tested network management message.
[0048] It should be noted that it takes a certain response time for the tested end to wake up again after entering the sleep state, and during this process, the test end sends a test network management message to the tested end at a preset time interval, so as to test when the tested end can feedback the tested network management message. Therefore, in the process of waiting for the tested end to feedback the tested network management message again, the test end always follows the rule of sending a test network management message to the tested end at a preset time interval. For example, after receiving the last frame of the tested network management message fed back by the tested end, a burst of test network management messages is sent to the tested end every 100ms until the tested end feeds back the tested network management message again, and the number of test network management messages sent by the test end to the tested end during this process is counted, and the number is multiplied by the preset time interval to obtain the recovery time.
[0049] In the above real-time method, the recovery duration is calculated by calculating the number of messages sent by the test end in the process of the tested end waking up from sleep mode and the time interval between message sending. This provides another practical solution for calculating the recovery duration in this application. It can accurately calculate the time consumed by the tested end from entering sleep mode to being reawakened, and can accurately reflect the recovery response capability of the tested end, which also helps to improve the accuracy and efficiency of communication connection detection.
[0050] In an optional implementation manner, before responding to the tested terminal stopping feeding back the tested network management message in S110, the method includes:
[0051] A1. In response to not receiving any message sent by the tested end after the communication connection is established with the tested end, continuously sending test network management messages to the tested end, so that the tested end continuously feeds back the tested network management messages.
[0052] It should be noted that after the test end and the tested end have formed a connection relationship that can communicate normally at the hardware and software levels, if the test end does not receive any message sent by the tested end, it means that the tested end has entered a sleep state. At this time, the wake-up operation can be started, that is, the test network management message is continuously sent to the tested end according to certain preset rules. The test end sends a test network management message to the tested end, and the tested end is awakened. At this time, it also responds by continuously sending the tested network management message that needs feedback to feed back to the test end, so that the test end knows that the tested end has been awakened and can interact. It can be understood that this process is equivalent to a pre-test process, which tests whether the tested end can be awakened normally to ensure that the recovery time of the awakening can be calculated later.
[0053] A2. According to a preset network management message interaction time, stop sending the test network management message, so that the tested end stops feeding back the tested network management message.
[0054] It should be noted that, during the above pre-test process, any network management message (including test network management message and tested network management message) is only used to verify the communication status between the two parties, and the process of verifying the communication status cannot be indefinite. Therefore, the network management message interaction duration can be the time limit set for verifying the communication status. The network management message interaction duration can be set according to the specific software and hardware, and can also be set by relevant technical personnel based on actual conditions or manual experience. In a specific example, the interaction process of network management messages between various electronic controllers installed in the vehicle can be completed within 1350-1650ms.
[0055] After the network management message interaction time ends, the test end immediately stops sending test network management messages to the tested end. When the test end no longer sends messages to the tested end to wake up, the tested end also stops feeding back the tested network management messages and enters a sleep state.
[0056] In the above implementation, after the test end and the tested end establish a communication connection, the tested end that is in a sleeping state is first tried to be awakened to confirm whether the tested end can be awakened. In this way, it can be confirmed whether the sleeping and awakening states of the tested end can be triggered, thereby performing a preliminary check for the subsequent determination of the recovery time. Then, by stopping sending test management messages to the tested end, the tested end is further triggered to enter a sleeping state, which can provide a basis for the subsequent determination of the recovery time. The awakening is triggered again on the basis of entering the sleep mode. The recovery time determined in this process is relatively accurate. Therefore, this can provide high-quality detection conditions for the communication connection detection of the present application scheme, which helps to ensure the efficiency and accuracy of the detection results.
[0057] It should be supplemented that the test end introduced in the embodiment of the present application can communicate with the bus communication device through the serial port, and the bus communication device can communicate with the tested end through Ethernet.
[0058] The test end can generally adopt a host computer (such as a personal computer), and use a bus communication device as a communication medium between the host computer and the electronic controller as the tested end. One end of the bus communication device is connected to the host computer, and the other end is connected to the electronic controller as the tested end. Exemplarily, the bus communication device can adopt a CANoe device, then the host computer can be connected to the CANoe device through a serial bus, such as USB (Universal Serial Bus), and the electronic controller of the tested end can be connected to the CANoe device through a CAN bus (Ethernet), so that the host computer can communicate and interact normally with the electronic controller of the tested end.
[0059] In the above implementation, the bus communication device is used as an intermediary to build an interactive bridge between the test end and the tested end, so that the host computer and the electronic controller that cannot be directly connected can continue to communicate, ensuring the hardware environment for communication connection detection and providing a solid foundation for calculating the recovery time and communication detection.
[0060] The above contents all explain the technical solutions provided by the present application from the test end side. In this regard, based on the same technical purpose, the embodiments of the present application also simultaneously explain the technical solutions of the present application from the tested end side, as follows.
[0061] Figure 2 A communication connection detection method provided in an embodiment of the present application can be applied to communication connection detection situations. The communication connection detection method provided in an embodiment of the present application can be performed by a communication connection detection device, which can be integrated in the tested end in the form of hardware and / or software. Figure 2 , the method provided in the embodiment of the present application comprises the following steps:
[0062] S210: Stop feeding back the tested network management message to the testing end, so that the testing end sends at least one testing network management message to the tested end at a preset time interval.
[0063] The tested end stops feeding back the tested network management message to the test end, which is equivalent to the tested end entering a sleep state. At this time, the test end needs to wake up the tested end. Therefore, the test end needs to send multiple frames of test network management messages to the tested end at a preset time interval to wake up the tested end. The process of the test end waking up the tested end can be found in the description of the aforementioned embodiments and implementation methods, and the embodiments of this application will not be repeated here.
[0064] S220, receiving and, based on the test network management message, restoring feedback of the network management message under test to the test end, so that the test end determines a detection result of the restoration time length for restoring feedback of the network management message under test according to a preset time length evaluation threshold.
[0065] After the test end sends the test network management message to the tested end, the tested end receives these test network management messages to be awakened, and the tested end is awakened from the sleep state and re-feeds back the tested network management message to the test end. In this process, the test end determines the time it takes for the tested end to resume sending messages from entering the sleep state to being awakened, that is, the recovery time, and detects the response capability of the tested end and the recovery capability of the communication connection based on this recovery time and the time evaluation threshold. The test end can refer to the description in the aforementioned real-time example and implementation method for the determination process and detection process of the recovery time, and the embodiment of the present application will not be repeated here.
[0066] The technical solution of the embodiment of the present application, by stopping the feedback of the tested network management message to the test end, reveals that the tested end has entered the sleep mode, prepares for the subsequent wake-up, and provides the basic conditions for the wake-up test; after receiving the test network management message sent by the test end for wake-up, the tested end resumes to feedback the tested network management message to the test end, providing support for the test end to detect the recovery time of the tested end, thereby helping the test end to more accurately and efficiently determine the response capability of the tested end, and further helps to detect the stability of the communication connection.
[0067] In an optional implementation manner, before stopping feeding back the tested network management message to the test end in S210, the method may further include:
[0068] B1. After establishing a communication connection with the test end, receiving a test network management message sent by the test end.
[0069] Before stopping feeding back the tested network management message to the test end, there is actually a pre-test phase, in which the tested end and the test end are first confirmed to have normal communication connection in terms of software and hardware, and then the test network management message sent by the test end is received.
[0070] B2. Feedback the tested network management message to the test end according to the test network management message;
[0071] The tested end responds to the test network management message sent by the test end, and correspondingly feeds back the tested network management message to the test end to prove to the test end that the communication capability of the tested end is normal.
[0072] B3. In response to the test end stopping sending the test network management message according to the preset network management message interaction duration, stop feeding back the tested network management message to the test end.
[0073] The test end stops sending test network management messages to the tested end, and correspondingly, the tested end also stops feeding back the tested network management messages to the test end, thereby the tested end enters a sleep state. As for the situation where the vehicle period stops sending test network management messages according to the preset network management message interaction duration, the description in the above embodiments and implementation methods can be referred to, and the embodiments of this application will not be repeated here.
[0074] In the above implementation mode, the tested end is awakened from the sleep state when the test network management message sent by the test end is received for the first time, and the tested end is fed back the tested network management message to the test end, thereby confirming that its own communication ability is normal. After the test end stops sending the test network management message, the tested end also stops feeding back and enters the sleep state; the tested end is awakened from the sleep state when the test network management message sent by the test end is received for the second time, and the tested end is awakened again from the sleep state and resumes feeding back the tested network management message, thereby helping the test end to record the time spent from entering the sleep state to being re-awakened, and providing a normal test environment for the test end.
[0075] It should be supplemented that the tested end described in the embodiment of the present application can communicate with the bus communication device via Ethernet, and the bus communication device can communicate with the test end via a serial port.
[0076] The test end can generally adopt a host computer (such as a personal computer), and use a bus communication device as a communication medium between the host computer and the electronic controller as the tested end. One end of the bus communication device is connected to the host computer, and the other end is connected to the electronic controller as the tested end. Exemplarily, the bus communication device can adopt a CANoe device, then the host computer can be connected to the CANoe device through a serial bus, such as USB (Universal Serial Bus), and the electronic controller of the tested end can be connected to the CANoe device through a CAN bus (Ethernet), so that the host computer can communicate and interact normally with the electronic controller of the tested end.
[0077] In the above implementation, the bus communication device is used as an intermediary to build an interactive bridge between the test end and the tested end, so that the host computer and the electronic controller that cannot be directly connected can continue to communicate, ensuring the hardware environment for communication connection detection and providing a solid foundation for calculating the recovery time and communication detection.
[0078] The above two embodiments and implementation methods respectively describe the technical solutions provided by the present application from the test end side and the tested end side. For a more intuitive description, the present application takes the detection process between the host computer and the tested controller as an example to provide a specific implementation method for explanation, which is as follows:
[0079] Figure 3A It is an interactive schematic diagram of a communication connection detection process provided by an embodiment of the present application; Figure 3B This is a hardware connection diagram of a communication connection detection provided by an embodiment of the present application. The embodiment of the present application is a preferred implementation method provided on the basis of the above-mentioned embodiments and implementation methods.
[0080] like Figure 3BAs shown, one side of the DUT (Device Under Test) is powered by a power supply, and the other side is connected to a bus communication device (such as a CANoe device) through a CAN line. The other side of the bus communication device is connected to a host computer PC (Personal Computer) through a USB line, so that the simulated ECU (Electronic Control Unit) simulated in the PC communicates with the DUT.
[0081] Among them, the DUT can use a controller under test based on AUTOSAR (AUTomotive Open System Architecture) network management. The bus communication device (taking Vector CANOE as an example) receives and simulates the message signal on the CAN line to collect the message sent by the DUT and simulate the sending of the message signal. The host computer can be pre-developed and configured with automated test engineering scripts by relevant technical personnel, including automated test execution and test result analysis. The host computer can use the CAPL language through the bus communication device to fully automate the operation, trigger the sleep and wake-up of the DUT, without manual intervention, greatly reducing the manual operation time and improving the detection efficiency and accuracy. The power supply is used to provide 12V power to the DUT so that it can work normally.
[0082] In AUTOSAR network management, network management messages between ECUs are sent and fed back bidirectionally. Figure 3A As shown, after the PC and DUT establish a communication connection, if the DUT does not send any message to the PC, it is confirmed that the DUT is in a sleep state. At this time, the PC sends a test network management message to the DUT. In response to the test network management message, the DUT feeds back the tested network management message to the PC. After the process of sending network management messages to each other lasts for t1, when the PC receives the t-repeat-message duration feedback message sent by the t1 timer, it stops sending the test network management message to the DUT. t1 can be selected as any duration in the range of 1350ms-1650ms. Because the DUT does not continue to receive the test network management message, it also stops feeding back the tested network management message to the PC. This process can be regarded as a pre-test stage. On the one hand, it can detect whether the DUT can sleep, wake up and communicate normally under the AUTOSAR network management architecture. On the other hand, it paves the way for the subsequent detection of the wake-up time of the DUT. At the end of this process, the PC needs to record the sending time T1 of the last frame of the tested network management message fed back by the DUT.
[0083] After the PC determines that the DUT no longer feeds back the network management message under test, that is, enters the sleep state, it attempts to wake up the DUT. After the DUT feeds back the last frame of the network management message under test, it starts timing and sends a frame of test network management message to the DUT every t2 duration. t2 can be 100ms or 200ms, which is set by relevant technical personnel. The test network management message is sent to the DUT at intervals of t2 continuously until the DUT resumes feeding back the network management message under test to the PC. At this time, the PC records the time T2 when the DUT is re-awakened to send the first frame of the network management message under test.
[0084] Then, the recovery time of the DUT being awakened from sleep is T-NM-TIMOUT=T2-T1. If the recovery time is within the range of 1800ms to 2200ms, it can be determined that the recovery time of the DUT being awakened is normal.
[0085] It should be noted that the above describes some embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the above embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0086] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a communication connection detection device. Figure 4 A schematic diagram of a communication connection detection device provided in an embodiment of the present application, referring to Figure 4 The communication connection detection device 400 includes a test message sending module 410, a recovery time determination module 420 and a communication connection detection module 430, wherein:
[0087] The test message sending module 410 is used to send at least one test network management message to the tested end according to a preset time interval in response to the tested end stopping feeding back the tested network management message, so that the tested end resumes feeding back the tested network management message according to the test network management message;
[0088] The recovery time determination module 420 is used to determine the recovery time of the tested end to recover and feed back the tested network management message;
[0089] The communication connection detection module 430 is used to determine the detection result of the recovery time according to a preset time evaluation threshold.
[0090] The technical solution of the embodiment of the present application is that the tested end stops feeding back the tested network management message, so that the test end can promptly determine whether the tested end has entered a sleep state, thereby reasonably arranging the subsequent wake-up process; at least one test network management message is sent to the tested end at a preset time interval, so that the tested end can recover and feed back the tested network management message according to the test network management message, and the tested end is awakened by sending multiple test network management messages at intervals, so that the time required for the tested end to wake up and recover can be directly or indirectly determined; the communication connection is detected according to the recovery time, and the response capability of the tested end to be awakened from sleep is effectively determined, thereby improving the efficiency and accuracy of the detection of the tested end and the communication connection. In an optional implementation, the recovery time determination module 420 may include:
[0091] The first calculation unit is used to calculate the recovery duration according to the stop feedback time when the measured end stops feeding back the measured network management message and the recovery feedback time when the measured end resumes feeding back the measured network management message.
[0092] In another optional implementation, the recovery duration determination module 420 may further include:
[0093] The second calculation unit is used to calculate the recovery time according to the preset time interval and the number of test network management messages sent to the tested terminal before the tested terminal recovers to feed back the tested network management message.
[0094] In an optional implementation, the device 400 may further include:
[0095] A network management message sending module, configured to, in response to not receiving any message sent by the tested end after the communication connection is established with the tested end, continuously send a test network management message to the tested end, so that the tested end continuously feeds back the tested network management message;
[0096] The message stopping sending module is used to stop sending the test network management message according to the preset network management message interaction time, so that the tested end stops feeding back the tested network management message.
[0097] In an optional implementation, the test end may communicate with a bus communication device via a serial port, and the bus communication device may communicate with the tested end via Ethernet.
[0098] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a communication connection detection device. Figure 5 A schematic diagram of a communication connection detection device provided in an embodiment of the present application, referring to Figure 5 , the communication connection detection device 500 includes a message feedback stopping module 510 and a message feedback recovery module 520, wherein:
[0099] The message feedback stopping module 510 is used to stop feeding back the tested network management message to the test end, so that the test end sends at least one test network management message to the tested end according to a preset time interval;
[0100] The message feedback recovery module 520 is used to receive and, based on the test network management message, recover and feed back the tested network management message to the test end, so that the test end determines the detection result of the recovery time of recovering and feeding back the tested network management message based on a preset time evaluation threshold.
[0101] The technical solution of the embodiment of the present application, by stopping the feedback of the tested network management message to the test end, reveals that the tested end has entered the sleep mode, prepares for the subsequent wake-up, and provides the basic conditions for the wake-up test; after receiving the test network management message sent by the test end for wake-up, the tested end resumes to feedback the tested network management message to the test end, providing support for the test end to detect the recovery time of the tested end, thereby helping the test end to more accurately and efficiently determine the response capability of the tested end, and further helps to detect the stability of the communication connection. In an optional implementation, the device 500 may also include:
[0102] A message receiving module, used for receiving a test network management message sent by the test end after establishing a communication connection with the test end;
[0103] A message feedback module, used for feeding back the tested network management message to the test end according to the test network management message;
[0104] The feedback stopping module is used to stop feeding back the tested network management message to the test end in response to the test end stopping sending the test network management message according to the preset network management message interaction duration.
[0105] In another optional implementation, the tested end communicates with a bus communication device via Ethernet, and the bus communication device communicates with the test end via a serial port.
[0106] For the convenience of description, the above device is described in terms of functions divided into various modules. Of course, when implementing the present application, the functions of each module can be implemented in the same or multiple software and / or hardware.
[0107] The device of the above embodiment is used to implement the corresponding communication connection detection method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.
[0108] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments, the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the communication connection detection method described in any of the above embodiments is implemented.
[0109] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application, Figure 6 A specific electronic device hardware structure is shown, and the electronic device can be used as a test end or a tested end adopted in any implementation method of the present application, and the device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are connected to each other in communication within the device through the bus 1050.
[0110] The processor 1010 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an 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 this specification.
[0111] The memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 may store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 1020 and are called and executed by the processor 1010.
[0112] The input / output interface 1030 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.
[0113] The communication interface 1040 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).
[0114] The bus 1050 includes a path that transmits information between the various components of the device (eg, the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040).
[0115] It should be noted that, although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040 and the bus 1050, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiments of the present specification, and does not necessarily include all the components shown in the figure.
[0116] The electronic device of the above embodiment is used to implement the corresponding communication connection detection method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.
[0117] Based on the same inventive concept, corresponding to the above-mentioned embodiment method, the present application also provides a vehicle, and the vehicle can be provided with a measured end as provided in the above-mentioned embodiment.
[0118] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the communication connection detection method described in any of the above embodiments.
[0119] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0120] The computer instructions stored in the storage medium of the above embodiment are used to enable the computer to execute the communication connection detection method described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0121] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present application (including the claims) is limited to these examples. In line with the concept of the present application, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present application as described above, which are not provided in detail for the sake of simplicity.
[0122] In addition, to simplify the description and discussion, and in order not to make the embodiments of the present application difficult to understand, the known power supply / ground connection with the integrated circuit (IC) chip and other components may or may not be shown in the provided drawings. In addition, the device can be shown in the form of a block diagram to avoid making the embodiments of the present application difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform to be implemented in the embodiments of the present application (that is, these details should be fully within the scope of understanding of those skilled in the art). In the case of elaborating specific details (e.g., circuits) to describe exemplary embodiments of the present application, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details or when these specific details are changed. Therefore, these descriptions should be considered to be illustrative rather than restrictive.
[0123] Although the present application has been described in conjunction with specific embodiments of the present application, many replacements, modifications and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.
[0124] The embodiments of the present application are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included in the scope of protection of the present application.
Claims
1. A method for detecting a communication connection, characterized in that: Applied to the test end, the method includes: In response to the tested end stopping feeding back the tested network management message, sending at least one test network management message to the tested end at a preset time interval, so that the tested end resumes feeding back the tested network management message according to the test network management message; Determine the recovery time of the tested end to recover and feed back the tested network management message; The detection result of the recovery duration is determined according to a preset duration evaluation threshold.
2. The method according to claim 1, characterized in that The determining of the recovery time length of the tested end recovering to feed back the tested network management message includes: The recovery duration is calculated according to the stop feedback time when the measured end stops feeding back the measured network management message and the resumption feedback time when the measured end resumes feeding back the measured network management message.
3. The method according to claim 1, characterized in that The determining of the recovery time length of the tested end recovering to feed back the tested network management message also includes: The recovery duration is calculated according to the preset time interval and the number of test network management messages sent to the tested terminal before the tested terminal recovers to feed back the tested network management message.
4. The method according to claim 1, characterized in that: Before responding to the tested end stopping feeding back the tested network management message, the method includes: In response to not receiving any message sent by the tested end after the communication connection is established with the tested end, continuously sending a test network management message to the tested end, so that the tested end continuously feeds back the tested network management message; According to the preset network management message interaction time, the sending of the test network management message is stopped, so that the tested end stops feeding back the tested network management message.
5. The method according to any one of claims 1 to 4, characterized in that: The test end communicates with the bus communication device via a serial port, and the bus communication device communicates with the tested end via Ethernet.
6. A method for detecting a communication connection, characterized in that: Applied to the tested end, the method comprises: Stop feeding back the tested network management message to the test end, so that the test end sends at least one test network management message to the tested end according to a preset time interval; The test network management message is received and, based on the test network management message, the tested network management message is restored to the test end, so that the test end determines the detection result of the restoration time length of restoring the tested network management message according to a preset time length evaluation threshold.
7. The method according to claim 6, characterized in that Before stopping feeding back the tested network management message to the test end, the method includes: After establishing a communication connection with the test end, receiving a test network management message sent by the test end; Feedback the tested network management message to the test end according to the test network management message; In response to the test end stopping sending the test network management message according to the preset network management message interaction duration, the tested network management message is stopped from being fed back to the test end.
8. The method according to any one of claims 6-7, characterized in that: The tested end communicates with the bus communication device via Ethernet, and the bus communication device communicates with the test end via a serial port.
9. A test terminal, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the communication connection detection method according to any one of claims 1 to 5 is implemented.
10. A tested terminal, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the communication connection detection method according to any one of claims 6 to 8 is implemented.
Citation Information
Patent Citations
Method and device for testing wake-up function of real-time clock module and electronic equipment
CN109921915A
Automatic test method and device for gateway network management strategy
CN114124767A
Test system and method for direct network management of vehicle-mounted controller
CN115705042A