Data interface detection method, device and system, program product and electronic equipment

Through the direct connection between the portable detection device and the device to be tested, read and write operations are performed, and the availability of the data interface is automatically detected, and the problems of low manual detection efficiency and poor accuracy in the prior art are solved, and a fast and accurate data interface is realized. Test.

CN119226055APending Publication Date: 2024-12-31转转一零二四(北京)科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411178576.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-26
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

The existing data interface detection method relies on manual operation, which is inefficient and cannot guarantee accuracy, resulting in poor time and accuracy.

Method used

An automated data interface detection method is provided, through the direct connection between the portable detection device and the device to be tested, read and write operations are performed, and detection information is generated to characterize the availability of the data interface without human participation.

Benefits of technology

It realizes fast and accurate data interface detection, saves labor costs and reduces the impact of detection results by human factors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119226055A_ABST
    Figure CN119226055A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a data interface detection method, device and system, a program product and electronic equipment. The detection method is applied to a to-be-detected device with a data interface, a detection program is pre-installed in the to-be-detected device, and the detection method comprises the steps that under the condition that the detection program detects that a portable detection device establishes connection with the to-be-detected device through the data interface, a detection task is executed; the detection task comprises read operation and / or write operation; wherein the reading operation comprises the following steps of: reading data stored in the portable detection equipment through the data interface; the write operation comprises the steps of writing data into the portable detection equipment through the data interface; the detection program generates detection information according to the operation result of the read operation and / or the operation result of the write operation, and the detection information is used for representing the availability of the data interface. The method and the device are used for solving the problems of long time consumption, low efficiency and poor accuracy when the data interface of the electronic equipment is detected manually in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data interface detection, and in particular to a data interface detection method, device, system, program product and electronic equipment. Background Art

[0002] When performing quality inspection on electronic devices (eg, mobile phones, tablets, etc.), it is necessary to test the data interface of the electronic device to determine whether the function of the data interface is normal.

[0003] The existing data interface detection method is: manually connect the electronic device to be tested to the computer through a data connection line, then install the corresponding driver on the computer, and then operate the computer to read and write the storage space of the electronic device to be tested to determine whether the data interface of the current electronic device is functioning normally.

[0004] This detection method not only wastes manpower and has low detection efficiency, but also the accuracy of the test results cannot be guaranteed. Summary of the invention

[0005] The embodiments of the present invention provide a data interface detection method, device, system, program product and electronic device, which are used to solve the problems of long time consumption, low efficiency and poor accuracy in the prior art when manually detecting the data interface of the electronic device, and realize automatic, fast and accurate detection of the data interface of the electronic device.

[0006] In a first aspect, an embodiment of the present invention provides a method for detecting a data interface, which is applied to a device under test having a data interface, wherein a detection program is pre-installed in the device under test, and the method comprises:

[0007] The detection program executes a detection task when it detects that the portable detection device establishes a connection with the device to be tested through the data interface; the detection task includes a read operation and / or a write operation; wherein the read operation includes: reading data stored in the portable detection device through the data interface; the write operation includes: writing data to the portable detection device through the data interface;

[0008] The detection program generates detection information according to the operation result of the read operation and / or the operation result of the write operation, and the detection information is used to characterize the availability of the data interface.

[0009] In a second aspect, an embodiment of the present invention provides a data interface detection device for detecting a device under test having a data interface, the device comprising:

[0010] A detection module, configured to execute a detection task when it is detected that the portable detection device establishes a connection with the device to be tested via the data interface; the detection task includes a read operation and / or a write operation; wherein the read operation includes: reading data stored in the portable detection device via the data interface; the write operation includes: writing data to the portable detection device via the data interface;

[0011] The detection result generating module is used to generate detection information according to the operation result of the read operation and / or the operation result of the write operation, wherein the detection information is used to characterize the availability of the data interface.

