A device connection method, apparatus, electronic device, and storage medium

By establishing a contact-based connection between wireless devices, and utilizing the waveform rules of the signal level and physical contact to transmit the signal level, the problem of unstable wireless device connections is solved, achieving a more reliable and secure connection method.

CN115442802BActive Publication Date: 2025-11-04HANGZHOU HIKROBOT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211018105.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-24
Publication Date
2025-11-04
Estimated Expiration
2042-08-24

AI Technical Summary

Technical Problem

Existing wireless device connection methods are not reliable and stable enough, and are prone to connection failure due to incorrect passwords or damaged QR codes, which poses security risks.

Method used

By establishing a contact connection between devices, using level signal waveform rules and physical contact to transmit level signals, the connection address of the devices is determined and the connection is established. The level signal can include encryption bit waveform signals and check bit waveform signals to improve security and reliability.

Benefits of technology

It improves the reliability and stability of device connections, enhances connection security, and avoids connection failures caused by incorrect passwords or damaged QR codes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115442802B_ABST
    Figure CN115442802B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a device connection method and apparatus, an electronic device and a storage medium. A first device has a first processor, the first device has a first level device, the first processor is electrically connected with the first level device, a second device has a second level device adapted to the first level device and a second processor, the second processor is electrically connected with the second level device, the method comprises: the first device acquires a level signal collected by the first level device, wherein the level signal is emitted by the second level device according to a preset level signal waveform rule based on a connection address of the second device after the second processor detects that the second level device is electrically connected with the first level device, the connection address of the second device is determined according to the level signal waveform rule and the waveform of the level signal, and a connection is established with the second device based on the connection address. The first device and the second device are connected through a contact type connection mode, and the reliability and stability of device connection are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of device connection, and in particular to a device connection method and device, an electronic device, and a storage medium. BACKGROUND

[0002] With the rapid development of wireless technology, the types of wireless devices are becoming more and more diverse. After the wireless devices are connected, convenient and fast wireless transmission can be achieved. At present, the connection mode of wireless devices can be based on WIFI (Wireless Fidelity, wireless local area network), Bluetooth, etc.

[0003] In the WIFI-based connection mode, the user needs to input the WIFI connection password through the wireless device to establish a connection. However, the user may input the password incorrectly or forget the password, resulting in a connection failure between the wireless devices, and there is a risk of leakage of the connection password. In the Bluetooth-based connection mode, for example, for a wireless gun product, when the gun is connected to the base, the gun needs to scan the two-dimensional code on the base to obtain the Bluetooth address of the base and complete the Bluetooth connection. However, when the gun cannot complete the code scanning due to some factors or the two-dimensional code is damaged, etc., this wireless connection mode will fail.

[0004] It can be seen that the current connection mode between devices is not reliable and stable. SUMMARY

[0005] The embodiments of the present application aim to provide a device connection method and device, an electronic device, and a storage medium to improve the reliability and stability of device connection. The specific technical solutions are as follows:

[0006] In a first aspect, the embodiments of the present application provide a device connection method applied to a first processor of a first device, the first device having a first level device, the first processor being electrically connected to the first level device, a second device having a second level device adapted to the first level device and a second processor, the second processor being electrically connected to the second level device, and the method comprising:

[0007] obtaining a level signal collected by the first level device, wherein the level signal is emitted by the second level device according to a preset level signal waveform rule based on a connection address of the second device after the second processor detects that the second level device is electrically connected to the first level device;

[0008] determining the connection address of the second device according to the level signal waveform rule and the waveform of the level signal;

[0009] establish a connection with the second device based on the connection address.

[0010] Optionally, the level signal comprises an encryption bit waveform signal.

[0011] The step of determining the connection address of the second device according to the level signal waveform rule and the waveform of the level signal comprises:

[0012] The step of determining the connection address of the second device according to the level signal waveform rule and the waveform of the level signal comprises:

[0013] The step of determining the connection address of the second device according to the level signal waveform rule and the waveform of the level signal comprises:

[0014] Optionally, the level signal comprises a check bit waveform signal.

[0015] The step of determining the connection address of the second device according to the level signal waveform rule and the waveform of the level signal comprises:

[0016] The step of determining the connection address of the second device according to the level signal waveform rule and the waveform of the level signal comprises:

[0017] The step of determining the connection address of the second device according to the level signal waveform rule and the waveform of the level signal comprises:

[0018] If correct, each character information except the character information corresponding to the check bit waveform signal is determined as the connection address of the second device.

[0019] If incorrect, the step of obtaining the level signal collected by the first level device is returned.

[0020] Optionally, the level signal comprises a preparation waveform signal.

[0021] The step of obtaining the level signal collected by the first level device comprises:

[0022] If the level signal collected by the first level device comprises a preparation waveform signal, the first preset number of waveform signals collected after the preparation waveform signal are taken as the level signals to be processed.

[0023] The step of determining the connection address of the second device according to the level signal waveform rule and the waveform of the level signal comprises:

[0024] determine the connection address of the second device according to the level signal waveform rule and the waveform of the level signal to be processed.

[0025] Optionally, the method further comprises:

[0026] determine the waveform of the first level signal based on the first target character information and the level signal waveform rule; output the first level signal to the second level device according to the determined waveform through the first level device, so that the second processor acquires the first level signal, and determines the first target character information according to the waveform of the first level signal and the level signal waveform rule, and / or,

[0027] acquire the second level signal collected by the first level device; and determine the second target character information according to the level signal waveform rule and the waveform of the second level signal, wherein the second level signal is determined by the second processor based on the second target character information and the level signal waveform rule.

[0028] Optionally, the waveform of the level signal specified in the level signal waveform rule includes at least one of a short waveform, a medium waveform, a long waveform, a rising edge jump, and a falling edge jump.

[0029] wherein the high level duration of the level signal of the short waveform, the level signal of the medium waveform, and the level signal of the long waveform are all different.

[0030] Optionally, a level code is composed of a second preset number of target waveforms, each level code corresponds to a character, and the character includes a number, a lowercase letter, an uppercase letter, and a special symbol.

[0031] wherein the target waveform includes the short waveform, the medium waveform, and the long waveform.

[0032] In a second aspect, an embodiment of the present application provides a device connection method applied to a second processor of a second device, the second device having a second level device, the second processor being electrically connected with the second level device, a first device having a first level device adapted to the second level device and a first processor, the first processor being electrically connected with the first level device, and the method comprising:

[0033] after detecting that the second level device is electrically connected with the first level device, determine the waveform of a level signal to be sent based on the connection address of the second processor and a preset level signal waveform rule;

[0034] The second level device sends a level signal according to the waveform, so that the first processor acquires the level signal collected by the first level device, determines the connection address of the second device according to the level signal waveform rule and the level signal, and establishes a connection with the second device based on the connection address.

[0035] Optionally, the method further comprises at least one of the following steps:

[0036] In the process of sending the level signal according to the waveform, an encryption bit waveform signal is added to the level signal based on a preset encryption rule;

[0037] In the process of sending the level signal according to the waveform, a check bit waveform signal is added to the level signal based on a preset check rule;

[0038] A preliminary waveform signal is added before the level signal.

[0039] Optionally, the method further comprises:

[0040] The first level signal is acquired by the second level device, and the first target character information is determined according to the waveform of the first level signal and the level signal waveform rule, wherein the first level signal is determined by the first processor based on the first target character information and the level signal waveform rule, and / or,

[0041] The waveform of the second level signal is determined based on the second target character information and the level signal waveform rule, the second level signal is sent to the first level device by the second level device according to the determined waveform, so that the first processor acquires the second level signal collected by the first level device, and the second target character information is determined according to the level signal waveform rule and the waveform of the second level signal.

[0042] In a third aspect, an apparatus for device connection is provided, which is applied to a first processor of a first device, the first device has a first level device, the first processor is electrically connected with the first level device, a second device has a second level device and a second processor, the second level device is adapted to the first level device, the second processor is electrically connected with the second level device, and the apparatus comprises:

[0043] A level signal acquisition module is configured to acquire a level signal collected by the first level device, wherein the level signal is sent by the second level device according to a preset level signal waveform rule after the second processor detects that the second level device is electrically connected with the first level device;

[0044] The connection address determination module is configured to determine a connection address of the second device according to the level signal waveform rule and the waveform of the level signal.

[0045] The first connection module is configured to establish a connection with the second device based on the connection address.

[0046] Optionally, the level signal comprises an encryption bit waveform signal.

[0047] The connection address determination module comprises:

[0048] The first conversion submodule is configured to convert the level signal into character information according to the level signal waveform rule and the waveform of the level signal.

[0049] The connection address acquisition submodule is configured to process target character information based on the character information corresponding to the encryption bit waveform signal and a preset encryption rule, to obtain the connection address of the second device, wherein the target character information is each character information except the character information corresponding to the encryption bit waveform signal, or the target character information is each character information after the character information corresponding to the encryption bit waveform signal.

[0050] Optionally, the level signal comprises a check bit waveform signal.

[0051] The connection address determination module comprises:

[0052] The second conversion submodule is configured to convert the level signal into character information according to the level signal waveform rule and the waveform of the level signal.

[0053] The character information determination submodule is configured to determine whether the character information corresponding to the check bit waveform signal is correct based on a preset check rule.

[0054] The first determination submodule is configured to determine each character information except the character information corresponding to the check bit waveform signal as the connection address of the second device if the character information is correct.

[0055] The first acquisition submodule is configured to acquire the level signal collected by the first level device if the character information is incorrect.

[0056] Optionally, the level signal comprises a preliminary waveform signal.

[0057] The level signal acquisition module comprises:

[0058] The second acquisition submodule is configured to, if the level signal collected by the first level device comprises the preliminary waveform signal, take the first preset number of waveform signals collected after the preliminary waveform signal as the level signal to be processed.

