Equipment connection method, terminal, electronic equipment and readable storage medium

By obtaining the equipment logo on the preset label on the test equipment, and using the corresponding relationship of the cloud to obtain the MAC address, directly connect to the test device, solve the problem of identification and connection difficulties in smart device testing, improve the test efficiency and accuracy. Reduce costs.

CN119383759APending Publication Date: 2025-01-28GUANGDONG HOTATA TECH GRP
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411627296.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-14
Publication Date
2025-01-28

AI Technical Summary

Technical Problem

It is difficult to accurately identify and connect the equipment to be tested in the existing smart device testing process, with low testing efficiency, low testing accuracy and high testing cost.

Method used

Obtain device logos by the preset label on the test device, and use the cloud stored device logo and MAC address correspondence to obtain the MAC address of the test device, thereby directly connecting the test equipment to ignore the broadcast information of other Bluetooth devices.

Benefits of technology

Improve test efficiency, reduce the test process, ensure the accuracy of the test process, and reduce the cost of testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119383759A_ABST
    Figure CN119383759A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a device connection method, a terminal, an electronic device and a readable storage medium, and relates to the field of intelligent devices, the method is applied to the terminal, and the method comprises the following steps: determining a to-be-tested device, obtaining a device identifier of the to-be-tested device based on a first tag preset on the to-be-tested device, and sending the device identifier to a cloud; receiving a first Mac address sent by the cloud, and searching and connecting to-be-tested equipment according to the first Mac address; the first Mac address is determined by the cloud according to the equipment identifier; the corresponding relation between the first Mac address stored in the cloud and the equipment identifier is determined through a first label and a second label preset on the to-be-tested equipment, the first label is used for recording equipment identifier related information, and the second label is used for recording first Mac address related information. According to the embodiment of the invention, the problems of difficulty in accurately identifying and connecting the to-be-tested equipment, low test efficiency, low test accuracy and high test cost are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of smart devices. Specifically, the present application relates to a device connection method, a terminal, an electronic device and a readable storage medium. Background Art

[0002] With the rapid development of Internet of Things technology, Bluetooth has been widely used in various smart devices. In the production process of these devices, functional testing and quality inspection are key links to ensure product performance and reliability. However, there are usually a large number of devices to be tested in the existing smart device testing process. Therefore, there are problems such as difficulty in accurately identifying and connecting the devices to be tested, low testing efficiency, low testing accuracy and high testing cost. Summary of the invention

[0003] The embodiments of the present application provide a device connection method, a terminal, an electronic device and a readable storage medium, which are used to solve the technical problems of difficulty in accurately identifying and connecting a device to be tested, low test efficiency, low test accuracy and high test cost.

[0004] According to a first aspect of an embodiment of the present application, a device connection method is provided, which is applied to a terminal, and the method includes: Determine a device to be tested, obtain a device identification of the device to be tested based on a first tag preset on the device to be tested, and send the device identification to the cloud; Receive the first Mac address sent by the cloud, and search and connect to the device to be tested according to the first Mac address; the first Mac address is determined by the cloud according to the device identifier; Among them, the correspondence between the first Mac address and the device identification stored in the cloud is determined by a first tag and a second tag preset on the device to be tested, the first tag is used to record information related to the device identification, and the second tag is used to record information related to the first Mac address. In a possible implementation, after searching and connecting to the device to be tested according to the first Mac address, the second Mac address of the device to be tested is determined according to the first Mac address, and a binding request containing the second Mac address is sent to the cloud; Receive the binding success information sent by the cloud, and display the first interface of the device to be tested; the binding success information is sent by the cloud after determining that the device to be tested meets the preset binding conditions according to the second Mac address, and the first interface includes at least one operable control; The first Mac address is the Mac address of the first communication module of the device to be tested, and the second Mac address is the Mac address of the second communication module of the device to be tested; Determine the organization unique identifier and the first device unique identifier in the first MAC address; convert the first device unique identifier according to the preset identifier conversion relationship between the first communication module and the second communication module to obtain the second device unique identifier; The organization unique identifier and the second device unique identifier are combined to obtain a second Mac address.

[0005] In another possible implementation, the device identification of the device to be tested is obtained by scanning a first tag preset on the outside of the device to be tested; The correspondence between the first Mac address and the device identification is established by the cloud after the scanning device obtains the device identification and the first Mac address of the device to be tested by scanning the first label on the outside of the device to be tested and the second label inside the device to be tested when assembling the device to be tested, and the device identification and the first Mac address are packaged and uploaded to the cloud.

[0006] According to a second aspect of an embodiment of the present application, a device connection method is provided, which is applied to a cloud, and the method includes: receiving a device identification of a device to be tested sent by a terminal, and acquiring a first Mac address corresponding to the device identification from a database; Sending the first Mac address to the terminal so that the terminal searches for and connects to the device to be tested according to the first Mac address; The correspondence between the first Mac address and the device identification stored in the database is determined by a first tag and a second tag preset on the device to be tested, the first tag is used to record device identification related information, and the second tag is used to record first Mac address related information.

[0007] In a possible implementation, after sending the first Mac address to the terminal, a binding request including a second Mac address sent by the terminal is received; the binding request is sent after the terminal is connected to the device to be tested, and the second Mac address is determined by the terminal according to the first Mac address; If it is determined according to the second Mac address that the device to be tested meets the preset binding condition, the binding relationship between the terminal and the device to be tested is stored, and a binding success message is sent to the terminal; The preset binding conditions include at least one of the following: The second Mac address conforms to the preset Mac address format; The cloud storage has a second Mac address; The number of binding requests containing the second Mac address received within a preset time period does not exceed a preset number threshold; The device to be tested corresponding to the second Mac address is currently allowed to be bound.

[0008] In a possible implementation, the cloud is further used to store the correspondence between the first Mac address and the device identifier in a database after receiving the device identifier and the first Mac address uploaded by the scanning device; The first Mac address and device identification are obtained by the scanning device by scanning the first label on the outside of the device to be tested and the second label inside the device to be tested when assembling the device to be tested. The device identification and the first Mac address are packaged and uploaded to the cloud.

[0009] In a possible implementation, receiving a device identification and a first Mac address that are packaged and uploaded by a scanning device; If it is determined that the device identifier and the first Mac address are not recorded in the database, storing the association relationship between the device identifier and the first Mac address in the database; If it is determined that the device identification is recorded in the database, the first Mac address associated with the device identification in the database is obtained, and an association failure message is returned to the scanning device; the association failure message includes the device identification and the associated first Mac address; If it is determined that the first Mac address is recorded in the database, the device identifier associated with the first Mac address in the database is obtained, and association failure information is returned to the scanning device; the association failure information includes the first Mac address and the associated device identifier.

