Control method for interface plugging, test method and storage medium

By designing automated plugging and unplugging equipment and using controllers and limit sensors to realize automatic plugging and unplugging of interface components, the problem of low efficiency and high cost of manual plugging and unplugging in the existing technology has been solved, the test efficiency and accuracy have been improved, and the test cost has been reduced. cost.

CN119336554APending Publication Date: 2025-01-21ZHEJIANG GEELY HLDG GRP CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411222834.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-02
Publication Date
2025-01-21

AI Technical Summary

Technical Problem

In the testing of existing equipment, plug-in and unplugging operations mainly rely on manual labor, resulting in low testing efficiency, high cost and inability to standardize, affecting the accuracy of the test results.

Method used

By designing a plug-and-pull device, including a controller, a driving component, a moving platform, a limit sensor and a fixed platform, automated plug-and-pull between interface components is realized. The method includes obtaining a plug-in control instruction, judging execution conditions based on data from a limit sensor, driving the mobile station to perform a plug-in operation, and generating a feedback signal.

Benefits of technology

It improves test efficiency and accuracy, reduces test costs, standardizes plugging and unplugging operations, and reduces the impact of human factors on test results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119336554A_ABST
    Figure CN119336554A_ABST
Patent Text Reader

Abstract

The invention relates to a control method and a test method for interface plugging and unplugging and a storage medium, and the control method comprises the steps: obtaining a plugging and unplugging control instruction which comprises a butt joint instruction or a separation instruction; determining a target position of movement of the mobile station and a target limiting sensor corresponding to the target position according to the plugging control instruction; driving the mobile station to move towards a target position when the condition of executing the plugging control instruction is judged according to the data of the target limiting sensor; and in response to the in-place triggering signal of the target limiting sensor, generating a feedback signal for completing the plugging control instruction. According to the technical scheme, automatic insertion and extraction between the interface components are achieved based on judgment of the execution conditions, the test efficiency and accuracy are improved, and the test cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of equipment testing, and in particular to a control method, a testing method and a storage medium for interface plugging and unplugging. Background Art

[0002] During the device testing process, plugging and unplugging operations are usually involved between the test interface and the interface of the device under test, for example, plugging and unplugging the interface of the device under test based on the plugging and unplugging operation. Taking the cockpit computer test as an example, when performing the plugging and unplugging test, the test interface, such as a USB plug, needs to be inserted into the USB interface of the cockpit computer, or unplugged from the USB interface of the cockpit computer.

[0003] However, currently, plug and unplug tests are mainly performed manually, which has low test efficiency, high labor and time costs, and cannot be standardized, affecting the accuracy of test results. Summary of the invention

[0004] In view of this, the purpose of the present application is to provide a control method, a test method and a storage medium for interface plugging and unplugging, which realizes automatic plugging and unplugging between interface components based on the judgment of execution conditions, improves test efficiency and accuracy, and reduces test costs.

[0005] To achieve the above-mentioned purpose, the present application provides a control method for performing interface plugging and unplugging, which is applied to a controller of a plugging and unplugging device, wherein the plugging and unplugging device also includes a driving component, a moving platform, a first limit sensor, a second limit sensor and a fixing platform, wherein the driving component, the first limit sensor and the second limit sensor are respectively connected to the controller, the moving platform is used to fix the first interface component, the fixing platform is used to fix the second interface component, the first limit sensor is set at a first position, the second limit sensor is set at a second position, the driving component is used to drive the moving platform to move between the first position and the second position, so that the first interface component and the second interface component can be docked or separated with each other, and the method includes:

[0006] Obtaining a plug-in control instruction, wherein the plug-in control instruction includes a docking instruction or a separation instruction;

[0007] Determine a target position of the mobile platform according to the plug-in control instruction, and a target limit sensor corresponding to the target position, wherein the target position includes the first position or the second position, and the target limit sensor includes the first limit sensor or the second limit sensor;

[0008] Determining whether the condition for executing the plug-in control instruction is currently met according to the data of the target limit sensor;

[0009] In response to the current condition that the plug-in control instruction is executed, controlling the driving component to drive the moving platform to move toward the target position;