[0059] The connection address determining module comprises:

[0060] The second determining sub-module is configured to determine the connection address of the second device according to the level signal waveform rule and the waveform of the to-be-processed level signal.

[0061] Optionally, the apparatus further comprises:

[0062] The first determining module is configured to determine the waveform of the first level signal based on the first target character information and the level signal waveform rule, and output the first level signal to the second level device according to the determined waveform through the first level device, so that the second processor acquires the first level signal and determines the first target character information according to the waveform of the first level signal and the level signal waveform rule, and / or,

[0063] acquire the second level signal collected by the first level device, and determine the second target character information according to the level signal waveform rule and the waveform of the second level signal, wherein the second level signal is determined by the second processor based on the second target character information and the level signal waveform rule.

[0064] Optionally, the waveform of the level signal specified by the level signal waveform rule comprises at least one of a short waveform, a medium waveform, a long waveform, a rising edge jump, and a falling edge jump.

[0065] The high-level duration of the level signal of the short waveform, the level signal of the medium waveform, and the level signal of the long waveform are all different.

[0066] Optionally, a level code is composed of a second preset number of target waveforms, each level code corresponds to one character, and the character comprises a number, a lowercase letter, an uppercase letter, and a special symbol.

[0067] The target waveform comprises the short waveform, the medium waveform, and the long waveform.

[0068] In a fourth aspect, an embodiment of the present application provides a device connection apparatus applied to a second processor of a second device, the second device having a second level device, the second processor being electrically connected with the second level device, a first device having a first level device adapted to the second level device and a first processor, the first processor being electrically connected with the first level device, and the apparatus comprising:

[0069] The waveform determining module is configured to determine the waveform of a to-be-sent level signal based on the connection address of the second processor and a preset level signal waveform rule when detecting that the second level device is electrically connected with the first level device.

[0070] a second connection module, configured to send a level signal according to the waveform through the second level device, so that the first processor acquires the level signal collected by the first level device, determines a connection address of the second device according to the level signal waveform rule and the level signal, and establishes a connection with the second device based on the connection address.

[0071] Optionally, the apparatus further comprises at least one of the following modules:

[0072] a first adding module, configured to add an encrypted bit waveform signal in the level signal based on a preset encryption rule in the process of sending the level signal according to the waveform;

[0073] a second adding module, configured to add a check bit waveform signal in the level signal based on a preset check rule in the process of sending the level signal according to the waveform;

[0074] a third adding module, configured to add a preliminary waveform signal before the level signal.

[0075] Optionally, the apparatus further comprises:

[0076] a second determining module, configured to acquire a first level signal through the second level device, and determine first target character information according to the waveform of the first level signal and the level signal waveform rule, wherein the first level signal is determined by the first processor based on the first target character information and the level signal waveform rule, and / or,

[0077] determine a waveform of a second level signal based on second target character information and the level signal waveform rule, send the second level signal to the first level device through the second level device according to the determined waveform, so that the first processor acquires the second level signal collected by the first level device, and determines the second target character information according to the level signal waveform rule and the waveform of the second level signal.

[0078] In a fifth aspect, an embodiment of the present application provides an electronic device, including a first processor, a first level device, a first communication interface, a first memory and a first communication bus, wherein the first processor is electrically connected with the first level device, the first processor, the first communication interface and the first memory complete communication with each other through the first communication bus.

[0079] the first memory is configured to store a computer program;

[0080] the first processor is configured to execute the program stored in the first memory, and implement the method steps of any one of the first aspect.

[0081] In a sixth aspect, an embodiment of the present application provides an electronic device, comprising a second processor, a second level device, a second communication interface, a second memory and a second communication bus, wherein the second processor is electrically connected with the second level device, the second processor, the second communication interface and the second memory complete mutual communication through the second communication bus.

[0082] The second memory is configured to store a computer program.

[0083] The second processor is configured to execute the program stored in the second memory, and implement the method steps of any one of the second aspect.

[0084] In a seventh aspect, an embodiment of the present application provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the method steps of the first aspect or the second aspect.

[0085] The embodiment of the present application has the following beneficial effects:

[0086] In the scheme provided by the embodiment of the present application, the first device has a first processor, the first device has a first level device, the first processor is electrically connected with the first level device, the second device has a second level device adapted to the first level device and a second processor, the second processor is electrically connected with the second level device, the first processor of the first device acquires a level signal collected by the first level device, wherein the level signal is emitted by the second level device according to a preset level signal waveform rule based on a connection address of the second device after the second processor detects that the second level device is electrically connected with the first level device, the connection address of the second device is determined according to the level signal waveform rule and the waveform of the level signal, and the connection with the second device is established based on the connection address. Since the level signal acquired by the first processor of the first device is emitted by the second level device of the second device according to the preset level signal waveform rule based on the connection address of the second device, the first processor of the first device can determine the connection address of the second device based on the level signal waveform rule and the waveform of the level signal, and then can establish the connection with the second device based on the connection address. The level signal can be transmitted through the physical contact of the first level device and the second level device, and the reliability and stability of the device connection can be improved through the contact type connection mode. Of course, any product or method implementing the present application does not necessarily need to achieve all the advantages described above. BRIEF DESCRIPTION OF DRAWINGS

[0087] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other embodiments can be obtained based on these drawings.

[0088] Figure 1 A flowchart illustrating the first device connection method provided in this application embodiment;

[0089] Figure 2 Based on Figure 1 A schematic diagram of the level signal in the embodiment shown;

[0090] Figure 3 for Figure 1 A specific flowchart of step S102 in the illustrated embodiment;

[0091] Figure 4 for Figure 1 Another specific flowchart of step S102 in the illustrated embodiment;

[0092] Figure 5 A flowchart illustrating the second device connection method provided in this application embodiment;

[0093] Figure 6 This is a schematic diagram of the structure of the first device connection device provided in the embodiments of this application;

[0094] Figure 7 This is a schematic diagram of the structure of the second type of device connection device provided in the embodiments of this application;

[0095] Figure 8 This is a schematic diagram of the structure of a first type of electronic device provided in an embodiment of this application;

[0096] Figure 9 This is a schematic diagram of the structure of a second electronic device provided in an embodiment of this application. Detailed Implementation

[0097] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art based on this application are within the scope of protection of this application.

[0098] To improve the reliability and stability of device connection, embodiments of the present application provide a device connection method, device, electronic device, computer readable storage medium and computer program product. First, the first device connection method provided by the embodiments of the present application is introduced.

[0099] The first device connection method provided by the embodiments of the present application can be applied to the first processor of the first device among the first device and the second device which need to be connected. The first device and the second device can be wireless devices. The first device has a first level device, the first processor is electrically connected with the first level device, the second device has a second level device adapted to the first level device and a second processor, and the second processor is electrically connected with the second level device.

[0100] As shown in Figure 1 A device connection method applied to the first processor of the first device, the method comprises:

[0101] S101, acquiring the level signal collected by the first level device;

[0102] The level signal is emitted by the second level device according to the preset level signal waveform rule based on the connection address of the second device after the second processor detects that the second level device is electrically connected with the first level device.

[0103] S102, determining the connection address of the second device according to the level signal waveform rule and the waveform of the level signal;

[0104] S103, establishing connection with the second device based on the connection address.

[0105] It can be seen that in the scheme provided in the embodiments of the present application, the first device has a first processor, the first device has a first level device, the first processor is electrically connected with the first level device, the second device has a second level device matched with the first level device and a second processor, the second processor is electrically connected with the second level device, the first processor of the first device acquires the level signal collected by the first level device, wherein the level signal is emitted by the second level device according to a preset level signal waveform rule based on the connection address of the second device after the second processor detects that the second level device is electrically connected with the first level device, the connection address of the second device is determined according to the level signal waveform rule and the waveform of the level signal, and the connection with the second device is established based on the connection address. Since the level signal acquired by the first processor of the first device is emitted by the second level device of the second device according to the preset level signal waveform rule based on the connection address of the second device, the first processor of the first device can determine the connection address of the second device based on the level signal waveform rule and the waveform of the level signal, and then can establish the connection with the second device based on the connection address. The level signal can be transmitted through the physical contact of the first level device and the second level device, and the reliability and stability of the device connection can be improved through the contact type connection.

[0106] At present, wireless devices are more and more popular with users and are applied in various scenes of life and work. For example, users can use WIFI wireless devices to connect to wireless networks, and can use Bluetooth wireless devices to transmit photos, files, etc. However, the stability and reliability of the current wireless device connection mode are not high enough. Therefore, in the scheme provided in the embodiments of the present application, a contact type connection is established between devices, and the level signal is transmitted through the contact of the first level device and the second level device, so that the connection between the first device and the second device is established based on the connection address of the second device represented by the level signal.

[0107] Specifically, when the first device and the second device need to establish a connection, the first device and the second device can be physically contacted to electrically connect the mutually matched first level device and the second level device. The first level device and the second level device can be a spring piece, a pin, etc., as long as they can be matched with each other and can transmit the level signal, which is not limited here.

[0108] After the second processor of the second device detects that the second level device is electrically connected with the first level device, the second processor can determine the waveform of the level signal to be sent according to the preset level signal waveform rule based on the connection address of the second device, that is, the connection address of the second device itself, and then the second level device sends the level signal according to the waveform. In this way, the first processor of the first device can obtain the level signal collected by the first level device in step S101. The level signal waveform rule can be a preset corresponding relationship between the waveform of the level signal and the character information.

