Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is illustrative only and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It is noted that the terms used herein should be interpreted as having a meaning that is consistent with the context of this specification and should not be interpreted in an idealized or overly formal sense.
Where a convention analogous to "at least one of A, B and C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B and C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.). Where a convention analogous to "A, B or at least one of C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B or C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
Some block diagrams and/or flow diagrams are shown in the figures. It will be understood that some blocks of the block diagrams and/or flowchart illustrations, or combinations thereof, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the instructions, which execute via the processor, create means for implementing the functions/acts specified in the block diagrams and/or flowchart block or blocks. The techniques of this disclosure may be implemented in hardware and/or software (including firmware, microcode, etc.). In addition, the techniques of this disclosure may take the form of a computer program product on a computer-readable storage medium having instructions stored thereon for use by or in connection with an instruction execution system.
When the electronic equipment is in communication connection with other equipment through WiFi or Bluetooth pairing, the equipment to be connected can be uniquely located through the identification information of the equipment to be connected. This requires not only manual participation of the user but also the user to acquire the identification information of the device to be connected in advance during the establishment of the communication connection. And when the identification information of the device to be connected is difficult to obtain, great trouble is often brought to the user.
For example, if a tablet computer and a wireless keyboard (e.g., a bluetooth keyboard) are used in a classroom, the tablet computer of a user (student or teacher) can search for tens of pieces of information of the wireless keyboard available for connection at the same time. In this case, the user needs to select information of the wireless keyboard (for example, the wireless keyboard on the desktop) from the information of the dozens of wireless keyboards available for connection, so as to connect the tablet computer with the wireless keyboard on the desktop. Otherwise, a connection error may cause the user not to control the tablet computer by operating the wireless keyboard on the desktop. However, the process of selecting the wireless keyboard actually needed by the user from the information of dozens of wireless keyboards available for connection consumes much effort, is very easy to make mistakes, and brings great trouble to the user.
In view of the above-mentioned drawbacks in the related art, the embodiments of the present disclosure provide a method for communication and a corresponding electronic device. When two electronic devices establish communication connection, signal wave (such as light wave or sound wave) interaction between the two electronic devices is triggered through physical contact of the two electronic devices according to a preset mode, wherein communication identification information (such as mac address) of the electronic devices to be paired can be coded in the signal wave, then the two electronic devices can be mutually identified based on the interaction of the signal wave, and directional communication connection is established between the two electronic devices. Therefore, the communication pairing of the equipment is carried out through physical contact, and the effect of one-touch connection is achieved.
The following provides an exemplary description of a method for communication and a corresponding electronic device according to embodiments of the disclosure with reference to the drawings. It should be noted that the terms "first" and "second" are used herein only for distinguishing the terms, and do not have actual limiting meanings.
Fig. 1A and 1B schematically illustrate anapplication scenario 100 of a method and an electronic device for communication according to an embodiment of the present disclosure.
As shown in fig. 1A and 1B, theapplication scenario 100 may include atablet computer 11 and awireless keyboard 12. Thetablet computer 11 may be a first electronic device according to the embodiment of the disclosure, and thewireless keyboard 12 may be a second electronic device according to the embodiment of the disclosure. It is understood that in other cases, thetablet computer 11 may be the second electronic device and thewireless keyboard 12 corresponds to the first electronic device.
In fig. 1A, thetablet computer 11 and thewireless keyboard 12 are not in contact. When it is desired to establish a communication connection between thetablet computer 11 and thewireless keyboard 12, thetablet computer 11 and thewireless keyboard 12 may be brought into contact in the manner shown in fig. 1B to trigger a directional communication connection between thetablet computer 11 and thewireless keyboard 12.
The contact between thetablet computer 11 and thewireless keyboard 12 may be physical contact in a predetermined manner. For example, thetablet computer 11 may be provided with a first specific area 111 for contacting thewireless keyboard 12. The first specific region 111 may be provided therein with, for example, metal pins, electrode pins, and the like. Thewireless keyboard 12 may be provided with a second specific area 121 coupled to the first specific area 111. When it is required to trigger the communication connection between thetablet computer 11 and thewireless keyboard 12, the user may contact the first specific region 111 of thetablet computer 11 and the second specific region 121 of thewireless keyboard 12, so as to contact the metal pins or the electrode pins to generate a trigger signal for establishing the communication connection.
Thetablet computer 11 and thewireless keyboard 12 may each include a signal transmitter and/or a signal receiver. The signal transmitter may be, for example, a microphone and/or an LED lamp, etc.; a microphone may be used to transmit sound waves; LED lamps can be used to emit light waves. The signal receiver may be, for example, a speaker and/or a camera, etc.; the horn may be for receiving sound waves; the camera may be used to receive light waves.
The description is continued by taking thetablet computer 11 including the speaker 112 and thewireless keyboard 12 including the microphone 122 as examples. As mentioned above, when thetablet computer 11 and thewireless keyboard 12 are contacted as shown in fig. 1B, a trigger signal for establishing a communication connection is generated.
The trigger signal may initiate the microphone 122 to emit sound waves outward, where communication identification information of thewireless keyboard 12 may be encoded in the sound waves in accordance with embodiments of the present disclosure.
At the same time, the trigger signal may activate the speaker 112 to receive a signal, such as a sound wave emitted by the microphone 122. Thetablet computer 11 may analyze the sound wave to obtain the communication identification information of thewireless keyboard 12. Thereafter, thetablet computer 11 may send a communication request to thewireless keyboard 12 based on the communication identification information to establish a communication connection between thetablet computer 11 and thewireless keyboard 12. After the communication connection between thetablet computer 11 and thewireless keyboard 12 is established, thetablet computer 11 and thewireless keyboard 12 may be kept in contact or may be physically separated, which is not limited in this disclosure.
In one embodiment, the location of the speaker 112 in thetablet computer 11 and the microphone 122 location setting in thewireless keyboard 12 may be matched. For example, when thetablet computer 11 and thewireless keyboard 12 are contacted in the manner shown in fig. 1B, the speaker 112 and the microphone 122 may be located opposite to each other in space, so that the sound wave emitted from the microphone 122 propagates to the speaker 112, and the efficiency and the speed of signal wave transmission can be ensured.
It should be noted that fig. 1A and 1B are only examples of scenarios in which the embodiments of the present disclosure may be applied to help those skilled in the art understand the technical content of the present disclosure, but do not mean that the embodiments of the present disclosure may not be used in other devices, systems, environments or scenarios.
Fig. 2 schematically shows a block diagram of a firstelectronic device 200 according to an embodiment of the present disclosure.
As shown in fig. 2, the firstelectronic device 200 may include a first obtainingmodule 210, a signalwave receiving module 220, aparsing module 230, and a firstcommunication establishing module 240.
The first obtainingmodule 210 is configured to obtain a trigger signal for establishing a communication connection, where the trigger signal is generated based on physical contact with a second electronic device to be connected in a predetermined manner.
The signalwave receiving module 220 is configured to receive a signal wave in response to a trigger signal.
Theparsing module 230 is configured to parse the signal wave to obtain communication identification information of the second electronic device included in the signal wave.
The firstcommunication establishing module 240 is configured to establish a communication connection with the second electronic device based on the communication identification information.
Fig. 3 schematically shows a block diagram of a secondelectronic device 300 according to an embodiment of the present disclosure.
As shown in fig. 3, the secondelectronic device 300 includes a second obtainingmodule 310, a signalwave transmitting module 320, and a secondcommunication establishing module 330.
The second obtainingmodule 310 is configured to obtain a trigger signal for establishing a communication connection, where the trigger signal is generated based on physical contact with a first electronic device to be connected in a predetermined manner.
The signalwave transmitting module 320 is used for responding to the trigger signal and transmitting the signal wave; wherein the signal wave includes communication identification information of the second electronic device.
The secondcommunication establishing module 330 is configured to receive a communication connection request sent by the first electronic device based on the communication identification information, so as to establish a communication connection with the first electronic device based on the communication connection request.
The firstelectronic device 200 may perform the method for communication shown in fig. 4 below, and the secondelectronic device 300 may perform the method for communication shown in fig. 5 below, so that when the firstelectronic device 200 and the secondelectronic device 300 are in physical contact in a predetermined manner, a communication connection between the firstelectronic device 200 and the secondelectronic device 300 may be achieved. In this way, the embodiment of the present disclosure can perform communication pairing of the devices through physical contact of the two electronic devices, and achieve the effect of one touch and one touch.
Fig. 4 schematically shows a flowchart of a method for communication applied to the firstelectronic device 200 according to an embodiment of the present disclosure.
As shown in fig. 4, the method may include operations S401 to S404.
In operation S401, the first obtainingmodule 210 obtains a trigger signal for establishing a communication connection, the trigger signal being generated based on physical contact with the secondelectronic device 300 to be connected in a predetermined manner.
In operation S402, the signalwave receiving module 220 receives a signal wave in response to the trigger signal. According to an embodiment of the present disclosure, the signal wave includes at least one of a light wave or a sound wave.
According to an embodiment of the present disclosure, a specific implementation of receiving the signal wave in operation S402 may be receiving the signal wave within a predetermined time period (e.g., 1ms) after obtaining the trigger signal; alternatively, the specific implementation of the received signal wave in operation S402 receives a signal wave whose signal intensity is within a first intensity range (e.g., within 10 mW). Since the firstelectronic device 200 and the secondelectronic device 300 are communication connections triggered by physical contact, the firstelectronic device 200 and the secondelectronic device 300 are at a small distance from each other when establishing communication connections. By limiting the time of receiving the signal wave or the signal strength of the signal wave, the interference of other signal waves in the environment can be avoided, and the accuracy of communication establishment is improved.
In operation S403, theparsing module 230 parses the signal wave to obtain communication identification information (e.g., mac address) of the secondelectronic device 300 included in the signal wave.
In operation S404, the firstcommunication establishing module 240 establishes a communication connection with the secondelectronic device 300 based on the communication identification information.
Fig. 5 schematically shows a flowchart of a method for communication applied to the secondelectronic device 300 according to an embodiment of the present disclosure.
As shown in fig. 5, the method may include operations S501 to S503.
In operation S501, the second obtainingmodule 310 obtains a trigger signal for establishing a communication connection, wherein the trigger signal is generated based on physical contact with a first electronic device to be connected in a predetermined manner.
In operation S502, the signalwave transmitting module 320 transmits a signal wave in response to the trigger signal, wherein the signal wave includes communication identification information (e.g., mac address) of the secondelectronic device 300. According to an embodiment of the present disclosure, the signal wave includes at least one of a light wave or a sound wave.
According to an embodiment of the present disclosure, a specific implementation of transmitting the signal wave in operation S502 may be that the signal wave is transmitted within a predetermined time period (0.5ms) after the trigger signal is obtained; or alternatively emit signal waves having signal intensities within a second intensity range (e.g., within 15 mW). Since the firstelectronic device 200 and the secondelectronic device 300 are communication connections triggered by physical contact, the firstelectronic device 200 and the secondelectronic device 300 are at a small distance from each other when establishing communication connections. Based on the characteristic, the transmitting time and/or the transmitting strength of the signal wave are/is set, so that the interference of other signal waves in the environment can be avoided, and the accuracy of communication establishment is improved.
In operation S503, the secondcommunication establishing module 330 receives a communication connection request transmitted by the firstelectronic device 200 based on the communication identification information to establish a communication connection with the firstelectronic device 200 based on the communication connection request.
According to an embodiment of the present disclosure, the firstelectronic device 200 includes a signal receiver for receiving a signal wave, and the secondelectronic device 300 includes a signal transmitter for transmitting a signal wave. For example, the signalwave receiving module 220 may be integrated in a signal receiver, and thesignal wave transmitter 320 may be integrated in a signal transmitter. Wherein the signal receiver is spatially opposite the signal transmitter (e.g., speaker 112 and microphone 122 in fig. 1A and 1B) when the firstelectronic device 200 and the secondelectronic device 300 are in physical contact in a predetermined manner.
Any number of modules, sub-modules, units, sub-units, or at least part of the functionality of any number thereof according to embodiments of the present disclosure may be implemented in one module. Any one or more of the modules, sub-modules, units, and sub-units according to the embodiments of the present disclosure may be implemented by being split into a plurality of modules. Any one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be implemented at least in part as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in any other reasonable manner of hardware or firmware by integrating or packaging a circuit, or in any one of or a suitable combination of software, hardware, and firmware implementations. Alternatively, one or more of the modules, sub-modules, units, sub-units according to embodiments of the disclosure may be at least partially implemented as a computer program module, which when executed may perform the corresponding functions.
For example, any plurality of the first obtainingmodule 210, the signalwave receiving module 220, theparsing module 230, the firstcommunication establishing module 240, the second obtainingmodule 310, the signalwave transmitting module 320, and the secondcommunication establishing module 330 may be combined in one module to be implemented, or any one of them may be split into a plurality of modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of the other modules and implemented in one module. According to the embodiment of the present disclosure, at least one of the first obtainingmodule 210, the signalwave receiving module 220, theparsing module 230, the firstcommunication establishing module 240, the second obtainingmodule 310, the signalwave transmitting module 320, and the secondcommunication establishing module 330 may be at least partially implemented as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented by hardware or firmware in any other reasonable manner of integrating or packaging a circuit, or implemented by any one of three implementation manners of software, hardware, and firmware, or by a suitable combination of any several of them. Alternatively, at least one of the first obtainingmodule 210, the signalwave receiving module 220, theparsing module 230, the firstcommunication establishing module 240, the second obtainingmodule 310, the signalwave transmitting module 320, and the secondcommunication establishing module 330 may be at least partially implemented as a computer program module that may perform a corresponding function when executed.
Fig. 6 schematically shows a block diagram of a first electronic device 600 according to another embodiment of the present disclosure. The computing or system architecture of the first electronic device 600 shown in fig. 6 is only one example and should not impose any limitations on the functionality or scope of use of embodiments of the disclosure.
As shown in fig. 6, the first electronic device 600 includes a processor 610, a computer-readable storage medium 620, and a signal receiver 630. The first electronic device 600 may perform the method described with reference to fig. 4. According to an embodiment of the present invention, at least one of the first obtainingmodule 210, the signalwave receiving module 220, theparsing module 230, and the firstcommunication establishing module 240 may be implemented as a computer program module described with reference to fig. 6, which, when executed by the processor 610, may implement the corresponding operations described above.
In particular, the processor 610 may comprise, for example, a general purpose microprocessor, an instruction set processor and/or related chip set and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), or the like. The processor 610 may also include onboard memory for caching purposes. The processor 610 may be a single processing unit or a plurality of processing units for performing the different actions of the method flow described with reference to fig. 4.
Computer-readable storage medium 620, for example, may be a non-volatile computer-readable storage medium, specific examples including, but not limited to: magnetic storage devices, such as magnetic tape or Hard Disk Drives (HDDs); optical storage devices, such as compact disks (CD-ROMs); a memory, such as a Random Access Memory (RAM) or a flash memory; and so on.
The computer-readable storage medium 620 may include a computer program 621, which computer program 621 may include code/computer-executable instructions that, when executed by the processor 610, cause the processor 610 to perform the method described with reference to fig. 4, or any variation thereof.
The computer program 621 may be configured with, for example, computer program code comprising computer program modules. For example, in an example embodiment, code in computer program 621 may include one or more program modules, including 621A, 621B, … …, for example. It should be noted that the division and number of modules are not fixed, and those skilled in the art may use suitable program modules or program module combinations according to actual situations, which when executed by the processor 610, enable the processor 610 to perform the method described with reference to fig. 4 or any variation thereof.
According to an embodiment of the present disclosure, the signal receiver 630 may be used to receive a signal wave. The processor 610 may interact with the signal receiver 630 to perform the method according to the method described with reference to fig. 4 or any variant thereof.
Fig. 7 schematically shows a block diagram of a secondelectronic device 700 according to another embodiment of the present disclosure. The computing or system architecture of the secondelectronic device 700 shown in fig. 7 is only one example and should not impose any limitations on the functionality or scope of use of embodiments of the present disclosure.
As shown in fig. 7, the secondelectronic device 700 includes aprocessor 710, a computer-readable storage medium 720, and asignal transmitter 730. The secondelectronic device 700 may perform the method described with reference to fig. 5. According to an embodiment of the present invention, at least one of the second obtainingmodule 310, the signalwave transmitting module 320, and the secondcommunication establishing module 330 may be implemented as a computer program module described with reference to fig. 7, which, when executed by theprocessor 710, may implement the respective operations described above.
In particular,processor 710 may comprise, for example, a general purpose microprocessor, an instruction set processor and/or associated chipset, and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), and/or the like. Theprocessor 710 may also include on-board memory for caching purposes. The processor 610 may be a single processing unit or a plurality of processing units for performing different actions according to the method flow described with reference to fig. 5.
Computer-readable storage medium 720, for example, may be a non-volatile computer-readable storage medium, specific examples including, but not limited to: magnetic storage devices, such as magnetic tape or Hard Disk Drives (HDDs); optical storage devices, such as compact disks (CD-ROMs); a memory, such as a Random Access Memory (RAM) or a flash memory; and so on.
The computer-readable storage medium 720 may comprise acomputer program 721, whichcomputer program 721 may comprise code/computer-executable instructions, which, when executed by theprocessor 710, cause theprocessor 710 to perform the method described with reference to fig. 5 or any variant thereof.
Thecomputer program 721 may be configured with, for example, computer program code comprising computer program modules. For example, in an example embodiment, code incomputer program 721 may include one or more program modules, including 721A,modules 721B, … …, for example. It should be noted that the division and number of modules are not fixed, and those skilled in the art may use suitable program modules or program module combinations according to actual situations, which when executed by theprocessor 710, enable theprocessor 710 to perform the method described with reference to fig. 5 or any variation thereof.
According to an embodiment of the present disclosure, thesignal transmitter 730 may be used to transmit a signal wave.Processor 710 may interact withsignal transmitter 730 to perform the method described with reference to fig. 5 or any variation thereof.
The present disclosure also provides a computer-readable storage medium, which may be contained in the apparatus/device/system described in the above embodiments; or may exist separately and not be assembled into the device/apparatus/system. The computer-readable storage medium carries one or more programs which, when executed, implement the methods described with reference to fig. 4 or 5.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example but is not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Those skilled in the art will appreciate that various combinations and/or combinations of features recited in the various embodiments and/or claims of the disclosure can be made without conflict, even if such combinations or combinations are not expressly recited in the present disclosure. In particular, various combinations and/or combinations of the features recited in the various embodiments and/or claims of the present disclosure may be made without departing from the spirit or teaching of the present disclosure. All such combinations and/or associations are within the scope of the present disclosure.
While the disclosure has been shown and described with reference to certain exemplary embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the disclosure as defined by the appended claims and their equivalents. Accordingly, the scope of the present disclosure should not be limited to the above-described embodiments, but should be defined not only by the appended claims, but also by equivalents thereof.