[0010] In response to the target limit sensor triggering an arrival signal, the drive component is controlled to stop working, and a feedback signal for completing the plugging and unplugging control instruction is generated.

[0011] In some embodiments, judging whether the condition for executing the plug-in control instruction is currently met according to the data of the target limit sensor includes:

[0012] If the target limit sensor triggers an arrival signal, the condition for executing the plug-in control instruction is not met at present;

[0013] If the target limit sensor does not trigger an arrival signal, the condition for executing the plug-in control instruction is currently met.

[0014] In some embodiments, the method further comprises:

[0015] In response to the condition for executing the plug-in control instruction not being met at present, the plug-in control instruction is not executed, and an abnormal feedback signal is generated.

[0016] The present application also provides a test method, which is applied to a host computer of a test system, wherein the test system further includes a plug-in device, wherein the plug-in device includes a controller, a drive component, a mobile platform, a first limit sensor, a second limit sensor and a fixed platform, wherein the drive component, the first limit sensor and the second limit sensor are respectively connected to the controller, and the controller is connected to the host computer, wherein the mobile platform is used to fix the first interface component, and the fixed platform is used to fix the second interface component, wherein the first limit sensor is set at a first position, and the second limit sensor is set at a second position, and the drive component is used to drive the mobile platform to move between the first position and the second position so that the first interface component and the second interface component can be docked or separated with each other, and wherein the test method includes:

[0017] Sending a plug-in control instruction to the controller so that the controller executes the control method according to any one of claims 1 to 4;

[0018] Receive a feedback signal sent by the controller to complete the plug-in control instruction.

[0019] In some embodiments, the test system further includes an image acquisition device, the image acquisition device is connected to the host computer, one of the first interface component and the second interface component is an interface component of the device under test, and the other of the first interface component and the second interface component is connected to the host computer. After receiving the feedback signal sent by the controller to complete the plug-in control instruction, the method further includes:

[0020] When the plug-in control instruction is a docking instruction, controlling the image acquisition device to acquire an interface image of the device under test;

[0021] Determining whether the device under test successfully recognizes the inserted interface component according to the interface image;

[0022] If yes, it is confirmed that a communication connection is successfully established with the device under test.

[0023] In some embodiments, judging whether the device under test successfully identifies the inserted interface component according to the interface image includes:

[0024] Extracting display features of the prompt recognition result in the interface image;

[0025] It is determined whether the device under test successfully identifies the inserted interface component according to the display characteristics.

[0026] The present application also provides a plugging and unplugging device, including a controller, a driving assembly, a moving platform, a first limit sensor, a second limit sensor and a fixing platform;

[0027] The driving assembly, the first limit sensor, and the second limit sensor are respectively connected to the controller;

[0028] The mobile platform is used to fix the first interface component, the fixed platform is used to fix the second interface component, the first limit sensor is set at a first position, the second limit sensor is set at a second position, and the driving component is used to drive the mobile platform to move between the first position and the second position, so that the first interface component and the second interface component can be docked or separated with each other;

[0029] The controller is configured to execute the steps of the control method as described above.

[0030] The present application also provides a test system, characterized in that it includes a host computer and the plug-in device described in claim 8, and the host computer is configured to execute the steps of the test method described above.

[0031] In some embodiments, an image acquisition device is also included, and the image acquisition device is connected to the host computer. One of the first interface component and the second interface component is an interface component of the device to be tested, and the other of the first interface component and the second interface component is connected to the host computer. The host computer is also configured to execute the steps of the test method as described above.

[0032] The present application also provides an electronic device, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the steps of any of the above methods when executed by the processor.

[0033] The present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above methods are implemented.

[0034] From the above, the control method for performing interface plugging and unplugging of the present application includes: obtaining plugging and unplugging control instructions, including docking instructions or separation instructions; determining the target position of the mobile station according to the plugging and unplugging control instructions, and the target limit sensor corresponding to the target position; when judging that the current conditions for executing the plugging and unplugging control instructions are met according to the data of the target limit sensor, driving the mobile station to move to the target position; in response to the target limit sensor triggering the arrival signal, generating a feedback signal of completing the plugging and unplugging control instructions. The technical solution of the present application realizes the automatic plugging and unplugging between interface components based on the judgment of the execution conditions, improves the test efficiency and accuracy, and reduces the test cost. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0036] Figure 1 The figure is a schematic diagram of the structure of a plugging and unplugging device provided according to an embodiment.