[0109] The level signal is a signal represented by a level value, where the level value is divided into a high level value "1" and a low level value "0". The level signal includes two signal characteristics, namely, edge transition and waveform length. The edge transition is a signal of high-low level transition, which can include rising edge transition and falling edge transition. As shown in Figure 2 The rising edge transition can represent the transition from low level to high level, and the falling edge transition can represent the transition from high level to low level. The waveform of the level signal represents the shape and form of the level signal. As shown in Figure 2 The waveform of the level signal can include short waveform, medium waveform and long waveform. Different waveforms of the level signal have different high level durations.

[0110] For example, based on the high level duration of the level signal, the waveform with a high level duration of 10 ms can be set as a short waveform, the waveform with a high level duration of 30 ms can be set as a medium waveform, and the waveform with a high level duration of 70 ms can be set as a long waveform, which is not limited here.

[0111] Since the waveform of the level signal can be set based on the high level duration, a plurality of waveforms of the level signal can be preset, and the plurality of waveforms of the level signal can be arranged and combined to set the level signal waveform rule.

[0112] For example, based on the high level duration, three waveforms are set, which are short waveform, medium waveform and long waveform. The three waveforms can be arranged and combined to set 27 kinds of level signal waveform rules, such as short waveform-medium waveform-long waveform, short waveform-short waveform-long waveform, medium waveform-long waveform-short waveform, etc. When device A is connected with device B, the level device of device B can send a level signal according to the preset level signal waveform rule based on its connection address, and the level signal waveform can be short waveform-medium waveform-long waveform-medium waveform-long waveform-short waveform-short waveform-short waveform-long waveform.

[0113] In step S101, the second level device is electrically connected to the first level device, which can be a contact connection, i.e., a connection method based on a physical path. In an embodiment, the first level device and the second level device can be connected through the pins of the devices. After the second processor detects that the first level device is electrically connected to the second level device, the second processor sends a level signal through the pins according to a preset level signal waveform rule based on the connection address of the second device, so that the first processor of the first device can obtain the level signal collected by the pins.

[0114] For example, in a product of a bar gun, when the bar gun and its base establish a connection, the bar gun can be inserted into the base, and then the level device of the bar gun and the level device of the base can be connected through the pins. After the processor of the base detects that the level device of the base is connected to the level device of the bar gun, the processor of the base can send a level signal through the pins according to a preset level signal waveform rule based on the Bluetooth address of the base, so that the processor of the bar gun can obtain the level signal collected by the pins.

[0115] In another embodiment, the first level device and the second level device can be connected through an interface of the devices, which can be a USB (Universal Serial Bus) interface or the like, which is not limited herein.

[0116] For example, a user wants to connect a tablet computer to a wireless network, and the tablet computer and the router need to establish a connection. Then the tablet computer and the router can be connected through an interface. After the processor of the tablet computer detects that the level device of the tablet computer is connected to the level device of the router, the processor of the tablet computer can send a level signal through the interface according to a preset level signal waveform rule based on the address of the tablet computer, so that the processor of the router can obtain the level signal collected by the interface.

[0117] In step S102, the first processor of the first device can determine the connection address of the second device according to the level signal waveform rule and the waveform of the level signal collected by the first level device. Since the waveform of the level signal is sent by the second processor of the second device through the second level device according to the preset level signal waveform rule based on the connection address of the second device, the processor of the first device can determine the connection address of the second device according to the preset level signal waveform rule and the waveform of the level signal.

[0118] For example, the preset level signal waveform rule is that 3 waveforms of short, medium and long waveforms are arranged and combined, 27 kinds of level signal waveform rules can be set, the device A and the device B are connected, the device A obtains the waveform of the level signal collected by the level device thereof, which is: short wave-form-medium wave-form-long wave-form-medium wave-form-long wave-form-short wave-form-short wave-form-short wave-form-long wave-form, then, based on the waveform of the level signal and the preset level signal waveform rule, the processor of the device A can determine that the address of the device B is dzB.

[0119] After the first processor of the first device determines the connection address of the second device, in the step S103, the first processor of the first device can establish connection with the second device based on the connection address.

[0120] For example, the device C is connected with the device D, the processor of the device C can determine that the connection address of the device D is dizhiD, then, the processor of the device C can establish connection with the device D based on the dizhiD.

[0121] In the scheme of the embodiment, since the level signal obtained by the first processor of the first device is emitted by the second level device of the second device based on the connection address of the second device according to the preset level signal waveform rule, the first processor of the first device can determine the connection address of the second device based on the level signal waveform rule and the waveform of the level signal, and then can establish connection with the second device based on the connection address, and the reliability and stability of the device connection can be improved through the contact type connection mode by the physical contact transmission of the level signal by the first level device and the second level device.

[0122] As an embodiment of the application, in order to ensure the security of the device connection, an encryption bit waveform signal can be set in the above-mentioned level signal, that is, the level signal can include an encryption bit waveform signal. The encryption bit waveform signal is a waveform signal corresponding to an encryption character information.

[0123] The step of determining the connection address of the second device according to the level signal waveform rule and the waveform of the level signal, as shown in Figure 3 may include:

[0124] S301, converting the level signal into character information according to the level signal waveform rule and the waveform of the level signal;

[0125] In an embodiment, the connection address of the second device is character information, then the first processor of the first device can convert the level signal into character information according to the preset level signal waveform rule and the waveform of the level signal. The character information can be letters, numbers, special symbols, etc., which are not limited here.

[0126] For example, the waveform of the preset level signal can include a short waveform, a medium waveform, and a long waveform. Based on the preset level signal waveform, the preset level signal waveform rule is as follows:

[0127] Character information Level signal waveform rule d Short waveform - middle waveform - long waveform i Middle waveform - long waveform - short waveform z Short waveform - short waveform - long waveform h Short waveform - long waveform - middle waveform B Long waveform - long waveform - middle waveform

[0128] The processor of the device A can obtain the level signal collected by the level device of the device A. The signal waveform is a short waveform-medium waveform-long waveform-medium waveform-long waveform-short waveform-short waveform-long waveform-short waveform-long waveform-medium waveform-medium waveform-long waveform-short waveform-long waveform-long waveform-medium waveform. The processor of the device A can convert the level signal into character information dizhiB according to the preset level signal waveform rule and the waveform of the level signal.

[0129] In S302, the target character information is processed based on the character information corresponding to the encrypted bit waveform signal and the preset encryption rule, to obtain the connection address of the second device.

[0130] Since the level signal can include the encrypted bit waveform signal, the processor of the first device can process the target character information based on the character information corresponding to the encrypted bit waveform signal and the preset encryption rule, to obtain the connection address of the second device. The target character information can be each character information except the character information corresponding to the encrypted bit waveform signal, or the target character information can be each character information after the character information corresponding to the encrypted bit waveform signal.

[0131] In an embodiment, the character information corresponding to the encrypted bit waveform signal can be a number, and the preset encryption rule can be a mathematical operation on the numbers included in the target character information, which can be addition, subtraction, multiplication, division, squaring, square root, etc., which is not limited here.

[0132] For example, the character information corresponding to the encrypted waveform signal is 4, and the preset encryption rule is to add 4 to the numbers in each character information except 4. The processor of the device C can convert the obtained level signal into character information fe10:dd04:24b0:b3ad:3bdb. Based on the preset encryption rule, each character information except 4 is processed, and the connection address of the device D is fe54:dd44:64b4:b7ad:7bdb.

[0133] In another embodiment, the character information corresponding to the encrypted bit waveform signal can be a letter, and the preset encryption rule can be a case conversion of the letters included in the target character information based on the letter.

[0134] For example, the character information corresponding to the encrypted waveform signal is S, and the preset encryption rule is to perform case conversion on each character information after S. The device E and the device F are connected, and the processor of the device E can convert the obtained level signal into character information fe10:FE04:24b0:dW3SAbdb. Based on the preset encryption rule, case conversion is performed on each character information after S, and the connection address of the device F is fe10:FE04:24b0:dW3SaBDB.

[0135] In another embodiment, the character information corresponding to the encrypted bit waveform signal can be a combination of numbers, letters or special symbols, and the preset encryption rule can be to exchange the character information before the character information combination and the character information after the character information combination.

[0136] For example, the character information corresponding to the encrypted waveform signal is 0:d, and the preset encryption rule is to exchange the character information before 0:d and the character information after 0:d. The device G and the device H are connected, and the processor of the device G can convert the obtained level signal into character information fe10:FE04:24b0:dW3aS:bdb. Based on the preset encryption rule, the character information before 0:d and the character information after 0:d are processed, and the connection address of the device H is W3aS:bdb0:dfe10:FE04:24b.

[0137] It can be seen that in the embodiment, the first processor of the first device can convert the level signal into character information according to the level signal waveform rule and the waveform of the level signal, process the target character information based on the character information corresponding to the encrypted bit waveform signal and the preset encryption rule, and obtain the connection address of the second device. Since the encrypted bit waveform signal is added to the level signal, the processor of the first device can process the target character information based on the character information corresponding to the encrypted bit waveform signal, and then determine the address of the second device, thereby improving the security of device connection.

[0138] As an embodiment of the present application, in order to ensure the reliability of device connection, a check bit waveform signal can be added to the above-mentioned level signal, that is, the level signal can include a check bit waveform signal. The check bit waveform signal is a waveform signal corresponding to a check bit character information.

[0139] The step of determining the connection address of the second device according to the level signal waveform rule and the waveform of the level signal, as shown in Figure 4 may include:

[0140] S401, converting the level signal into character information according to the level signal waveform rule and the waveform of the level signal;

[0141] The step S401 is specifically implemented as described in the above embodiment, and thus will not be repeated here.

[0142] S402, determining whether the character information corresponding to the check bit waveform signal is correct based on a preset check rule;

[0143] Since the level signal can include the check bit waveform signal, the processor of the first device can determine whether the character information corresponding to the check bit waveform signal is correct based on a preset check rule.