[0010] According to a third aspect of an embodiment of the present application, a terminal is provided, the device comprising: A first acquisition module is used to determine a device to be tested, obtain a device identification of the device to be tested based on a first tag preset on the device to be tested, and send the device identification to the cloud; A first receiving module is used to receive a first Mac address sent by the cloud, and search and connect to the device to be tested according to the first Mac address; the first Mac address is determined by the cloud according to the device identifier; Among them, the correspondence between the first Mac address and the device identification stored in the cloud is determined by the first tag and the second tag preset on the device to be tested, the first tag is used to record the information related to the device identification, and the second tag is used to record the first Mac address related message.

[0011] According to a fourth aspect of an embodiment of the present application, an electronic device is provided, which includes a memory, a processor, and a computer program stored in the memory, and when the processor executes the program, the steps of the method provided in the first aspect are implemented.

[0012] According to a fifth aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method provided in the first aspect are implemented.

[0013] According to the sixth aspect of an embodiment of the present application, a computer program product is provided, which includes computer instructions stored in a computer-readable storage medium. When a processor of a computer device reads the computer instructions from the computer-readable storage medium, the processor executes the computer instructions, so that the computer device executes the steps of implementing the method provided in the first aspect.

[0014] The beneficial effects of the technical solution provided by the embodiment of the present application are: The device connection method applied to the terminal provided in the embodiment of the present application obtains the device identification of the device to be tested by a first tag preset on the device to be tested. Since the correspondence between the device identification and the first Mac address has been stored in the cloud, the device identification is sent to the cloud to obtain the first Mac address of the device to be tested. After receiving the first Mac address of the device to be tested, the method directly connects to the corresponding device to be tested according to the first Mac address. The present application directly connects to the device to be tested by obtaining the first Mac address, ignores the broadcast information of other Bluetooth devices, avoids the interference of a large number of broadcast information of Bluetooth devices causing erroneous connection, greatly improves the test efficiency, greatly saves the test process, and solves the technical problems of difficulty in accurately identifying and connecting the device to be tested, low test efficiency, low test accuracy and high test cost. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in describing the embodiments of the present application are briefly introduced below.

[0016] Figure 1 A schematic diagram of a system architecture for implementing a device connection method provided in an embodiment of the present application; Figure 2 A schematic diagram of a flow chart of a device connection method applied to a terminal provided in an embodiment of the present application; Figure 3 A flowchart of a method for determining a second Mac address in a device connection method provided in an embodiment of the present application; Figure 4 A schematic diagram of a process flow of a device connection method applied to the cloud provided in an embodiment of the present application; Figure 5 An interactive schematic diagram of a device connection method provided in an embodiment of the present application; Figure 6 A schematic diagram of the structure of a terminal provided in an embodiment of the present application; Figure 7 A schematic diagram of a cloud structure provided in an embodiment of the present application; Figure 8A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0017] The embodiments of the present application are described below in conjunction with the drawings in the present application. It should be understood that the implementation methods described below in conjunction with the drawings are exemplary descriptions for explaining the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions of the embodiments of the present application.

[0018] It will be understood by those skilled in the art that, unless specifically stated, the singular forms "one", "an" and "the" used herein may also include plural forms. It should be further understood that the terms "including" and "comprising" used in the embodiments of the present application refer to that the corresponding features can be implemented as the presented features, information, data, steps, operations, elements and / or components, but do not exclude the implementation as other features, information, data, steps, operations, elements, components and / or combinations thereof supported by the technical field. It should be understood that when we call an element "connected" or "coupled" to another element, the one element can be directly connected or coupled to the other element, or it can refer to that the one element and the other element establish a connection relationship through an intermediate element. In addition, the "connection" or "coupling" used here may include wireless connection or wireless coupling. The term "and / or" used here indicates at least one of the items defined by the term, for example, "A and / or B" can be implemented as "A", or as "B", or as "A and B".

[0019] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0020] In the existing device test connection process, since there are many devices to be tested, there are usually multiple devices broadcasting Bluetooth at the same time at the production test site. In the stage of discovering and connecting to devices, the terminal used for testing may find multiple Bluetooth signal sources, and when testing, testers can often only see limited information such as the Bluetooth Mac address, which is not enough to accurately determine which device to be tested should be connected. In an environment with limited space, it is also difficult to determine the device to be connected based on signal strength alone, resulting in difficulty in accurately identifying the target device, which may cause the application to connect to the wrong device, and the tester has to try repeatedly, greatly reducing the test efficiency.

[0021] The related technology solves the above-mentioned problems arising during the equipment testing process by using a signal shielding room: however, the use of the signal shielding method requires a large amount of capital cost investment, and the equipment to be tested needs to be moved to the shielding room. Therefore, there are still problems of low testing efficiency and high testing cost during the equipment testing process.

[0022] In response to at least one of the above-mentioned technical problems or areas that need improvement in the process of testing and connecting the above-mentioned devices, the present application proposes a device connection method, which obtains the device identification of the device to be tested by a first tag preset on the device to be tested. Since the cloud has stored the correspondence between the device identification and the first Mac address, the device identification is sent to the cloud to obtain the first Mac address of the device to be tested. After receiving the first Mac address of the device to be tested, the device is directly connected to the corresponding device to be tested according to the first Mac address. The present application directly connects to the device to be tested through the obtained first Mac address, ignores the broadcast information of other Bluetooth devices, avoids the interference of a large number of broadcast information of Bluetooth devices and causes erroneous connection, greatly improves the test efficiency, greatly saves the test process, and solves the technical problems of difficulty in accurately identifying and connecting the device to be tested, low test efficiency, low test accuracy and high test cost.

[0023] The following describes several exemplary embodiments to illustrate the technical solutions of the embodiments of the present application and the technical effects produced by the technical solutions of the present application. It should be noted that the following embodiments can refer to, draw on or combine with each other, and the same terms, similar features and similar implementation steps in different embodiments will not be described repeatedly.

[0024] Figure 1 A schematic diagram of a system architecture for implementing a device connection method provided in an embodiment of the present application, wherein the system architecture includes: a terminal 120, a cloud 140 and a device to be tested 160.

[0025] The terminal 120 installs and runs an application program having a device connection method. The terminal 120 is used to perform a functional test on the device to be tested.

[0026] The terminal 120 is connected to the cloud 140 via a wireless network or a wired network.

[0027] The cloud 140 includes at least one of a server, multiple servers, a cloud computing platform, and a virtualization center. Schematically, the cloud 140 includes a processor 144 and a memory 142, and the memory 142 includes a display module 1421, a control module 1422, and a receiving module 1423. The cloud 140 is used to provide background services for the application of the device connection method. Optionally, the cloud 140 undertakes the main computing work and the terminal 120 undertakes the secondary computing work; or, the cloud 140 undertakes the secondary computing work and the terminal 120 undertakes the main computing work; or, the cloud 140 and the terminal 120 adopt a distributed computing architecture for collaborative computing.