[0037] Figure 2 The present invention is a flowchart of a control method for performing interface plugging and unplugging according to an embodiment.

[0038] Figure 3 The figure is a schematic diagram of the structure of a test system provided according to an embodiment.

[0039] Figure 4 The figure is a flow chart of a testing method provided according to an embodiment. DETAILED DESCRIPTION

[0040] The specific embodiments of the present application will be described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the description of the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.

[0041] In the description of this application, unless otherwise clearly specified and limited, the terms "set", "install", "connect", etc. should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium. For ordinary technicians in this field, the specific meanings of the above terms can be understood according to specific circumstances.

[0042] The terms "first", "second", "third", etc. are merely used to distinguish values ​​or elements of similar attributes, rather than to indicate or imply relative importance or a particular order.

[0043] The terms "comprises," "comprising," or any other variations thereof, are intended to cover a non-exclusive inclusion of the elements listed and may also include additional elements not expressly listed.

[0044] Figure 1 FIG. 1 is a schematic diagram of the structure of a plug-in device provided according to an embodiment. Figure 1 As shown, the plug-in device of the present application includes a controller 21 , a driving component 22 , a moving platform 23 , a first limit sensor 24 , a second limit sensor 25 and a fixing platform 26 .

[0045] The driving assembly 22, the first limit sensor 24, and the second limit sensor 25 are respectively connected to the controller 21. The moving platform 23 is used to fix the first interface assembly 31, the fixing platform 26 is used to fix the second interface assembly 32, the first limit sensor 24 is set at the first position, and the second limit sensor 25 is set at the second position. The driving assembly 22 is used to drive the moving platform 23 to move between the first position and the second position, so that the first interface assembly 31 and the second interface assembly 32 can be docked or separated with each other.

[0046] The docking means that the first interface component 31 and the second interface component 32 are plugged into each other to complete the physical connection. The separation means that the first interface component 31 and the second interface component 32 are separated from each other and have no physical connection.

[0047] With the above structure, when the moving platform 23 moves between the first position and the second position, the first interface component 31 can be driven to approach or move away from the second interface component 32, thereby making the first interface component 31 and the second interface component 32 dock or separate with each other. Figure 1 As shown in the example, the mobile station 23 is in the first position, the first interface component 31 is separated from the second interface component 32, and the mobile station 23 is in the second position, the first interface component 31 is docked with the second interface component 32. In other embodiments, depending on the position of the fixed station 26, the mobile station 23 may be in the second position, the first interface component 31 is separated from the second interface component 32, and the mobile station 23 may be in the first position, the first interface component 31 is docked with the second interface component 32, which is not limited here.

[0048] The first limit sensor 24 and the second limit sensor 25 can be limit switches, which are used to trigger an in-position signal when the mobile platform 23 reaches a specific position or a position range. During the process of docking and separating the interface components, the first limit sensor 24 and the second limit sensor 25 perform position detection to determine whether the mobile platform 23 has moved to the position. When the mobile platform 23 has moved to the position, it can be confirmed that the docking or separation of the interface components is currently completed.

[0049] In some embodiments, the controller 21 is implemented using an STM32 single-chip microcomputer. In this embodiment, the controller 21 uses UART (Universal Asynchronous Receiver / Transmitter) to communicate with external devices. UART has two data lines for sending and receiving, which do not interfere with each other and belong to a full-duplex communication mode. The driving modes of different single-chip microcomputers may be different. In practical applications, the format of data sent and received can be customized, and verification methods such as checksum and CRC verification can be added to avoid data errors.

[0050] In some embodiments, the plug-in device includes a base, on which is provided a slide rail that cooperates with the movable platform 23. The drive assembly 22 includes a motor 221 and a screw rod 222. The motor 221 is fixed on the base, and one end of the screw rod 222 is connected to the output shaft of the motor 221. The movable platform 23 is provided with a through hole. The screw rod 222 is a threaded screw rod 222. The screw rod 222 passes through the through hole and cooperates with the thread of the through hole. The motor 221 drives the movable platform 23 to move on the slide rail through the screw rod 222, thereby realizing driving the movable platform 23 to move between the first position and the second position.