[0144] In an embodiment, the preset check rule can take one or more bits of the character information as the character information corresponding to the check bit waveform signal. The one or more bits of the character information can be located at any position of the character information, which is not specifically limited here.

[0145] For example, the preset check rule is to take the character information dd as the character information corresponding to the check bit waveform signal. The device A and the device B are connected. The processor of the device A can convert the obtained level signal into the character information fe10:dd04:24b0:b3ad:b. Then, the processor of the device A can determine whether the check bit character information dd is correct based on the preset check rule.

[0146] In another embodiment, the preset check rule can take the number of bits of the character information as the character information corresponding to the check bit waveform signal. The number representing the number of bits can be located at any position of the character information, which is not specifically limited here.

[0147] For example, the preset check rule is to take the number of bits of the character information as the character information corresponding to the check bit waveform signal. The number of bits of the character information is located at the end of the character information. The device C and the device D are connected. The processor of the device C can convert the obtained level signal into the character information fe10ad:3bdby12. Then, the processor of the device C can determine whether 12 representing the number of bits of the character information at the end of the character information is correct based on the preset check rule.

[0148] S403, if correct, determining each character information except the character information corresponding to the check bit waveform signal as the connection address of the second device;

[0149] When the first processor of the first device determines that the character information corresponding to the check bit waveform signal is correct based on the preset check rule, each character information except the character information corresponding to the check bit waveform signal can be determined as the connection address of the second device.

[0150] For example, the preset check rule is to take the character information ddd as the character information corresponding to the check bit waveform signal, the device E and the device F are connected, the processor of the device E can convert the obtained level signal into the character information fe10: ddd04: 24b0: b3b, and determine that the ddd in the character information is correct, so that each character information except the ddd can be determined as the connection address of the device F, that is, fe10: 04: 24b0: b3b.

[0151] S404, if not correct, return to the step of obtaining the level signal collected by the first level device.

[0152] When the first processor of the first device determines that the character information corresponding to the check bit waveform signal is incorrect based on the preset check rule, the step S101 of obtaining the level signal collected by the first level device can be returned, and then it is further determined whether the character information corresponding to the check bit waveform signal in the level signal is correct.

[0153] For example, the preset check rule is to take the character information ddd as the character information corresponding to the check bit waveform signal, the device E and the device F are connected, the processor of the device E can convert the obtained level signal into the character information fe10: ddd04: 24b0: b3b, and determine that the ddd in the character information is correct, so that each character information except the ddd can be determined as the connection address of the device F, that is, fe10: 04: 24b0: b3b.

[0154] It can be seen that in the embodiment, the first processor of the first device can convert the level signal into character information according to the level signal waveform rule and the waveform of the level signal, determine whether the character information corresponding to the check bit waveform signal is correct based on the preset check rule, if correct, determine each character information except the character information corresponding to the check bit waveform signal as the connection address of the second device, if not correct, return to the step of obtaining the level signal collected by the first level device. Since the check bit waveform signal is added to the level signal, the obtained level signal can be checked based on the preset check rule, thereby ensuring the accuracy of the connection address of the second device and improving the reliability of the device connection.

[0155] As an embodiment of the present application, in order to ensure the effective contact of the device and establish a stable connection, a preliminary waveform signal can be added to the above-mentioned level signal, that is, the level signal can include a preliminary waveform signal. The preliminary waveform signal is a waveform signal added before the level signal corresponding to the connection address.

[0156] The above-mentioned step of obtaining the level signal collected by the first level device can include:

[0157] If the first level device collects a level signal including a preliminary waveform signal, the first preset number of waveform signals collected after the preliminary waveform signal are taken as the level signals to be processed.

[0158] In an embodiment, the first level device and the second level device are in contact connection, and the preliminary waveform signal can be added in front of the level signal corresponding to the connection address of the second device. Then, the first level device collects a level signal including the preliminary waveform signal, and the first preset number of waveform signals collected after the preliminary waveform signal are taken as the level signals to be processed.

[0159] For example, the preliminary waveform signal is a waveform signal corresponding to short waveform-short waveform-short waveform, the device A and the device B are connected, and the level signal collected by the level device of the device A is a waveform signal corresponding to short waveform-short waveform-short waveform-short waveform-medium waveform-long waveform-medium waveform-long waveform-short waveform-short waveform-short waveform-long waveform. The level signal includes the preliminary waveform signal, and then the processor of the device A can take the 9 waveform signals collected after the preliminary waveform signal as the level signals to be processed, i.e., take the waveform signals corresponding to short waveform-medium waveform-long waveform-medium waveform-long waveform-short waveform-short waveform-short waveform-long waveform as the level signals to be processed.

[0160] The above step of determining the connection address of the second device according to the level signal waveform rule and the waveform of the level signal can include:

[0161] Determining the connection address of the second device according to the level signal waveform rule and the waveform of the level signal to be processed.

[0162] Since the level signal to be processed is the level signal without the preliminary waveform signal, the first processor of the first device can determine the connection address of the second device according to the level signal waveform rule and the waveform of the level signal to be processed.

[0163] For example, based on the above example, the device A and the device B are connected, and the processor of the device A obtains the level signals to be processed corresponding to the waveform signals of short waveform-medium waveform-long waveform-medium waveform-long waveform-short waveform-short waveform-short waveform-long waveform. The waveform rule of the preset level signal is as follows:

[0164] Character information Level signal waveform rule d Short waveform - middle waveform - long waveform z Middle waveform - long waveform - short waveform h Short waveform - short waveform - long waveform

[0165] Then, based on the level signals to be processed and the waveform rule of the preset level signal, the processor of the device A can determine that the connection address of the device B is dzh.

[0166] It can be seen that in the embodiment, the level signal collected by the first level device includes the preliminary waveform signal, the first preset number of waveform signals collected after the preliminary waveform signal are taken as the to-be-processed level signal, and the connection address of the second device is determined according to the level signal waveform rule and the waveform of the to-be-processed level signal. Since the level signal collected by the first level device includes the preliminary waveform signal, when the first device and the second device are determined to be stably connected, the first processor of the first device takes the first preset number of waveform signals collected after the preliminary waveform signal as the to-be-processed level signal, so that the stability and reliability of the device connection can be ensured.

[0167] As an implementation manner of the embodiment of the present application, the above method can further include:

[0168] determining the waveform of the first level signal based on the first target character information and the level signal waveform rule; outputting, by the first level device, the first level signal to the second level device according to the determined waveform, so that the second processor acquires the first level signal, and determines the first target character information according to the waveform of the first level signal and the level signal waveform rule, and / or,

[0169] acquiring the second level signal collected by the first level device; and determining the second target character information according to the level signal waveform rule and the waveform of the second level signal, wherein the second level signal is determined by the second processor based on the second target character information and the level signal waveform rule.

[0170] In an implementation manner, when the first device and the second device are connected, the first processor of the first device can determine the second target character information, and the second processor of the second device can determine the first target character information. The processor of the first device can determine the waveform of the first level signal based on the first target character information and the level signal waveform rule, the first level device of the first device can output the first level signal to the second level device of the second device according to the determined waveform, so that the second processor of the second device can acquire the first level signal and determine the first target character information according to the waveform of the first level signal and the level signal waveform rule. In order to ensure the reliability of the connection between the first device and the second device, the second level device of the second device can send the second level signal to the first device, and then the first processor of the first device can acquire the second level signal collected by the first level device, determine the second target character information according to the level signal waveform rule and the waveform of the second level signal, wherein the second level signal is determined by the second processor based on the second target character information and the level signal waveform rule.

[0171] For example, the device A and the device B are connected, the connection address of the device A is dizhiA, based on the level signal waveform rule and the connection address, the processor of the device A can determine that the level signal waveform a of the device A is long waveform-middle waveform-long waveform-short waveform-middle waveform-long waveform-middle waveform-long waveform-short waveform-short waveform-long waveform, the level device of the device A can output the level signal output by the processor of the device A to the level device of the device B according to the level waveform a, and then the processor of the device B can obtain the level signal, and determine that the connection address of the device A is dizhiA according to the level signal waveform a and the level signal waveform rule. Correspondingly, the connection address of the device B is dizhiB, based on the level signal waveform rule, the processor of the device B can determine that the level signal waveform b of the device B is long waveform-middle waveform-long waveform-short waveform-middle waveform-long waveform-middle waveform-long waveform-short waveform-short waveform-long waveform, the level device of the device B can output the level signal output by the processor of the device B to the level device of the device A according to the level waveform b, and then the processor of the device A can obtain the level signal, and determine that the connection address of the device B is dizhiB according to the level signal waveform b and the level signal waveform rule.

[0172] In another embodiment, the first processor of the first device can determine the second target character information, or the second processor of the second device can determine the first target character information. The processor of the first device can determine the waveform of the first level signal based on the first target character information and the level signal waveform rule, the first level device of the first device can output the first level signal to the second level device of the second device according to the determined waveform, and then the second processor of the second device can obtain the first level signal and determine the first target character information according to the waveform of the first level signal and the level signal waveform rule. Or, the second level device of the second device can send the second level signal to the first device, the first processor of the first device can obtain the second level signal collected by the first level device, and determine the second target character information according to the level signal waveform rule and the waveform of the second level signal.

[0173] It can be seen that, in the embodiment, the waveform of the first level signal is determined based on the first target character information and the level signal waveform rule; the first level signal is output to the second level device by the first level device according to the determined waveform, so that the first level signal is acquired by the second processor, and the first target character information is determined according to the waveform of the first level signal and the level signal waveform rule, and / or the second level signal collected by the first level device is acquired; the second target character information is determined according to the level signal waveform rule and the waveform of the second level signal, wherein the second level signal is determined by the second processor based on the second target character information and the level signal waveform rule. Since the first device and the second device are connected, the second target character information can be determined by the first processor of the first device and the first target character information can be determined by the second processor of the second device, so that the determination of the bidirectional target character information is realized, or the second target character information can be determined by the first processor of the first device or the first target character information can be determined by the second processor of the second device, so that the determination of the unidirectional target character information is realized, thereby making the connection of the device more flexible and reliable.

