Equipment information acquisition method and device of electronic equipment, equipment and storage medium

The device list is obtained through the general port of the monitoring detection device and the information of the electronic equipment to be tested is solved, and the problem of lack of universal electronic equipment information acquisition methods in the prior art is solved, and efficient and accurate information acquisition of various electronic equipment is achieved.

CN120068044APending Publication Date: 2025-05-30转转一零二四(北京)科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311576761.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-23
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

There is a lack of a universal electronic device information acquisition method that can be applied to a variety of electronic devices in the prior art, resulting in unsatisfactory efficiency and accuracy of automated information acquisition.

Method used

By monitoring the common port of the detection device, obtain the device list and filter the list to obtain the device information of the electronic device to be tested. This method is suitable for electronic devices that establish connections through common ports such as USB transmission protocol.

Benefits of technology

It realizes the acquisition of equipment information for a variety of electronic devices, improves the efficiency and accuracy of information acquisition, and supports the standardization of the process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120068044A_ABST
    Figure CN120068044A_ABST
Patent Text Reader

Abstract

The invention aims to provide an equipment information acquisition method and device of electronic equipment, equipment and a storage medium, and aims to solve the technical problem that an electronic equipment information acquisition method with good universality does not exist for various electronic equipment at present in the prior art. According to the method, the device information of the to-be-detected electronic device is not directly obtained from the to-be-detected electronic device, but the device information of the to-be-detected electronic device is obtained by analyzing the access device list provided by the detection device when the to-be-detected electronic device is connected with the detection device. In the process of establishing the data connection between the to-be-detected electronic equipment and the detection equipment, the to-be-detected electronic equipment information received by the detection equipment is stored in the equipment list, and the storage format of the equipment list of the detection equipment is fixed, so that any to-be-detected electronic equipment which can establish the connection with the detection equipment can be stored in the equipment list of the detection equipment. And the equipment information can be obtained by analyzing the equipment list of the detection equipment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular, to a method, apparatus, device, and storage medium for obtaining device information of an electronic device. Background Art

[0002] When performing maintenance / detection / repair on an electronic device, it is first necessary to obtain relevant information of the electronic device, such as an identification code that can determine the identity of the electronic device. The channels for obtaining relevant information of the electronic device are not fixed. For example, consulting the technical documentation corresponding to the electronic device or operating the electronic device to query the information stored therein can both achieve the acquisition of relevant information of the electronic device. However, the above methods all rely on manual operations by staff. In the current business process, the efficiency and accuracy of the above operations manually performed by staff are not ideal, and it is not conducive to the standardization of the process.

[0003] An idea for improving the above method is to obtain relevant information of the electronic device through an automated method. However, due to differences in the designs of different electronic devices, a method for automatically obtaining information for one type of electronic device may not be applicable to another type of electronic device. Therefore, the current automated methods for obtaining relevant information of electronic devices are often only applied to a specific model of electronic device. In summary, for the current diverse electronic devices, there is no electronic device information acquisition method with good generality. Summary of the Invention

[0004] In view of this, embodiments of the present invention are committed to providing a method, apparatus, device, and storage medium for obtaining device information of an electronic device, so as to solve the technical problem in the prior art that for the current diverse electronic devices, there is no electronic device information acquisition method with good generality.

[0005] According to the first aspect of the embodiments of the present application, a method for obtaining device information of an electronic device is provided, including:

[0006] Listening to a common port of a detection device, where the detection device is used to obtain device information of a to-be-tested electronic device;

[0007] When it is detected that the to-be-tested electronic device is connected to the common port of the detection device, obtaining a device list, where the device list includes device information of each electronic device connected to the detection device through the common port of the detection device;

[0008] Screening the device list to obtain the device information of the to-be-tested electronic device.

[0009] Optionally, the general-purpose port of the detection device is a port using the USB transmission protocol, and the USB transmission protocol includes at least USB2.0 and / or USB3.0.

[0010] Optionally, the device list is stored in the form of an array;

[0011] The screening of the device list to obtain the device information of the electronic device to be tested includes:

[0012] Obtaining the array element corresponding to the electronic device that was last connected to the general-purpose port in the device list and using it as the device information of the electronic device to be tested;

[0013] Or,

[0014] According to the listening result obtained by listening to the general-purpose port of the detection device, obtaining the array element corresponding to the electronic device in the device list that corresponds to the listening result, and using it as the device information of the electronic device to be tested.

[0015] Optionally, the listening to the general-purpose port of the detection device includes:

[0016] Creating an access listening event, which is used to continuously detect whether a new electronic device is connected to the general-purpose port of the detection device;

[0017] After listening to the general-purpose port of the detection device, it further includes:

[0018] Creating a removal listening event, which is used to continuously detect whether an electronic device that has been connected to the general-purpose port of the detection device is removed from the general-purpose port of the detection device.

[0019] Optionally, the device information of the electronic device to be tested includes at least one of the following information:

[0020] Manufacturer, device model, and device serial number.

[0021] Optionally, after screening the device list to obtain the device information of the electronic device to be tested, it further includes:

[0022] When the device information of the electronic device to be tested includes the manufacturer and the device serial number, through the query channel provided by the manufacturer, using the device serial number to query the official information of the electronic device to be tested;

[0023] Displaying the official information of the electronic device to be tested.

[0024] Optionally, before querying the official information of the electronic device to be tested through the query channel provided by the manufacturer using the device serial number, it further includes:

[0025] Compare the manufacturer and the device serial number with preset query channel information to determine the query channel of the electronic device to be tested.

[0026] In a second aspect, an embodiment of the present application provides a device information acquisition device for an electronic device, including:

[0027] A monitoring unit for monitoring a general port of a detection device, where the detection device is used to acquire device information of an electronic device to be tested;

[0028] An acquisition unit for acquiring a device list when it is monitored that the electronic device to be tested is connected to the general port of the detection device, where the device list includes device information of each electronic device connected to the detection device through the general port of the detection device;

[0029] A screening unit for screening the device list to acquire the device information of the electronic device to be tested.

[0030] In a third aspect, an embodiment of the present application provides a device information acquisition device for an electronic device, including a memory and a processor;

[0031] The memory is connected to the processor and is used to store programs;

[0032] The processor is used to implement the device information acquisition method for the electronic device as described in the first aspect by running the program in the memory.

[0033] In a fourth aspect, an embodiment of the present application provides a storage medium, on which a computer program is stored, and when the computer program is run by a processor, it implements the device information acquisition method for the electronic device as described in the first aspect.

[0034] The present application provides a device information acquisition method for an electronic device, which does not directly acquire the device information of the electronic device to be tested, but analyzes the access device list provided by the detection device to acquire the device information of the electronic device to be tested when the electronic device to be tested establishes a connection with the detection device. During the process of establishing a data connection between the electronic device to be tested and the detection device, the device information of the electronic device to be tested received by the detection device will be stored in the device list, and the storage format of the device list of the detection device is fixed. Therefore, for any electronic device to be tested that can establish a connection with the detection device, its device information can be acquired by analyzing the device list of the detection device. Description of the Drawings

[0035] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the accompanying drawings required for the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only the embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can also be obtained based on the provided drawings.

[0036] Figure 1 The figure shows a schematic flowchart of a method for obtaining device information of an electronic device provided by an embodiment of the present application.

[0037] Figure 2 The figure shows a timing diagram for verifying Android mobile phone information by applying the method for obtaining device information of an electronic device in the present application provided by an embodiment of the present application.

[0038] Figure 3 It is a schematic structural diagram of a device information acquisition device of an electronic device in an embodiment of the present application.

[0039] Figure 4 It is a schematic structural diagram of a device information acquisition device of an electronic device in an embodiment of the present application. Detailed implementation manners

[0040] The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope protected by the present application.

[0041] The present application realizes the acquisition of the device information of the electronic device to be tested through a detection device. In order to standardize the communication process between two electronic devices, several communication protocols are currently specified in the field of computer technology, such as the USB protocol, the HDMI protocol, etc. When the ports of two electronic devices are connected, the two devices send information to each other in the information format specified by the communication protocol to exchange the device information of each other and establish a data connection.