[0051] In some embodiments, the fixed platform 26 is disposed on the base and is disposed at one end of the screw rod 222 opposite to the motor 221. The mobile platform 23 is used to fix the first interface component 31, and the fixed platform 26 is used to fix the second interface component 32. In some implementations, when the output shaft of the motor 221 rotates forward, the screw rod 222 drives the mobile platform 23 to move toward the fixed platform 26, and when the mobile platform 23 reaches the second position, the first interface component 31 and the second interface component 32 are docked, and when the output shaft of the motor 221 is reversed, the screw rod 222 drives the mobile platform 23 to move away from the fixed platform 26, and when the mobile platform 23 reaches the first position, the first interface component 31 and the second interface component 32 are separated. It should be noted that the plug-in action can also be set when the output shaft of the motor 221 is reversed, and the separation action can be achieved when the output shaft of the motor 221 rotates forward, which is not limited here.

[0052] In some embodiments, one of the first interface component 31 and the second interface component 32 is an interface component of a device under test, and the other of the first interface component 31 and the second interface component 32 is a test interface, or the first interface component 31 and the second interface component 32 are interface components on different devices under test. Thus, the plugging and unplugging device can automatically perform plugging and unplugging operations between interface components, provide a physical connection for implementing a test, or perform a plugging and unplugging test.

[0053] The controller 21 is configured to execute a control method for realizing automatic plugging and unplugging. For details, see the following description of a control method for performing interface plugging and unplugging.

[0054] Figure 2 FIG. 1 is a flow chart of a control method for performing interface plugging and unplugging according to an embodiment. Figure 2 As shown, the control method for interface plugging and unplugging of this embodiment is applied to Figure 1 The controller 21 of the plug-in device shown includes:

[0055] S1, obtaining a plug-in control instruction, wherein the plug-in control instruction includes a docking instruction or a separation instruction;

[0056] S2, determining a target position of the mobile station according to the plug-in control instruction, and a target limit sensor corresponding to the target position, wherein the target position includes a first position or a second position, and the target limit sensor includes a first limit sensor or a second limit sensor;

[0057] S3, judging whether the conditions for executing the plug-in control instruction are met at present according to the data of the target limit sensor;

[0058] S4, in response to the current condition of executing the plug-in control instruction being met, controlling the driving component to drive the mobile platform to move toward the target position;

[0059] S5, in response to the target limit sensor triggering the arrival signal, controlling the drive component to stop working and generating a feedback signal of completing the plugging and unplugging control instruction.

[0060] Among them, the docking instruction is an instruction used to instruct the controller to control the driving component to drive the mobile platform to dock the first interface component with the second interface component, and the separation instruction is an instruction used to instruct the controller to control the driving component to drive the mobile platform to separate the first interface component from the second interface component.

[0061] The target limit sensor is a limit sensor used to detect whether the mobile station has reached the target position. Depending on the plug-in control instruction, the target position and the target limit sensor are different. Take the case where the mobile station is in the first position, the first interface component is separated from the second interface component, and the mobile station is in the second position, and the first interface component is docked with the second interface component as an example. At this time, if the plug-in control instruction is a docking instruction, the target position is the second position, and if the plug-in control instruction is a separation instruction, the target position is the first position. When the target position is the second position, the corresponding target limit sensor is the second limit sensor at the second position, and when the target position is the first position, the corresponding target limit sensor is the first limit sensor at the first position.

[0062] The conditions for executing the plug-in control command are used to analyze the status of the plug-in device to ensure that the plug-in control command is correctly executed. Before the control drive component drives the mobile station, it is first determined whether the current conditions for executing the plug-in control command are met based on the data of the target limit sensor, which can ensure that the plug-in control command is correctly executed and avoid damage to the interface component or incorrect execution of the control command due to the target limit sensor being triggered incorrectly.