[0028] Optionally, the device types of the terminal include: at least one of a smart phone, a tablet computer, an e-book reader, a Moving Picture Experts Group Audio Layer III (MP3) player, a Moving Picture Experts Group Audio Layer IV (MP4) player, a laptop computer and a desktop computer.

[0029] Those skilled in the art will appreciate that the number of the above terminals may be more or less. For example, the above terminal may be only one, or the above terminals may be dozens or hundreds, or more. The embodiment of the present application does not limit the number of terminals and device types.

[0030] The present application provides a device connection method applied to a terminal, such as Figure 2 As shown, the method includes: S101, determining a device to be tested, obtaining a device identification of the device to be tested based on a first tag preset on the device to be tested, and sending the device identification to the cloud.

[0031] In an embodiment of the present application, the device to be tested is a smart device waiting for functional testing. The device to be tested has dual communication modules. The device to be tested can exchange information with the terminal and the cloud through the communication module. The device to be tested can be a smart home device, such as a smart lock, a smart light, and a smart appliance. The wireless communication device can also be a personal electronic device, such as a smart watch, a fitness device, an e-reader, etc. The wireless communication device can also be an industrial controller, such as a PLC control, an industrial robot, etc. The wireless communication device can also be an electronic device that can be controlled both short-range and long-range.

[0032] In the embodiment of the present application, the terminal is a terminal used by a staff member who performs a test operation. The staff member connects to the device to be tested through the test software on the terminal and then tests the device to be tested.

[0033] In an embodiment of the present application, since the cloud has stored the correspondence between the device identification and the first Mac address, after the terminal obtains the device identification of the device to be tested, it sends the device identification to the cloud to obtain more information related to the device to be tested, thereby achieving connection with the device to be tested and performing functional testing.

[0034] In the embodiment of the present application, the first tag preset on the device to be tested is generated based on the device identification, and the first tag is used to record the device identification related information of the device to be tested.

[0035] In an embodiment of the present application, the staff can determine the device identification based on the first label preset on the device to be tested, and then obtain the device identification by inputting the device identification into the terminal, or the staff can scan the first label preset on the device to be tested through a specific scanning instrument to enable the terminal to obtain the device identification.

[0036] S102, receiving a first Mac address sent by the cloud, and searching and connecting to a device to be tested according to the first Mac address.

[0037] In an embodiment of the present application, the first Mac address is determined by the cloud based on the device identifier. That is, after the terminal sends the device identifier of the device to be tested to the cloud, the cloud determines the first Mac address of the device to be tested based on the acquired device identifier, and then sends the first Mac address to the terminal.

[0038] In an embodiment of the present application, the cloud pre-stores a correspondence between the first Mac address and the device identifier. The correspondence between the first Mac address and the device identifier stored in the cloud is determined by a first tag and a second tag preset on the device to be tested, and the second tag is used to record content related to the first Mac address.

[0039] In an embodiment of the present application, the second tag is generated based on the first Mac address. The second tag recording information related to the first Mac address and the first tag recording information related to the device identification can be preset on the device to be tested. When it is necessary to establish a correspondence between the device identification and the first Mac address, the first tag and the second tag on the same device to be tested can represent the correspondence between the device identification and the first Mac address, thereby storing the correspondence between the device identification and the first Mac address determined based on the first tag and the second tag in the cloud.

[0040] In an embodiment of the present application, the first Mac address is the Mac address of the first communication module of the device to be tested, and the first communication module is a Bluetooth communication module, that is, the first Mac address is the Mac address of the Bluetooth module of the device to be tested. Therefore, after the terminal receives the first Mac address, the terminal starts the Bluetooth function, searches for the device to be tested according to the first Mac address, and establishes a Bluetooth connection with the device to be tested after searching for the device to be tested corresponding to the first Mac address. The terminal only searches and connects to the device to be tested corresponding to the specified first Mac address, thereby ensuring the accuracy of the test process and reducing production delays caused by incorrect connections.

[0041] The device connection method applied to the terminal provided in the embodiment of the present application obtains the device identification of the device to be tested by a first tag preset on the device to be tested. Since the correspondence between the device identification and the first Mac address has been stored in the cloud, the device identification is sent to the cloud to obtain the first Mac address of the device to be tested. After receiving the first Mac address of the device to be tested, the method directly connects to the corresponding device to be tested according to the first Mac address. The present application directly connects to the device to be tested by obtaining the first Mac address, ignores the broadcast information of other Bluetooth devices, avoids the interference of a large number of broadcast information of Bluetooth devices causing erroneous connection, greatly improves the test efficiency, greatly saves the test process, and solves the technical problems of difficulty in accurately identifying and connecting the device to be tested, low test efficiency, low test accuracy and high test cost.

[0042] Based on the above embodiments, as an optional embodiment, after searching and connecting to the device to be tested according to the first Mac address, the second Mac address of the device to be tested is determined according to the first Mac address, and a binding request containing the second Mac address is sent to the cloud; the binding success information sent by the cloud is received, and the first interface of the device to be tested is displayed; the binding success information is sent by the cloud after determining that the device to be tested meets the preset binding conditions according to the second Mac address, and the first interface includes at least one operable control.

[0043] In an embodiment of the present application, the first Mac address is the Mac address of the first communication module of the device to be tested, and the first communication module may be a Bluetooth communication module, that is, the first Mac address may be the Mac address of the Bluetooth communication module, and the second Mac address is the Mac address of the second communication module of the device to be tested, and the second communication module may be a WiFi communication module, that is, the second Mac address may be the Mac address of the WiFi communication module.

[0044] In an embodiment of the present application, it is pre-defined that the first Mac address and the second Mac address of the same device to be tested follow a preset rule. When creating the first Mac address and the second Mac address of the same device to be tested, the above preset rule will be followed, so that the terminal can determine the second Mac address when only the first Mac address is obtained when the preset rule is clearly understood.

[0045] In an embodiment of the present application, after the terminal successfully connects to the device to be tested, the second Mac address is determined based on the first Mac address of the device to be tested, and then a binding request containing the second Mac address is sent to the cloud to request the cloud to establish a binding relationship between the terminal and the device to be tested. Only when the terminal and the device to be tested are in a binding relationship can a functional test be performed on the device to be tested.

[0046] In an embodiment of the present application, after the terminal sends a binding request containing the second Mac address of the device to be tested to the cloud, the cloud will determine whether the device to be tested meets the preset binding conditions based on the second Mac address. If the preset binding conditions are met, it means that the current terminal can be bound to the device to be tested, thereby establishing a binding relationship between the terminal and the device to be tested, and sending a binding success message to the terminal.

[0047] In the embodiment of the present application, the preset binding conditions are used to verify whether the current device to be tested is legal, whether the device to be tested can currently perform functional testing, and whether the device to be tested is currently allowed to establish a binding relationship with the terminal. Only after the preset binding conditions are verified, the binding relationship between the terminal and the device to be tested is established to ensure that the terminal can smoothly perform functional testing after binding, avoiding the problem of being unable to perform functional testing after binding.