[0042] Since the communication protocol specifies a standard information format, after the data connection is established, the detection device side must have obtained the information of the electronic device to be tested that is specified by the communication protocol and needs to be sent from the electronic device to be tested side to the detection device during the establishment of the data connection. By analyzing the list of connected electronic devices provided by the detection device, the information of the electronic device to be tested can be obtained.

[0043] It should be noted that a communication protocol generally only specifies the electrical characteristics of the interface used, and does not directly specify the physical type of the interface. For example, in the development process of the USB protocol, there have been various physical interface types using this protocol, such as standard USB, MiniUSB, MicroUSB, and Type-C. In this application, the above physical interface types can all be regarded as common ports using the same communication protocol. The technical solution of this application is implemented based on the communication protocol and does not specify the physical type of the interface applied to this application either.

[0044] The first embodiment of this application provides a method for obtaining device information of an electronic device. As Figure 1 shown, this method may include the following steps:

[0045] Step 101: Monitor the common port of the detection device, where the detection device is used to obtain the device information of the electronic device to be tested.

[0046] This application can be applied to various electronic devices that can establish a data connection through a common port. For example, this application can be applied to the situation where a data connection between a detection device and an electronic device to be tested is established using various common serial port protocols, such as RS232, RS485, RS422, USB protocol, or HDMI protocol, etc., and is applied to various types of physical interfaces using the above communication protocols.

[0047] Monitor the common port of the detection device. When an electronic device is detected to be connected to the common port, regard this electronic device as the electronic device to be tested and continue to execute the following steps of this application. The method of monitoring the common port of the detection device can be set according to requirements. For example, a detection switch is preset. After triggering the detection switch, continuously monitor the common port of the detection device and stop monitoring when an electronic device is detected to be connected to the common port; or, continuously monitor the common port without interruption; or, preset a detection period and a monitoring period. When the timer duration is equal to the detection period duration, clear the timer and perform a monitoring with a duration equal to the monitoring period duration.

[0048] Step 102: When it is monitored that an electronic device to be tested is connected to the common port of the detection device, obtain a device list, where the device list includes the device information of each electronic device connected to the detection device through the common port of the detection device.

[0049] This technical solution relies on existing operating systems. Specifically, classified by the operating system kernel, most of the existing common operating systems are derived from one of the three kernels: Unix, Linux, or NT-based. For example, among common operating systems, iOS and macOS are based on Unix, Android and Loongson OS are based on Linux, and the NT kernel is used by the Windows system.

[0050] The above operating systems handle externally connected electronic devices in a relatively similar way, and will authenticate the externally connected electronic devices. During authentication, the externally connected electronic device needs to provide some device information about it, and a device list will be pre-set in the operating system to record the device information of these externally connected electronic devices.

[0051] In addition, it should be noted that this application can also be applied to other operating systems using the above design concept. For example, for the HarmonyOS NEXT system released using the HarmonyOS kernel, if its system structure also designs a device list for recording the device information of externally connected electronic devices and grants the permission for programs running in the user space to obtain this device list, it is also applicable to the method in this application. Or, this application can also be applied to small embedded systems with a device list.

[0052] In summary, obtaining the device list from the operating system of the detection device can obtain the device information of all connected electronic devices.

[0053] Step 103: Screen the device list to obtain the device information of the electronic device to be tested.

[0054] After obtaining the device list, since the device list includes the device information of all electronic devices connected to the detection device, it is necessary to further screen out the device information belonging to the electronic device to be tested.

[0055] In the screening process, certain characteristics of the electronic device to be tested are used to distinguish the electronic device to be tested from other electronic devices, so as to screen out the device information of the electronic devices with this characteristic in the device list.

[0056] Optional characteristics of the electronic device to be tested can be the time when the electronic device is connected to the detection device, such as connected to the detection device 1 minute ago; it can also be the device name, such as "Removable Disk: F"; it can also be based on the location of the physical interface connected, for example, the detection device has 4 physical interfaces numbered 1-4, and the characteristic of the electronic device to be tested is the electronic device connected to interface 3.