[0063] In some embodiments, judging whether the condition for executing the plug-in control instruction is met according to the data of the target limit sensor includes:

[0064] If the target limit sensor triggers an in-place signal, the conditions for executing the plug-in and pull-out control instructions are not met at present;

[0065] If the target limit sensor does not trigger the arrival signal, the conditions for executing the plug-in control command are currently met.

[0066] The data of the target limit sensor includes the arrival signal triggered by the target limit sensor, and the conditions for executing the plug-in control instruction include:

[0067] The target limit sensor is in the state of not triggering the in-position signal.

[0068] Since the in-position signal of the target limit sensor is triggered when the mobile platform moves to the specified position, before executing the plug-in control instruction, the target limit sensor should be in a state where the in-position signal is not triggered to indicate that the state of the plug-in device meets the conditions for executing the plug-in control instruction.

[0069] The status of the plug-in and unplug device includes the position of the mobile station and the working status of the target limit sensor. When the target limit sensor does not trigger the arrival signal, it can indicate that the target limit sensor is in a normal working state (for example, there is no foreign matter in the detection range that affects the detection of the target limit sensor), or it can indicate that the mobile station is not currently in the target position (that is, when docking is required, the interface components are not in a docking state, and when separation is required, the interface components are not in a separation state). At this time, the conditions for executing the plug-in control instruction are met.

[0070] When the target limit sensor triggers an in-position signal, it indicates that the target limit sensor is in an abnormal working state (for example, there are foreign objects in the detection range that affect the detection of the target limit sensor), or it indicates that the mobile station is currently in the target position (that is, when docking is required, the interface components are in a docking state, and when separation is required, the interface components are in a separation state). At this time, the conditions for executing the plug-in control instruction are not met.

[0071] In some embodiments, the method further comprises:

[0072] In response to the current condition of not meeting the execution condition of the plug-in control instruction, the plug-in control instruction is not executed, and an abnormal feedback signal is generated.

[0073] Among them, when the conditions for executing the plug-in control instruction are not met at present, it indicates that the target limit sensor is in an abnormal working state, or that the mobile station is currently at the target position. At this time, if the plug-in control instruction is executed, it may cause the controller to receive an erroneous arrival signal and fail to control the mobile station to move, resulting in an error in the execution of the instruction, or continue to move when the mobile station is at the target position, resulting in damage to the interface component or equipment. Therefore, when the conditions for executing the plug-in control instruction are not met at present, the plug-in control instruction is not executed, and an abnormal feedback signal is generated for prompting.

[0074] The technical solution of this application has the following beneficial effects:

[0075] 1. Automatic control of interface plugging and unplugging is realized based on plug-in equipment, which improves test efficiency, reduces test time constraints, reduces the investment of related resources, and reduces test costs;

[0076] 2. Automatic plugging and unplugging of interface components is realized based on the judgment of execution conditions, which improves the accuracy and safety of the test;

[0077] 3. Automated plug-in and pull-out control can be more conducive to the standardization of plug-in and pull-out operations, improve the accuracy of related tests (such as plug-in and pull-out pressure tests), and reduce the impact of human subjective consciousness and operations on test results.

[0078] Figure 3 FIG. 1 is a schematic diagram of the structure of a test system provided according to an embodiment. Figure 3 As shown, the test system includes a host computer 51 and a plug-in device. The host computer 51 is connected to the controller 21. The structure of the plug-in device is detailed in Figure 1 The host computer 51 is configured to:

[0079] Send plug-in and plug-out control instructions to the controller;

[0080] The receiving controller sends a feedback signal indicating that the plug-in and pull-out control instructions have been completed.

[0081] The plug-in and pull-out control instruction may be a single plug-in and pull-out control instruction or a multiple plug-in and pull-out control instruction.

[0082] In some embodiments, sending the plug-in control instruction to the controller includes:

[0083] Within a preset time period, a preset number of plug-in and plug-out control instructions are sent at preset time intervals.

[0084] When performing the plugging and unplugging stress test, a preset number of plugging and unplugging control instructions may be sent at preset time intervals within a preset duration, for example, a plugging and unplugging control instruction may be sent every 20 seconds within one minute.