[0048] In the embodiment of the present application, after the terminal receives the binding success information sent by the cloud, it determines that a binding relationship has been established with the device to be tested, and a function instruction can be sent to the device to be tested through the cloud, thereby displaying the first interface of the device to be tested.

[0049] In an embodiment of the present application, the binding success information is sent after determining that the device to be tested meets the preset binding conditions based on the second Mac address. The first interface includes at least one operable control, and the first interface can be used to perform functional testing on the device to be tested. For example, the first interface may include control controls for each function of the device to be tested, and the tester can perform functional testing on the device to be tested by triggering the control controls for each function.

[0050] In the embodiment of the present application, the method for determining the second Mac address is as follows: Figure 3 The specific contents are as follows: S201, determining an organization unique identifier and a first device unique identifier in a first MAC address; S202, converting the first device unique identifier according to a preset identifier conversion relationship between the first communication module and the second communication module to obtain a second device unique identifier; S203, combining the organization unique identifier and the second device unique identifier to obtain a second Mac address.

[0051] In an embodiment of the present application, the first Mac address and the second Mac address are both composed of an organization-unique identifier and a device-unique identifier. The organization-unique identifier is used to uniquely identify a specific organization or manufacturer. That is to say, since the first Mac address and the second Mac address belong to the same device to be tested, that is, the Bluetooth communication module corresponding to the first Mac address and the WiFi communication module corresponding to the second Mac address belong to the same organization, if the brand or manufacturer of the above-mentioned device to be tested is generated, then the organization-unique identifiers of the first Mac address and the second Mac address are the same; the device-unique identifier is used to distinguish different communication modules on the same device to be tested, that is, it can distinguish between Bluetooth communication modules and WiFi communication modules, and the identifier conversion relationship of the device-unique identifiers between different communication modules can be pre-defined, so that the device-unique identifier of another communication module can be determined based on the known device-unique identifier of one communication module.

[0052] In S201 of the embodiment of the present application, the first Mac address and the second Mac address belong to the same device to be tested. Therefore, the organization unique identifier in the first Mac address can be determined first to determine the organization unique identifier in the second Mac address, and the first device unique identifier in the first Mac address can be determined to further determine the device unique identifier of the second Mac address later.

[0053] In S202 of the embodiment of the present application, the terminal converts the acquired first device identifier of the first communication module into the second device identifier of the second communication module according to a predefined identifier conversion relationship between the first communication module and the second communication module.

[0054] In an embodiment of the present application, the identifier conversion relationship may be that a preset increment is formed between the last byte of the first device identifier and the last byte of the second device identifier, and the other bytes are the same. For example, if the last byte of the first device identifier is 5E, then the last byte of the second device identifier is 5F, and the other bytes of the first device identifier and the second device identifier are the same; the identifier conversion relationship may also be that certain bits of the first device identifier are operated according to a specific algorithm to obtain the bits corresponding to the second device identifier.

[0055] In S203 of the embodiment of the present application, since the organization unique identifier of the first Mac address in the first communication module is the same as the organization unique identifier of the second Mac address in the second communication module, after determining the second device identifier of the second communication module, the organization unique identifier and the second device identifier obtained from the first Mac address are combined to obtain the second Mac address of the second communication module.

[0056] In one example, the identifier conversion relationship between the first device identifier and the second device identifier is a preset increment, the first Mac address is 00:1A:2B:3C:4D:5E, wherein 00:1A:2B is the organization unique identifier of the first Mac address, 3C:4D:5E is the first device unique identifier of the first Mac address, the increment between the first device unique identifier and the second device unique identifier is, then the second device identifier is 3C:4D:5F, the organization unique identifier and the second device identifier are combined to obtain the second Mac address of 00:1A:2B:3C:4D:5F.

[0057] In the above scheme, by using the identifier conversion relationship used when generating the first Mac address and the second Mac address, the second Mac address of the same device to be tested can be obtained directly when the first Mac address is obtained, without obtaining it from the device to be tested, which greatly saves the test process and improves the test efficiency.

[0058] On the basis of the above embodiments, as an optional embodiment, the device identification of the device to be tested is obtained by scanning a first label preset on the outside of the device to be tested; the correspondence between the first Mac address and the device identification is that when the device to be tested is assembled, the scanning device obtains the device identification and the first Mac address of the device to be tested by scanning the first label on the outside of the device to be tested and the second label inside the device to be tested, and the device identification and the first Mac address are packaged and uploaded to the cloud, and then established by the cloud.

[0059] In an embodiment of the present application, a first label on the outside of the device to be tested is used to record information related to the device identification of the device to be tested, and a second label inside the device to be tested is used to record information related to the first Mac address of the device to be tested. Therefore, the device identification can be obtained by scanning the first label on the outside of the device to be tested, but since the label for the information related to the first Mac address is set inside the device to be tested, it cannot be directly obtained by scanning.

[0060] In the embodiment of the present application, the types of tags are QR code tags, barcode tags, NFC tags and RFID tags.

[0061] In the embodiment of the present application, in the process of producing equipment, it is necessary to record the equipment identification of each equipment, convert the equipment identification into information in a preset format through a specific program, and then record the information in the preset format through a label, establish a corresponding relationship between the equipment identification and the label, and print the label on the outer shell of the equipment to be tested or the packaging of the equipment to be tested, so that the staff or user can obtain the equipment identification of the equipment to be tested according to the pre-stored corresponding relationship between the label and the equipment identification after scanning the label. Therefore, in the above scheme, the terminal scans the label on the outside of the equipment to be tested to obtain the equipment identification of the equipment to be tested.

[0062] In an embodiment of the present application, during the production process of the device, it is also necessary to record the first Mac address of the device. Therefore, the first Mac address is also converted into information in a preset format through specific software, and then an industrial-grade printer is used to print the information in the preset format on a high-temperature resistant and waterproof label, recording the first Mac address corresponding to each label, and during the assembly process of the device, the pre-printed changes are pasted or embedded in the designated position inside the device to ensure that the label position will not affect the function of the device and will not fall off during the service life of the device.

[0063] In an embodiment of the present application, the first Mac address stored in the cloud is obtained by the scanning device through scanning the second label inside the device to be tested, and the device identification stored in the cloud is obtained by the scanning device scanning the first label outside the device to be tested. When assembling the device to be tested, the scanning device can obtain the device identification and the first Mac address of the device to be tested at the same time by scanning the second label inside the device to be tested and the first label outside the device to be tested. The scanning device packages the obtained device identification and first Mac address and sends them to the cloud, so that the cloud can store the association between the device identification and the first Mac address of the device to be tested in a database, so that when the terminal needs the first Mac address of the device to be tested, it can be obtained from the cloud according to the device identification.