[0012] In a third aspect, an embodiment of the present invention provides a data interface detection system, the system comprising: a control device, a device to be tested with a detection program pre-installed therein, and a portable detection device, the device to be tested comprising: a data interface, the data interface being used to connect the portable detection device;

[0013] The control device is used to connect the device to be tested and the portable detection device through the data interface;

[0014] The device under test is used to perform a detection task through the detection program when the detection program detects that the portable detection device has established a connection with the device under test through the data interface, and to generate detection information according to the detection result;

[0015] Wherein, the detection task includes a read operation and / or a write operation; wherein, the read operation includes: reading data stored in the portable detection device through the data interface; the write operation includes: writing data to the portable detection device through the data interface; the detection result includes the operation result of the read operation and / or the operation result of the write operation; the detection information is used to characterize the availability of the data interface.

[0016] In a fourth aspect, an embodiment of the present invention provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the steps of the data interface detection method.

[0017] In a fifth aspect, an embodiment of the present invention provides an electronic device, comprising a memory and a processor; the memory is connected to the processor and is used to store programs; the processor is used to implement the data interface detection method by running the program in the memory.

[0018] In a sixth aspect, an embodiment of the present invention provides a non-transitory computer-readable storage medium having a computer program stored thereon, which implements the steps of the data interface detection method when the computer program is executed by a processor.

[0019] In the technical solution provided by the embodiment of the present invention, the device under test can automatically write data to the portable detection device, read data from the portable detection device, and obtain the detection result of the data interface according to the data writing result and the data reading result. The device under test can automatically complete the detection of the data interface without human participation, saving labor costs, and because the detection process is automatically performed by the device under test according to the set logic and is not affected by human factors, the purpose of fast and accurate data interface detection can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0021] Figure 1 is a flow chart of a method for detecting a data interface provided by an embodiment of the present invention;

[0022] Figure 2 is a block diagram of a data interface detection system provided by an embodiment of the present invention;

[0023] Figure 3 It is a schematic diagram of the interaction between different devices in the detection system of the data interface provided by the embodiment of the present invention;

[0024] Figure 4 is a block diagram of a data interface detection device provided by an embodiment of the present invention;

[0025] Figure 5 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0026] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0027] Taking second-hand mobile phones as an example, when conducting quality inspection on second-hand mobile phones, it is necessary to test the data interface of the mobile phone. Specifically, for example, it is necessary to test the Universal Serial Bus (USB) interface to determine whether the data interface is functioning normally, and then display the data interface status of the current mobile phone to the buyer in the quality inspection report.

[0028] In the prior art, a mobile phone is generally connected to a computer using a data connection cable, and then a corresponding driver is installed on the computer. The storage space of the mobile phone is manually read and written through the computer to determine whether the data interface of the current mobile phone is normal.

[0029] The existing detection process needs to be completed manually. The operator not only needs to operate the computer, but also needs to operate the mobile phone, which has low overall efficiency. In addition, different operators have different detection capabilities, and the detection results are easily affected by human factors.

[0030] It is understandable that in addition to mobile phones, electronic devices with data interfaces, such as tablet computers, laptop computers, and desktop computers, have similar data interface detection processes and all have the aforementioned problems.

[0031] In order to solve the above problem, an embodiment of the present invention provides a method for detecting a data interface. The method is applied to a device to be tested having a data interface.

[0032] Among them, a detection program is pre-installed in the device to be tested, and the detection program is used to realize automatic detection of the data interface. Generally, the program in the electronic device is adapted to the operating system, so the detection program can be matched with the operating system installed in the device to be tested. For example, if the operating system installed in the device to be tested is an Android system, then the detection program can be adapted to the Android system. Compared with the existing detection method that requires different drivers to be installed in the computer for different device manufacturers, the software resource cost required by the embodiment of the present invention is lower.

[0033] The data interface of the device under test may include but is not limited to: a Micro USB-B interface, a USB Type-C interface, a Lightning interface, etc.