[0085] In some embodiments, please refer to Figure 3 The test system also includes an image acquisition device 52, which is connected to the host computer 51. One of the first interface component and the second interface component is an interface component of the device under test, and the other of the first interface component and the second interface component is connected to the host computer 51.

[0086] The display module of the device under test is located within the acquisition range of the image acquisition device 52 , and the image acquisition device 52 can acquire the image of the interface displayed in the display module.

[0087] In some embodiments, the host computer 51 is further configured to:

[0088] When the plug-in control instruction is a docking instruction, the image acquisition device is controlled to acquire an interface image of the device under test;

[0089] Judging whether the device under test successfully recognizes the inserted interface component according to the interface image;

[0090] If yes, it confirms that the communication connection with the device under test is successfully established.

[0091] Among them, after receiving the feedback signal of completing the plug-in control instruction sent by the controller 21, if the plug-in control instruction is a docking instruction, it is necessary to further confirm whether the host computer 51 has successfully established a communication connection with the device under test. When the first interface component and the second interface component complete the physical connection and the host computer 51 successfully establishes a communication connection with the device under test, it indicates that this docking is successful.

[0092] After the first interface component and the second interface component are docked, the device under test identifies the external device and the display interface changes accordingly, such as displaying a test interface, or displaying a prompt box indicating a successful or failed connection. Therefore, it can be determined based on the interface image whether the device under test successfully identifies the inserted interface component.

[0093] In some embodiments, the host computer 51 is further configured to:

[0094] Extracting display features of prompt recognition results in the interface image;

[0095] Determine whether the device under test successfully identifies the inserted interface component based on the displayed characteristics.

[0096] Among them, when the interface of the device under test changes, such as displaying a test interface, or displaying a prompt box indicating a successful or failed connection, the test interface or prompt box is a display feature that prompts the recognition result. By extracting and recognizing features of the image, it can be determined whether the device under test successfully recognizes the inserted interface component. In this way, after the interface component is docked in place, it can automatically determine whether a communication connection is successfully established with the device under test based on image recognition, further improving the test efficiency. At the same time, through image recognition, a quantitative analysis can be performed on the results of whether the device under test successfully recognizes the external device, thereby improving the accuracy of the test.

[0097] Figure 4 FIG. 1 is a flow chart of a testing method according to an embodiment. Figure 4 As shown, the test method of this embodiment is applied to Figure 3 The host computer 51 in the method includes:

[0098] S10, sending a plug-in control instruction to the controller;

[0099] S20, receiving a feedback signal sent by the controller indicating completion of the plugging and unplugging control instruction.

[0100] In some embodiments, the test system further includes an image acquisition device, the image acquisition device is connected to a host computer, one of the first interface component and the second interface component is an interface component of the device under test, the other of the first interface component and the second interface component is connected to the host computer, and after receiving a feedback signal from the controller to complete the plug-in control instruction, the method further includes:

[0101] When the plug-in control instruction is a docking instruction, the image acquisition device is controlled to acquire an interface image of the device under test;

[0102] Judging whether the device under test successfully recognizes the inserted interface component according to the interface image;

[0103] If yes, it confirms that the communication connection with the device under test is successfully established.

[0104] In some embodiments, judging whether the device under test successfully recognizes the inserted interface component according to the interface image includes:

[0105] Extracting display features of prompt recognition results in the interface image;

[0106] Determine whether the device under test successfully identifies the inserted interface component based on the displayed characteristics.

[0107] The steps of the above test method are detailed in the description of the test system embodiment and will not be repeated here.

[0108] The present application also provides an electronic device, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the steps of any of the above methods when executed by the processor.

[0109] The present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above methods are implemented.