[0064] In the above solution, the association and binding between the device identification and the first Mac address is automatically completed through the scanning device, thereby further improving production efficiency.

[0065] The present application provides a device connection method applied to the cloud, such as Figure 4 As shown, the method includes: S301, receiving a device identification of a device to be tested sent by a terminal, and obtaining a first Mac address corresponding to the device identification from a database.

[0066] In an embodiment of the present application, after the cloud receives the device identification sent by the terminal, it obtains the first Mac address corresponding to the device identification from a database storing the association relationship between the device identification and the first Mac address.

[0067] In an embodiment of the present application, the correspondence between the first Mac address and the device identification stored in the database is determined by a first tag and a second tag preset on the device to be tested, the first tag is used to record information related to the device identification, and the second tag is used to record information related to the first Mac address.

[0068] In an embodiment of the present application, since the Bluetooth module and the host of the device to be tested are generated separately, it is impossible to establish an association relationship between the device identification and the first Mac address in advance. Therefore, a first tag recording information related to the device identification of the device to be tested and a second tag recording information related to the first Mac address of the device to be tested are preset on the device to be tested, so that the correspondence between the device identification and the first Mac address can be determined and stored according to the first tag and the second tag preset on the same device to be tested, and the corresponding first Mac address can be determined from the database according to the device identification when the device identification sent by the terminal is received.

[0069] S302, sending the first Mac address to the terminal.

[0070] In an embodiment of the present application, the cloud sends a first Mac address so that the terminal searches for and connects to the device to be tested based on the first Mac address. That is to say, since the cloud sends the first Mac address of the device to be tested, after receiving the first Mac address, the terminal does not need to determine which device to connect to based on information such as signal strength, and can directly connect to the device to be tested based on the first Mac address.

[0071] The device connection method applied to the cloud provided in the embodiment of the present application pre-stores the association relationship between the device identification scanned when assembling the device to be tested and the first Mac address. When the cloud receives the device identification sent by the terminal, it can obtain the corresponding first Mac address from the database storing the above correspondence, and then send the first Mac address to the terminal, so that the terminal can directly search and connect to the device to be tested according to the first Mac address, without the need for manual search and connection based on the Bluetooth signal strength and other content, thereby solving the problem that the terminal is difficult to accurately identify and connect to the device to be tested, and greatly improves the test efficiency and accuracy, and reduces the test production cost and time cost.

[0072] Based on the above embodiments, as an optional embodiment, after sending the first Mac address to the terminal, a binding request containing a second Mac address sent by the terminal is received. If it is determined according to the second Mac address that the device to be tested meets the preset binding conditions, the binding relationship between the terminal and the device to be tested is stored, and a binding success message is sent to the terminal.

[0073] In the embodiment of the present application, the binding request is sent after the terminal is connected to the device to be tested, and the second Mac address is determined by the terminal according to the first Mac address.

[0074] In an embodiment of the present application, after the terminal establishes a connection with the device to be tested, the terminal determines the second Mac address of the device to be tested according to the first Mac address of the device to be tested, and sends a binding request including the second Mac address to the cloud.

[0075] In an embodiment of the present application, the cloud receives a binding request including a second Mac address sent by the terminal, obtains the second Mac address from the binding request, and prepares to determine whether the current terminal can be bound to the device to be tested based on the second Mac address.

[0076] In the embodiment of the present application, the preset binding conditions are used to verify whether the current device to be tested is legal, whether the device to be tested can currently perform functional testing, and whether the device to be tested is currently allowed to establish a binding relationship with the terminal. Only after the preset binding conditions are verified, the binding relationship between the terminal and the device to be tested is established to ensure that the terminal can smoothly perform functional testing after binding, avoiding the problem of being unable to perform functional testing after binding.

[0077] In an embodiment of the present application, the cloud determines whether the device to be tested meets the preset binding conditions based on the second Mac address. When the second Mac address meets the preset binding conditions, the binding relationship between the terminal and the device to be tested is stored, and a binding success message is sent to the terminal.

[0078] In the embodiment of the present application, a terminal and a device to be tested are in a binding relationship, and the terminal can remotely control the device to be tested through the cloud.

[0079] In the embodiment of the present application, the preset binding condition includes at least one of the following: The second Mac address conforms to the preset Mac address format; The cloud storage has a second Mac address; The number of binding requests containing the second Mac address received within a preset time period does not exceed a preset number threshold; The device to be tested corresponding to the second Mac address is currently allowed to be bound.

[0080] In an embodiment of the present application, the preset Mac address format is used to check whether the format of the second Mac address is correct, ensuring that it complies with the standard Mac address format, such as 12 hexadecimal digits, separator format, etc.

[0081] In the embodiment of the present application, the second Mac address is stored in the cloud, indicating that the test device corresponding to the second Mac address has been registered in the cloud, that is, it has passed the legality authentication.

[0082] In the embodiment of the present application, the number of binding requests containing the second Mac address received within a preset time period does not exceed a preset number, in order to avoid abuse of the device to be tested or prevent attacks.

[0083] In an embodiment of the present application, it is determined that the device to be tested corresponding to the second Mac address is currently allowed to be bound, that is, it is determined whether the device to be tested has now entered the test process, to avoid binding of devices that have not yet entered the test process, affecting the test efficiency.

[0084] In the above scheme, when a binding request containing a second Mac address is received from the terminal, it is determined whether the device to be tested meets the preset binding conditions based on the second Mac address. If so, a binding relationship between the terminal and the device to be tested is established, and a binding success message is sent to the terminal for the terminal to display a test interface for functional testing. At the same time, the binding request is verified according to the preset binding conditions, ensuring that the terminal is bound to the correct device to be tested in a safe environment.

[0085] Based on the above embodiments, as an optional embodiment, the cloud is further used to store the correspondence between the first Mac address and the device identifier in the database after receiving the device identifier and the first Mac address uploaded by the scanning device; The first Mac address and device identification are obtained by the scanning device by scanning the first label on the outside of the device to be tested and the second label inside the device to be tested when assembling the device to be tested. The device identification and the first Mac address are packaged and uploaded to the cloud.

[0086] In an embodiment of the present application, after the scanning device uploads the device identification and the first Mac address to the cloud, the cloud storage establishes and stores the corresponding relationship between the device identification and the first Mac address in a database.

[0087] In an embodiment of the present application, in the process of producing equipment, it is necessary to record the device identification of each device, convert the device identification into information in a preset format through a specific program, and then record the device identification related information through a label, establish a correspondence between the device identification and the first label, and print the first label on the outer shell of the device to be tested or the packaging of the device to be tested, so that the tester or purchaser can directly determine the device identification of the device to be tested based on the first label of the device to be tested when using the device to be tested.