[0034] The Micro USB-B interface is a common standard USB interface used for charging, data transmission, and connecting external devices, such as computers, keyboards, and mice.

[0035] The USB Type-C interface is a new generation of USB interface with a reversible plug that can be used for charging, data transmission and connecting various external devices, while supporting high-speed data transmission and video output.

[0036] The Lightning interface is used for charging and data transmission, and supports digital signal output functions such as video and audio.

[0037] It is understandable that the types of data interfaces on the device under test are not limited to the above types, and in addition to being a USB interface, it can also be a serial interface, a parallel interface, an Ethernet interface, an optical interface, etc.

[0038] The detection method is described in detail below through some embodiments. The following embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0039] like Figure 1 As shown, the detection method may include step 101 and step 102, as described below:

[0040] Step 101 : When the detection program detects that the portable detection device has established a connection with the device to be tested via a data interface, the detection task is executed.

[0041] The detection task described here may include at least one of the following: a read operation and a write operation. Among them, the read operation may include: reading data stored in the portable detection device through the data interface; the write operation may include: writing data to the portable detection device through the data interface. In the embodiment of the present application, data can be written to and / or read from the portable inspection device through the data interface to detect the data interface.

[0042] The portable detection device described herein supports direct connection with the data interface of the device to be detected without the intervention of a host computer. Therefore, the embodiment of the present invention does not require the use of a computer device.

[0043] Optionally, when the data interface is a USB interface, the portable detection device may be a device based on On-The-Go (OTG) technology in electronic device data interaction technology, which is referred to as an OTG device in the embodiment of the present invention.

[0044] OTG is a special USB standard and specification used to support direct connection between USB devices. The OTG device obtained through OTG technology is also a USB device. Under the action of OTG technology, the OTG device can be directly connected to the device under test through the USB interface without connecting the two to a computer or other USB host to achieve the connection between the two.

[0045] In addition, OTG technology allows devices to switch roles between master and slave, that is, they can act as a USB host or slave when needed, which enables connected devices to exchange data with each other without being restricted by fixed master and slave roles.

[0046] Among them, the portable detection device can establish a communication connection with the device under test based on a preset protocol, and set the device under test as a communication host, so that the device under test can establish a communication connection with the portable detection device in response to the data interface, so that the device under test can perform data reading and writing operations on the portable detection device.

[0047] When the data interface is a USB interface, the preset protocol may be a USB protocol, which may include USB 2.0, USB 3.0, USB 3.1, USB 4.0, and the like.

[0048] USB2.0 is a common communication protocol used to connect mobile phones to computers, external storage devices, keyboards, mice, printers and other external devices for data transmission and control. Example devices: Most mobile phones support USB2.0 for communication with computers, data transmission and charging, etc.

[0049] USB 3.0 and USB 3.1 are upgraded versions of USB 2.0, providing higher data transfer speeds and more features. Example devices: Some high-end mobile phones and external hard drives support USB 3.0 or USB 3.1 for faster data transfer.

[0050] USB 4.0 provides higher data transfer speeds than previous USB standards. USB 4.0 supports high-power charging, which can charge mobile devices faster. It also supports bidirectional power transmission, allowing devices to exchange power when needed. USB 4.0 is a versatile communication protocol suitable for a variety of device types and uses, providing high-performance data transfer and multi-device connection capabilities.

[0051] It is understandable that when the data interface type is different, the corresponding preset protocol is also different. For example, when the data interface is a serial interface, the corresponding preset protocol may be a serial communication protocol, such as RS-232. It is also understandable that when the data interface type is different, the corresponding type of portable detection equipment may also be different, and the specific selection can be based on actual needs.

[0052] Step 102: The detection program generates detection information according to the operation result of the read operation and / or the operation result of the write operation.

[0053] The detection information is used to characterize the availability of the data interface. The availability of the data interface includes: the data interface is available and the data interface is unavailable.