[0057] Screening based on the characteristics of the electronic device to be tested can obtain the device information of the electronic device to be tested.

[0058] In the second embodiment of the present application, the method for obtaining the device information of the electronic device in the first embodiment is further defined in more detail and specifically. Some or all of the technical features in the second embodiment can be combined with, replaced with, etc. the first embodiment alone or jointly, so as to obtain more feasible methods for obtaining the device information of the electronic device.

[0059] The following elaborates in detail on the method for obtaining the device information of the electronic device in the second embodiment of the present application:

[0060] Optionally, the general port of the detection device is a port using the USB transmission protocol, and the USB transmission protocol includes at least USB2.0 and USB3.0.

[0061] In this embodiment, in combination with the current actual application situation, the USB transmission protocol is specifically proposed, and the most common USB2.0 and USB3.0 interfaces are particularly emphasized.

[0062] Since the naming of the USB transmission protocol has been modified many times and is compatible with other protocols, this embodiment will be elaborated below to clarify the application scope of this embodiment.

[0063] First, the most common interface protocols currently are the interfaces using USB2.0 and USB3.0. Among them, USB3.0 has an improved version USB3.2, but it still belongs to the USB3.0 version. Secondly, the USB4 protocol, which has higher performance, is currently being gradually popularized.

[0064] Secondly, USB4 is compatible with the Thunderbolt transmission protocol and can be considered the same within the application scope of the present application. At the same time, USB4 and the Thunderbolt protocol are also compatible with the DP video protocol and the PD fast charging protocol. And the compatibility of the above protocols enables the above protocols to all apply the method in this embodiment.

[0065] In summary, the method in this embodiment at least ensures that it can be applied to the most common USB2.0 and USB3.0 protocols, and according to the compatibility rules, it can also be applied to one or more interfaces that are compatible with each other when using USB4, Thunderbolt, DP video protocol, and PD fast charging protocol alone or simultaneously.

[0066] Optionally, the device list is stored in the form of an array; the device list is filtered to obtain the device information of the electronic device to be tested, including: obtaining the array element corresponding to the electronic device that was last connected to the common port in the device list as the device information of the electronic device to be tested; or, according to the listening result obtained by listening to the common port of the detection device, obtaining the array element corresponding to the electronic device in the device list that corresponds to the listening result, and using it as the device information of the electronic device to be tested.

[0067] In this embodiment, the device list can be stored in the form of an array. The rows of the array represent the electronic devices connected to the detection device and their device information, and the columns of the array represent the types of device information, such as device serial numbers, device access times, and other information.

[0068] The array element in this embodiment is all the information of a certain row in the array. In practical applications, due to the maintenance and update of the operating system, when other electronic devices are connected, the types and quantities of device information required to be submitted may change. Therefore, the length of the array element in this embodiment is not fixed and will change according to the regulations of the operating system in the application environment.

[0069] In order to screen out the electronic device to be tested in the device list stored in the form of an array, this embodiment proposes two screening rules in combination with the actual application situation. First, in a normal usage environment, the latest inserted device is often the electronic device to be tested. Therefore, the device information of the electronic device that was last connected to the common port can be directly screened. However, considering that when the usage environment is relatively complex, such as when multiple electronic devices are detected simultaneously, this embodiment also provides a method of distinguishing each electronic device connected to the detection device through the listening result to determine the electronic device to be tested and obtain the device information.

[0070] Optionally, listening to the common port of the detection device includes:

[0071] Creating an access listening event, which is used to continuously detect whether a new electronic device is connected to the common port of the detection device; after listening to the common port of the detection device, it also includes: creating a removal listening event, which is used to continuously detect whether an electronic device that has been connected to the common port of the detection device is removed from the common port of the detection device.

[0072] In this embodiment, the listening logic for the common port is improved. In the method of this embodiment, an access listening event can be created through the attach method, and a removal listening event can be created through the detach method. To achieve timely discovery of the situation where the electronic device to be tested is connected to the detection device and the situation where the electronic device to be tested is removed. To confirm whether the electronic device to be tested is still connected to the detection device.