[0088] In an embodiment of the present application, during the production process of the device, it is also necessary to record the first Mac address of the device. Therefore, the first Mac address is also converted into information in a preset format through specific software, and then an industrial-grade printer is used to print the information in the preset format on a high-temperature resistant and waterproof label, recording the first Mac address corresponding to each label, and during the assembly process of the device, the pre-printed transition is pasted or embedded in a specified position inside the device to ensure that the label position will not affect the function of the device and will not fall off during the service life of the device. The second label is pasted inside the device for use only when the staff scans the first label and the second label to establish a correspondence between the device identification and the first Mac address.

[0089] When assembling the device to be tested, the device identification and the first Mac address of the device to be tested are obtained simultaneously through a scanning device, and then the first Mac address and the device identification are sent to the cloud together. After the cloud receives the device identification and the first Mac address, the corresponding relationship between the device identification and the first Mac address is stored in the database.

[0090] In an embodiment of the present application, when assembling the device to be tested, the device identification and the first Mac address of the test device are obtained by scanning the label on the outside of the device to be tested and the label inside the device to be tested. By using a scanning device during assembly to directly transmit the device identification code and the first Mac address to the cloud, a correspondence between the device identification and the first Mac address is established, thereby avoiding erroneous operations caused by interference from Bluetooth broadcasts of multiple devices and greatly improving the test efficiency.

[0091] Based on the above embodiments, as an optional embodiment, the device identification and the first Mac address uploaded by the scanning device are received in a package; if it is determined that the device identification and the first Mac address are not recorded in the database, the association relationship between the device identification and the first Mac address is stored in the database.

[0092] In an embodiment of the present application, after receiving the device identification and the first Mac address sent by the scanning device, the cloud will not directly store the association between the device identification and the first Mac address in the data, but will first determine whether the current database has recorded the currently received device identification and the first Mac address. When it is determined that the device identification and the first Mac address are not recorded in the database, it means that the labels corresponding to the first Mac address and the device identification are scanned by the scanning device for the first time, and the first Mac address and the device identification are bound for the first time. Therefore, the correspondence between the device identification and the first Mac address can be stored in the database.

[0093] In an embodiment of the present application, if it is determined that the device identification is recorded in the database, the first Mac address associated with the device identification in the database is obtained, and the association failure information is returned to the scanning device; the association failure information includes the device identification and the associated first Mac address; if it is determined that the first Mac address is recorded in the database, the device identification associated with the first Mac address in the database is obtained, and the association failure information is returned to the scanning device; the association failure information includes the first Mac address and the associated device identification.

[0094] In an embodiment of the present application, if the cloud determines that the device identifier has been recorded in the database, it will obtain the first Mac address associated with the device identifier recorded in the database, and return association failure information to the scanning device, wherein the association failure information includes the device identifier and the first Mac address associated with the device identifier; if the cloud determines that the first Mac address has been recorded in the database, the cloud obtains the device identifier associated with the first Mac address recorded in the database, and returns association failure information to the scanning device, wherein the association failure information includes the first Mac address and the device identifier associated with the first Mac address. If the device identifier and the first Mac address have both been recorded in the database, the association failure information returned to the scanning device includes the first Mac address, the device identifier associated with the first Mac address, the device identifier, and the first Mac address associated with the device identifier.

[0095] In the above scheme, the cloud will establish a corresponding relationship between the first Mac address and the device identification only when it determines that the device identification and the first Mac address are not recorded in the database, ensuring that the label corresponding to the device identification and the first Mac address is only scanned once and only a unique association is made, avoiding problems when determining the first Mac address based on the device identification. When it is confirmed that the information has been recorded in the database, the cloud will return the association failure information to the scanning system, and will also return the recorded device identification and / or the content currently associated with the first Mac address to the first Mac address, which can help staff to correct current problems in a timely manner.

[0096] refer to Figure 5 As shown, it exemplarily shows an interactive flow chart of a device connection method, the specific contents are as follows: S401, when the device to be tested is assembled, the scanning device simultaneously scans the first label on the outside of the device to be tested and the second label on the inside of the device to be tested to obtain the device identification and the first Mac address of the device to be tested; S402, the scanning device sends the device identification and the first Mac address of the device to be tested to the cloud; S403: When the cloud determines that the device identifier and the first Mac address are not recorded in the database, the association relationship between the device identifier and the first Mac address is stored in the database; S404: Before the terminal is ready to test the device to be tested, the terminal scans a first label on the outside of the device to be tested to obtain a device identification of the device to be tested; S405, the terminal sends the device identification of the device to be tested to the cloud; S406, the cloud obtains the first Mac address associated with the device identifier from the database; S407, the cloud sends the first Mac address to the terminal; S408, the terminal establishes a connection with the device to be tested according to the first Mac address; S409, the terminal determines a second Mac address of the device to be tested according to the first Mac address; S410, the terminal sends a binding request including the second Mac address to the cloud; S411, when the cloud determines that the device to be tested meets the preset binding condition according to the second Mac address, the binding relationship between the terminal and the device to be tested is stored; S412, the cloud sends a binding success message to the terminal; S413: Display the first interface of the device to be tested.

[0097] The device connection method provided in the embodiment of the present application does not require the introduction of a high-cost signal shielding room. When testing a large number of devices, it can directly realize accurate identification and connection of the device by scanning the label on the outside of the device to be tested. In the assembly stage of the device, the device identification and the first Mac address are associated and the association relationship is stored, thereby avoiding incorrect connection due to interference from broadcast information of multiple Bluetooth devices, greatly improving the efficiency of device testing. Moreover, since the terminal only searches and connects to the specified first Mac address, the accuracy of the test process is ensured and production delays caused by incorrect connection are reduced. In addition, the device connection method provided in the present application is suitable for production environments of various sizes, and can be effectively applied for testing from small batch production to large-scale assembly lines. It can easily cope with production line layout adjustments or capacity expansion, and has strong flexibility.

[0098] The present application embodiment provides a terminal, such as Figure 6 As shown, the terminal 60 may include: a first acquisition module 601 and a first receiving module 602 .

[0099] A first acquisition module 601 is used to determine a device to be tested, obtain a device identification of the device to be tested based on a first tag preset on the device to be tested, and send the device identification to the cloud; The first receiving module 602 is used to receive the first Mac address sent by the cloud, and search and connect to the device to be tested according to the first Mac address; the first Mac address is determined by the cloud according to the device identifier; Among them, the correspondence between the first Mac address and the device identification stored in the cloud is determined by the first tag and the second tag preset on the device to be tested, the first tag is used to record the information related to the device identification, and the second tag is used to record the first Mac address related message.

[0100] The device of the embodiments of the present application can execute the method provided by the embodiments of the present application, and the implementation principles are similar. The actions performed by each module in the device of each embodiment of the present application correspond to the steps in the method of each embodiment of the present application. For the detailed functional description of each module of the device, please refer to the description in the corresponding method shown in the previous text, which will not be repeated here.