[0054] For example, it is known that the data to be written into the portable detection device (hereinafter referred to as the true value of the written data) is written into the portable detection device through the data interface. If it is found that the actually written data is inconsistent with the true value of the written data, such as a portion of the data is lost, it can be determined that there is a problem with the data interface, and detection information indicating that the data interface is unavailable can be generated. Optionally, the portable detection device can include a screen, through which the actually written data can be observed.

[0055] For another example, the data to be read from the portable detection device (hereinafter referred to as the read data true value) is known. After reading the data from the portable detection device through the data interface, it is found that the actually read data is inconsistent with the read data true value, such as a part of the data is lost. Therefore, it can be determined that there is a problem with the data interface, and detection information indicating that the data interface is unavailable can be generated. Optionally, the actually read data can be observed through the screen of the device under test itself or an external screen.

[0056] For the above two examples, if the data actually written is consistent with the true value of the written data, and the data actually read is consistent with the true value of the read data, it means that there is no problem with the data interface, and detection information indicating that the data interface is available can be generated.

[0057] In the data interface detection method provided by the embodiment of the present invention, the device to be tested can automatically write data to the portable detection device and / or automatically read data from the portable detection device through the detection program, and obtain the detection result of the data interface according to the data writing result and / or the data reading result. It can be seen that the detection process does not require human participation, saving labor costs, and therefore, the inspection process is not affected by human factors, thereby achieving the purpose of fast and accurate data interface detection.

[0058] In an optional embodiment, before step 101, the method may further include:

[0059] The detection program determines, based on pre-configured protocol parameters, that the device to be tested and the portable detection device establish a physical connection via a data interface; and establishes a communication connection between the data interface and the portable detection device.

[0060] The protocol parameters are used to realize the connection between the device to be tested and the portable detection device, and the protocol parameters may include: interface category information. Optionally, the protocol parameters may be pre-configured based on the detection program.

[0061] When the detection program obtains the information for characterizing the interface category, it determines that the device to be tested and the portable detection device have established a physical connection through the data interface. After that, a communication connection between the data interface and the portable detection device can be further established.

[0062] Among them, the portable detection device is provided with a data interface which can be directly plugged into the data interface of the device to be tested, thereby eliminating the need for a data connection line.

[0063] Optionally, when the detection program detects that the device to be tested and the portable detection device cannot establish a communication connection through the data interface, the detection program generates detection information for indicating that the data interface is unavailable.

[0064] In the embodiment of the present invention, the availability of the data interface can be preliminarily determined based on whether the device under test and the portable detection device can establish a communication connection. If the two can establish a communication connection, the availability of the data interface can be further verified by performing a read operation and / or a write operation; if the two cannot establish a communication connection, it can be determined that the data interface is unavailable, which can improve the detection efficiency of the data interface.

[0065] In an optional embodiment, the detection task includes a write operation and a read operation.

[0066] The write operation in the detection task specifically includes: writing pre-stored data into the portable detection device through the data interface.

[0067] The read operation in the detection task specifically includes: reading the data written into the portable detection device through the data interface.

[0068] In the embodiment of the present invention, the availability of the data interface is determined by sequentially executing a write operation and a read operation, and reading data based on the data written by the write operation.

[0069] Accordingly, step 102: the detection program generates detection information according to the operation result of the read operation and / or the operation result of the write operation, which may include:

[0070] Compare whether the data written by the write operation is the same as the data read by the read operation; if they are the same, generate detection information for indicating that the data interface is available; if they are not the same, generate detection information for indicating that the data interface is unavailable.

[0071] In an embodiment of the present invention, the availability of the data interface is determined by reading data written to a convenient detection device and comparing whether the written data and the read data are identical; if they are different, it indicates that there is a problem with the data interface, and detection information is generated to characterize that the data interface is unavailable; if they are the same, it indicates that there is no problem with the data interface, and detection information is generated to characterize that the data interface is available.