[0073] Optionally, the device information of the electronic device to be tested includes at least one of the following information:

[0074] Manufacturer, device model, and device serial number.

[0075] Taking a mobile phone using the Android system as an example of the device to be tested, for different Android system versions and different custom modifications of the Android system by different manufacturers, the methods for obtaining the device information of these mobile phones are not universal. A method that can be applied to mobile phones of brand A may not be applicable due to the adjustment of Android system permissions by mobile phones of brand B. Therefore, in order to obtain information such as the manufacturer, device model, and device serial number of the electronic device, this embodiment proposes a method for obtaining device information by detecting the device end.

[0076] Among the device information, obtaining the manufacturer and device model is beneficial for taking further targeted processing of the electronic device to be tested according to the settings of the manufacturer for the device model. Obtaining the device serial number is beneficial for authenticating the identity of the electronic device to be tested.

[0077] Optionally, after filtering the device list and obtaining the device information of the electronic device to be tested, it further includes: when the device information of the electronic device to be tested includes the manufacturer and the device serial number, through the query channel provided by the manufacturer, use the device serial number to query the official information of the electronic device to be tested; display the official information of the electronic device to be tested.

[0078] In the method provided in this embodiment, it is necessary to pre-obtain the query channels provided by each manufacturer. Most manufacturers of electronic devices will provide a channel for verifying electronic devices on their official websites. According to the manufacturer and the device serial number, the official information corresponding to the device serial number recorded by the manufacturer can be verified. Taking a mobile phone or earphone as an example, by querying the SN code of the mobile phone or earphone on the official website of the mobile phone manufacturer, the official information corresponding to the SN code can be confirmed.

[0079] By comparing the displayed official information with the obtained device information, the identity of the electronic device to be tested can be verified.

[0080] As Figure 2 shown, Figure 2A process for verifying Android phone information using this method. The Android phone first connects to the detection device. The detection device has pre-registered the attach monitoring event and discovers the access of the Android phone through the monitoring event of the USB channel, and initially returns the monitoring result. The detection device will continue to collect the information of the Android phone during the process of establishing a connection with the Android phone. After the collection is completed, the SN code and manufacturer information of the Android phone are filtered out from the device list of the detection device using this method. And the factory information of the Android phone is found and returned for display according to the manufacturer information and the SN code. Finally, the connection between the detection device and the Android phone is disconnected.

[0081] Optionally, before querying the official information of the electronic device to be tested using the device serial number through the query channel provided by the manufacturer, it further includes: comparing the manufacturer and the device serial number with the preset query channel information to determine the query channel of the electronic device to be tested.

[0082] In practical applications, since the regulations of device serial numbers by manufacturers are not the same. For example, the same manufacturer uses different coding methods for the serial numbers of headphones and mobile phones, with different digit numbers and application characters. Or a new serial number coding method is adopted, and there is a conflict between the new serial number query method and the old coding method. Therefore, it is necessary to prepare the query channel information in advance for initially determining the query method of the electronic device to be tested according to the manufacturer and the device serial number of the electronic device to be tested. For example, if it is initially determined that the electronic device is a headphone according to the manufacturer and the number of digits of the serial number, it needs to be queried through the query channel of the headphone.

[0083] Correspondingly, the third embodiment of this application further provides a device information acquisition device for an electronic device, as Figure 3 shown, the device includes:

[0084] A monitoring unit 301, configured to monitor the general port of the detection device, where the detection device is used to acquire the device information of the electronic device to be tested;

[0085] An acquisition unit 302, configured to acquire a device list when it is monitored that there is an electronic device to be tested accessing the general port of the detection device, where the device list includes the device information of each electronic device accessing the detection device through the general port of the detection device;

[0086] A screening unit 303, configured to screen the device list to acquire the device information of the electronic device to be tested.

[0087] Optionally, the general port of the detection device is a port using the USB transmission protocol, and the USB transmission protocol includes at least USB2.0 and / or USB3.0.

[0088] Optionally, the device list is stored in the form of an array;

[0089] Filter the device list to obtain the device information of the electronic device to be tested, including:

[0090] Obtain the array element corresponding to the electronic device that was last connected to the common port in the device list and use it as the device information of the electronic device to be tested;

[0091] Or,

[0092] According to the listening result obtained by listening to the common port of the detection device, obtain the array element corresponding to the electronic device in the device list that corresponds to the listening result, and use it as the device information of the electronic device to be tested.

[0093] Optionally, listening to the common port of the detection device includes:

[0094] Create an access listening event, which is used to continuously detect whether a new electronic device is connected to the common port of the detection device;

[0095] After listening to the common port of the detection device, it also includes:

[0096] Create a removal listening event, which is used to continuously detect whether an electronic device that has been connected to the common port of the detection device is removed from the common port of the detection device.

[0097] Optionally, the device information of the electronic device to be tested includes at least one of the following information:

[0098] Manufacturer, device model, and device serial number.

[0099] Optionally, after filtering the device list to obtain the device information of the electronic device to be tested, it also includes:

[0100] When the device information of the electronic device to be tested includes the manufacturer and the device serial number, use the device serial number to query the official information of the electronic device to be tested through the query channel provided by the manufacturer;

[0101] Display the official information of the electronic device to be tested.

[0102] Optionally, before using the device serial number to query the official information of the electronic device to be tested through the query channel provided by the manufacturer, it also includes:

[0103] Compare the manufacturer and the device serial number with the preset query channel information to determine the query channel of the electronic device to be tested.

[0104] The device information acquisition device of the electronic device provided in this embodiment belongs to the same inventive concept as the device information acquisition method of the electronic device provided in the foregoing embodiments of the present application. It can execute the device information acquisition method of the electronic device provided in any of the foregoing embodiments of the present application, and has the corresponding functional modules and beneficial effects for executing the method. For technical details not described in detail in this embodiment, reference may be made to the specific processing content of the device information acquisition method of the electronic device provided in the foregoing embodiments of the present application, which will not be elaborated herein.

[0105] For the above monitoring unit 301, acquisition unit 302, and screening unit 303, the functions implemented may be realized by the same or different processors respectively, which is not limited in the embodiments of the present application.

[0106] It should be understood that the units in the above device may be implemented in the form of a processor calling software. For example, the device includes a processor, the processor is connected to a memory, and instructions are stored in the memory. The processor calls the instructions stored in the memory to implement any of the above methods or the functions of each unit of the device. The processor may be a general-purpose processor, such as a CPU or a microprocessor, etc., and the memory may be a memory inside or outside the device. Alternatively, the units in the device may be implemented in the form of a hardware circuit, and the functions of some or all of the units may be realized by designing the hardware circuit. The hardware circuit may be understood as one or more processors. For example, in one implementation, the hardware circuit is an ASIC, and the functions of some or all of the above units are realized by designing the logical relationship of the components in the circuit. Again, for example, in another implementation, the hardware circuit may be implemented by a PLD. Taking an FPGA as an example, it may include a large number of logic gate circuits, and the connection relationship between the logic gate circuits is configured through a configuration file to realize the functions of some or all of the above units. All units of the above device may be all implemented in the form of a processor calling software, or all implemented in the form of a hardware circuit, or some implemented in the form of a processor calling software, and the remaining part implemented in the form of a hardware circuit.

[0107] In an embodiment of the present application, a processor is a circuit with signal processing capabilities. In one implementation, the processor can be a circuit with instruction reading and running capabilities, such as a CPU, microprocessor, GPU, or DSP, etc.; in another implementation, the processor can implement certain functions through the logical relationship of a hardware circuit, and the logical relationship of this hardware circuit is fixed or can be reconfigured. For example, the processor is a hardware circuit implemented by an ASIC or PLD, such as an FPGA, etc. In a reconfigurable hardware circuit, the process of the processor loading a configuration document to implement the configuration of the hardware circuit can be understood as the process of the processor loading instructions to implement the functions of some or all of the above units. In addition, it can also be a hardware circuit designed for artificial intelligence, which can be understood as a type of ASIC, such as an NPU, TPU, DPU, etc.