[0174] As an embodiment of the present application, the waveform of the level signal specified by the level signal waveform rule can include at least one of a short waveform, a medium waveform, a long waveform, a rising edge jump, and a falling edge jump.

[0175] Since the waveform of the level signal can be set based on the high-level duration, it can include a short waveform, a medium waveform, and a long waveform. In the edge jump, since the rising edge jump can represent a jump from low to high, and the falling edge jump can represent a jump from high to low, both can change the waveform of the level signal. Therefore, at least one of the short waveform, the medium waveform, the long waveform, the rising edge jump, and the falling edge jump can be used as the waveform of the level signal specified by the level signal waveform rule. Among them, the high-level duration of the short waveform, the medium waveform, and the long waveform of the level signal is different.

[0176] For example, based on the high-level duration of the level signal, the high-level duration of the level signal corresponding to the short waveform, the medium waveform, and the long waveform is as follows:

[0177] Waveform High level duration interval range High level duration Short waveform 10~30ms 15ms Middle waveform 50~70ms 60ms Long waveform 80-120ms 100ms

[0178] Since the waveform of the level signal sometimes appears jitter during the acquisition of the level signal, and the sampling frequency of the level signal also affects the waveform of the level signal, the high-level duration interval range can be pre-set, and the waveform in the high-level duration interval range can be used as the effective waveform corresponding to the waveform.

[0179] It can be seen that, in the embodiment, the waveform of the level signal defined by the level signal waveform rule can include at least one of a short waveform, a medium waveform, a long waveform, a rising edge jump, and a falling edge jump. Based on the multiple waveforms of the level signal, multiple level signal waveform rules can be preset, and corresponding to the multiple character information, the processor of the device can send level signals based on different connection addresses, so that the connection of the device is more flexible and reliable.

[0180] In addition, in the case of high level signal sampling frequency, using a shorter waveform of the level signal can reduce the waveform duration, reduce the waveform effective interval, and further improve the data transmission efficiency and data transmission bandwidth. For devices with high real-time level signal collection, the flip and high and low levels of the level signal can be used to replace a certain waveform, which can reduce the transmission time of single character data and further improve the data transmission bandwidth.

[0181] As an embodiment of the present application, a level code is composed of level signals of a second preset number of target waveforms, and each level code corresponds to a character. The character includes numbers, lowercase letters, uppercase letters, and special symbols.

[0182] The waveform of the level signal can include different target waveforms, and a level code can be composed of level signals of a second preset number of target waveforms, so that each level code corresponds to a character. That is, the level code is a combination of different level signals, which represents a specific encoding rule. The character can include numbers, lowercase letters, uppercase letters, and special symbols, and the target waveform can include a short waveform, a medium waveform, and a long waveform, which are not limited here.

[0183] For example, the second preset number is set to 4, that is, four target waveforms of the level signal are combined into a level code, and at most 81 level codes can be represented. The target waveforms are short waveforms S, medium waveforms M, and long waveforms L. The character can be converted into a corresponding level code, and the relationship is as follows:

[0184]

[0185]

[0186] Character Level code Character Level code Character Level code a SMSM l SLMS w MSML b SMSL m SLMM x MSLS c SMMS n SLML y MSLM d SMMM o SLLS z MSLL e SMML p SLLM f SMLS q SLLL g SMLM r MSSS h SMLL s MSSM i SLSS t MSSL j SLSM u MSMS k SLSL v MSMM

[0187]

[0188]

[0189] Character Level code Character Level code < LSLL $ LMLS > LMSS % LMLM { LMSM & LMLL } LMSL * LLSS ! LMMS <stx> < / stx> LLSM @ LMMM <etx> < / etx> LLSL # LMML

[0190] According to the conversion relationship between the character and the level code, the connection address 012ABCDEF of the device A can be converted into the level code: SSSS-SSSM-SSSL-MMSS-MMSM-MMSL-MMMS-MMMM-MMML. Based on the level code corresponding to the connection address of the device A, the transmission time of the level signal sent by the processor of the device A can be calculated. For example, the short waveform level signal lasts for 15 ms, the medium waveform level signal lasts for 60 ms, the long waveform level signal lasts for 100 ms, and the interval time of any two target waveform level signals is 15 ms. Therefore, the transmission time of the level signal corresponding to the connection address is T = 15 * 15 + 18 * 60 + 3 * 100 + 3 * 15 * 9 = 2010 ms. The duration of the target waveform level signal and the interval time of any two target waveform level signals can be set according to actual conditions, and are not limited here.

[0191] As can be seen, in the embodiment, a level code is composed of the second preset number of target waveform level signals, each level code corresponds to a character, and the character includes numbers, lowercase letters, uppercase letters, and special symbols. The target waveform can include a short waveform, a medium waveform, and a long waveform. By composing a level code based on the second preset number of long waveforms, medium waveforms, and short waveforms, the level code can be one-to-one corresponding to the character, so that the device can accurately determine the specific character information and accurately determine the connection address, thereby improving the reliability and stability of the device connection.

[0192] In addition, the embodiment proposes a pre-designed level code conversion rule for decoding, which can realize simple data transmission, and then realize the device connection through simple contact. Compared with the existing connection method which completely depends on the wireless communication link, the connection method is more reliable and stable. Moreover, in addition to the one-way level code protocol, a two-way level code protocol can also be added to realize simple data interaction and increase the flexibility and reliability of the protocol design.

[0193] Corresponding to the first device connection method described above, the embodiment of the present application also provides another device connection method. The second device connection method provided by the embodiment of the present application can be applied to a second processor of a second device. The second device has a second level device, and the second processor is electrically connected with the second level device. A first device has a first level device and a first processor, and the first processor is electrically connected with the first level device.

[0194] As shown in Figure 5 A device connection method applied to a second processor of a second device, the method comprising:

[0195] S501, when detecting that the second level device is electrically connected with the first level device, determining a waveform of a level signal to be sent based on a connection address of the second device and a preset level signal waveform rule;

[0196] When the second processor of the second device detects that the second level device is electrically connected with the first level device of the first device, the waveform of the level signal to be sent can be determined based on the connection address of the second device and the preset level signal waveform rule.

[0197] S502, emitting the level signal according to the waveform through the second level device, so that the first processor acquires the level signal collected by the first level device, determines the connection address of the second device according to the level signal waveform rule and the level signal, and establishes the connection with the second device based on the connection address.

[0198] When the second processor of the second device determines the waveform of the level signal to be sent, the first processor of the first device can acquire the level signal collected by the first level device through the second level device according to the waveform, and then determine the connection address of the second device according to the level signal waveform rule and the level signal, and establish the connection with the second device based on the connection address.

[0199] It can be seen that in the embodiment, when the second processor of the second device detects that the second level device is electrically connected with the first level device, the waveform of the level signal to be sent can be determined based on the connection address of the second device and the preset level signal waveform rule, the first processor acquires the level signal collected by the first level device through the second level device according to the waveform, and then determines the connection address of the second device according to the level signal waveform rule and the level signal, and establishes the connection with the second device based on the connection address. Since the level signal emitted by the second device through the second level device is based on the connection address and the preset level signal waveform rule, the first processor of the first device can determine the connection address of the second device based on the level signal and the preset level signal waveform rule, and then establish the connection with the second device based on the connection address. The transmission of the level signal through the physical contact of the first level device and the second level device can improve the reliability and stability of the device connection through the contact connection mode.

[0200] As an implementation manner of the embodiment of the present application, the above method further includes at least one of the following steps:

[0201] In the process of emitting the level signal according to the waveform, an encrypted bit waveform signal is added to the level signal based on a preset encryption rule;

[0202] In the process of sending the level signal according to the waveform, a check bit waveform signal is added to the level signal based on a preset check rule.

[0203] A preparatory waveform signal is added before the level signal.

[0204] In the first case, in order to improve the security of the first device and the second device, the second processor of the second device can add an encrypted bit waveform signal to the level signal based on a preset encryption rule in the process of sending the level signal according to the waveform.

[0205] In an embodiment, the preset encryption rule can be to add a waveform signal corresponding to one or more characters as the encrypted bit waveform signal to the level signal.

[0206] For example, device A and device B are connected, the connection address of device B is fe10:d04e:24b0:b3ad, the letter k is taken as the encrypted bit character, and the connection address with the encrypted bit character is fe10:d04e:k48b0:b6ad. Then, the waveform signal of k can be added to the level signal in the process of sending the level signal based on the connection address of device B according to the waveform.

[0207] In the second case, in order to improve the reliability of the first device and the second device, the first device can check the level signal sent by the second device based on the connection address. Then, the second processor of the second device can add a check bit waveform signal to the level signal based on a preset check rule in the process of sending the level signal according to the waveform.

[0208] In an embodiment, the preset check rule can check the number of bits of character information. Then, a waveform signal corresponding to the number of bits of character information can be added to the end of the level signal as the check bit waveform signal.

[0209] For example, device C and device D are connected, the connection address of device D is b3ad:3bdb, and the number of bits of character information of the connection address is 9. Then, in the process of sending the level signal based on the connection address of device D according to the waveform, a waveform signal corresponding to 9 can be added to the end of the level signal.

[0210] In the third case, in order to determine the stable connection of the first device and the second device, the second processor of the second device can add a preparatory waveform signal before the level signal.

[0211] In an embodiment, the second processor of the second device can add the preparatory waveform signal before a preset interval of time of sending the level signal.