[0072] Optionally, the write operation in the detection task may be further specific: based on the storage directory of the portable detection device, writing data to the portable detection device through the data interface; the read operation in the detection task may also specifically include: reading the storage directory of the portable detection device through the data interface, determining the storage location of the written data, and reading the written data at the storage location.

[0073] The storage directory mentioned here may refer to the location of each folder in the portable detection device.

[0074] Optionally, a target storage path may be predetermined based on a storage directory of the portable detection device, and data may be written into the portable detection device through a data interface based on the target storage path.

[0075] Optionally, a storage path can be randomly determined based on the storage directory of the portable detection device, and data can be written to the portable detection device through the data interface based on the random storage path. At this time, the random storage path needs to be recorded to provide a data reading basis for subsequent read operations.

[0076] In summary, the data interface detection method provided by the embodiment of the present invention can automatically complete the detection of the data interface, improve the detection efficiency on the basis of saving labor costs, and solve the problem of uncertainty in the detection results caused by human factors. In addition, the detection program used to realize automatic detection can be adapted to the operating system of the device to be tested, and there is no need to develop different detection programs for different equipment manufacturers. Compared with the detection method of the prior art that requires different drivers to be installed in the computer for different equipment manufacturers, the software resource cost required by the embodiment of the present invention is relatively low. In addition, the device to be tested can be directly connected to the portable detection device without the need for data connection lines, computers and other equipment, saving hardware implementation costs.

[0077] The embodiment of the present invention further provides a data interface detection system. The data interface detection system described below and the data interface detection method described above may refer to each other, and the repeated parts may not be repeated.

[0078] like Figure 2 As shown, the detection system may include: a control device 201 , a device to be tested 202 and a portable detection device 203 .

[0079] The device to be tested 202 includes a data interface, which is used to connect to the portable detection device 203. A detection program is also pre-installed in the device to be tested, and the detection program is used to realize automatic detection of the data interface. The detection program can be matched with the operating system installed in the device to be tested. For example, if the operating system installed in the device to be tested is an Android system, the detection program is adapted to the Android system. Compared with the need to install different drivers for different device manufacturers in the prior art detection method, the software resources required by the embodiment of the present invention are relatively simple.

[0080] The control device 201 can be used to connect the device to be tested 202 and the portable detection device 203 via a data interface.

[0081] The device under test 202 can be used to execute a detection task through the detection program when it is detected through the detection program that the portable detection device 203 establishes a connection with the device under test 202 through the data interface, and generate detection information according to the detection result.

[0082] The detection task here may include a read operation and / or a write operation. The read operation may include: reading data stored in the portable detection device through a data interface; the write operation may include: writing data to the portable detection device through a data interface; and the detection result includes the operation result of the read operation and / or the operation result of the write operation.

[0083] The detection information described here is used to characterize the availability of the data interface.

[0084] Specifically, the control device 201 can perform an initialization operation after being powered on, and the initialization operation specifically includes: obtaining a configuration file, and performing an initialization operation based on the configuration file. The configuration file is used to represent the operation flow of the control device during the data interface detection process.

[0085] In the data interface detection system provided by the embodiment of the present invention, the control device 201 can automatically connect the device to be tested with the portable detection device 203. After the two devices are connected, the device to be tested 202 can establish a connection with the portable detection device 203 through the data interface, and perform a read operation and / or a write operation on the portable detection device 203 through the data interface, and determine the availability of the data interface according to the operation result of the read operation and / or the operation result of the write operation. The entire detection process is fully automated, without human participation, saving labor costs, and because the inspection process is not affected by human factors, but the device to be tested is automatically detected according to the set logic, the purpose of fast and accurate data interface detection can be achieved.

[0086] In an optional embodiment, the control device 201 may include: a conveying structure and a robotic arm.

[0087] The conveying structure can be used to transport the device to be tested 202 to the position to be tested; the mechanical arm can be used to grab the device to be tested 202 from the position to be tested, and connect the device to be tested 202 and the portable testing device 203 through a data interface.