[0101] Further, in a possible implementation, after searching and connecting to the device to be tested according to the first Mac address, a second Mac address of the device to be tested is determined according to the first Mac address, and a binding request including the second Mac address is sent to the cloud; Receive the binding success information sent by the cloud, and display the first interface of the device to be tested; the binding success information is sent by the cloud after determining that the device to be tested meets the preset binding conditions according to the second Mac address, and the first interface includes at least one operable control; The first Mac address is the Mac address of the first communication module of the device to be tested, and the second Mac address is the Mac address of the second communication module of the device to be tested; Determine the organization unique identifier and the first device unique identifier in the first mac address; According to a preset identifier conversion relationship between the first communication module and the second communication module, convert the first device unique identifier to obtain the second device unique identifier; The organization unique identifier and the second device unique identifier are combined to obtain a second Mac address.

[0102] In another possible implementation, the device identification of the device to be tested is obtained by scanning a first tag preset on the outside of the device to be tested; The correspondence between the first Mac address and the device identification is established by the cloud after the scanning device obtains the device identification and the first Mac address of the device to be tested by scanning the first label on the outside of the device to be tested and the second label inside the device to be tested when assembling the device to be tested, and the device identification and the first Mac address are packaged and uploaded to the cloud.

[0103] The present application embodiment provides a terminal, such as Figure 7 As shown, the terminal 70 may include: a second acquisition module 701 and a sending module 702.

[0104] Specifically, the second acquisition module 701 is used to receive the device identification of the device to be tested sent by the terminal, and obtain the first Mac address corresponding to the device identification from the database; The sending module 702 is used to send the first Mac address to the terminal, so that the terminal searches for and connects to the device to be tested according to the first Mac address; The correspondence between the first Mac address and the device identification stored in the database is determined by a first tag and a second tag preset on the device to be tested, the first tag is used to record device identification related information, and the second tag is used to record first Mac address related information.

[0105] The device of the embodiments of the present application can execute the method provided by the embodiments of the present application, and the implementation principles are similar. The actions performed by each module in the device of each embodiment of the present application correspond to the steps in the method of each embodiment of the present application. For the detailed functional description of each module of the device, please refer to the description in the corresponding method shown in the previous text, which will not be repeated here.

[0106] Further, in a possible implementation, after sending the first Mac address to the terminal, a binding request including a second Mac address sent by the terminal is received; the binding request is sent after the terminal is connected to the device to be tested, and the second Mac address is determined by the terminal according to the first Mac address; If it is determined according to the second Mac address that the device to be tested meets the preset binding condition, the binding relationship between the terminal and the device to be tested is stored, and a binding success message is sent to the terminal; The preset binding conditions include at least one of the following: The second Mac address conforms to the preset Mac address format; The cloud storage has a second Mac address; The number of binding requests containing the second Mac address received within a preset time period does not exceed a preset number threshold; The device to be tested corresponding to the second Mac address is currently allowed to be bound.

[0107] In a possible implementation, the cloud is further used to store the correspondence between the first Mac address and the device identifier in a database after receiving the device identifier and the first Mac address uploaded by the scanning device; The first Mac address and device identification are obtained by the scanning device by scanning the first label on the outside of the device to be tested and the second label inside the device to be tested when assembling the device to be tested. The device identification and the first Mac address are packaged and uploaded to the cloud.

[0108] In a possible implementation, receiving a device identification and a first Mac address that are packaged and uploaded by a scanning device; If it is determined that the device identifier and the first Mac address are not recorded in the database, storing the association relationship between the device identifier and the first Mac address in the database; If it is determined that the device identification is recorded in the database, the first Mac address associated with the device identification in the database is obtained, and an association failure message is returned to the scanning device; the association failure message includes the device identification and the associated first Mac address; If it is determined that the first Mac address is recorded in the database, the device identifier associated with the first Mac address in the database is obtained, and association failure information is returned to the scanning device; the association failure information includes the first Mac address and the associated device identifier.

[0109] In an embodiment of the present application, an electronic device (computer device / equipment / system) is provided, including a memory, a processor and a computer program stored in the memory, and the processor executes the above-mentioned computer program to implement the steps of the device connection method. Compared with the related art, it can be achieved: the present application obtains the device identification of the device to be tested by a first tag preset on the device to be tested. Since the cloud has stored the corresponding relationship between the device identification and the first Mac address, the device identification is sent to the cloud to obtain the first Mac address of the device to be tested. After receiving the first Mac address of the device to be tested, the device is directly connected to the corresponding device to be tested according to the first Mac address. The present application directly connects to the device to be tested through the obtained first Mac address, ignoring the broadcast information of other Bluetooth devices, avoiding the interference of a large number of broadcast information of Bluetooth devices and causing erroneous connection, greatly improving the test efficiency, greatly saving the test process, and solving the technical problems of difficulty in accurately identifying and connecting the device to be tested, low test efficiency, low test accuracy and high test cost. In an optional embodiment, an electronic device is provided, such as Figure 8 As shown, Figure 8 The electronic device 4000 shown includes: a processor 4001 and a memory 4003. The processor 4001 and the memory 4003 are connected, such as through a bus 4002. Optionally, the electronic device 4000 may also include a transceiver 4004, which may be used for data interaction between the electronic device and other electronic devices, such as data transmission and / or data reception. It should be noted that in actual applications, the transceiver 4004 is not limited to one, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of the present application.

[0110] Processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. Processor 4001 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0111] The bus 4002 may include a path to transmit information between the above components. The bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus 4002 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 8 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0112] The memory 4003 may be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), magnetic disk storage media, other magnetic storage devices, or any other medium that can be used to carry or store computer programs and can be read by a computer, without limitation herein.

[0113] The memory 4003 is used to store the computer program for executing the embodiment of the present application, and the execution is controlled by the processor 4001. The processor 4001 is used to execute the computer program stored in the memory 4003 to implement the steps shown in the above method embodiment.

[0114] Among them, the electronic equipment package may include but is not limited to mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 8 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0115] The embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps and corresponding contents of the aforementioned method embodiment can be implemented. Compared with the prior art, it can be implemented as follows: the device identification of the device to be tested is obtained by presetting a first tag on the device to be tested, and since the cloud has stored the corresponding relationship between the device identification and the first Mac address, the device identification is sent to the cloud to obtain the first Mac address of the device to be tested, and after receiving the first Mac address of the device to be tested, the device to be tested is directly connected to the corresponding device to be tested according to the first Mac address. The present application directly connects to the device to be tested by obtaining the first Mac address, ignoring the broadcast information of other Bluetooth devices, avoiding the interference of a large number of broadcast information of Bluetooth devices and causing erroneous connection, greatly improving the test efficiency, greatly saving the test process, and solving the technical problems of difficulty in accurately identifying and connecting the device to be tested, low test efficiency, low test accuracy and high test cost.