[0110] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A control method for plugging and unplugging an interface, characterized in that: A controller applied to a plug-in device, the plug-in device further comprising a driving component, a moving platform, a first limit sensor, a second limit sensor and a fixed platform, the driving component, the first limit sensor and the second limit sensor are respectively connected to the controller, the moving platform is used to fix the first interface component, the fixed platform is used to fix the second interface component, the first limit sensor is set at a first position, the second limit sensor is set at a second position, the driving component is used to drive the moving platform to move between the first position and the second position, so that the first interface component and the second interface component can be docked or separated with each other, and the method comprises: Obtaining a plug-in control instruction, wherein the plug-in control instruction includes a docking instruction or a separation instruction; Determine a target position of the mobile platform according to the plug-in control instruction, and a target limit sensor corresponding to the target position, wherein the target position includes the first position or the second position, and the target limit sensor includes the first limit sensor or the second limit sensor; Determining whether the condition for executing the plug-in control instruction is currently met according to the data of the target limit sensor; In response to the current condition that the plug-in control instruction is executed, controlling the driving component to drive the moving platform to move toward the target position; In response to the target limit sensor triggering an arrival signal, the drive component is controlled to stop working, and a feedback signal for completing the plugging and unplugging control instruction is generated.

2. The method according to claim 1, characterized in that The determining, based on the data of the target limit sensor, whether the condition for executing the plugging and unplugging control instruction is currently met includes: If the target limit sensor triggers an arrival signal, the condition for executing the plug-in control instruction is not met at present; If the target limit sensor does not trigger an arrival signal, the condition for executing the plug-in control instruction is currently met.

3. The method according to any one of claims 1 to 2, characterized in that The method further comprises: In response to the condition for executing the plug-in control instruction not being met at present, the plug-in control instruction is not executed, and an abnormal feedback signal is generated.

4. A testing method, characterized in that: A host computer applied to a test system, the test system also includes a plug-in device, the plug-in device includes a controller, a drive component, a mobile platform, a first limit sensor, a second limit sensor and a fixed platform, the drive component, the first limit sensor, and the second limit sensor are respectively connected to the controller, the controller is connected to the host computer, the mobile platform is used to fix the first interface component, the fixed platform is used to fix the second interface component, the first limit sensor is set at a first position, the second limit sensor is set at a second position, the drive component is used to drive the mobile platform to move between the first position and the second position, so that the first interface component and the second interface component can be docked or separated with each other, and the test method includes: Sending a plug-in control instruction to the controller so that the controller executes the control method according to any one of claims 1 to 3; Receive a feedback signal sent by the controller to complete the plug-in control instruction.

5. The method according to claim 4, characterized in that The test system further includes an image acquisition device, the image acquisition device is connected to the host computer, one of the first interface component and the second interface component is an interface component of the device under test, and the other of the first interface component and the second interface component is connected to the host computer. After receiving the feedback signal sent by the controller to complete the plug-in control instruction, the method further includes: When the plug-in control instruction is a docking instruction, controlling the image acquisition device to acquire an interface image of the device under test; Determining whether the device under test successfully recognizes the inserted interface component according to the interface image; If yes, it is confirmed that a communication connection is successfully established with the device under test.

6. The method according to claim 5, characterized in that The step of judging whether the device under test successfully identifies the inserted interface component according to the interface image includes: Extracting display features of the prompt recognition result in the interface image; It is determined whether the device under test successfully identifies the inserted interface component according to the display characteristics.

7. A plug-in device, characterized in that: It includes a controller, a driving component, a moving platform, a first limit sensor, a second limit sensor and a fixed platform; The driving assembly, the first limit sensor, and the second limit sensor are respectively connected to the controller; The mobile platform is used to fix the first interface component, the fixed platform is used to fix the second interface component, the first limit sensor is set at a first position, the second limit sensor is set at a second position, and the driving component is used to drive the mobile platform to move between the first position and the second position, so that the first interface component and the second interface component can be docked or separated with each other; The controller is configured to perform the steps of the method according to any one of claims 1 to 3.

8. A testing system, characterized in that: It comprises a host computer and the plug-in device as claimed in claim 7, wherein the host computer is configured to execute the steps of the method as claimed in claim 4.

9. The system according to claim 8, characterized in that It also includes an image acquisition device, which is connected to the host computer, one of the first interface component and the second interface component is an interface component of a device under test, and the other of the first interface component and the second interface component is connected to the host computer, and the host computer is also configured to execute the steps of the method described in claim 5 or 6.

10. An electronic device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the steps of the method according to any one of claims 1 to 6 when executed by the processor.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.