[0088] The position to be detected is determined in advance.

[0089] Specifically, the transmission operation of the transmission structure and the docking operation of the robot arm are both determined based on the operation process configured in the above initialization.

[0090] Specifically, the transmission structure transfers the device to be tested 202 to the position to be tested to facilitate the grabbing of the robot arm; the robot arm grabs the device to be tested 202 from the position to be tested, and inserts the portable detection device 203 into the data interface of the device to be tested 202. Optionally, the portable detection device 203 is provided with a data interface that can be directly plugged into the data interface of the device to be tested 202, eliminating the use of a data connection line.

[0091] It can be understood that the control device 201 may include not only the conveying structure and the robotic arm, but also a main control device for controlling the conveying structure and the robotic arm.

[0092] In an optional embodiment, the read operation may specifically include: reading data written into the portable detection device through the data interface.

[0093] The detection program in the device under test 202 can compare whether the data written by the write operation is the same as the data read by the read operation; and if they are the same, generate detection information for indicating that the data interface is available; or if they are not the same, generate detection information for indicating that the data interface is unavailable.

[0094] Optionally, the write operation may specifically include: writing data into the portable detection device through a data interface based on a storage directory of the portable detection device.

[0095] The read operation may specifically include: reading a storage directory of the portable detection device through a data interface, determining a storage location of the written data, and reading the written data at the storage location.

[0096] In an optional embodiment, the detection program in the device under test 202 can also determine, based on pre-configured protocol parameters, that the device under test and the portable detection device establish a physical connection through a data interface; and when it is determined that a physical connection is established, establish a communication connection between the data interface and the portable detection device.

[0097] Below through Figure 3 The detection process of the data interface is exemplified.

[0098] The detection process illustrated in this embodiment is implemented by interaction between the control device 201, the portable detection device 203 and the device to be tested 202 (corresponding to the detection program installed in the device to be tested 202):

[0099] S301, the control device 201 controls the conveying structure to convey the device to be tested 202 to a position to be tested.

[0100] S302 , the control device 201 controls the mechanical arm to automatically insert the portable detection device 203 into the data interface of the device under test 202 .

[0101] S303, the device under test 202 configures protocol parameters.

[0102] S304 , the device under test 202 senses the insertion of the portable detection device 203 , and establishes a communication connection with the portable detection device 203 .

[0103] S305 , the device under test 202 reads the storage directory of the portable detection device 203 .

[0104] S306 , the device under test 202 writes data to the portable detection device 203 based on the read storage directory.

[0105] S307 , the device under test 202 reads data from the portable detection device 203 .

[0106] S308 , the device under test 202 generates detection information based on the consistency of the written data and the read data.

[0107] S309 , the device under test 202 generates an instruction for verifying that the portable detection device 203 is unplugged.

[0108] S310, the device under test 202 sends an instruction for proving that the portable detection device 203 is unplugged to the control device.

[0109] S311, the control device 201 controls the mechanical arm to pull out the portable detection device 203 from the device to be tested.

[0110] The embodiment of the present invention can realize automatic quality inspection of the data interface based on the control device 201, the device to be tested 202 and the portable detection device 203, thereby saving manpower, improving the quality inspection efficiency, and reducing the problem of detection differences caused by human factors. In addition, data cables and computer equipment are no longer needed to assist in quality inspection, which can reduce the detection cost.

[0111] The embodiment of the present invention further provides a data interface detection device, which is used to detect a device to be tested having a data interface.

[0112] like Figure 4 As shown, the device may include:

[0113] The detection module 401 is used to execute the detection task when it is detected that the portable detection device has established a connection with the device to be tested through the data interface.

[0114] Wherein, the detection task includes a read operation and / or a write operation; wherein, the read operation includes: reading data stored in the portable detection device through the data interface; the write operation includes: writing data to the portable detection device through the data interface.