[0108] It can be seen that each unit in the above device can be one or more processors (or processing circuits) configured to implement the above method, such as: CPU, GPU, NPU, TPU, DPU, microprocessor, DSP, ASIC, FPGA, or a combination of at least two of these processor forms.

[0109] In addition, each unit in the above device can be integrated in whole or in part, or can be independently implemented. In one implementation, these units are integrated together and implemented in the form of an SOC. The SOC can include at least one processor for implementing any of the above methods or implementing the functions of each unit of the device. The types of the at least one processor can be different, such as including a CPU and an FPGA, a CPU and an artificial intelligence processor, a CPU and a GPU, etc.

[0110] Another embodiment of the present application also proposes a device information acquisition device for an electronic device. Refer to Figure 4 As shown, the device includes:

[0111] A memory 400 and a processor 410;

[0112] Wherein, the memory 400 is connected to the processor 410 and is used to store programs;

[0113] The processor 410 is used to implement the device information acquisition method of the electronic device disclosed in any of the above embodiments by running the program stored in the memory 400.

[0114] Specifically, the device information acquisition device of the above electronic device may further include: a bus, a communication interface 420, an input device 430, and an output device 440.

[0115] The processor 410, the memory 400, the communication interface 420, the input device 430, and the output device 440 are interconnected through a bus. Among them:

[0116] The bus may include a path for transmitting information between various components of a computer system.

[0117] The processor 410 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 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.

[0118] The processor 410 may include a main processor and may also include a baseband chip, a modem, etc.

[0119] The memory 400 stores a program for implementing the technical solution of the present invention and may also store an operating system and other critical services. Specifically, the program may include program code, and the program code includes computer operation instructions. More specifically, the memory 400 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 memory, a flash memory, etc.

[0120] The input device 430 may include a device for receiving user input data and information, 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, etc.

[0121] The output device 440 may include a device for allowing information to be output to a user, such as a display screen, a printer, a speaker, etc.

[0122] The communication interface 420 may include a device of any transceiver type for communicating with other devices or communication networks, such as Ethernet, a radio access network (RAN), a wireless local area network (WLAN), etc.

[0123] The processor 410 executes the program stored in the memory 400 and calls other devices, which can be used to implement the steps of the device information acquisition method of any one of the electronic devices provided in the above embodiments of the present application.

[0124] The present application also proposes a storage medium, on which a computer program is stored. The computer program is executed by a processor to perform the steps in the device information acquisition method of the electronic device described in the "Exemplary Method" section of the present specification above. Specifically, the following steps can be implemented:

[0125] Step 101: Monitor the general port of the detection device, which is used to obtain the device information of the electronic device to be tested.

[0126] Step 102: When it is monitored that an electronic device to be tested is connected to the general port of the detection device, obtain a device list, where the device list includes the device information of each electronic device connected to the detection device through the general port of the detection device.

[0127] Step 103: Screen the device list to obtain the device information of the electronic device to be tested.

[0128] For the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that this application is not limited by the described action sequence, because according to this application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0129] It should be noted that the embodiments in this specification are all described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The same or similar parts among the embodiments can be referred to each other. For device embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiments.

[0130] The steps in the method embodiments of this application can be adjusted, combined, and deleted according to actual needs. The technical features recorded in each embodiment can be replaced or combined.

[0131] The modules and sub-modules in the devices and terminals in the embodiments of this application can be combined, divided, and deleted according to actual needs.

[0132] In several embodiments provided by this application, it should be understood that the disclosed terminals, devices, and methods can be implemented in other ways. For example, the terminal embodiments described above are only illustrative. For example, the division of modules or sub-modules is only a logical function division. In actual implementation, there can be other division methods. For example, multiple sub-modules or modules can be combined or integrated into another module, or some features can be ignored or not executed. Another point, the displayed or discussed coupling or direct coupling or communication connection to each other can be through some interfaces, and the indirect coupling or communication connection of the device or module can be in an electrical, mechanical, or other form.

