CN-122002629-A - Content connection method and device
Abstract
The application provides a content connection method and device, and relates to the technical field of terminals. In the method, under the condition that the first equipment and the second equipment establish wireless communication connection, ultrasonic ranging can be carried out through a loudspeaker and/or a microphone of the first equipment and the second equipment, the distance between the first equipment and the second equipment is calculated, if the distance is smaller than a distance threshold value, the condition of content connection is met, and the first equipment can send the content displayed by the first equipment to the second equipment to realize content connection. Therefore, the first equipment does not need to additionally deploy an NFC chip, the second equipment does not need to additionally deploy an electronic tag, and content connection can be realized, so that the cost of the first equipment and the cost of the second equipment are not increased additionally.
Inventors
- WU YAOGANG
- WANG QI
- DU ZHENGUO
- ZHOU YONGXING
Assignees
- 华为技术有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20241105
Claims (16)
- 1. A method of content attachment, comprising: The first device establishes a wireless communication connection with the second device; Performing ultrasonic ranging based on speakers and/or microphones of the first device and the second device, the first device calculating a distance between the first device and the second device; And under the condition that the distance between the first device and the second device is smaller than or equal to a distance threshold value, the first device sends the content displayed by the first device to the second device through the wireless communication connection.
- 2. The method according to claim 1, characterized in that the distance between the first device and the second device is calculated based on ultrasonic ranging of the speaker and/or microphone of the first device and the second device, if one or more of the following conditions are fulfilled: the first equipment is in motion state, or The gesture of the first device satisfies a preset gesture comprising that the top position of the front face of the first device points to the second device, or The strength of the wireless signal received by the first device is greater than a first strength threshold.
- 3. The method of claim 2, wherein the first device is in an operational state comprising moving the first device in a thickness direction of the first device in a direction in which a back side of the first device faces.
- 4. A method according to claim 2 or 3, wherein the attitude of the first device meets a preset attitude comprising a pitch angle of the first device in the range (-90 °,10 ° ] and a yaw angle of the first device in the range (-90 °,90 °).
- 5. The method of claim 4, wherein the pitch angle is in the range (-60 °,0 °).
- 6. The method according to any one of claims 1 to 5, wherein said ultrasonic ranging based on a speaker and/or microphone of the first device and the second device, the first device calculating a distance between the first device and the second device, comprises: The first device and the second device are paired, and the time difference between the clock of the first device and the clock of the second device is determined; The first device determines the sending time of the ultrasonic wave and transmits the sending time to the second device so that the second device sends the ultrasonic wave at the sending time; The first device receives ultrasonic waves sent by a first loudspeaker of the second device through a first microphone of the first device; the first device determines the distance based on a time at which the first microphone receives ultrasonic waves, the transmission time, and the time difference.
- 7. The method according to any one of claims 1 to 6, wherein the ultrasonic ranging based on the speaker and/or microphone of the first device and the second device, the first device calculating a distance between the first device and the second device, comprises: The first device is based on a first microphone and a first loudspeaker in the first device, a second microphone and a second loudspeaker in the second device perform ultrasonic ranging to obtain a first distance d, the first distance is the sum of the distance from the first loudspeaker to the second microphone and the distance from the first microphone to the second loudspeaker, and the first microphone and the first loudspeaker are positioned on the same plane in the first device; The distance between the first device and the second device is smaller than or equal to a distance threshold value, wherein the first distance is smaller than or equal to a distance threshold value dy, and d x <dy≤√2d x ,d x is the distance between the second microphone and the second loudspeaker.
- 8. The method according to any one of claims 1 to 6, wherein the ultrasonic ranging based on the speaker and/or microphone of the first device and the second device, the first device calculating a distance between the first device and the second device, comprises: the first device sends first information to the second device, wherein the first information is used for indicating the second device to send a coordinate origin of a coordinate system; The first device receives second information from the second device, the second information being indicative of a first microphone, a first speaker, or a second speaker in the second device configured as a point of origin of coordinates; performing ultrasonic ranging based on a first microphone, a first speaker and a second speaker in the second device, wherein the second microphone, a third speaker and a fourth speaker in the second device determine coordinates of the first device relative to the origin of coordinates, wherein the second microphone and the third speaker are in a first plane in the first device, the third microphone and the fourth speaker are in a second plane in the first device, and the first plane and the second plane are different planes in the first device; The first device determines a distance of the first device relative to the second device based on coordinates of the first device relative to the origin of coordinates.
- 9. The method of any one of claims 1 to 8, wherein the wireless communication connection comprises one or more of a Bluetooth communication connection, a star flash communication connection, or a WiFi communication connection.
- 10. The method of claim 9, wherein the wireless communication connection comprises a bluetooth communication connection; The first device establishes a wireless communication connection with a second device, comprising: And under the condition that the Bluetooth function of the first equipment is in an on state, responding to the Bluetooth pairing operation with the second equipment, carrying out Bluetooth pairing with the second equipment, and establishing Bluetooth communication connection.
- 11. The method of claim 9, wherein the wireless communication connection comprises a bluetooth communication connection; The first device establishes a wireless communication connection with a second device, comprising: the method comprises the steps that under the condition that the Bluetooth function of first equipment is in an on state, the first equipment monitors Bluetooth signals; and when the intensity of the Bluetooth signal sent by the second equipment is larger than a second intensity threshold value, the first equipment and the second equipment are subjected to Bluetooth pairing, and Bluetooth communication connection is established.
- 12. An electronic device, the electronic device comprising: one or more processors and memory; The memory is coupled with the one or more processors, the memory for storing computer program code comprising computer instructions that the one or more processors invoke to cause the electronic device to perform the method of any of claims 1-11.
- 13. An electronic device comprising at least one speaker, at least one microphone and a processor for performing the method of any of claims 1 to 11.
- 14. A chip system for application to an electronic device, the chip system comprising one or more processors configured to invoke computer instructions to cause the electronic device to perform the method of any of claims 1-11.
- 15. A computer readable storage medium comprising computer instructions which, when run on an electronic device, cause the electronic device to perform the method of any of claims 1-11.
- 16. A computer program product, characterized in that the computer program product comprises computer program code which, when run on an electronic device, causes the electronic device to perform the method according to any of claims 1-11.
Description
Content connection method and device Technical Field The present application relates to the field of communications technologies, and in particular, to a method and an apparatus for content connection. Background With the development of terminal technology, content connection between multiple electronic devices can be realized, that is, seamless access and continuous processing of the same content and/or task between multiple electronic devices can be realized. At present, the functions of multi-screen collaboration, file mutual transmission, application circulation and the like of electronic equipment can enable content connection among different electronic equipment. In some scenarios, multi-screen collaboration, file interaction, and application streaming of the electronic device may all be implemented through a "one touch" feature. For example, a near field communication (NEAR FIELD communication) chip is deployed on a mobile phone, an electronic tag is deployed on a notebook computer, and when the NFC chip of the mobile phone is close to the electronic tag of the notebook computer, data can be transmitted between the mobile phone and the notebook computer, so that multi-screen collaboration, file mutual transmission and application circulation are realized. However, this approach may additionally increase the cost of the electronic device. Disclosure of Invention The application provides a content connection method and a device, which are beneficial to completing the content connection between electronic devices without increasing the cost of the electronic devices additionally. In a first aspect, an embodiment of the present application provides a content connection method, where the method includes establishing a wireless communication connection between a first device and a second device, performing ultrasonic ranging based on a speaker and/or a microphone of the first device and the second device, where the first device calculates a distance between the first device and the second device, and sending, by the first device, content displayed by the first device to the second device through the wireless communication connection when the distance between the first device and the second device is less than or equal to a distance threshold. The ultrasonic ranging may be one-way ultrasonic ranging or two-way ultrasonic ranging, which is not limited by the embodiment of the present application. For one-way ultrasonic ranging, the specific ranging method may refer to fig. 9, and for two-way ultrasonic ranging, the specific ranging method may refer to fig. 5 or fig. 7, which are not described herein. The distance threshold may be used to indicate that the first device is in proximity to the second device. If the ultrasonic ranging is two-way ultrasonic ranging, the determination of the distance threshold may refer to fig. 6, and will not be described in detail herein. Under the condition that wireless communication connection is established, the distance between the first equipment and the second equipment is smaller than or equal to a distance threshold value, the condition of content connection is met, and content connection can be performed, namely, the first equipment sends content displayed by the first equipment to the second equipment through the wireless communication connection, so that under the condition that NFC chips and electronic tags are not deployed by the first equipment and the second equipment respectively, content connection can be realized by using speakers and/or microphones which are included by most of equipment, and the cost of the electronic equipment is not increased additionally while content connection between the electronic equipment is facilitated. In one possible implementation, the distance between the first device and the second device is calculated based on ultrasonic ranging of the speaker and/or microphone of the first device and the second device, if one or more of the following conditions are met, the first device is in a motion state, or the gesture of the first device meets a preset gesture, the preset gesture comprises that the top position of the front surface of the first device points to the second device, or the intensity of the wireless signal received by the first device is greater than a first intensity threshold. In one example, the first device calculates a distance between the first device and the second device based on ultrasonic ranging of a speaker and/or microphone of the first device and the second device with the first device in motion. In this way, the first device is in a motion state, which indicates that the user is using the first device, and can perform ranging to determine whether the user wants to continue the content, so that the probability of false triggering of the content is reduced. In another example, in a case where the pose of the first device satisfies the preset pose, the first device performs ultrasonic ranging based on the speake