[0115] The detection result generating module 402 is used to generate detection information according to the operation result of the read operation and / or the operation result of the write operation.

[0116] The detection information is used to characterize the availability of the data interface.

[0117] In an optional embodiment, the detection result generating module 402 may include:

[0118] The comparison unit is used to compare whether the data written by the write operation is the same as the data read by the read operation.

[0119] A result generating unit is used for generating detection information for characterizing that the data interface is available when the comparison result output by the comparison unit indicates that the data written by the write operation is the same as the data read by the read operation; or for generating detection information for characterizing that the data interface is unavailable when the comparison result output by the comparison file unit indicates that the data written by the write operation is different from the data read by the read operation.

[0120] In an optional embodiment, the device may further include:

[0121] The connection establishment module is used to determine, based on pre-configured protocol parameters, that the device under test and the portable detection device establish a physical connection through the data interface; and after determining that the physical connection is established, establish a communication connection between the data interface and the portable detection device.

[0122] In an optional embodiment, the write operation includes: writing data into the portable detection device through the data interface based on a storage directory of the portable detection device.

[0123] The read operation includes: reading a storage directory of the portable detection device through the data interface, determining a storage location of the written data, and reading the written data at the storage location.

[0124] The data interface detection device provided in this embodiment belongs to the same application concept as the data interface detection method provided in the above embodiments of this application, and can execute the data interface detection method provided in any of the above embodiments of this application, and has the corresponding functional modules and beneficial effects of the execution method. For technical details not fully described in this embodiment, please refer to the specific processing content of the data interface detection method provided in the above embodiments of this application, and will not be repeated here.

[0125] The present application also provides an electronic device, such as Figure 5 As shown, the electronic device includes: a memory 500 and a processor 510 .

[0126] The memory 500 is connected to the processor 510 and is used to store programs.

[0127] The processor 510 is used to implement the data interface detection method in the above embodiment by running the program stored in the memory 500.

[0128] Specifically, the electronic device may further include: a data interface 520 , an input device 530 , an output device 540 and a bus 550 .

[0129] The processor 510, the memory 500, the data communication interface 520, the input device 530 and the output device 540 are connected to each other via a bus.

[0130] Bus 550 may include a pathway for transferring information between the various components of the computer system.

[0131] The processor 510 may be a general-purpose processor, such as a general-purpose central processing unit (CPU), a microprocessor, etc., or an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the scheme of the present invention. It may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0132] The processor 510 may include a main processor, and may also include a baseband chip, a modem, and the like.

[0133] The memory 500 stores a program for executing the technical solution of the present invention, and may also store an operating system and other key services. Specifically, the program may include a program code, and the program code includes a computer operation instruction. More specifically, the memory 500 may include a read-only memory (ROM), other types of static storage devices that can store static information and instructions, a random access memory (RAM), other types of dynamic storage devices that can store information and instructions, a disk storage, a flash, and the like.

[0134] The input device 530 may include a device for receiving data and information input by a user, such as a keyboard, a mouse, a camera, a scanner, a light pen, a voice input device, a touch screen, a pedometer, or a gravity sensor.

[0135] Output device 540 may include devices that allow information to be output to a user, such as a display screen, printer, speaker, etc.

[0136] Data interface 520 may include any device such as a transceiver to communicate with other devices or communication networks.

[0137] The processor 510 executes the program stored in the memory 500 and calls other devices, which can be used to implement the various steps of the data interface detection method provided in the above embodiment of the present application to detect the data interface 520.

[0138] On the other hand, the present invention also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the data interface detection method provided by the above methods.

[0139] In yet another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to perform the above-mentioned data interface detection methods.

