A peripheral device connection method, peripheral device connection device and storage medium
By detecting the usage status of the virtual reality device peripherals and controlling their working mode, combined with the connection scanning and identification technology of the first peripheral, the problems of peripheral switching and connection efficiency are solved, and power saving and service life are achieved.
Patent Information
- Application Number
- CN202211027820.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-25
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2042-08-25
AI Technical Summary
In the prior art, it is difficult to efficiently switch and connect peripherals of virtual reality devices when not in use, resulting in waste of electricity and reduced service life.
By detecting the usage status of the second peripheral and the third peripheral, controlling them to enter the normal operating mode or the sleep mode, and performing connection scanning and identification through the first peripheral, the connection application result is determined to establish a communication connection.
It improves the switching and communication connection efficiency of peripheral equipment, saves the power of peripheral devices, extends its service life, and improves the accuracy of peripheral status judgment and connection rigor.
Smart Images

Figure CN115350470B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of terminal communication technology, and in particular to a peripheral device connection method, a peripheral device connection device and a storage medium. Background Art
[0002] With the rapid development of science and technology, virtual reality devices have gradually entered people's daily lives. Virtual reality devices have various applications such as games, watching movies, and social networking. For these different applications, users usually buy different devices to control and interact, such as controllers for game interaction and other peripherals (such as rings) for watching movies or designing. However, due to latency and transmission efficiency considerations, head-mounted devices, controllers, and other peripherals are generally rarely connected and used at the same time. When users need to switch between multiple peripherals, the process of switching devices is cumbersome and time-consuming, and the efficiency of establishing communication connections for peripherals is low.
[0003] In the prior art, when a peripheral is not in use, if the user does not actively turn off the power supply of the peripheral device or disconnect the peripheral device, the peripheral device will remain in normal working state, consuming more power. If the peripheral device is in working state for a long time, its service life will be reduced. Summary of the invention
[0004] In order to overcome the above technical defects, the purpose of the present invention is to provide a peripheral connection method, a peripheral connection device and a storage medium to improve the switching and communication connection efficiency of peripheral devices and save the power of peripherals.
[0005] The present invention discloses a peripheral device connection method, comprising the steps of:
[0006] Providing a first peripheral device, a second peripheral device, and a third peripheral device;
[0007] Detecting the second peripheral device to obtain a first usage state, and detecting the third peripheral device to obtain a second usage state;
[0008] Controlling the first peripheral device, the second peripheral device, and the third peripheral device to enter a normal working mode or a sleep mode according to the first use state and the second use state includes:
[0009] When it is determined that both the first usage state and the second usage state are unused states, controlling the second peripheral device and the third peripheral device to enter a sleep mode;
[0010] When it is determined that the first use state or the second use state is a normal use state, the following steps are performed:
[0011] Controlling the second peripheral device or the third peripheral device to send a connection request signal to the first peripheral device;
[0012] After the first peripheral device acquires the connection application signal through connection scanning, it performs peripheral connection identification on the second peripheral device or the third peripheral device to obtain an application result;
[0013] According to the application result, the first peripheral device is controlled to establish a communication connection with the second peripheral device or the third peripheral device and enter a normal working mode, or the first peripheral device is controlled to enter the connection scanning working mode.
[0014] Preferably, the step of performing peripheral connection identification on the second peripheral device or the third peripheral device to obtain the application result after the first peripheral device obtains the connection application signal through connection scanning includes:
[0015] After the first peripheral performs connection scanning to obtain the connection application signal, the peripheral connection identification step is entered, the sending direction of the connection application signal is sensed to obtain the peripheral to be connected, and the photo of the peripheral to be connected is obtained to obtain the photo of the peripheral to be connected;
[0016] The photo of the peripheral device to be connected is compared with the photos of the peripheral devices pre-stored in the first peripheral device to obtain a comparison result, and the application result is determined according to the comparison result.
[0017] Preferably, the step of comparing the photo of the peripheral device to be connected with the photo of the peripheral device pre-stored in the first peripheral device to obtain a comparison result, and determining the application result according to the comparison result includes:
[0018] When only the photo of the second peripheral to be connected has a similarity with the photo of the peripheral greater than or equal to a preset similarity threshold, determining that the application result is connection approval;
[0019] When only the photo of the third peripheral device to be connected has a similarity with the photo of the peripheral device that is greater than or equal to the similarity threshold, determining that the application result is connection approval;
[0020] When the similarity between the photo of the second peripheral to be connected and the peripheral photo and the similarity between the photo of the third peripheral to be connected and the peripheral photo are both greater than the similarity threshold, determining the application result according to the preset communication connection priority;
[0021] When the similarities between all the photos of the peripheral devices to be connected and the photo of the peripheral device are less than the similarity threshold, it is determined that the application result is that the connection is not agreed.
[0022] Preferably, the step of controlling the first peripheral device to establish a communication connection with the second peripheral device or the third peripheral device and enter a normal working mode according to the application result, or controlling the first peripheral device to enter the connection scanning working mode includes:
[0023] When it is determined that the application result is connection approval, controlling the first peripheral device to establish a communication connection with the second peripheral device or the third peripheral device and enter a normal working mode;
[0024] When it is confirmed that the application result is that the connection is not agreed, the first peripheral device is controlled to enter the connection scanning working mode.
[0025] Preferably, after controlling the first peripheral device to establish a communication connection with the second peripheral device or the third peripheral device and enter a normal working mode according to the application result, or controlling the first peripheral device to enter the connection scanning working mode, the following steps are further performed:
[0026] The peripheral device connection identification is performed through the first peripheral device to obtain an identification result, and the communication connection state between the first peripheral device and the second peripheral device or the third peripheral device is controlled according to the identification result.
[0027] Preferably, the step of performing the peripheral device connection identification by the first peripheral device to obtain a working state, and controlling the communication connection state between the first peripheral device and the second peripheral device or the third peripheral device according to the working state includes:
[0028] When the second peripheral device and the third peripheral device are both in a non-working state, disconnecting the communication connection between the first peripheral device and the second peripheral device or the third peripheral device, and making the first peripheral device enter the connection scanning working mode;
[0029] When the second peripheral is in a normal working state and the third peripheral is in a non-working state, the first peripheral is connected to the second peripheral in communication, and the first peripheral is disconnected from the third peripheral;
[0030] When the third peripheral is in a normal working state and the second peripheral is in a non-working state, the first peripheral is connected to the third peripheral in communication, and the first peripheral is disconnected from the second peripheral;
[0031] When the second peripheral device and the third peripheral device are both in use, the first peripheral device is controlled to be connected to the second peripheral device or the third peripheral device according to a preset communication connection priority.
[0032] Preferably, when the second peripheral device and the third peripheral device are both in use, the step of controlling the connection between the first peripheral device and the second peripheral device or the third peripheral device according to a preset communication connection priority includes:
[0033] Acquire the communication connection priority of the second peripheral device and the communication connection priority of the third peripheral device;
[0034] When the communication connection priority of the second peripheral device is greater than the communication connection priority of the third peripheral device, controlling the first peripheral device to establish a communication connection with the second peripheral device, and disconnecting the communication connection between the first peripheral device and the third peripheral device;
[0035] When the communication connection priority of the third peripheral device is greater than the communication connection priority of the second peripheral device, controlling the first peripheral device to establish a communication connection with the third peripheral device, and disconnecting the communication connection between the first peripheral device and the second peripheral device;
[0036] When the communication connection priority of the second peripheral device is the same as the communication connection priority of the third peripheral device, the first peripheral device is communicatively connected to the second peripheral device, and the first peripheral device is communicatively connected to the third peripheral device.
[0037] The present invention also provides a peripheral device connection apparatus, comprising a first peripheral device, a second peripheral device and a third peripheral device, wherein the first peripheral device comprises a connection control module and an identification module;
[0038] The second peripheral device includes a first detection module, and the first detection module is used to detect the second peripheral device to obtain a first usage state;
[0039] The third peripheral device includes a second detection module, and the second detection module is used to detect the third peripheral device to obtain a second usage state;
[0040] The connection control module is used to control the first peripheral device, the second peripheral device and the third peripheral device to enter a normal working mode or a sleep mode according to the first use state and the second use state, and the steps include:
[0041] When it is determined that both the first usage state and the second usage state are unused states, controlling the second peripheral device and the third peripheral device to enter a sleep mode;
[0042] When it is determined that the first use state or the second use state is a normal use state, the following steps are performed:
[0043] Controlling the second peripheral device or the third peripheral device to send a connection request signal to the first peripheral device;
[0044] After the first peripheral device acquires the connection application signal through connection scanning, the identification module performs peripheral connection identification on the second peripheral device or the third peripheral device to obtain an application result;
[0045] According to the application result, the first peripheral device is controlled to establish a communication connection with the second peripheral device or the third peripheral device and enter a normal working mode, or the first peripheral device is controlled to enter the connection scanning working mode.
[0046] Preferably, the identification module comprises:
[0047] A signal sensing unit, used to sense the sending direction of the connection application signal to obtain the peripheral device to be connected;
[0048] An image capturing unit, for acquiring a photo of the peripheral device to be connected to obtain a photo of the peripheral device to be connected;
[0049] The image recognition unit is used to compare the photo of the peripheral device to be connected with the photos of the peripheral devices pre-stored in the first peripheral device to obtain a comparison result, and determine the application result according to the comparison result.
[0050] The present invention also provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the peripheral device connection method is implemented.
[0051] After adopting the above technical solution, compared with the prior art, the present invention has the following beneficial effects:
[0052] (1) The use status of the devices is obtained by detecting the second device and the third device, and the first peripheral device, the second peripheral device and the third peripheral device are controlled to enter a normal working mode or a sleep mode according to the use status of the devices. The working status of the peripherals is controlled by a program, which is easy and labor-saving. The working mode of the peripherals is more efficient, and the peripherals can be put into a sleep mode, thereby saving power of the peripherals and prolonging the service life of the peripherals.
[0053] (2) The peripheral connection is identified through the first peripheral to further determine the status of the peripheral, thereby improving the accuracy of the peripheral status judgment; the application result is obtained through connection identification, and the first peripheral is controlled to establish a communication connection with the second peripheral or the third peripheral according to the application result, or the first peripheral is controlled to enter a connection scanning working mode, and the communication connection status of the first peripheral is controlled in turn according to the connection application signal and the application result, which reflects the rigor of the peripheral connection and improves the accuracy of the peripheral connection; the status of the peripheral is automatically detected and the communication connection status of the first peripheral is controlled according to the status and the application result, thereby improving the connection efficiency between peripherals, enhancing the communication efficiency and interaction between peripherals, and improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 is a flow chart of a peripheral device connection method according to an embodiment of the present invention;
[0055] Figure 2 A flowchart of performing peripheral connection identification on a second peripheral device or a third peripheral device to obtain an application result according to an embodiment of the present invention;
[0056] Figure 3 A flowchart of controlling the communication connection state between the first peripheral device and the second peripheral device or the third peripheral device according to the recognition result according to an embodiment of the present invention;
[0057] Figure 4 Schematic diagram of the structure of the peripheral connection device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0058] The advantages of the present invention are further described below in conjunction with the accompanying drawings and specific embodiments.
[0059] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0060] The terms used in this disclosure are for the purpose of describing specific embodiments only and are not intended to limit the disclosure. The singular forms of "a", "said" and "the" used in this disclosure and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0061] It should be understood that although the terms first, second, third, etc. may be used in the present disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present disclosure, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0062] In the description of the present invention, it is necessary to understand that the terms "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating the orientation or position relationship, are based on the orientation or position relationship shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.
[0063] In the description of the present invention, unless otherwise specified and limited, it should be noted that the terms "installed", "connected" and "connected" should be understood in a broad sense. For example, it can be a mechanical connection or an electrical connection, or it can be the internal connection of two components. It can be a direct connection or an indirect connection through an intermediate medium. For ordinary technicians in this field, the specific meanings of the above terms can be understood according to the specific circumstances.
[0064] In the following description, the suffixes such as "module", "component" or "unit" used to represent elements are only used to facilitate the description of the present invention, and have no specific meanings. Therefore, "module" and "component" can be used interchangeably.
[0065] The present invention provides a peripheral device connection method, referring to Figure 1 , including the steps of:
[0066] S0: provides the first peripheral, the second peripheral and the third peripheral;
[0067] In some embodiments, the first peripheral device is a head-mounted display device, and more specifically, the first peripheral device is a head-mounted VR glasses;
[0068] The second peripheral device is a peripheral device that can establish a communication connection with the first peripheral device, such as a handle;
[0069] The third peripheral device is also a peripheral device that can establish a communication connection with the first peripheral device, such as a smart bracelet or a smart ring;
[0070] The handle, smart bracelet and smart ring are provided with buttons for inputting commands or touch recognition devices to control the head-mounted display device to display the content the user wants; the purpose of controlling the head-mounted display device through the second peripheral device or the third peripheral device is achieved, and the control is more convenient and quick.
[0071] S1: Detect the second peripheral device to obtain a first usage state, and detect the third peripheral device to obtain a second usage state;
[0072] In some embodiments, the second peripheral device includes a first detection module, which is used to detect the second peripheral device to obtain a first usage state; the third peripheral device includes a second detection module, which is used to detect the third peripheral device to obtain a second usage state.
[0073] S2: controlling the first peripheral device, the second peripheral device and the third peripheral device to enter a normal working mode or a sleep mode according to the first use state and the second use state, wherein the steps include:
[0074] S20: When it is determined that both the first usage state and the second usage state are unused states, controlling the second peripheral device and the third peripheral device to enter a sleep mode;
[0075] In some embodiments, the first peripheral device includes a first control module, and the second peripheral device includes a second control module. When it is determined that the first usage state and the second usage state are both unused states, the first control module controls the second peripheral device to enter a sleep mode, and the second control module controls the third peripheral device to enter a sleep mode, so as to achieve power saving.
[0076] S21: When it is determined that the first use state or the second use state is a normal use state, execute the following steps:
[0077] S22: controlling the second peripheral device or the third peripheral device to send a connection request signal to the first peripheral device;
[0078] In some embodiments, the first peripheral device, the second peripheral device and the third peripheral device all include a signal transmission unit, and the signal transmission unit is used to perform signal transmission between the first peripheral device and the second peripheral device and between the first peripheral device and the third peripheral device. The second peripheral device transmits a connection request signal to the first peripheral device through the signal transmission unit, and the third peripheral device transmits a connection request signal to the first peripheral device through the signal transmission unit.
[0079] S23: After the first peripheral device obtains the connection application signal through connection scanning, it performs peripheral connection identification on the second peripheral device or the third peripheral device to obtain an application result;
[0080] In some embodiments, the first peripheral device includes a connection scanning module and an identification module, the connection scanning module is used to perform a connection scanning step to obtain a connection application signal, and the identification module is used to perform connection identification on the second peripheral device or the third peripheral device to obtain an application result.
[0081] S24: Control the first peripheral device to establish a communication connection with the second peripheral device or the third peripheral device and enter a normal working mode according to the application result, or control the first peripheral device to enter the connection scanning working mode.
[0082] In some embodiments, the first peripheral device also includes a connection control module, which is used to control the first peripheral device to establish a communication connection with the second peripheral device or the third peripheral device and enter a normal working mode based on the application result; or control the first peripheral device to enter the connection scanning working mode, that is, scan whether there is a new connection application signal through the connection scanning module.
[0083] As a preferred embodiment of the present invention, in step S23, referring to Figure 2 , the step of performing peripheral connection identification on the second peripheral device or the third peripheral device to obtain the application result after the first peripheral device obtains the connection application signal through connection scanning includes:
[0084] S231: After the first peripheral performs connection scanning to obtain the connection application signal, the peripheral connection identification step is entered, the sending direction of the connection application signal is sensed to obtain the peripheral to be connected, and the photo of the peripheral to be connected is obtained to obtain the photo of the peripheral to be connected;
[0085] S232: Compare the photo of the external device to be connected with the photo of the external device pre-stored in the first external device to obtain a comparison result, and determine the application result according to the comparison result. The specific steps include:
[0086] S233: When only the photo of the to-be-connected peripheral of the second peripheral has a similarity with the peripheral photo that is greater than or equal to a preset similarity threshold, determining that the application result is connection approval;
[0087] S234: When only the photo of the third peripheral device to be connected has a similarity with the photo of the peripheral device that is greater than or equal to the similarity threshold, determining that the application result is connection approval;
[0088] S235: When the similarity between the photo of the second peripheral to be connected and the peripheral photo and the similarity between the photo of the third peripheral to be connected and the peripheral photo are both greater than the similarity threshold, determining the application result according to the preset communication connection priority;
[0089] In some embodiments, in step S235, the step of determining the application result according to the preset communication connection priority includes:
[0090] Comparing the communication connection priorities of the second peripheral device and the third peripheral device, when the communication connection priority of the second peripheral device is greater than the communication connection priority of the third peripheral device, determining that the application result is to agree to connect to the second peripheral device, at this time, the first peripheral device establishes a communication connection with the second peripheral device;
[0091] When the communication connection priority of the third peripheral device is greater than the communication connection priority of the second peripheral device, the application result is determined to be approval to connect to the third peripheral device, and the first peripheral device establishes a communication connection with the third peripheral device;
[0092] When the communication connection priority of the second peripheral device is the same as the communication connection priority of the third peripheral device, the application result is determined to be approval to connect the second peripheral device and the third peripheral device. At this time, the first peripheral device simultaneously establishes communication connections with the second peripheral device and the third peripheral device.
[0093] S236: When the similarities between all the photos of the peripheral devices to be connected and the photo of the peripheral device are less than the similarity threshold, it is determined that the application result is not agreeing to the connection.
[0094] In some embodiments, when a new peripheral device needs to establish a communication connection with the first peripheral device, and there are no new peripheral photos in the pre-stored peripheral photos, a photo storage operation is performed, and the photo of the new peripheral device is obtained by one of the methods such as shooting and USB uploading and saved in the pre-stored peripheral photo library, so as to facilitate the subsequent connection identification step and the communication connection step to proceed smoothly.
[0095] As a preferred implementation manner of the present invention, in step S24, the step of controlling the first peripheral device to establish a communication connection with the second peripheral device or the third peripheral device and enter a normal working mode according to the application result, or controlling the first peripheral device to enter the connection scanning working mode includes:
[0096] S241: When it is determined that the application result is connection approval, controlling the first peripheral device to establish a communication connection with the second peripheral device or the third peripheral device and enter a normal working mode;
[0097] S242: When it is confirmed that the application result is that the connection is not approved, the first peripheral device is controlled to enter the connection scanning working mode.
[0098] As a preferred embodiment of the present invention, refer to Figure 3 After controlling the first peripheral device to establish a communication connection with the second peripheral device or the third peripheral device and enter a normal working mode according to the application result, or controlling the first peripheral device to enter the connection scanning working mode, further performing the following steps:
[0099] S25: performing the peripheral device connection identification through the first peripheral device to obtain an identification result, and controlling the communication connection state between the first peripheral device and the second peripheral device or the third peripheral device according to the identification result, wherein the specific steps include:
[0100] S251: When the second peripheral device and the third peripheral device are both in a non-working state, disconnecting the communication connection between the first peripheral device and the second peripheral device or the third peripheral device, and making the first peripheral device enter the connection scanning working mode;
[0101] In some embodiments, when the second peripheral device and the third peripheral device are both in a non-working state, the communication connection between the first peripheral device and the second peripheral device or the third peripheral device is disconnected, the second peripheral device and the third peripheral device both enter a sleep mode, and the first peripheral device enters a connection scanning working mode to scan for new connection application signals, so as to facilitate timely detection of new connection application signals and subsequent establishment of new communication connections.
[0102] S252: When the second peripheral device is in a normal working state and the third peripheral device is in a non-working state, the first peripheral device is connected to the second peripheral device for communication, and the communication connection between the first peripheral device and the third peripheral device is disconnected;
[0103] In some embodiments, the first peripheral device is in communication connection with the second peripheral device, and after the communication connection between the first peripheral device and the third peripheral device is disconnected, the third peripheral device enters a sleep mode.
[0104] S253: When the third peripheral is in a normal working state and the second peripheral is in a non-working state, the first peripheral is connected to the third peripheral in communication, and the first peripheral is disconnected from the second peripheral in communication;
[0105] In some embodiments, the first peripheral device is in communication connection with the third peripheral device, and after the communication connection between the first peripheral device and the second peripheral device is disconnected, the second peripheral device enters a sleep mode.
[0106] S254: When the second peripheral device and the third peripheral device are both in use, controlling the first peripheral device to connect to the second peripheral device or the third peripheral device according to a preset communication connection priority.
[0107] The advantage of step S5 is that the peripheral connection identification is performed through the first peripheral to obtain an identification result, and the communication connection status between the first peripheral and the second peripheral or the third peripheral is controlled according to the identification result, thereby adding a method for detecting the status of the second peripheral and the third peripheral on the basis of detecting the status of the second peripheral and the third peripheral in step S1, thereby improving the accuracy and fault tolerance of the status detection of the second peripheral and the third peripheral.
[0108] In step S254, when the second peripheral device and the third peripheral device are both in use, the specific steps of controlling the connection between the first peripheral device and the second peripheral device or the third peripheral device according to the preset communication connection priority include:
[0109] Acquire the communication connection priority of the second peripheral device and the communication connection priority of the third peripheral device;
[0110] When the communication connection priority of the second peripheral device is greater than the communication connection priority of the third peripheral device, controlling the first peripheral device to establish a communication connection with the second peripheral device, and disconnecting the communication connection between the first peripheral device and the third peripheral device;
[0111] When the communication connection priority of the third peripheral device is greater than the communication connection priority of the second peripheral device, controlling the first peripheral device to establish a communication connection with the third peripheral device, and disconnecting the communication connection between the first peripheral device and the second peripheral device;
[0112] When the communication connection priority of the second peripheral device is the same as the communication connection priority of the third peripheral device, the first peripheral device is communicatively connected to the second peripheral device, and the first peripheral device is communicatively connected to the third peripheral device.
[0113] In some embodiments, the communication connection priority can be freely set according to the needs of the user. When the handle and the smart bracelet work at the same time, the handle and the smart bracelet both send a connection request signal to the head-mounted display device;
[0114] If only the handle needs to be connected, the communication connection priority of the handle is set to be higher than the communication connection priority of the smart bracelet, so that the handle and the head-mounted display device establish a communication connection;
[0115] If only a smart bracelet needs to be connected, the communication connection priority of the smart bracelet is set to be higher than the communication connection priority of the handle, so that the smart bracelet and the head-mounted display device establish a communication connection;
[0116] If you need to connect the handle and the smart bracelet at the same time, set the communication connection priority of the smart bracelet to be the same as the communication connection priority of the handle. At this time, the head-mounted display device establishes communication connections with the handle and the smart bracelet at the same time.
[0117] Its advantage is that by setting the communication connection priority, the first peripheral device connects to one or several peripheral devices at a time. When multiple peripheral devices work at the same time and send connection request signals to the first peripheral device, the first peripheral device selects the peripheral device with the highest communication connection priority for communication connection according to the communication connection priority.
[0118] Referring to 4, the present invention further provides a peripheral device connection apparatus, comprising a first peripheral device 1, a second peripheral device 2 and a third peripheral device 3, wherein the first peripheral device 1 comprises a connection control module 11 and an identification module 12;
[0119] The second peripheral device 2 includes a first detection module 21, and the first detection module 21 is used to detect the second peripheral device 2 to obtain a first usage state;
[0120] The third peripheral device 3 includes a second detection module 31, and the second detection module 31 is used to detect the third peripheral device 3 to obtain a second usage state;
[0121] In some embodiments, the first detection module 21 and the second detection module 31 both include sensors, including but not limited to inertial measurement units (IMUs), capacitive sensors, pressure sensors, and infrared sensors;
[0122] The first detection module 21 is used to detect the picked-up and put-down states of the second peripheral device 2. When it is detected that the second peripheral device 2 is in the picked-up state or in the state held by the user, the state of the second peripheral device 2 is determined to be the first use state; when it is detected that the second peripheral device 2 is in the put-down state, the state of the second peripheral device 2 is determined to be the unused state;
[0123] Similarly, the second detection module 31 is used to detect the picked-up and put-down states of the third peripheral device 3. When it is detected that the third peripheral device 3 is in the picked-up state or in the state of being held by the user, the state of the third peripheral device 3 is determined to be the second usage state; when it is detected that the third peripheral device 3 is in the put-down state, the state of the third peripheral device 3 is determined to be the unused state.
[0124] The connection control module 11 is used to control the first peripheral device 1, the second peripheral device 2 and the third peripheral device 3 to enter a normal working mode or a sleep mode according to the first use state and the second use state, and the steps include:
[0125] When it is determined that both the first usage state and the second usage state are unused states, controlling the second peripheral device 2 and the third peripheral device 3 to enter a sleep mode;
[0126] In some embodiments, referring to 4 , the first peripheral device 1 includes a first control module 22 , and the second peripheral device 2 includes a second control module 32 .
[0127] In some specific embodiments, when it is determined that the first usage state and the second usage state are both unused states, the first control module 22 controls the second peripheral device 2 to enter the sleep mode, and the second control module 32 controls the third peripheral device 3 to enter the sleep mode to achieve power saving.
[0128] When it is determined that the first use state or the second use state is a normal use state, the following steps are performed:
[0129] Controlling the second peripheral device 2 or the third peripheral device 3 to send a connection request signal to the first peripheral device 1;
[0130] In some embodiments, when it is determined that the first usage state is the active usage state and the second usage state is the unused state, the first control module 22 controls the second peripheral device 2 to send a connection request signal to the first peripheral device 1, and the second control module 32 controls the third peripheral device 3 to enter the sleep mode.
[0131] In some other embodiments, when it is determined that the first usage state is an unused state and the second usage state is an active state, the first control module 22 controls the second peripheral device 2 to enter a sleep mode, and the second control module 32 controls the second peripheral device 2 to send a connection request signal to the first peripheral device 1 .
[0132] After the first peripheral device 1 obtains the connection application signal through connection scanning, the identification module 12 performs peripheral connection identification on the second peripheral device 2 or the third peripheral device 3 to obtain an application result;
[0133] Referring to 4, the first peripheral device 1 further includes a connection scanning module 13, which is used to perform connection scanning to obtain a connection application signal.
[0134] According to the application result, the first peripheral device 1 is controlled to establish a communication connection with the second peripheral device 2 or the third peripheral device 3 and enter a normal working mode, or the first peripheral device 1 is controlled to enter the connection scanning working mode, that is, the connection scanning module 13 is controlled to scan to determine whether there is a new connection application signal.
[0135] In some embodiments, the connection control module 11 is a microcontroller unit (MCU).
[0136] In some embodiments, the step of performing peripheral connection identification on the second peripheral device 2 or the third peripheral device 3 to obtain an application result after the first peripheral device 1 obtains the connection application signal through connection scanning includes:
[0137] After the first peripheral device 1 performs connection scanning to obtain the connection application signal, the identification module 12 enters a peripheral device connection identification step, senses the sending direction of the connection application signal to obtain the peripheral device to be connected, and obtains a photo of the peripheral device to be connected to obtain a photo of the peripheral device to be connected;
[0138] The identification module 12 compares the photo of the peripheral device to be connected with the photo of the peripheral device pre-stored in the first peripheral device 1 to obtain a comparison result, and determines the application result according to the comparison result, and the specific steps include:
[0139] When the similarity between the photo of the external device to be connected and the photo of the external device is greater than or equal to a preset similarity threshold, determining that the application result is approval for connection;
[0140] When the similarity between the photo of the external device to be connected and the photo of the external device is less than a preset similarity threshold, it is determined that the application result is that the connection is not agreed.
[0141] The identification module 12 includes:
[0142] A signal sensing unit 121, used for sensing the sending direction of the connection application signal to obtain a peripheral device to be connected;
[0143] An image capturing unit 122 is configured to obtain a photo of the peripheral device to be connected to obtain a photo of the peripheral device to be connected;
[0144] The image recognition unit 123 is used to compare the photo of the peripheral device to be connected with the photos of the peripheral devices pre-stored in the first peripheral device to obtain a comparison result, and determine the application result according to the comparison result.
[0145] In some specific embodiments, referring to 4, the signal sensing unit 121 is used to sense the sending direction of the connection application signal and determine the position of the signal source, which is the peripheral device to be connected; the image capturing unit 123 is used to capture a photo of the signal source to obtain a photo of the peripheral device to be connected; the image recognition unit 122 is used to compare the photo of the peripheral device to be connected with the photo of the peripheral device pre-stored in the first peripheral device to obtain a comparison result, and determine the application result according to the comparison result, and send the application result to the connection control module 11, and the specific steps include:
[0146] When only the similarity between the external device photo to be connected of the second external device and the external device photo is greater than or equal to the preset similarity threshold, the application result is determined to be connection approval; the connection control module 11 controls the first external device 1 to establish a communication connection with the second external device 2 according to the application result;
[0147] When only the similarity between the external device photo to be connected of the third external device and the external device photo is greater than or equal to the similarity threshold, the application result is determined to be connection approval; the connection control module 11 controls the first external device 1 to establish a communication connection with the third external device 3 according to the application result;
[0148] When the similarity between all the photos of the peripheral devices to be connected and the photo of the peripheral device is less than the similarity threshold, it is determined that the application result is not agreeing to the connection; the connection control module 11 controls the first peripheral device 1 to enter the connection scanning working mode according to the application result;
[0149] When the similarity between the photo of the second peripheral to be connected and the peripheral photo and the similarity between the photo of the third peripheral to be connected and the peripheral photo are both greater than the similarity threshold, the application result is determined according to the preset communication connection priority, and the specific steps are as follows:
[0150] Compare the communication connection priorities of the second peripheral device and the third peripheral device. When the communication connection priority of the second peripheral device is greater than the communication connection priority of the third peripheral device, determine that the application result is to agree to connect the second peripheral device; the connection control module 11 controls the first peripheral device 1 to establish a communication connection with the third peripheral device 3 according to the application result;
[0151] When the communication connection priority of the third peripheral device is greater than the communication connection priority of the second peripheral device, the application result is determined to be approval to connect to the third peripheral device, and the first peripheral device establishes a communication connection with the third peripheral device;
[0152] When the communication connection priority of the second peripheral device is the same as the communication connection priority of the third peripheral device, the application result is determined to be agreeing to connect the second peripheral device and the third peripheral device, and the connection control module 11 controls the first peripheral device 1 to establish communication connections with the second peripheral device 2 and the third peripheral device 3 at the same time according to the application result.
[0153] In some specific embodiments, the image capturing unit 123 is a camera with a rotating camera lens, such as a gimbal camera. The shooting direction of the camera can be adjusted manually or automatically as needed to track the position of the peripheral device to be connected and take photos of the peripheral device to be connected in time, thereby improving the communication connection efficiency.
[0154] In some specific embodiments, the signal sensing unit 121 is a signal detector for detecting the direction and position of a signal source that sends a connection request signal, so that the image capturing unit 123 can directly capture a photo of the peripheral device to be connected that sends a connection request signal.
[0155] In some embodiments, referring to 4, after the connection control module 11 controls the first peripheral device 1 to establish a communication connection with the second peripheral device 2 or the third peripheral device 3 according to the application result and enter the normal working mode, or controls the first peripheral device 1 to enter the connection scanning working mode, the following steps are further performed:
[0156] The peripheral device connection identification is performed by the identification module 12 of the first peripheral device 1 to obtain an identification result, and the communication connection state between the first peripheral device 1 and the second peripheral device 2 or the third peripheral device 3 is controlled according to the identification result, and the specific steps include:
[0157] When the second peripheral device 2 and the third peripheral device 3 are both in a non-working state, disconnecting the communication connection between the first peripheral device 1 and the second peripheral device 2 or the third peripheral device 3, and making the first peripheral device 1 enter the connection scanning working mode;
[0158] When the second peripheral device 2 is in a normal working state and the third peripheral device 3 is in a non-working state, the first peripheral device 1 is connected to the second peripheral device 2 for communication, and the communication connection between the first peripheral device 1 and the third peripheral device 3 is disconnected;
[0159] When the third peripheral device 3 is in a normal working state and the second peripheral device 2 is in a non-working state, the first peripheral device 1 is connected to the third peripheral device 3 for communication, and the communication connection between the first peripheral device 1 and the second peripheral device 2 is disconnected;
[0160] When the second peripheral device 2 and the third peripheral device 3 are both in use, the first peripheral device 1 is controlled to be connected to the second peripheral device 2 or the third peripheral device 3 according to a preset communication connection priority, and the specific steps include:
[0161] Acquire the communication connection priority of the second peripheral device and the communication connection priority of the third peripheral device;
[0162] When the communication connection priority of the second peripheral device is greater than the communication connection priority of the third peripheral device, the first peripheral device 1 is controlled to establish a communication connection with the second peripheral device 2, and the communication connection between the first peripheral device 1 and the third peripheral device 3 is disconnected;
[0163] When the communication connection priority of the third peripheral device is greater than the communication connection priority of the second peripheral device, the first peripheral device 1 is controlled to establish a communication connection with the third peripheral device 3, and the communication connection between the first peripheral device 1 and the second peripheral device 2 is disconnected;
[0164] When the communication connection priority of the second peripheral device is the same as the communication connection priority of the third peripheral device, the first peripheral device 1 is communicatively connected to the second peripheral device 2 , and the first peripheral device 1 is communicatively connected to the third peripheral device 3 .
[0165] In some specific embodiments, the step of the first peripheral device 1 performing the peripheral device connection identification to obtain the identification result includes:
[0166] The first peripheral device 1 takes real-time photos of the second peripheral device 2 and the third peripheral device 3 through a camera. When the second peripheral device 2 is captured being held in the user's hand or other operating position, the second peripheral device 2 is determined to be in a normal working state; when the second peripheral device 2 is captured not being placed in the hand or operating position, the second peripheral device 2 is determined to be in a non-working state. Similarly, when the third peripheral device 3 is captured being held in the user's hand or other operating position, the third peripheral device 3 is determined to be in a normal working state; when the third peripheral device 3 is captured not being placed in the hand or operating position, the third peripheral device 3 is determined to be in a non-working state.
[0167] As a preferred embodiment of the present invention, referring to 4, the first peripheral device 1, the second peripheral device 2 and the third peripheral device 3 all include a signal transmission unit 4, and the signal transmission unit 4 is used for signal transmission between the first peripheral device 1 and the second peripheral device 2 and between the first peripheral device 1 and the third peripheral device 3.
[0168] In some embodiments, in the first peripheral device 1, the connection scanning module 13 includes a signal transmission unit 4 (not shown in the figure), which is specifically a signal receiving device; the signal transmission unit 4 in the second peripheral device 2 is a signal transmitting device, and the signal transmission unit 4 in the third peripheral device 3 is also a signal transmitting device, and the signal transmitting device matches the signal receiving device.
[0169] In some embodiments, after the first detection module 21 detects that the second peripheral device 2 is in the first usage state, the second peripheral device 2 transmits a connection application signal to the first peripheral device 1 through the signal transmission unit to request to establish a communication connection with the first peripheral device 1. After the first peripheral device 1 obtains the connection application signal sent by the second peripheral device 2 through the connection scanning step, the second peripheral device 2 is subjected to peripheral connection identification through the identification module 12 to obtain an application result. According to the application result, the first peripheral device 1 and the second peripheral device 2 are controlled to establish a communication connection, or the first peripheral device 1 and the second peripheral device 2 are controlled not to establish a communication connection, and the first peripheral device 1 enters a connection scanning working mode;
[0170] After the second detection module 31 detects that the third peripheral device 3 is in the second usage state, the third peripheral device 3 transmits a connection application signal to the first peripheral device 1 through the signal transmission unit 4 to request to establish a communication connection with the first peripheral device 1. After the first peripheral device 1 obtains the connection application signal sent by the third peripheral device 3 through the connection scanning step, the third peripheral device 3 is identified by the identification module 12 to obtain an application result. According to the application result, the first peripheral device 1 and the third peripheral device 3 are controlled to establish a communication connection, or the first peripheral device 1 and the third peripheral device 3 are controlled not to establish a communication connection, and the first peripheral device 1 enters the connection scanning working mode.
[0171] In some embodiments, the signal transmission unit 4 is a wireless transmission module or a wired transmission module, and the wireless transmission module includes but is not limited to any one of WiFi, Bluetooth and Zigbee.
[0172] The present invention also provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the peripheral device connection method is implemented.
[0173] After adopting the above technical solution, compared with the prior art, the present invention has the following beneficial effects:
[0174] 1. The use status of the device is obtained by detecting the second device and the third device, and the first peripheral device, the second peripheral device and the third peripheral device are controlled to enter the normal working mode or the sleep mode according to the use status of the device. The working status of the peripheral device is controlled by the program, which is easy and labor-saving. The working mode of the peripheral device is more efficient, and the peripheral device can be put into the sleep mode, which saves the power of the peripheral device and increases the service life of the peripheral device;
[0175] 2. Perform peripheral connection identification through the first peripheral to further determine the status of the peripheral, thereby improving the accuracy of peripheral status judgment; obtain application results through connection identification, and control the first peripheral to establish a communication connection with the second peripheral or the third peripheral according to the application result, or control the first peripheral to enter a connection scanning working mode, and control the communication connection status of the first peripheral according to the connection application signal and the application result in turn, which reflects the rigor of the peripheral connection and improves the accuracy of the peripheral connection; automatically detect the status of the peripheral and control the communication connection status of the first peripheral according to the status and application results, thereby improving the connection efficiency between peripherals, enhancing the communication efficiency and interaction between peripherals, and improving the user experience.
[0176] It should be noted that the embodiments of the present invention have better practicability and do not impose any form of limitation on the present invention. Any technician familiar with the field may use the technical content disclosed above to change or modify it into an equivalent effective embodiment. However, any modification or equivalent changes and modifications made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention are still within the scope of the technical solution of the present invention.
Claims
1. A peripheral device connection method, characterized in that: Includes steps: Providing a first peripheral device, a second peripheral device, and a third peripheral device; Detecting the second peripheral device to obtain a first usage state, and detecting the third peripheral device to obtain a second usage state; Controlling the first peripheral device, the second peripheral device, and the third peripheral device to enter a normal working mode or a sleep mode according to the first use state and the second use state includes: When it is determined that both the first usage state and the second usage state are unused states, controlling the second peripheral device and the third peripheral device to enter a sleep mode; When it is determined that the first use state or the second use state is a normal use state, the following steps are performed: Controlling the second peripheral device or the third peripheral device to send a connection request signal to the first peripheral device; After the first peripheral device acquires the connection application signal through connection scanning, it performs peripheral connection identification on the second peripheral device or the third peripheral device to obtain an application result; According to the application result, the first peripheral device is controlled to establish a communication connection with the second peripheral device or the third peripheral device and enter a normal working mode, or the first peripheral device is controlled to enter the connection scanning working mode.
2. The peripheral device connection method according to claim 1, characterized in that: The step of performing peripheral connection identification on the second peripheral device or the third peripheral device to obtain an application result after the first peripheral device obtains the connection application signal through connection scanning includes: After the first peripheral performs connection scanning to obtain the connection application signal, the peripheral connection identification step is entered, the sending direction of the connection application signal is sensed to obtain the peripheral to be connected, and the photo of the peripheral to be connected is obtained to obtain the photo of the peripheral to be connected; The photo of the peripheral device to be connected is compared with the photos of the peripheral devices pre-stored in the first peripheral device to obtain a comparison result, and the application result is determined according to the comparison result.
3. The peripheral device connection method according to claim 2, characterized in that: The step of comparing the photo of the peripheral device to be connected with the photo of the peripheral device pre-stored in the first peripheral device to obtain a comparison result, and determining the application result according to the comparison result includes: When only the photo of the second peripheral to be connected has a similarity with the photo of the peripheral greater than or equal to a preset similarity threshold, determining that the application result is connection approval; When only the photo of the third peripheral device to be connected has a similarity with the photo of the peripheral device that is greater than or equal to the similarity threshold, determining that the application result is connection approval; When the similarity between the photo of the second peripheral to be connected and the peripheral photo and the similarity between the photo of the third peripheral to be connected and the peripheral photo are both greater than the similarity threshold, determining the application result according to the preset communication connection priority; When the similarities between all the photos of the peripheral devices to be connected and the photo of the peripheral device are less than the similarity threshold, it is determined that the application result is that the connection is not agreed.
4. The peripheral device connection method according to claim 3, characterized in that: The step of controlling the first peripheral device to establish a communication connection with the second peripheral device or the third peripheral device and enter a normal working mode according to the application result, or controlling the first peripheral device to enter the connection scanning working mode includes: When it is determined that the application result is connection approval, controlling the first peripheral device to establish a communication connection with the second peripheral device or the third peripheral device and enter a normal working mode; When it is confirmed that the application result is that the connection is not agreed, the first peripheral device is controlled to enter the connection scanning working mode.
5. The peripheral device connection method according to claim 1, characterized in that: After controlling the first peripheral device to establish a communication connection with the second peripheral device or the third peripheral device and enter a normal working mode according to the application result, or controlling the first peripheral device to enter the connection scanning working mode, further performing the following steps: The peripheral device connection identification is performed through the first peripheral device to obtain an identification result, and the communication connection state between the first peripheral device and the second peripheral device or the third peripheral device is controlled according to the identification result.
6. The peripheral device connection method according to claim 5, characterized in that: The steps of performing the peripheral device connection identification through the first peripheral device to obtain a working state, and controlling the communication connection state between the first peripheral device and the second peripheral device or the third peripheral device according to the working state include: When the second peripheral device and the third peripheral device are both in a non-working state, disconnecting the communication connection between the first peripheral device and the second peripheral device or the third peripheral device, and making the first peripheral device enter the connection scanning working mode; When the second peripheral is in a normal working state and the third peripheral is in a non-working state, the first peripheral is connected to the second peripheral in communication, and the first peripheral is disconnected from the third peripheral; When the third peripheral is in a normal working state and the second peripheral is in a non-working state, the first peripheral is connected to the third peripheral in communication, and the first peripheral is disconnected from the second peripheral; When the second peripheral device and the third peripheral device are both in use, the first peripheral device is controlled to be connected to the second peripheral device or the third peripheral device according to a preset communication connection priority.
7. The peripheral device connection method according to claim 6, characterized in that: When the second peripheral device and the third peripheral device are both in use, the step of controlling the connection between the first peripheral device and the second peripheral device or the third peripheral device according to a preset communication connection priority includes: Acquire the communication connection priority of the second peripheral device and the communication connection priority of the third peripheral device; When the communication connection priority of the second peripheral device is greater than the communication connection priority of the third peripheral device, controlling the first peripheral device to establish a communication connection with the second peripheral device, and disconnecting the communication connection between the first peripheral device and the third peripheral device; When the communication connection priority of the third peripheral device is greater than the communication connection priority of the second peripheral device, controlling the first peripheral device to establish a communication connection with the third peripheral device, and disconnecting the communication connection between the first peripheral device and the second peripheral device; When the communication connection priority of the second peripheral device is the same as the communication connection priority of the third peripheral device, the first peripheral device is communicatively connected to the second peripheral device, and the first peripheral device is communicatively connected to the third peripheral device.
8. A peripheral connection device, characterized in that: It includes a first peripheral device, a second peripheral device and a third peripheral device, wherein the first peripheral device includes a connection control module and an identification module; The second peripheral device includes a first detection module, and the first detection module is used to detect the second peripheral device to obtain a first usage state; The third peripheral device includes a second detection module, and the second detection module is used to detect the third peripheral device to obtain a second usage state; The connection control module is used to control the first peripheral device, the second peripheral device and the third peripheral device to enter a normal working mode or a sleep mode according to the first use state and the second use state, and the steps include: When it is determined that both the first usage state and the second usage state are unused states, controlling the second peripheral device and the third peripheral device to enter a sleep mode; When it is determined that the first use state or the second use state is a normal use state, the following steps are performed: Controlling the second peripheral device or the third peripheral device to send a connection request signal to the first peripheral device; After the first peripheral device acquires the connection application signal through connection scanning, the identification module performs peripheral connection identification on the second peripheral device or the third peripheral device to obtain an application result; According to the application result, the first peripheral device is controlled to establish a communication connection with the second peripheral device or the third peripheral device and enter a normal working mode, or the first peripheral device is controlled to enter the connection scanning working mode.
9. The peripheral device connection device according to claim 8, characterized in that: The identification module comprises: A signal sensing unit, used for sensing the sending direction of the connection application signal to obtain a peripheral device to be connected; An image capturing unit, for acquiring a photo of the peripheral device to be connected to obtain a photo of the peripheral device to be connected; The image recognition unit is used to compare the photo of the peripheral device to be connected with the photo of the peripheral device pre-stored in the first peripheral device to obtain a comparison result, and determine the application result according to the comparison result.
10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the peripheral device connection method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Multi-connection method and electronic device supporting same
CN105517186A
Data processing method and device, equipment and storage medium
CN112312368A