[0116] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0117] The embodiment of the present application also provides a computer program product, including a computer program, which can implement the steps and corresponding contents of the aforementioned method embodiment when executed by a processor. Compared with the prior art, it can be achieved that: the device identification of the device to be tested is obtained by presetting a first tag on the device to be tested, and since the cloud has stored the corresponding relationship between the device identification and the first Mac address, the device identification is sent to the cloud to obtain the first Mac address of the device to be tested, and after receiving the first Mac address of the device to be tested, the first Mac address is directly connected to the corresponding device to be tested. The present application directly connects to the device to be tested through the obtained first Mac address, ignores the broadcast information of other Bluetooth devices, avoids the interference of a large number of broadcast information of Bluetooth devices and causes erroneous connection, greatly improves the test efficiency, greatly saves the test process, and solves the technical problems of difficulty in accurately identifying and connecting the device to be tested, low test efficiency, low test accuracy and high test cost.

[0118] The terms "first", "second", "third", "fourth", "1", "2", etc. (if any) in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than that shown or described in the drawings.

[0119] It should be understood that, although each operation step is indicated by arrows in the flowchart of the embodiment of the present application, the implementation order of these steps is not limited to the order indicated by the arrows. Unless clearly stated herein, in some implementation scenarios of the embodiment of the present application, the implementation steps in each flowchart can be performed in other orders according to demand. In addition, some or all of the steps in each flowchart may include multiple sub-steps or multiple stages based on actual implementation scenarios. Some or all of these sub-steps or stages may be executed at the same time, and each sub-step or stage in these sub-steps or stages may also be executed at different times respectively. In different scenarios of execution time, the execution order of these sub-steps or stages may be flexibly configured according to demand, and the embodiment of the present application does not limit this.

[0120] The above are only optional implementation methods for some implementation scenarios of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the technical concept of the scheme of the present application, other similar implementation methods based on the technical ideas of the present application are also within the protection scope of the embodiments of the present application.

Claims

1. A device connection method, characterized in that: Applied to a terminal, the method comprises: Determine a device to be tested, obtain a device identification of the device to be tested based on a first tag preset on the device to be tested, and send the device identification to the cloud; Receiving a first Mac address sent by the cloud, searching and connecting the device to be tested according to the first Mac address; the first Mac address is determined by the cloud according to the device identifier; Among them, the correspondence between the first Mac address stored in the cloud and the device identification is determined by presetting a first tag and a second tag on the device to be tested, the first tag is used to record the relevant information of the device identification, and the second tag is used to record the relevant information of the first Mac address.

2. The method according to claim 1, characterized in that The step of searching and connecting the device to be tested according to the first Mac address further includes: Determine a second Mac address of the device to be tested according to the first Mac address, and send a binding request including the second Mac address to the cloud; Receive the binding success information sent by the cloud, and display the first interface of the device to be tested; the binding success information is sent by the cloud after determining that the device to be tested meets the preset binding condition according to the second Mac address, and the first interface includes at least one operable control; The first Mac address is the Mac address of the first communication module of the device to be tested, and the second Mac address is the Mac address of the second communication module of the device to be tested; The determining the second Mac address of the device to be tested according to the first Mac address includes: Determine the organization unique identifier and the first device unique identifier in the first mac address; According to a preset identifier conversion relationship between the first communication module and the second communication module, convert the first device unique identifier to obtain a second device unique identifier; The organization unique identifier and the second device unique identifier are combined to obtain the second Mac address.

3. The method according to claim 1, characterized in that The device identification of the device to be tested is obtained by scanning a first tag preset outside the device to be tested; The correspondence between the first Mac address and the device identification is established by the cloud after the scanning device obtains the device identification and the first Mac address of the device to be tested by scanning the first label on the outside of the device to be tested and the second label inside the device to be tested when assembling the device to be tested, and the device identification and the first Mac address are packaged and uploaded to the cloud.

4. A device connection method, characterized in that: Applied to the cloud, the method includes: Receiving the device identification of the device to be tested sent by the terminal, and acquiring the first Mac address corresponding to the device identification from the database; Sending the first Mac address to the terminal, so that the terminal searches for and connects to the device to be tested according to the first Mac address; Among them, the correspondence between the first Mac address and the device identification stored in the database is determined by presetting a first tag and a second tag on the device to be tested, the first tag is used to record information related to the device identification, and the second tag is used to record information related to the first Mac address.

5. The method according to claim 4, characterized in that The sending the first Mac address to the terminal further includes: receiving a binding request including a second Mac address sent by the terminal; the binding request is sent after the terminal is connected to the device to be tested, and the second Mac address is determined by the terminal according to the first Mac address; If it is determined according to the second Mac address that the device to be tested meets the preset binding condition, the binding relationship between the terminal and the device to be tested is stored, and a binding success message is sent to the terminal; The preset binding condition includes at least one of the following: The second Mac address conforms to a preset Mac address format; The cloud stores the second Mac address; The number of binding requests containing the second Mac address received within a preset time period does not exceed a preset number threshold; The device to be tested corresponding to the second Mac address is currently allowed to be bound.

6. The method according to claim 4, characterized in that The cloud is also used to store the corresponding relationship between the first Mac address and the device identifier in the database after receiving the device identifier and the first Mac address uploaded by the scanning device; The first Mac address and the device identification are obtained by a scanning device when assembling the device to be tested by scanning a first label on the outside of the device to be tested and a second label inside the device to be tested, and the device identification and the first Mac address are packaged and uploaded to the cloud.

7. The method according to claim 6, characterized in that The method further comprises: Receive the device identification and the first Mac address uploaded by the scanning device in a package; If it is determined that the device identifier and the first Mac address are not recorded in the database, storing the association relationship between the device identifier and the first Mac address in the database; If it is determined that the device identifier is recorded in the database, the first Mac address associated with the device identifier in the database is obtained, and association failure information is returned to the scanning device; the association failure information includes the device identifier and the associated first Mac address; If it is determined that the first Mac address is recorded in the database, the device identifier associated with the first Mac address in the database is obtained, and association failure information is returned to the scanning device; the association failure information includes the first Mac address and the associated device identifier.

8. A terminal, characterized in that: include: A first acquisition module, used to determine a device to be tested, obtain a device identification of the device to be tested based on a first tag preset on the device to be tested, and send the device identification to the cloud; A first receiving module, used to receive a first Mac address sent by the cloud, and search and connect to the device to be tested according to the first Mac address; the first Mac address is determined by the cloud according to the device identifier; Among them, the correspondence between the first Mac address stored in the cloud and the device identification is determined by presetting a first tag and a second tag on the device to be tested, the first tag is used to record the relevant information of the device identification, and the second tag is used to record the relevant information of the first Mac address.

9. An electronic device comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Equipment binding method and system, storage medium and electronic device

    CN121239515A