[0140] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0141] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0142] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for detecting a data interface, characterized in that: Applied to a device under test having a data interface, wherein a detection program is pre-installed in the device under test, the method comprises: The detection program executes a detection task when it detects that the portable detection device establishes a connection with the device to be tested through the data interface; the detection task includes a read operation and / or a write operation; wherein the read operation includes: reading data stored in the portable detection device through the data interface; the write operation includes: writing data to the portable detection device through the data interface; The detection program generates detection information according to the operation result of the read operation and / or the operation result of the write operation, and the detection information is used to characterize the availability of the data interface.

2. The method for detecting a data interface according to claim 1, characterized in that: The read operation specifically includes: reading data written into the portable detection device through the data interface; The detection program generates detection information according to the operation result of the read operation and / or the operation result of the write operation, including: Comparing whether the data written by the write operation is the same as the data read by the read operation; If they are the same, generating detection information for indicating that the data interface is available; If they are not the same, detection information for indicating that the data interface is unavailable is generated.

3. The method for detecting a data interface according to claim 1 or 2, characterized in that: The portable detection device establishes a connection with the device to be tested via the data interface, including: The detection program determines, based on pre-configured protocol parameters, that the device under test and the portable detection device establish a physical connection via the data interface; The detection program establishes a communication connection between the data interface and the portable detection device.

4. The method for detecting a data interface according to claim 2, characterized in that: The write operation includes: writing data into the portable detection device through the data interface based on the storage directory of the portable detection device; The read operation includes: reading a storage directory of the portable detection device through the data interface, determining a storage location of the written data, and reading the written data at the storage location.

5. A data interface detection device, characterized in that: Used to detect a device under test having a data interface, the device comprises: A detection module, configured to execute a detection task when it is detected that the portable detection device establishes a connection with the device to be tested via the data interface; the detection task includes a read operation and / or a write operation; wherein the read operation includes: reading data stored in the portable detection device via the data interface; the write operation includes: writing data to the portable detection device via the data interface; The detection result generating module is used to generate detection information according to the operation result of the read operation and / or the operation result of the write operation, wherein the detection information is used to characterize the availability of the data interface.

6. The data interface detection device according to claim 5, characterized in that: The detection result generating module comprises: a comparing unit, used for comparing whether the data written by the write operation is the same as the data read by the read operation; A result generating unit is used for generating detection information for characterizing that the data interface is available when the comparison result output by the comparison unit indicates that the data written by the write operation is the same as the data read by the read operation; or for generating detection information for characterizing that the data interface is unavailable when the comparison result output by the comparison file unit indicates that the data written by the write operation is different from the data read by the read operation.

7. A data interface detection system, characterized in that: The system comprises: a control device, a device to be tested with a detection program pre-installed therein, and a portable detection device, wherein the device to be tested comprises: a data interface, wherein the data interface is used to connect the portable detection device; The control device is used to connect the device to be tested and the portable detection device through the data interface; The device under test is used to perform a detection task through the detection program when the detection program detects that the portable detection device has established a connection with the device under test through the data interface, and to generate detection information according to the detection result; Wherein, the detection task includes a read operation and / or a write operation; wherein, the read operation includes: reading data stored in the portable detection device through the data interface; the write operation includes: writing data to the portable detection device through the data interface; the detection result includes the operation result of the read operation and / or the operation result of the write operation; the detection information is used to characterize the availability of the data interface.

8. The data interface detection system according to claim 7, characterized in that: The control device includes: a conveying structure and a mechanical arm; The conveying structure is used to convey the device to be tested to a position to be tested; The mechanical arm is used to grab the device to be tested from the position to be tested, and connect the device to be tested and the portable testing device through the data interface.

9. A computer program product, characterized in that The computer program product comprises a computer program stored on a non-transitory computer-readable storage medium, wherein the computer program comprises program instructions. When the program instructions are executed by a computer, the computer can execute the data interface detection method according to any one of claims 1 to 4.

10. An electronic device comprising a memory and a processor; The memory is connected to the processor and is used to store programs; The processor is used to implement the data interface detection method according to any one of claims 1 to 4 by running the program in the memory.