[0212] For example, the device E and the device F are connected, the connection address of the device F is csb3ad:3bdb, a character ready is added at the front end of the connection address, a waveform corresponding to the ready is used as a preliminary waveform signal, and then the waveform signal corresponding to the ready can be added before the device F sends the level signal based on the connection address of the device F for 15 ms according to the waveform.

[0213] It can be seen that, in the embodiment, the second processor of the second device can add the encrypted bit waveform signal in the level signal based on the preset encryption rule in the process of sending the level signal according to the waveform, the check bit waveform signal in the level signal based on the preset check rule in the process of sending the level signal according to the waveform, and the preliminary waveform signal before the level signal. Since at least one of the encrypted bit waveform signal, the check bit waveform signal, and the preliminary waveform signal can be added in the level signal, the connection between the devices can be secret, effective, and stable, and the reliability and stability of the device connection are improved.

[0214] As an embodiment of the present application, the above method can further include:

[0215] acquiring, by the second level device, the first level signal, and determining first target character information according to the waveform of the first level signal and the level signal waveform rule, wherein the first level signal is determined by the first processor based on the first target character information and the level signal waveform rule, and / or,

[0216] determining the waveform of the second level signal based on the second target character information and the level signal waveform rule, sending, by the second level device, the second level signal to the first level device according to the determined waveform, so that the first processor acquires the second level signal collected by the first level device, and determines the second target character information according to the level signal waveform rule and the waveform of the second level signal.

[0217] In one embodiment, the second processor of the second device can determine the first target character information, and the first processor of the first device can determine the second target character information. The processor of the second device can acquire the first level signal through the second level device, and determine the first target character information according to the waveform of the first level signal and the level signal waveform rule, wherein the first level signal is determined by the first processor of the first device based on the first target character information and the level signal waveform rule. Correspondingly, the first processor of the first device can determine the waveform of the second level signal based on the second target character information and the level signal waveform rule, send the second level signal to the first level device through the second level device according to the determined waveform, and acquire the second level signal collected by the first level device, and then determine the second target character information according to the level signal waveform rule and the waveform of the second level signal.

[0218] In another embodiment, the second processor of the second device can determine the first target character information, or the first processor of the first device can determine the second target character information. The processor of the second device can acquire the first level signal through the second level device, and determine the first target character information according to the waveform of the first level signal and the level signal waveform rule. Or, the first processor of the first device can determine the waveform of the second level signal based on the second target character information and the level signal waveform rule, send the second level signal to the first level device through the second level device according to the determined waveform, acquire the second level signal collected by the first level device, and then determine the second target character information according to the level signal waveform rule and the waveform of the second level signal.

[0219] It can be seen that, in the embodiment, the first level signal is acquired through the second level device, and the first target character information is determined according to the waveform of the first level signal and the level signal waveform rule, wherein the first level signal is determined by the first processor based on the first target character information and the level signal waveform rule, and / or the waveform of the second level signal is determined based on the second target character information and the level signal waveform rule, the second level signal is sent to the first level device through the second level device according to the determined waveform, so that the first processor acquires the second level signal collected by the first level device, and determines the second target character information according to the level signal waveform rule and the waveform of the second level signal. Since the first device and the second device are connected, the first target character information can be determined by the second processor of the second device and the second target character information can be determined by the first processor of the first device, realizing the determination of bidirectional target character information, or the first target character information can be determined by the second processor of the second device or the second target character information can be determined by the first processor of the first device, realizing the determination of unidirectional target character information, so that the connection of the device is more flexible and reliable.

[0220] As an implementation of the embodiment of the present application, the waveform of the level signal specified by the level signal waveform rule can include at least one of a short waveform, a medium waveform, a long waveform, a rising edge jump, and a falling edge jump.

[0221] It can be seen that, in the embodiment, the waveform of the level signal specified by the level signal waveform rule can include at least one of a short waveform, a medium waveform, a long waveform, a rising edge jump, and a falling edge jump. Based on the multiple waveforms of the level signal, multiple level signal waveform rules can be preset, and corresponding to the multiple character information, the processor of the device can send level signals based on different connection addresses, so that the connection of the device is more flexible and reliable.

[0222] As an implementation of the embodiment of the present application, a level code is composed of level signals of a second preset number of target waveforms, each level code corresponds to a character, and the character includes numbers, lowercase letters, uppercase letters, and special symbols.

[0223] The target waveforms include the short waveforms, the medium waveforms, and the long waveforms.

[0224] It can be seen that, in the embodiment, a level code is composed of level signals of a second preset number of target waveforms, each level code corresponds to a character, and the character includes numbers, lowercase letters, uppercase letters, and special symbols. The target waveforms can include short waveforms, medium waveforms, and long waveforms. By composing a level code based on a second preset number of long waveforms, medium waveforms, and short waveforms, the level code can be one-to-one corresponding to the character, so that the device can accurately determine the specific character information and accurately determine the connection address, thereby improving the reliability and stability of the device connection.

[0225] In addition, the embodiment of the present application relates to a contact connection method between devices, which is a connection method based on a physical path and can also be widely applied to the transmission of short and repetitive data, such as contact connection, contact password transmission, and contact handshake. Compared with the wireless data connection method, the contact connection method is more stable and reliable, is not limited by the environment, and is also simpler to operate.

[0226] Corresponding to the first device connection method, the embodiment of the present application also provides a first device connection apparatus, and the first device connection apparatus provided by the embodiment of the present application will be introduced below.

[0227] As shown in FIG. 1, the first device connection apparatus includes a first device 1 and a second device 2. Figure 6As shown in the first device, a device connection apparatus is applied to a first processor of a first device, the first device has a first level device, the first processor is electrically connected with the first level device, a second device has a second level device matched with the first level device and a second processor, the second processor is electrically connected with the second level device, and the apparatus comprises:

[0228] A level signal acquisition module 610 is configured to acquire a level signal collected by the first level device, wherein the level signal is emitted by the second level device according to a preset level signal waveform rule based on a connection address of the second device after the second processor detects that the second level device is electrically connected with the first level device.

[0229] A connection address determination module 620 is configured to determine the connection address of the second device according to the level signal waveform rule and the waveform of the level signal.

[0230] A first connection module 630 is configured to establish a connection with the second device based on the connection address.

[0231] It can be seen that in the scheme provided by the embodiments of the present application, the first device has a first processor, the first device has a first level device, the first processor is electrically connected with the first level device, the second device has a second level device matched with the first level device and a second processor, the second processor is electrically connected with the second level device, the first processor of the first device acquires a level signal collected by the first level device, wherein the level signal is emitted by the second level device according to a preset level signal waveform rule based on a connection address of the second device after the second processor detects that the second level device is electrically connected with the first level device, the connection address of the second device is determined according to the level signal waveform rule and the waveform of the level signal, and a connection with the second device is established based on the connection address. Since the level signal acquired by the first processor of the first device is emitted by the second level device of the second device according to a preset level signal waveform rule based on a connection address of the second device, the first processor of the first device can determine the connection address of the second device based on the level signal waveform rule and the waveform of the level signal, and then a connection with the second device can be established based on the connection address, and the reliability and stability of the device connection can be improved through the physical contact transmission of the level signal by the first level device and the second level device.

[0232] As an implementation manner of the embodiments of the present application, the above-mentioned level signal includes an encrypted bit waveform signal.

[0233] The above-mentioned connection address determination module 620 can include:

[0234] The first converting submodule is configured to convert the level signal into character information according to the level signal waveform rule and the waveform of the level signal.

[0235] The connection address obtaining submodule is configured to process target character information based on the character information corresponding to the encrypted bit waveform signal and a preset encryption rule to obtain the connection address of the second device, wherein the target character information is each character information except the character information corresponding to the encrypted bit waveform signal, or the target character information is each character information after the character information corresponding to the encrypted bit waveform signal.

[0236] As an implementation of the embodiment of the present application, the level signal includes a check bit waveform signal.

[0237] The connection address determining module 620 includes:

[0238] The second converting submodule is configured to convert the level signal into character information according to the level signal waveform rule and the waveform of the level signal.

[0239] The character information determining submodule is configured to determine whether the character information corresponding to the check bit waveform signal is correct based on a preset check rule.

[0240] The first determining submodule is configured to determine each character information except the character information corresponding to the check bit waveform signal as the connection address of the second device if the character information is correct.

[0241] The first obtaining submodule is configured to obtain the level signal collected by the first level device if the character information is incorrect.

[0242] As an implementation of the embodiment of the present application, the level signal includes a preliminary waveform signal.

[0243] The level signal obtaining module 610 can include:

[0244] The second obtaining submodule is configured to take the first preset number of waveform signals collected after the preliminary waveform signal as the to-be-processed level signal if the level signal collected by the first level device includes the preliminary waveform signal.

[0245] The connection address determining module 620 can include:

[0246] The second determining submodule is configured to determine the connection address of the second device according to the level signal waveform rule and the waveform of the to-be-processed level signal.

[0247] As an implementation of the embodiment of the present application, the apparatus can further include:

[0248] A first determining module is configured to determine the waveform of a first level signal based on the first target character information and the level signal waveform rules; output the first level signal to a second level device according to the determined waveform via the first level device, so that the second processor acquires the first level signal and determines the first target character information according to the waveform of the first level signal and the level signal waveform rules, and / or,

[0249] Used to acquire the second level signal collected by the first level device; and to determine the second target character information according to the level signal waveform rules and the waveform of the second level signal, wherein the second level signal is determined by the second processor based on the second target character information and the level signal waveform rules.

[0250] As one embodiment of this application, the waveform of the level signal specified by the above-mentioned level signal waveform rules includes at least one of short waveform, medium waveform, long waveform, rising edge transition, and falling edge transition;