[0133] A module or sub-module described as a separating component may or may not be physically separated. A component as a module or sub-module may or may not be a physical module or sub-module, that is, it may be located in one place, or may be distributed across multiple network modules or sub-modules. Some or all of the modules or sub-modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0134] In addition, each functional module or sub-module in various embodiments of the present application can be integrated in a processing module, or each module or sub-module can exist physically alone, or two or more modules or sub-modules can be integrated in one module. The above-mentioned integrated module or sub-module can be implemented in the form of hardware, or can be implemented in the form of a software functional module or sub-module.

[0135] Those skilled in the art can further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed in this article can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods for each specific application to implement the described functions, but such implementation should not be considered to exceed the scope of this application.

[0136] The steps of the method or algorithm described in combination with the embodiments disclosed in this article can be directly implemented by hardware, a software unit executed by a processor, or a combination of the two. The software unit can be placed in a random access memory (RAM), memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, register, hard disk, removable disk, CD-ROM, or any other form of storage medium well-known in the technical field.

[0137] Finally, it should also be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of another identical element in the process, method, article or device including the said element.

[0138] The foregoing description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for obtaining device information of an electronic device, including: Listening to the general port of a detection device, where the detection device is used to obtain the device information of a to-be-tested electronic device; When it is detected that the to-be-tested electronic device is connected to the general port of the detection device, obtaining a device list, where the device list includes the device information of each electronic device connected to the detection device through the general port of the detection device; Filtering the device list to obtain the device information of the to-be-tested electronic device.

2. The method according to claim 1, characterized in that, The general port of the detection device is a port using the USB transmission protocol, and the USB transmission protocol at least includes USB2.0 and / or USB3.

0.

3. The method according to claim 1, characterized in that, The device list is stored in the form of an array; The filtering the device list to obtain the device information of the to-be-tested electronic device includes: Obtaining the array element corresponding to the electronic device that was last connected to the general port in the device list and using it as the device information of the to-be-tested electronic device; Or, According to the listening result obtained by listening to the general port of the detection device, obtaining the array element corresponding to the electronic device in the device list that corresponds to the listening result and using it as the device information of the to-be-tested electronic device.

4. The method according to claim 1, characterized in that, The listening to the general port of the detection device includes: Creating an access listening event, where the access listening event is used to continuously detect whether a new electronic device is connected to the general port of the detection device; After listening to the general port of the detection device, it further includes: Creating a removal listening event, where the removal listening event is used to continuously detect whether an electronic device that has been connected to the general port of the detection device is removed from the general port of the detection device.

5. The method according to claim 1, characterized in that, The device information of the to-be-tested electronic device at least includes one of the following information: Manufacturer, device model, and device serial number.

6. The method according to claim 5, characterized in that, After filtering the device list to obtain the device information of the to-be-tested electronic device, it further includes: When the device information of the to-be-tested electronic device includes the manufacturer and the device serial number, through the query channel provided by the manufacturer, using the device serial number to query the official information of the to-be-tested electronic device; Displaying the official information of the to-be-tested electronic device.

7. The method according to claim 6, characterized in that, Before querying the official information of the to-be-tested electronic device through the query channel provided by the manufacturer using the device serial number, it further includes: Comparing the manufacturer and the device serial number with preset query channel information to determine the query channel of the to-be-tested electronic device.

8. A device information obtaining device for an electronic device, characterized in that, including: A listening unit for listening to the general port of a detection device, where the detection device is used to obtain the device information of a to-be-tested electronic device; An acquiring unit, configured to acquire a device list when monitoring that the electronic device to be tested is connected to the universal port of the detection device, wherein the device list includes device information of each electronic device connected to the detection device through the universal port of the detection device; The screening unit is used to screen the device list to obtain device information of the electronic device to be tested.

9. A device for acquiring device information of an electronic device, It is characterized in that including memory and processor; The memory is connected to the processor and is used to store programs; The processor is used to implement the device information acquisition method of the electronic device according to any one of claims 1 to 7 by running the program in the memory.

10. A storage medium, It is characterized in that The storage medium stores a computer program, and when the computer program is executed by the processor, the method for acquiring device information of an electronic device according to any one of claims 1 to 7 is implemented.