[0251] The duration of the high level signal is different for the short waveform, the medium waveform, and the long waveform.

[0252] As one embodiment of this application, a level code is formed by the level signals of a second preset number of target waveforms, and each level code corresponds to a character, the character including numbers, lowercase letters, uppercase letters and special symbols;

[0253] The target waveform includes the short waveform, the medium waveform, and the long waveform.

[0254] Corresponding to the second device connection method described above, this application embodiment also provides a second device connection device, which will be described below.

[0255] like Figure 7 As shown, a device connection apparatus is applied to a second processor of a second device. The second device has a second-level device, and the second processor is electrically connected to the second-level device. A first device has a first-level device adapted to the second-level device and a first processor, and the first processor is electrically connected to the first-level device. The apparatus includes:

[0256] The waveform determination module 710 is used to determine the waveform of the level signal to be sent based on its own connection address and preset level signal waveform rules after detecting that the second level device is electrically connected to the first level device.

[0257] The second connection module 720 is configured to send a level signal according to the waveform through the second level device, so that the first processor acquires the level signal collected by the first level device, determines the connection address of the second device according to the level signal waveform rule and the level signal, and establishes a connection with the second device based on the connection address.

[0258] It can be seen that in the scheme provided by the embodiments of the present application, when the second processor of the second device detects that the second level device is electrically connected with the first level device, the waveform of the level signal to be sent can be determined based on the connection address of the second device and the preset level signal waveform rule, the level signal is sent according to the waveform through the second level device, so that the first processor acquires the level signal collected by the first level device, and then the connection address of the second device is determined according to the level signal waveform rule and the level signal, and a connection is established with the second device based on the connection address. Since the level signal sent by the second device through the second level device is based on the connection address and the preset level signal waveform rule, the first processor of the first device can determine the connection address of the second device based on the level signal and the preset level signal waveform rule, and then a connection can be established with the second device based on the connection address. The transmission of the level signal through the physical contact of the first level device and the second level device can improve the reliability and stability of the device connection through the contact type connection mode.

[0259] As an implementation manner of the embodiments of the present application, the apparatus can further include at least one of the following modules:

[0260] The first adding module is configured to add an encrypted bit waveform signal in the level signal based on a preset encryption rule in the process of sending the level signal according to the waveform.

[0261] The second adding module is configured to add a check bit waveform signal in the level signal based on a preset check rule in the process of sending the level signal according to the waveform.

[0262] The third adding module is configured to add a preliminary waveform signal before the level signal.

[0263] As an implementation manner of the embodiments of the present application, the apparatus can further include:

[0264] The second determining module is configured to acquire the first level signal through the second level device, and determine the first target character information according to the waveform of the first level signal and the level signal waveform rule, wherein the first level signal is determined by the first processor based on the first target character information and the level signal waveform rule, and / or,

[0265] determining a waveform of the second level signal based on the second target character information and the level signal waveform rule, sending the second level signal to the first level device according to the determined waveform through the second level device, so that the first processor acquires the second level signal collected by the first level device, and determining the second target character information according to the level signal waveform rule and the waveform of the second level signal.

[0266] As an implementation of the embodiment of the present application, the waveform of the level signal specified by the level signal waveform rule can include at least one of a short waveform, a medium waveform, a long waveform, a rising edge jump, and a falling edge jump.

[0267] As an implementation of the embodiment of the present application, a level code is composed of level signals of a second preset number of target waveforms, each level code corresponds to a character, and the character includes a digit, a lowercase letter, an uppercase letter, and a special symbol.

[0268] The target waveform includes the short waveform, the medium waveform, and the long waveform.

[0269] The embodiment of the present application also provides an electronic device, which can be the first device in the above-mentioned embodiments, as shown in the following table. Figure 8 The electronic device includes a first processor 801, a first level device 802, a first communication interface 803, a first memory 804, and a communication bus 805, wherein the first processor 801, the first communication interface 803, and the first memory 804 complete mutual communication through the communication bus 805.

[0270] The first memory 804 is used to store a computer program.

[0271] The first processor 801 is used to execute the program stored in the first memory 804, so as to realize the first device connection method steps of any of the above-mentioned embodiments.

[0272] As can be seen, in the solution provided in this application embodiment, the first device has a first processor and a first level device, the first processor being electrically connected to the first level device. The second device has a second level device adapted to the first level device and a second processor, the second processor being electrically connected to the second level device. The first processor of the first device acquires the level signal collected by the first level device. The level signal is emitted by the second processor through the second level device according to a preset level signal waveform rule based on the connection address of the second device after detecting the electrical connection between the second and first level devices. The connection address of the second device is determined according to the level signal waveform rule and the waveform of the level signal, and a connection is established with the second device based on the connection address. Since the level signal acquired by the first processor of the first device is emitted by the second level device of the second device according to the preset level signal waveform rule based on the connection address of the second device, the first processor of the first device can determine the connection address of the second device based on the level signal waveform rule and the waveform of the level signal. Therefore, a connection can be established with the second device based on the connection address. The level signal is transmitted through the physical contact between the first and second level devices, which improves the reliability and stability of the device connection through a contact-type connection method.

[0273] This application also provides an electronic device, which can be the second device described in the above embodiments, such as... Figure 9 As shown, it includes a second processor 901, a second level device 902, a second communication interface 903, a second memory 904, and a communication bus 905. The second processor 901, the second communication interface 903, and the second memory 904 communicate with each other via the communication bus 905.

[0274] The second memory 904 is used to store computer programs;

[0275] The second processor 901, when executing the program stored in the second memory 904, implements the steps of the second device connection method described in any of the above embodiments.

[0276] It can be seen that in the scheme provided by the embodiment of the application, when the second processor of the second device detects that the second level device is electrically connected with the first level device, the waveform of the level signal to be sent can be determined based on the connection address of the second device and the preset level signal waveform rule, the level signal is sent through the second level device according to the waveform, so that the first processor acquires the level signal collected by the first level device, and then the connection address of the second device is determined according to the level signal waveform rule and the level signal, and the connection with the second device is established based on the connection address. Since the level signal sent by the second device through the second level device is based on the connection address and the preset level signal waveform rule, the first processor of the first device can determine the connection address of the second device based on the level signal and the preset level signal waveform rule, and then the connection with the second device can be established based on the connection address. The transmission of the level signal through the physical contact of the first level device and the second level device can improve the reliability and stability of the device connection through the contact type connection mode.

[0277] The communication bus mentioned in the above electronic device can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For convenience of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or only one type of bus.

[0278] The communication interface is used for communication between the above electronic device and other devices.

[0279] The memory can include a random access memory (RAM) and can also include a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory can also be at least one storage device located away from the aforementioned processor.

[0280] The processor described above can be a general processor, including a central processing unit (CPU), a network processor (NP), etc.; can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component.

[0281] In another embodiment provided in the present application, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program. The computer program is executed by a processor to implement the steps of the device connection method in any of the above embodiments.

[0282] In another embodiment provided in the present application, a computer program product is provided, and the computer program product includes instructions. When the computer program product is executed on a computer, the computer is caused to perform the device connection method in any of the above embodiments.

[0283] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions can be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) mode. The computer readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. integrated with one or more available media. The available medium can be a magnetic medium (for example, floppy disk, hard disk, magnetic tape), an optical medium (for example, DVD), or a semiconductor medium (for example, solid state disk (SSD)) and the like.

[0284] It is to be understood that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting; it is not intended to exclude myriad other embodiments of the present application that other present or future devices, platforms, modules, components and systems can utilize as appropriate, and is therefore included in the scope of the present application. It must be noted that as used herein, the singular forms "a", "an" and "the" include plural referents unless the context clearly dictates otherwise. The terms "includes" and "comprising," as well as any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements is not necessarily limited to those elements, but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. The terms "first", "second", "third", etc. are used to identify different elements, but do not connote any order, sequence, or importance.

[0285] Each of the embodiments in the present specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other. Each of the embodiments focuses on the difference from other embodiments. In particular, for the device, electronic device, computer-readable storage medium, and computer program product embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the part of the method embodiment.

[0286] The above only describes the preferred embodiments of the present application, and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application is included in the protection scope of the present application.

Claims

1. A device connection method, characterized in that, A first processor is applied to a first device, the first device having a first-level device, the first processor being electrically connected to the first-level device; a second device has a second-level device adapted to the first-level device and a second processor, the second processor being electrically connected to the second-level device; the method includes: The system acquires the level signal collected by the first level device, wherein the level signal is emitted by the second level device according to a preset level signal waveform rule based on the connection address of the second device after the second processor detects that the second level device is electrically connected to the first level device; the connection address of the second device is a string composed of at least alphanumeric characters; the preset level signal waveform rule is a pre-defined correspondence between the waveform of the level signal and the character information; the waveform of the level signal in the correspondence is a permutation and combination of at least one of short waveforms, medium waveforms, and long waveforms; The connection address of the second device is determined based on the waveform rules and waveform of the level signal. A connection is established with the second device based on the connection address.

2. The method according to claim 1, characterized in that, The level signal includes an encryption bit waveform signal; The step of determining the connection address of the second device based on the waveform rules and waveform of the level signal includes: Based on the waveform rules and waveform of the level signal, the level signal is converted into character information; Based on the character information corresponding to the encrypted bit waveform signal and the preset encryption rules, the target character information is processed to obtain the connection address of the second device. The target character information is all the character information except for the character information corresponding to the encrypted bit waveform signal, or the target character information is all the character information after the character information corresponding to the encrypted bit waveform signal.

3. The method according to claim 1, characterized in that, The level signal includes a check bit waveform signal; The step of determining the connection address of the second device based on the waveform rules and waveform of the level signal includes: Based on the waveform rules and waveform of the level signal, the level signal is converted into character information; Based on preset verification rules, determine whether the character information corresponding to the verification bit waveform signal is correct; If correct, each character information except for the character information corresponding to the check bit waveform signal is determined as the connection address of the second device; If incorrect, return to the step of obtaining the level signal acquired by the first level device.

4. The method according to claim 1, characterized in that, The level signal includes a preliminary waveform signal; The step of acquiring the level signal collected by the first level device includes: If the level signal acquired by the first level device includes a preliminary waveform signal, the first preset number of waveform signals acquired after the preliminary waveform signal shall be used as the level signal to be processed. The step of determining the connection address of the second device based on the waveform rules and waveform of the level signal includes: The connection address of the second device is determined based on the waveform rules of the level signal and the waveform of the level signal to be processed.

5. The method according to any one of claims 1-4, characterized in that, The method further includes: Based on the first target character information and the level signal waveform rules, the waveform of the first level signal is determined; the first level device outputs the first level signal to the second level device according to the determined waveform, so that the second processor acquires the first level signal and determines the first target character information according to the waveform of the first level signal and the level signal waveform rules, and / or, The second level signal acquired by the first level device is obtained; the second target character information is determined according to the waveform rules of the level signal and the waveform of the second level signal, wherein the second level signal is determined by the second processor based on the second target character information and the waveform rules of the level signal.

6. The method according to any one of claims 1-4, characterized in that, The waveform of the level signal specified in the level signal waveform rules includes at least one of short waveform, medium waveform, long waveform, rising edge transition, and falling edge transition; The duration of the high level signal is different for the short waveform, the medium waveform, and the long waveform.

7. The method according to claim 6, characterized in that, A level code is formed by the level signals of a second preset number of target waveforms. Each level code corresponds to a character, which includes numbers, lowercase letters, uppercase letters, and special symbols. The target waveform includes the short waveform, the medium waveform, and the long waveform.

8. A device connection method, characterized in that, A second processor is applied to a second device, the second device having a second-level device, the second processor being electrically connected to the second-level device; a first device has a first-level device adapted to the second-level device and a first processor, the first processor being electrically connected to the first-level device; the method includes: When the second level device is detected to be electrically connected to the first level device, the waveform of the level signal to be sent is determined based on its own connection address and a preset level signal waveform rule. The connection address of the second device is a string consisting of at least alphanumeric characters. The preset level signal waveform rule is a pre-defined correspondence between the waveform of the level signal and the character information. The waveform of the level signal in the correspondence is a permutation and combination of at least one of short, medium, and long waveforms. The second level device emits a level signal according to the waveform, so that the first processor can obtain the level signal collected by the first level device, determine the connection address of the second device according to the level signal waveform rules and the level signal, and establish a connection with the second device based on the connection address.

9. The method according to claim 8, characterized in that, The method further includes at least one of the following steps: During the process of emitting a level signal according to the waveform, an encrypted bit waveform signal is added to the level signal based on a preset encryption rule; During the process of emitting a level signal according to the waveform, a check bit waveform signal is added to the level signal based on a preset check rule; A preliminary waveform signal is added before the stated level signal.

10. The method according to claim 8 or 9, characterized in that, The method further includes: A first level signal is acquired through the second level device, and first target character information is determined according to the waveform of the first level signal and the waveform rules of the level signal, wherein the first level signal is determined by the first processor based on the first target character information and the waveform rules of the level signal, and / or Based on the second target character information and the level signal waveform rules, the waveform of the second level signal is determined. The second level device sends the second level signal to the first level device according to the determined waveform, so that the first processor can obtain the second level signal collected by the first level device and determine the second target character information according to the level signal waveform rules and the waveform of the second level signal.

11. A device connection apparatus, characterized in that, A first processor is applied to a first device, the first device having a first-level device, the first processor being electrically connected to the first-level device; a second device has a second-level device adapted to the first-level device and a second processor, the second processor being electrically connected to the second-level device; the apparatus includes: A level signal acquisition module is used to acquire the level signal collected by the first level device. The level signal is generated by the second level device according to a preset level signal waveform rule, based on the connection address of the second device, after the second processor detects that the second level device is electrically connected to the first level device. The connection address of the second device is a string consisting of at least alphanumeric characters. The preset level signal waveform rule is a pre-defined correspondence between the waveform of the level signal and the character information. The waveform of the level signal in the correspondence is a permutation and combination of at least one of short, medium, and long waveforms. The connection address determination module is used to determine the connection address of the second device based on the waveform rules of the level signal and the waveform of the level signal; The first connection module is used to establish a connection with the second device based on the connection address.

12. The apparatus according to claim 11, characterized in that, The level signal includes an encryption bit waveform signal; The connection address determination module includes: The first conversion submodule is used to convert the level signal into character information according to the level signal waveform rules and the waveform of the level signal; The connection address acquisition submodule is used to process the target character information based on the character information corresponding to the encrypted bit waveform signal and the preset encryption rules to obtain the connection address of the second device. The target character information is all the character information except for the character information corresponding to the encrypted bit waveform signal, or the target character information is all the character information after the character information corresponding to the encrypted bit waveform signal. And / or, The level signal includes a check bit waveform signal; The connection address determination module includes: The second conversion submodule is used to convert the level signal into character information according to the level signal waveform rules and the waveform of the level signal; The character information determination submodule is used to determine whether the character information corresponding to the verification bit waveform signal is correct based on preset verification rules. The first determining submodule is used to determine, if correct, each character information except for the character information corresponding to the check bit waveform signal as the connection address of the second device; The first acquisition submodule is used to acquire the level signal collected by the first level device if it is incorrect; And / or, The level signal includes a preliminary waveform signal; The level signal acquisition module includes: The second acquisition submodule is used to, if the level signal acquired by the first level device includes a preliminary waveform signal, take the first preset number of waveform signals acquired after the preliminary waveform signal as the level signal to be processed. The connection address determination module includes: The second determining submodule is used to determine the connection address of the second device based on the waveform rules of the level signal and the waveform of the level signal to be processed. The device further includes: A first determining module is configured to determine the waveform of a first level signal based on the first target character information and the level signal waveform rules; output the first level signal to a second level device according to the determined waveform via the first level device, so that the second processor acquires the first level signal and determines the first target character information according to the waveform of the first level signal and the level signal waveform rules, and / or, Used to acquire the second level signal collected by the first level device; and to determine the second target character information according to the level signal waveform rules and the waveform of the second level signal, wherein the second level signal is determined by the second processor based on the second target character information and the level signal waveform rules; The waveform of the level signal specified in the level signal waveform rules includes at least one of short waveform, medium waveform, long waveform, rising edge transition, and falling edge transition; The duration of the high level signal of the short waveform, the level signal of the medium waveform, and the level signal of the long waveform are all different. A level code is formed by the level signals of a second preset number of target waveforms. Each level code corresponds to a character, which includes numbers, lowercase letters, uppercase letters, and special symbols. The target waveform includes the short waveform, the medium waveform, and the long waveform.

13. A device connection apparatus, characterized in that, A second processor is applied to a second device, the second device having a second-level device, the second processor being electrically connected to the second-level device; a first device has a first-level device adapted to the second-level device and a first processor, the first processor being electrically connected to the first-level device; the apparatus includes: The waveform determination module is used to determine the waveform of the level signal to be transmitted based on its own connection address and a preset level signal waveform rule after detecting that the second level device is electrically connected to the first level device. The connection address of the second device is a string consisting of at least alphanumeric characters; the preset level signal waveform rule is a pre-defined correspondence between the waveform of the level signal and the character information; the waveform of the level signal in the correspondence is a permutation and combination of at least one of short, medium, and long waveforms. The second connection module is used to send a level signal according to the waveform through the second level device, so that the first processor can obtain the level signal collected by the first level device, determine the connection address of the second device according to the level signal waveform rules and the level signal, and establish a connection with the second device based on the connection address.

14. The apparatus according to claim 13, characterized in that, The device further includes at least one of the following modules: The first insertion module is used to add an encrypted bit waveform signal to the level signal based on a preset encryption rule during the process of emitting a level signal according to the waveform. The second addition module is used to add a check bit waveform signal to the level signal based on a preset check rule during the process of emitting a level signal according to the waveform. The third input module is used to input a preliminary waveform signal before the level signal; The device further includes: The second determining module is configured to acquire a first level signal through the second level device, and determine first target character information based on the waveform of the first level signal and the waveform rules of the level signal, wherein the first level signal is determined by the first processor based on the first target character information and the waveform rules of the level signal, and / or The first processor is used to determine the waveform of the second level signal based on the second target character information and the level signal waveform rules. The second level device sends the second level signal to the first level device according to the determined waveform, so that the first processor can obtain the second level signal collected by the first level device and determine the second target character information according to the level signal waveform rules and the waveform of the second level signal.

15. An electronic device, characterized in that, It includes a first processor, a first level device, a first communication interface, a first memory, and a first communication bus, wherein the first processor is electrically connected to the first level device, and the first processor, the first communication interface, and the first memory communicate with each other through the first communication bus; The first memory is used to store computer programs; When the first processor executes the program stored in the first memory, it implements the steps of the method described in any one of claims 1-7.

16. An electronic device, characterized in that, It includes a second processor, a second level device, a second communication interface, a second memory, and a second communication bus, wherein the second processor is electrically connected to the second level device, and the second processor, the second communication interface, and the second memory communicate with each other through the second communication bus. The second memory is used to store computer programs; The second processor, when executing a program stored in the second memory, implements the steps of the method described in any one of claims 8-10.

17. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the method described in any one of claims 1-7 or 8-10.

Citation Information

Patent Citations

  • Data transmission method and terminal

    CN107359963A

  • Wireless communication connection method and device, electronic equipment and readable storage medium

    CN114828016A