Communication system and communication method
By establishing a close-range wireless communication connection between electronic devices and sending a search request message containing a screen projection logo, the problem of excessive or failure of screen projection search is solved, and the search efficiency and user experience are improved.
Patent Information
- Application Number
- CN202110999943.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-26
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2041-08-26
AI Technical Summary
In the case of unstable local area network environment, the screen projection search time between electronic devices is too long or the search fails, resulting in a decline in user experience.
By establishing a close-range wireless communication connection between the first electronic device and the second electronic device, a search request message is sent in multicast or broadcast mode, and the screen projection identification information is included to realize two-way search and improve search efficiency.
It effectively reduces the probability of screen projection search failure, improves the efficiency of device screen projection search, and improves user experience.
Smart Images

Figure CN115734169B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminals, and in particular to a communication system and a communication method. Background Art
[0002] When multiple electronic devices are connected to the same local area network, searches can be performed between electronic devices to achieve a variety of application scenarios. For example, common application scenarios for searches between electronic devices include screen casting. When casting a screen, the transmitting device searches for the receiving device, and after finding the receiving device, it sends the cast data to the receiving device, and the receiving device displays the received cast data. However, when existing electronic devices perform searches, the success rate of the search depends on the network environment of the local area network. When the network environment of the local area network is unstable, packet loss may occur, which may cause the search time between electronic devices to be too long or the search to fail. Summary of the Invention
[0003] To solve the above technical problems, the present application provides a communication system and a communication method. The technical solution provided by the present application can solve the technical problems of long search time or search failure between electronic devices, thereby improving search efficiency, shortening search time, and improving user experience.
[0004] In a first aspect, a communication system is provided. The communication system includes a first electronic device and a second electronic device. The first electronic device includes a first processor; a first memory coupled to the first processor; and a first computer program stored in the first memory. When the first computer program is executed by the first processor, the first electronic device performs:
[0005] A connection is established with the second electronic device in a first short-range wireless communication manner within a first distance from the second electronic device.
[0006] In response to the establishment of the first short-range wireless communication connection, a first search request message is sent in a multicast or broadcast manner.
[0007] A second search request message is received from a second electronic device. In response to the second search request message, second identification information related to the second electronic device is output, where the second identification information includes at least one second projection screen identification.
[0008] The second electronic device includes: a second processor; a second memory, the second memory being coupled to the second processor; and a second computer program, wherein the second computer program is stored in the second memory. When the second computer program is executed by the second processor, the second electronic device performs:
[0009] A first short-range wireless communication connection is established with the first electronic device within a first distance from the first electronic device.
[0010] In response to the establishment of the first short-range wireless communication connection, a second search request message is sent in a multicast or broadcast manner.
[0011] A first search request message is received from a first electronic device.
[0012] In response to the first search request message, first identification information related to the first electronic device is output, and the first identification information includes at least one first projection screen identification.
[0013] Among them, the first screen projection identifier and the second screen projection identifier both correspond to the same screen projection method between the first electronic device and the second electronic device.
[0014] The first distance is a distance at which the first electronic device and the second electronic device can communicate with each other through a first short-range wireless communication method.
[0015] In a first aspect, a first electronic device transmits a first search request message via multicast or broadcast in response to establishment of a first near-field wireless communication connection. A second electronic device transmits a second search request message via multicast or broadcast in response to establishment of the first near-field wireless communication connection. The first and second electronic devices perform a bidirectional search in response to the same action.
[0016] At the same time, the first search request message multicast or broadcast by the first electronic device includes the first identification information, and the second search request message multicast or broadcast by the second electronic device includes the second identification information. Therefore, when the first electronic device receives the second search request message or the second electronic device receives the first search request message, it can cast the screen according to the identification information in the search request message, which can effectively reduce the probability of screen casting search failure and improve the efficiency of device screen casting search.
[0017] In some embodiments, the first electronic device and the second electronic device can be electronic devices that support multi-device collaboration technology, such as smart phones, laptops, desktop computers, tablet computers, wearable devices, vehicle-mounted devices, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), smart TVs, projection devices, augmented reality (AR) / virtual reality (VR) devices, etc.
[0018] In some embodiments, the first electronic device further performs: in response to the second search request message, sending a second search response message to the second electronic device; receiving the first search response message from the second electronic device; and in response to the first user input of the second projection identifier, sending a second projection request associated with the second projection identifier to the second electronic device.
[0019] In some embodiments, the second electronic device further performs: in response to the first search request message, sending a first search response message to the first electronic device; receiving a second search response message from the first electronic device; and in response to a second user input of the first projection identifier, sending a first projection request associated with the first projection identifier to the first electronic device.
[0020] In some embodiments, the first electronic device also performs: in response to the first user input of the second screen projection identifier, sending a second screen projection request related to the second screen projection identifier to the second electronic device, and the second screen projection request is used for the first electronic device to project the screen to the second electronic device.
[0021] In some embodiments, the second electronic device further performs:
[0022] In response to the second user input of the first screen projection identifier, a first screen projection request related to the first screen projection identifier is sent to the first electronic device, and the first screen projection request is used to request the first electronic device to project the screen to the second electronic device.
[0023] In some implementations, the sending of the first search request message and the sending of the second search response message are executed synchronously on the first electronic device and are independent of each other.
[0024] The sending of the second search request message and the sending of the first search response message are performed synchronously on the second electronic device and are independent of each other.
[0025] In some implementations, the first search request message includes first identification information; and the second search request message includes second identification information.
[0026] In some implementations, the first search request message further includes: a standard message header field, a forwarding host address field, a notification type field, a maximum waiting time field, a search target field, and a first projection identification field;
[0027] The second search request message also includes: a standard message start field, a forwarding host address field, a notification type field, a maximum waiting time field, a search target field, and a second projection identification field.
[0028] In some implementations, the first search response message includes the second identification information; and the second search response message includes the first identification information.
[0029] In some embodiments, the first short-range wireless communication method includes one of Bluetooth, near field communication, or wireless network.
[0030] In some embodiments, the first screen projection identifier includes a device name of the first electronic device.
[0031] In some embodiments, outputting first identification information associated with the first electronic device includes:
[0032] The device name of the first electronic device is displayed on the second electronic device.
[0033] In some implementations, before outputting the first identification information associated with the first electronic device, the second electronic device further performs:
[0034] Obtain the first identification information that has been output; when the first identification information that has been output includes the third identification information related to the first electronic device, no longer output the third identification information related to the first electronic device; when the first identification information that has been output does not include the third identification information related to the first electronic device, output the third identification information related to the first electronic device.
[0035] In some embodiments, the second screen projection identifier includes a device name of the second electronic device.
[0036] In some implementations, outputting second identification information related to the second electronic device includes: displaying a device name of the second electronic device on the first electronic device.
[0037] In some implementations, before outputting the second identification information associated with the second electronic device, the first electronic device further performs:
[0038] Obtain the output second identification information; when the output second identification information includes the fourth identification information related to the second electronic device, no longer output the fourth identification information related to the first electronic device; when the output second identification information does not include the fourth identification information related to the second electronic device, output the fourth identification information related to the second electronic device.
[0039] In a second aspect, a communication system is provided. The communication system includes a first electronic device and a second electronic device, wherein the first electronic device includes: a first processor; a first memory coupled to the first processor; and a first computer program, wherein the first computer program is stored in the first memory. When the first computer program is executed by the first processor, the first electronic device performs:
[0040] A connection is established with the second electronic device in a first short-range wireless communication manner within a first distance from the second electronic device.
[0041] In response to the establishment of the first short-range wireless communication connection, a first search request message is sent in a multicast or broadcast manner. The first search request message does not include first identification information related to the first electronic device. The first identification information includes at least one first projection screen identification.
[0042] A second search request message is received from a second electronic device.
[0043] In response to the second search request message, second identification information related to the second electronic device is output, and the second identification information includes at least one second projection screen identification.
[0044] The second electronic device includes: a second processor; a second memory, the second memory being coupled to the second processor; and a second computer program, wherein the second computer program is stored in the second memory. When the second computer program is executed by the second processor, the second electronic device performs:
[0045] A first short-range wireless communication connection is established with the first electronic device within a first distance from the first electronic device.
[0046] In response to the establishment of the first short-range wireless communication connection, a second search request message is sent in a multicast or broadcast manner.
[0047] A first search request message is received from a first electronic device.
[0048] In response to the first search request message, a first search response message is sent to the first electronic device, wherein the first search response message includes the second identification information.
[0049] The first projection screen identifier and the second projection screen identifier both correspond to the same projection screen mode between the first electronic device and the second electronic device. The first distance is the distance at which the first electronic device and the second electronic device can communicate via the first short-range wireless communication mode.
[0050] In a second aspect, a first electronic device sends a first search request message via multicast or broadcast in response to establishment of a first near-field wireless communication connection. A second electronic device sends a second search request message via multicast or broadcast in response to establishment of the first near-field wireless communication connection. The first and second electronic devices perform a bidirectional search in response to the same action.
[0051] At the same time, the second search request message multicast or broadcast by the second electronic device includes the second identification information. Therefore, when the first electronic device receives the second search request message, it can cast the screen according to the second identification information in the second search request message, which can effectively reduce the probability of screen casting search failure and improve the efficiency of device screen casting search.
[0052] In some implementations, the first electronic device further performs:
[0053] In response to the second search request message, a second search response message is sent to the second electronic device. A first search response message is received from the second electronic device, wherein the first search response message includes second identification information. In response to the first user input of the second projection screen identifier, a second projection screen request associated with the second projection screen identifier is sent to the second electronic device.
[0054] In some embodiments, the second electronic device further performs:
[0055] A second search response message is received from the first electronic device, wherein the second search response message includes the first identification information. In response to a second user input of the first screen projection identifier, a first screen projection request associated with the first screen projection identifier is sent to the first electronic device.
[0056] In some implementations, the first electronic device further performs:
[0057] In response to the first user input of the second screen projection identifier, a second screen projection request related to the second screen projection identifier is sent to the second electronic device, and the second screen projection request is used for the first electronic device to project the screen to the second electronic device.
[0058] In some embodiments, the second electronic device further performs:
[0059] In response to the second user input of the first screen projection identifier, a first screen projection request related to the first screen projection identifier is sent to the first electronic device, and the first screen projection request is used to request the first electronic device to project the screen to the second electronic device.
[0060] In some implementations, the sending of the first search request message and the receiving of the first search response message are synchronously executed on the first electronic device with the receiving of the second search request message and the sending of the second search response message, and are independent of each other.
[0061] The sending of the second search request message and the receiving of the second search response message are synchronously executed on the second electronic device with the receiving of the first search request message and the sending of the first search response message, and are independent of each other.
[0062] In some implementations, the first search request message further includes:
[0063] The second search request message also includes: a standard message header field, a forwarding host address field, a notification type field, a maximum wait time field, and a search target field.
[0064] In some implementations, the first search response message includes:
[0065] Second identification information; the second search response message includes: first identification information.
[0066] In some embodiments, the first short-range wireless communication method includes one of Bluetooth, near field communication, or wireless network.
[0067] In some embodiments, the first screen projection identifier includes a device name of the first electronic device.
[0068] In some embodiments, outputting first identification information associated with the first electronic device includes:
[0069] The device name of the first electronic device is displayed on the second electronic device.
[0070] In some implementations, before outputting the first identification information associated with the first electronic device, the second electronic device further performs:
[0071] Obtain the first identification information that has been output; when the first identification information that has been output includes the third identification information related to the first electronic device, no longer output the third identification information related to the first electronic device; when the first identification information that has been output does not include the third identification information related to the first electronic device, output the third identification information related to the first electronic device.
[0072] In some embodiments, the second screen projection identifier includes a device name of the second electronic device.
[0073] In some embodiments, outputting second identification information associated with the second electronic device includes:
[0074] The device name of the second electronic device is displayed on the first electronic device.
[0075] In some implementations, before outputting the second identification information associated with the second electronic device, the first electronic device further performs:
[0076] Obtain the output second identification information; when the output second identification information includes the fourth identification information related to the second electronic device, no longer output the fourth identification information related to the first electronic device; when the output second identification information does not include the fourth identification information related to the second electronic device, output the fourth identification information related to the second electronic device.
[0077] In a third aspect, an embodiment of the present application provides a communication system, including a first electronic device and a second electronic device, wherein the first electronic device includes: a first processor; a first memory, the first memory being coupled to the first processor; and a first computer program, wherein the first computer program is stored in the first memory. When the first computer program is executed by the first processor, the first electronic device executes:
[0078] Establish a connection with the second electronic device in a first short-range wireless communication mode within a first distance from the second electronic device. In response to the establishment of the connection in the first short-range wireless communication mode, send a first search request message in a multicast or broadcast manner. Receive a second search request message from the second electronic device. In response to the second search request message, send a second search response message to the second electronic device, wherein the second search response message includes first identification information related to the first electronic device, and the first identification information includes at least one first projection screen identification.
[0079] The second electronic device includes: a second processor; a second memory, the second memory being coupled to the second processor; and a second computer program, wherein the second computer program is stored in the second memory. When the second computer program is executed by the second processor, the second electronic device performs:
[0080] Establish a connection with the first electronic device in a first short-range wireless communication mode within a first distance from the first electronic device. In response to the establishment of the connection in the first short-range wireless communication mode, send a second search request message in a multicast or broadcast manner, the second search request message does not include second identification information related to the second electronic device, and the second identification information includes at least one second projection screen identification. Receive the first search request message from the first electronic device, and in response to the first search request message, output first identification information related to the first electronic device, the first identification information including at least one first projection screen identification.
[0081] The first projection screen identifier and the second projection screen identifier both correspond to the same projection screen mode between the first electronic device and the second electronic device. The first distance is the distance at which the first electronic device and the second electronic device can communicate via the first short-range wireless communication mode.
[0082] In the third aspect, the first electronic device sends a first search request message in a multicast or broadcast manner in response to the establishment of the first short-range wireless communication connection. The second electronic device sends a second search request message in a multicast or broadcast manner in response to the establishment of the first short-range wireless communication connection. The first electronic device and the second electronic device perform a two-way search in response to the same action. At the same time, the first search request message multicast or broadcast by the first electronic device includes the first identification information. Therefore, when the second electronic device receives the first search request message, it can cast the screen according to the first identification information in the first search request message, which can effectively reduce the probability of screen casting search failure and improve the efficiency of device screen casting search.
[0083] In some implementations, the first electronic device further performs:
[0084] A first search response message is received from a second electronic device, wherein the first search response message includes second identification information. In response to a first user input of a second screen projection identifier, a second screen projection request associated with the second screen projection identifier is sent to the second electronic device.
[0085] In some embodiments, the second electronic device further performs:
[0086] In response to the first search request message, a first search response message is sent to the first electronic device. A second search response message is received from the first electronic device, wherein the second search response message includes the first identification information. In response to a second user input of the first projection screen identifier, a first projection screen request associated with the first projection screen identifier is sent to the first electronic device.
[0087] In some embodiments, the first electronic device also performs: in response to the first user input of the second screen projection identifier, sending a second screen projection request related to the second screen projection identifier to the second electronic device, and the second screen projection request is used for the first electronic device to project the screen to the second electronic device.
[0088] In some embodiments, the second electronic device also performs: in response to a second user input of the first screen projection identifier, sending a first screen projection request related to the first screen projection identifier to the first electronic device, where the first screen projection request is used to request the first electronic device to project the screen to the second electronic device.
[0089] In some embodiments, the sending of the first search request message and the receiving of the first search response message are performed simultaneously with the receiving of the second search request message and the sending of the second search response message on the first electronic device, and are independent of each other. The sending of the second search request message and the receiving of the second search response message are performed simultaneously with the receiving of the first search request message and the sending of the first search response message on the second electronic device, and are independent of each other.
[0090] In some implementations, the first search request message further includes: a standard message header field, a forwarding host address field, a notification type field, a maximum waiting time field, a search target field, and a first projection identification field;
[0091] The second search request message further includes: a standard message beginning field, a forwarding host address field, a notification type field, a maximum waiting time field, and a search target field.
[0092] In some implementations, the first search response message includes: second identification information; the second search response message includes: first identification information.
[0093] In some embodiments, the first short-range wireless communication method includes one of Bluetooth, near field communication, or wireless network.
[0094] In some embodiments, the first screen projection identifier includes a device name of the first electronic device.
[0095] In some embodiments, outputting first identification information related to the first electronic device includes: displaying a device name of the first electronic device on the second electronic device.
[0096] In some embodiments, before outputting the first identification information related to the first electronic device, the second electronic device also performs: obtaining the output first identification information; when the output first identification information includes the third identification information related to the first electronic device, no longer outputting the third identification information related to the first electronic device; when the output first identification information does not include the third identification information related to the first electronic device, outputting the third identification information related to the first electronic device.
[0097] In some embodiments, the second screen projection identifier includes a device name of the second electronic device.
[0098] In some implementations, outputting second identification information related to the second electronic device includes: displaying a device name of the second electronic device on the first electronic device.
[0099] In some embodiments, before outputting the second identification information related to the second electronic device, the first electronic device also performs: obtaining the output second identification information; when the output second identification information includes the fourth identification information related to the second electronic device, no longer outputting the fourth identification information related to the first electronic device; when the output second identification information does not include the fourth identification information related to the second electronic device, outputting the fourth identification information related to the second electronic device.
[0100] In a fourth aspect, an embodiment of the present application provides a communication system, comprising a first electronic device and a second electronic device, wherein the first electronic device comprises: a first processor; a first memory coupled to the first processor; and a first computer program, wherein the first computer program is stored in the first memory. When the first computer program is executed by the first processor, the first electronic device executes:
[0101] Within a first distance from a third electronic device, a connection using a first short-range wireless communication method is established with the third electronic device, wherein the third electronic device is an accessory device of the second electronic device, and the third electronic device is connected to the second electronic device. In response to the establishment of the connection using the first short-range wireless communication method, a first search request message is sent in a multicast or broadcast manner. A first search response message is received from the second electronic device. In response to the first search response message, second identification information related to the second electronic device is output, and the second identification information includes at least one second projection screen identification. A second search request message is received from the second electronic device. In response to the second search request message, a second search response message is sent to the second electronic device.
[0102] The second electronic device includes: a second processor; a second memory, the second memory being coupled to the second processor; and a second computer program, wherein the second computer program is stored in the second memory. When the second computer program is executed by the second processor, the second electronic device performs:
[0103] Confirm that the distance between the first electronic device and the third electronic device is within the first distance, and establish a connection with the third electronic device using the first short-range wireless communication method. In response to the establishment of the connection using the first short-range wireless communication method, send a second search request message in a multicast or broadcast manner. Receive a second search response message from the first electronic device. In response to the second search response message, output first identification information related to the first electronic device, the first identification information including at least one first screen projection identifier. Receive a first search request message from the first electronic device. In response to the first search request message, send a first search response message to the first electronic device. The sending of the first search request message and the receiving of the first search response message are synchronized with the receiving of the second search request message and the sending of the second search response message on the first electronic device and are independent of each other. The sending of the second search request message and the receiving of the second search response message are synchronized with the receiving of the first search request message and the sending of the first search response message on the second electronic device and are independent of each other. The first screen projection identifier and the second screen projection identifier both correspond to the same screen projection method between the first electronic device and the second electronic device. The first distance is the distance at which the first electronic device and the third electronic device can communicate using the first short-range wireless communication method.
[0104] In a fourth aspect, the first electronic device sends a first search request message in a multicast or broadcast manner in response to establishing a connection with a third electronic device using a first short-range wireless communication method. The second electronic device determines, through the third electronic device, that the first electronic device has established a connection with the third electronic device using the first short-range wireless communication method, and in response to the establishment of the first short-range wireless communication method connection, sends a second search request message in a multicast or broadcast manner. This can expand the application scenarios of the communication system and increase the compatibility and usability of the communication system.
[0105] In some implementations, the first electronic device further performs:
[0106] In response to the first user input of the second screen projection identifier, a second screen projection request related to the second screen projection identifier is sent to the second electronic device, and the second screen projection request is used for the first electronic device to project the screen to the second electronic device.
[0107] In some implementations, the second electronic device further performs:
[0108] In response to the second user input of the first screen projection identifier, a first screen projection request related to the first screen projection identifier is sent to the first electronic device, and the first screen projection request is used to request the first electronic device to project the screen to the second electronic device.
[0109] In some implementations, the first search request message further includes:
[0110] The second search request message also includes the following: a standard message header field, a forwarding host address field, a notification type field, a maximum wait time field, a search target field, and a first projection identification field.
[0111] In some implementations, the first search response message includes the second identification information; and the second search response message includes the first identification information.
[0112] In some embodiments, the first short-range wireless communication method includes one of Bluetooth, near field communication, or wireless network.
[0113] In some embodiments, the first screen projection identifier includes a device name of the first electronic device.
[0114] In some embodiments, outputting first identification information related to the first electronic device includes: displaying a device name of the first electronic device on the second electronic device.
[0115] In some embodiments, before outputting the first identification information related to the first electronic device, the second electronic device also performs: obtaining the output first identification information; when the output first identification information includes the third identification information related to the first electronic device, no longer outputting the third identification information related to the first electronic device; when the output first identification information does not include the third identification information related to the first electronic device, outputting the third identification information related to the first electronic device.
[0116] In some embodiments, the second screen projection identifier includes a device name of the second electronic device.
[0117] In some implementations, outputting second identification information related to the second electronic device includes: displaying a device name of the second electronic device on the first electronic device.
[0118] In some implementations, before outputting the second identification information associated with the second electronic device, the first electronic device further performs:
[0119] Obtain the output second identification information; when the output second identification information includes the fourth identification information related to the second electronic device, no longer output the fourth identification information related to the first electronic device; when the output second identification information does not include the fourth identification information related to the second electronic device, output the fourth identification information related to the second electronic device.
[0120] In a fifth aspect, an embodiment of the present application provides a communication method, which is applied to the communication system provided in the first aspect, the communication system including a first electronic device and a second electronic device, the method including:
[0121] Within a first distance from a second electronic device, the first electronic device establishes a connection with the second electronic device in a first short-range wireless communication mode. In response to the establishment of the connection in the first short-range wireless communication mode, the first electronic device and the second electronic device respectively send a first search request message and a second search request message in a multicast or broadcast manner. The first electronic device receives the second search request message from the second electronic device. In response to the second search request message, the first electronic device outputs second identification information related to the second electronic device, and the second identification information includes at least one second projection screen identification. The second electronic device receives the first search request message from the first electronic device. In response to the first search request message, the second electronic device outputs first identification information related to the first electronic device, and the first identification information includes at least one first projection screen identification. Wherein, the first projection screen identification and the second projection screen identification both correspond to the same projection mode between the first electronic device and the second electronic device. The first distance is the distance at which the first electronic device and the second electronic device can communicate through the first short-range wireless communication mode.
[0122] The beneficial effects of the fifth aspect can be referred to the relevant description in the first aspect and will not be repeated here.
[0123] In some embodiments, the method further comprises:
[0124] In response to the second search request message, the first electronic device sends a second search response message to the second electronic device. The first electronic device receives the first search response message from the second electronic device. In response to the first user input of the second projection screen identifier, the first electronic device sends a second projection screen request associated with the second projection screen identifier to the second electronic device.
[0125] In some embodiments, the method further includes: in response to the first search request message, the second electronic device sending a first search response message to the first electronic device. The second electronic device receives a second search response message from the first electronic device. In response to a second user input of the first projection identifier, the second electronic device sends a first projection request associated with the first projection identifier to the first electronic device.
[0126] In some embodiments, the method also includes: in response to a first user input of a second screen projection identifier, the first electronic device sends a second screen projection request related to the second screen projection identifier to the second electronic device, and the second screen projection request is used for the first electronic device to project the screen to the second electronic device.
[0127] In some embodiments, the method also includes: in response to a second user input of the first screen projection identifier, the second electronic device sends a first screen projection request related to the first screen projection identifier to the first electronic device, and the first screen projection request is used to request the first electronic device to project the screen to the second electronic device.
[0128] In some embodiments, the sending of the first search request message and the sending of the second search response message are performed simultaneously on the first electronic device and are independent of each other. The sending of the second search request message and the sending of the first search response message are performed simultaneously on the second electronic device and are independent of each other.
[0129] In some implementations, the first search request message includes first identification information, and the second search request message includes second identification information.
[0130] In some embodiments, the first search request message further includes: a standard message header field, a forwarding host address field, a notification type field, a maximum wait time field, a search target field, and a first projection identification field. The second search request message further includes: a standard message header field, a forwarding host address field, a notification type field, a maximum wait time field, a search target field, and a second projection identification field.
[0131] In some implementations, the first search response message includes: second identification information; the second search response message includes: first identification information.
[0132] In some embodiments, the first short-range wireless communication method includes one of Bluetooth, near field communication, or wireless network.
[0133] In some embodiments, the first screen projection identifier includes a device name of the first electronic device.
[0134] In some embodiments, outputting first identification information related to the first electronic device includes: displaying a device name of the first electronic device on the second electronic device.
[0135] In some implementations, before outputting the first identification information associated with the first electronic device, the second electronic device further performs:
[0136] Obtain the first identification information that has been output; when the first identification information that has been output includes the third identification information related to the first electronic device, no longer output the third identification information related to the first electronic device; when the first identification information that has been output does not include the third identification information related to the first electronic device, output the third identification information related to the first electronic device.
[0137] In some embodiments, the second screen projection identifier includes a device name of the second electronic device.
[0138] In some implementations, outputting second identification information related to the second electronic device includes: displaying a device name of the second electronic device on the first electronic device.
[0139] In some implementations, before outputting the second identification information associated with the second electronic device, the first electronic device further performs:
[0140] Obtain the output second identification information; when the output second identification information includes the fourth identification information related to the second electronic device, no longer output the fourth identification information related to the first electronic device; when the output second identification information does not include the fourth identification information related to the second electronic device, output the fourth identification information related to the second electronic device.
[0141] In a sixth aspect, an embodiment of the present application provides a communication method, which is applied to the communication system provided in the second aspect, the communication system including a first electronic device and a second electronic device, the method including:
[0142] Within a first distance from a second electronic device, a first electronic device establishes a connection with a second electronic device using a first short-range wireless communication method. In response to the establishment of the first short-range wireless communication method connection, the first electronic device and the second electronic device respectively transmit a first search request message and a second search request message via multicast or broadcast. The first electronic device receives the second search request message from the second electronic device. In response to the second search request message, the first electronic device outputs second identification information associated with the second electronic device, the second identification information including at least one second screen projection identifier, and the first electronic device transmits a second search response message to the second electronic device. The second electronic device receives the second search response message from the first electronic device. In response to the second search response message, the second electronic device outputs first identification information associated with the first electronic device, the first identification information including at least one first screen projection identifier. The second electronic device receives the first search request message from the first electronic device. In response to the first search request message, the second electronic device transmits a first search response message to the first electronic device. The first search request message does not include the first identification information; the second search response message does include the first identification information. The first screen projection identifier and the second screen projection identifier both correspond to the same screen projection method between the first and second electronic devices. The first distance is the distance at which the first and second electronic devices can communicate using the first short-range wireless communication method.
[0143] The beneficial effects of the sixth aspect can be referred to the relevant description in the second aspect and will not be repeated here.
[0144] In some embodiments, the method further comprises:
[0145] In response to the second search request message, the first electronic device sends a second search response message to the second electronic device. The first electronic device receives the first search response message from the second electronic device, wherein the first search response message includes second identification information. In response to the first user input of the second projection screen identifier, the first electronic device sends a second projection screen request related to the second projection screen identifier to the second electronic device.
[0146] In some embodiments, the method further comprises:
[0147] The second electronic device receives a second search response message from the first electronic device, wherein the second search response message includes the first identification information. In response to the second user input of the first projection screen identification, the second electronic device sends a first projection screen request related to the first projection screen identification to the first electronic device.
[0148] In some embodiments, the method further comprises:
[0149] In response to the first user input of the second screen projection identifier, the first electronic device sends a second screen projection request related to the second screen projection identifier to the second electronic device, and the second screen projection request is used for the first electronic device to project the screen to the second electronic device.
[0150] In some embodiments, the method also includes: in response to a second user input of the first screen projection identifier, the second electronic device sends a first screen projection request related to the first screen projection identifier to the first electronic device, and the first screen projection request is used to request the first electronic device to project the screen to the second electronic device.
[0151] In some embodiments, the sending of the first search request message and the sending of the second search response message are performed simultaneously on the first electronic device and are independent of each other. The sending of the second search request message and the sending of the first search response message are performed simultaneously on the second electronic device and are independent of each other.
[0152] In some implementations, the first search request message further includes:
[0153] The second search request message also includes: a standard message header field, a forwarding host address field, a notification type field, a maximum wait time field, and a search target field.
[0154] In some implementations, the first search response message includes:
[0155] Second identification information; the second search response message includes: first identification information.
[0156] In some embodiments, the first short-range wireless communication method includes one of Bluetooth, near field communication, or wireless network.
[0157] In some embodiments, the first screen projection identifier includes a device name of the first electronic device.
[0158] In some embodiments, outputting first identification information related to the first electronic device includes: displaying a device name of the first electronic device on the second electronic device.
[0159] In some embodiments, before outputting the first identification information related to the first electronic device, the second electronic device also performs: obtaining the output first identification information; when the output first identification information includes the third identification information related to the first electronic device, no longer outputting the third identification information related to the first electronic device; when the output first identification information does not include the third identification information related to the first electronic device, outputting the third identification information related to the first electronic device.
[0160] In some embodiments, the second screen projection identifier includes a device name of the second electronic device.
[0161] In some implementations, outputting second identification information related to the second electronic device includes: displaying a device name of the second electronic device on the first electronic device.
[0162] In some implementations, before outputting the second identification information associated with the second electronic device, the first electronic device further performs:
[0163] Obtain the output second identification information; when the output second identification information includes the fourth identification information related to the second electronic device, no longer output the fourth identification information related to the first electronic device; when the output second identification information does not include the fourth identification information related to the second electronic device, output the fourth identification information related to the second electronic device.
[0164] In a seventh aspect, an embodiment of the present application provides a communication method, which is applied to the communication system provided in the third aspect, the communication system including a first electronic device and a second electronic device, the method including:
[0165] Within a first distance from a second electronic device, a first electronic device establishes a connection with a second electronic device using a first short-range wireless communication method. In response to the establishment of the first short-range wireless communication method connection, the first electronic device and the second electronic device respectively transmit a first search request message and a second search request message via multicast or broadcast. The first electronic device receives a first search response message from the second electronic device. In response to the first search response message, the first electronic device outputs second identification information associated with the second electronic device, the second identification information including at least one second screen projection identifier. The first electronic device receives a second search request message from the second electronic device. In response to the second search request message, the first electronic device transmits a second search response message to the second electronic device. The second electronic device receives the first search request message from the first electronic device. In response to the first search request message, the second electronic device outputs first identification information associated with the first electronic device, the first identification information including at least one first screen projection identifier, and transmits a first search response message to the first electronic device. The second search request message does not include the second identification information; the first search response message does include the second identification information. The first screen projection identifier and the second screen projection identifier both correspond to the same screen projection method between the first and second electronic devices. The first distance is the distance over which the first and second electronic devices can communicate using the first short-range wireless communication method.
[0166] The beneficial effects of the seventh aspect can be referred to the relevant description in the third aspect and will not be repeated here.
[0167] In some embodiments, the method further comprises:
[0168] The first electronic device receives a first search response message from the second electronic device, wherein the first search response message includes second identification information. In response to a first user input of a second screen projection identifier, the first electronic device sends a second screen projection request associated with the second screen projection identifier to the second electronic device.
[0169] In some embodiments, the method further includes: in response to the first search request message, the second electronic device sending a first search response message to the first electronic device. The second electronic device receives a second search response message from the first electronic device, wherein the second search response message includes the first identification information. In response to a second user input of the first screen projection identifier, the second electronic device sends a first screen projection request related to the first screen projection identifier to the first electronic device.
[0170] In some embodiments, the method also includes: in response to a first user input of a second screen projection identifier, the first electronic device sends a second screen projection request related to the second screen projection identifier to the second electronic device, and the second screen projection request is used for the first electronic device to project the screen to the second electronic device.
[0171] In some embodiments, the method also includes: in response to a second user input of the first screen projection identifier, the second electronic device sends a first screen projection request related to the first screen projection identifier to the first electronic device, and the first screen projection request is used to request the first electronic device to project the screen to the second electronic device.
[0172] In some embodiments, the sending of the first search request message and the sending of the second search response message are performed simultaneously on the first electronic device and are independent of each other. The sending of the second search request message and the sending of the first search response message are performed simultaneously on the second electronic device and are independent of each other.
[0173] In some embodiments, the first search request message further includes: a standard message header field, a forwarding host address field, a notification type field, a maximum wait time field, a search target field, and a first projection identification field. The second search request message further includes: a standard message header field, a forwarding host address field, a notification type field, a maximum wait time field, a search target field, and a second projection identification field.
[0174] In some implementations, the first search response message includes: second identification information; the second search response message includes: first identification information.
[0175] In some embodiments, the first short-range wireless communication method includes one of Bluetooth, near field communication, or wireless network.
[0176] In some embodiments, the first screen projection identifier includes a device name of the first electronic device.
[0177] In some embodiments, outputting first identification information related to the first electronic device includes: displaying a device name of the first electronic device on the second electronic device.
[0178] In some implementations, before outputting the first identification information associated with the first electronic device, the second electronic device further performs:
[0179] Obtain the first identification information that has been output; when the first identification information that has been output includes the third identification information related to the first electronic device, no longer output the third identification information related to the first electronic device; when the first identification information that has been output does not include the third identification information related to the first electronic device, output the third identification information related to the first electronic device.
[0180] In some embodiments, the second screen projection identifier includes a device name of the second electronic device.
[0181] In some implementations, outputting second identification information related to the second electronic device includes: displaying a device name of the second electronic device on the first electronic device.
[0182] In some implementations, before outputting the second identification information associated with the second electronic device, the first electronic device further performs:
[0183] Obtain the output second identification information; when the output second identification information includes the fourth identification information related to the second electronic device, no longer output the fourth identification information related to the first electronic device; when the output second identification information does not include the fourth identification information related to the second electronic device, output the fourth identification information related to the second electronic device.
[0184] In an eighth aspect, an embodiment of the present application provides a communication method, which is applied to the communication system provided in the fourth aspect, the communication system includes a first electronic device and a second electronic device, and the method includes: within a first distance from a third electronic device, the first electronic device and the third electronic device establish a connection in a first short-range wireless communication mode, wherein the third electronic device is an auxiliary device of the second electronic device, and the third electronic device is connected to the second electronic device. In response to the establishment of the first short-range wireless communication mode connection, the first electronic device and the second electronic device respectively send a first search request message and a second search request message in a multicast or broadcast manner. The first electronic device receives a first search response message from the second electronic device. In response to the first search response message, the first electronic device outputs second identification information related to the second electronic device, and the second identification information includes at least one second projection screen identification. The first electronic device receives a second search request message from the second electronic device. In response to the second search request message, the first electronic device sends a second search response message to the second electronic device.
[0185] The second electronic device receives a second search response message from the first electronic device. In response to the second search response message, the second electronic device outputs first identification information related to the first electronic device, and the first identification information includes at least one first screen projection identifier. The second electronic device receives a first search request message from the first electronic device; in response to the first search request message, the second electronic device sends a first search response message to the first electronic device. Among them, the sending of the first search request message and the reception of the first search response message are synchronized with the reception of the second search request message and the sending of the second search response message on the first electronic device and are independent of each other. The sending of the second search request message and the reception of the second search response message are synchronized with the reception of the first search request message and the sending of the first search response message on the second electronic device and are independent of each other. The first screen projection identifier and the second screen projection identifier both correspond to the same screen projection method between the first electronic device and the second electronic device. The first distance is the distance at which the first electronic device and the third electronic device can communicate through the first short-range wireless communication method.
[0186] The beneficial effects of the eighth aspect can be referred to the relevant description in the fourth aspect and will not be repeated here.
[0187] In some embodiments, the method further includes: in response to the second search request message, the first electronic device sending a second search response message to the second electronic device. The first electronic device receives the first search response message from the second electronic device. In response to the first user input of the second projection screen identifier, the first electronic device sends a second projection screen request associated with the second projection screen identifier to the second electronic device.
[0188] In some embodiments, the method further includes: in response to the first search request message, the second electronic device sending a first search response message to the first electronic device. The second electronic device receives a second search response message from the first electronic device. In response to a second user input of the first projection identifier, the second electronic device sends a first projection request associated with the first projection identifier to the first electronic device.
[0189] In some embodiments, the method also includes: in response to a first user input of a second screen projection identifier, the first electronic device sends a second screen projection request related to the second screen projection identifier to the second electronic device, and the second screen projection request is used for the first electronic device to project the screen to the second electronic device.
[0190] In some embodiments, the method also includes: in response to a second user input of the first screen projection identifier, the second electronic device sends a first screen projection request related to the first screen projection identifier to the first electronic device, and the first screen projection request is used to request the first electronic device to project the screen to the second electronic device.
[0191] In some embodiments, the sending of the first search request message and the sending of the second search response message are performed simultaneously on the first electronic device and are independent of each other. The sending of the second search request message and the sending of the first search response message are performed simultaneously on the second electronic device and are independent of each other.
[0192] In some implementations, the first search request message includes first identification information, and the second search request message includes second identification information.
[0193] In some embodiments, the first search request message further includes: a standard message header field, a forwarding host address field, a notification type field, a maximum wait time field, a search target field, and a first projection identification field. The second search request message further includes: a standard message header field, a forwarding host address field, a notification type field, a maximum wait time field, a search target field, and a second projection identification field.
[0194] In some implementations, the first search response message includes: second identification information; the second search response message includes: first identification information.
[0195] In some embodiments, the first short-range wireless communication method includes one of Bluetooth, near field communication, or wireless network.
[0196] In some embodiments, the first screen projection identifier includes a device name of the first electronic device.
[0197] In some embodiments, outputting first identification information related to the first electronic device includes: displaying a device name of the first electronic device on the second electronic device.
[0198] In some embodiments, before outputting the first identification information related to the first electronic device, the second electronic device also performs: obtaining the output first identification information; when the output first identification information includes the third identification information related to the first electronic device, no longer outputting the third identification information related to the first electronic device; when the output first identification information does not include the third identification information related to the first electronic device, outputting the third identification information related to the first electronic device.
[0199] In some embodiments, the second screen projection identifier includes a device name of the second electronic device.
[0200] In some implementations, outputting second identification information related to the second electronic device includes: displaying a device name of the second electronic device on the first electronic device.
[0201] In some embodiments, before outputting the second identification information related to the second electronic device, the first electronic device also performs: obtaining the output second identification information; when the output second identification information includes the fourth identification information related to the second electronic device, no longer outputting the fourth identification information related to the first electronic device; when the output second identification information does not include the fourth identification information related to the second electronic device, outputting the fourth identification information related to the second electronic device.
[0202] In the ninth aspect, an embodiment of the present application provides a first electronic device, which includes: a first processor. A first memory, the first memory is coupled to the first processor. And a first computer program, wherein the first computer program is stored on the first memory. When the first computer program is executed by the first processor, the first electronic device executes: establishing a connection with the second electronic device in a first short-range wireless communication mode within a first distance from the second electronic device. In response to the establishment of the first short-range wireless communication mode connection, a first search request message is sent in a multicast or broadcast manner. A second search request message is received from the second electronic device. In response to the second search request message, second identification information related to the second electronic device is output, and the second identification information includes at least one second projection screen identifier. Wherein, the second projection screen identifier corresponds to a projection screen method between the first electronic device and the second electronic device. The first distance is the distance at which the first electronic device and the second electronic device can communicate through the first short-range wireless communication mode.
[0203] In some embodiments, the first electronic device further performs: in response to the second search request message, sending a second search response message to the second electronic device; receiving the first search response message from the second electronic device; and in response to the first user input of the second projection identifier, sending a second projection request associated with the second projection identifier to the second electronic device.
[0204] In some embodiments, the first electronic device also performs: in response to the first user input of the second screen projection identifier, sending a second screen projection request related to the second screen projection identifier to the second electronic device, and the second screen projection request is used for the first electronic device to project the screen to the second electronic device.
[0205] In some implementations, the sending of the first search request message and the sending of the second search response message are executed synchronously on the first electronic device and are independent of each other.
[0206] In some embodiments, the first electronic device also performs: obtaining the output second identification information; when the output second identification information includes the fourth identification information related to the second electronic device, no longer outputting the fourth identification information related to the first electronic device; when the output second identification information does not include the fourth identification information related to the second electronic device, outputting the fourth identification information related to the second electronic device.
[0207] In a tenth aspect, an embodiment of the present application provides a second electronic device, the second electronic device comprising: a second processor; a second memory coupled to the second processor; and a second computer program, wherein the second computer program is stored in the second memory. When the second computer program is executed by the second processor, the second electronic device performs:
[0208] Establish a connection with the first electronic device in a first short-range wireless communication mode within a first distance from the first electronic device. In response to the establishment of the connection in the first short-range wireless communication mode, send a second search request message in a multicast or broadcast manner. Receive a first search request message from the first electronic device. In response to the first search request message, output first identification information related to the first electronic device, and the first identification information includes at least one first projection screen identifier. The first projection screen identifier corresponds to a projection screen method between the first electronic device and the second electronic device. The first distance is the distance at which the first electronic device and the second electronic device can communicate through the first short-range wireless communication mode.
[0209] In some embodiments, the second electronic device further performs: in response to the first search request message, sending a first search response message to the first electronic device; receiving a second search response message from the first electronic device; and in response to a second user input of the first projection identifier, sending a first projection request associated with the first projection identifier to the first electronic device.
[0210] In some embodiments, the second electronic device also performs: in response to a second user input of the first screen projection identifier, sending a first screen projection request related to the first screen projection identifier to the first electronic device, and the first screen projection request is used for the second electronic device to project the screen to the first electronic device.
[0211] In some implementations, the sending of the second search request message and the sending of the first search response message are executed synchronously on the second electronic device and are independent of each other.
[0212] In some embodiments, the second electronic device also performs: obtaining the output first identification information; when the output first identification information includes the third identification information related to the first electronic device, no longer outputting the third identification information related to the first electronic device; when the output first identification information does not include the third identification information related to the first electronic device, outputting the third identification information related to the first electronic device.
[0213] In the eleventh aspect, an embodiment of the present application provides a communication method, which is applied to the first electronic device provided in the ninth aspect. The method includes: within a first distance from the second electronic device, the first electronic device establishes a connection with the second electronic device in a first short-range wireless communication mode. In response to the establishment of the connection in the first short-range wireless communication mode, the first electronic device sends a first search request message in a multicast or broadcast manner. The first electronic device receives a second search request message from the second electronic device. In response to the second search request message, the first electronic device outputs second identification information related to the second electronic device, and the second identification information includes at least one second projection screen identification. The second projection screen identification corresponds to a projection screen method between the first electronic device and the second electronic device. The first distance is the distance at which the first electronic device and the second electronic device can communicate through the first short-range wireless communication mode.
[0214] In some embodiments, the method further includes: in response to the second search request message, the first electronic device sending a second search response message to the second electronic device. The first electronic device receives the first search response message from the second electronic device. In response to the first user input of the second projection screen identifier, the first electronic device sends a second projection screen request associated with the second projection screen identifier to the second electronic device.
[0215] In some embodiments, the method also includes: in response to a first user input of a second screen projection identifier, the first electronic device sends a second screen projection request related to the second screen projection identifier to the second electronic device, and the second screen projection request is used for the first electronic device to project the screen to the second electronic device.
[0216] In some implementations, the sending of the first search request message and the sending of the second search response message are executed synchronously on the first electronic device and are independent of each other.
[0217] In some embodiments, the method further includes: the first electronic device obtains the output second identification information; when the output second identification information includes fourth identification information related to the second electronic device, the fourth identification information related to the first electronic device is no longer output; when the output second identification information does not include the fourth identification information related to the second electronic device, the fourth identification information related to the second electronic device is output.
[0218] In the twelfth aspect, an embodiment of the present application provides a communication method, which is applied to the second electronic device provided in the ninth aspect, and the method includes: within a first distance from the first electronic device, the second electronic device establishes a connection with the first electronic device in a first short-range wireless communication mode. In response to the establishment of the connection in the first short-range wireless communication mode, the second electronic device sends a second search request message in a multicast or broadcast manner. The second electronic device receives the first search request message from the first electronic device. In response to the first search request message, the second electronic device outputs first identification information related to the first electronic device, and the first identification information includes at least one first projection screen identification. The first projection screen identification corresponds to a projection screen method between the first electronic device and the second electronic device. The first distance is the distance at which the first electronic device and the second electronic device can communicate through the first short-range wireless communication mode.
[0219] In some embodiments, the method further includes: in response to the first search request message, the second electronic device sending a first search response message to the first electronic device. The second electronic device receives a second search response message from the first electronic device. In response to a second user input of the first projection identifier, the second electronic device sends a first projection request associated with the first projection identifier to the first electronic device.
[0220] In some embodiments, the method further includes: in response to a second user input of the first screen projection identifier, sending a first screen projection request related to the first screen projection identifier to the first electronic device, the first screen projection request being used for the second electronic device to project the screen to the first electronic device.
[0221] In some implementations, the sending of the second search request message and the sending of the first search response message are executed synchronously on the second electronic device and are independent of each other.
[0222] In some embodiments, the method also includes: obtaining the output first identification information; when the output first identification information includes the third identification information related to the first electronic device, no longer outputting the third identification information related to the first electronic device; when the output first identification information does not include the third identification information related to the first electronic device, outputting the third identification information related to the first electronic device.
[0223] In the thirteenth aspect, an embodiment of the present application provides a computer-readable storage medium, which is applied to a first electronic device. The computer-readable storage medium stores a computer program. When the computer program is executed by the processor, the first electronic device executes the method provided in the fifth, sixth, seventh, eighth or eleventh aspect above.
[0224] In the fourteenth aspect, an embodiment of the present application provides a computer-readable storage medium, which is applied to a second electronic device. The computer-readable storage medium stores a computer program. When the computer program is executed by the processor, the second electronic device executes the method provided in the fifth, sixth, seventh, eighth or twelfth aspect above.
[0225] In the fifteenth aspect, an embodiment of the present application provides a computer program product, which, when running on a first electronic device, enables the first electronic device to execute the method provided in the fifth, sixth, seventh, eighth or eleventh aspect above.
[0226] In the sixteenth aspect, an embodiment of the present application provides a computer program product, which, when running on a second electronic device, enables the second electronic device to execute the method provided in the fifth, sixth, seventh, eighth or twelfth aspect above.
[0227] It can be understood that the beneficial effects of the above-mentioned ninth to sixteenth aspects can be found in the relevant descriptions of the above-mentioned first to fourth aspects, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0228] Figure 1 An application scenario of a communication system and a communication method provided by an embodiment of the present application is shown;
[0229] Figure 2 A schematic diagram showing the structure of an electronic device to which a communication system and a communication method are applied according to an embodiment of the present application is shown;
[0230] Figure 3 A schematic diagram showing the software structure of an electronic device applying the communication system and communication method provided in an embodiment of the present application is shown;
[0231] Figure 4 A schematic flow chart of a communication system and a communication method provided in an embodiment of the present application is shown;
[0232] Figure 5 A schematic diagram of a scenario in which a first electronic device displays device information of a second electronic device, provided by an embodiment of the present application, is shown;
[0233] Figure 6A schematic diagram of a scenario in which a second electronic device displays device information of a first electronic device, provided by an embodiment of the present application, is shown;
[0234] Figure 7 A schematic diagram of another scenario in which a first electronic device displays device information of a second electronic device provided by an embodiment of the present application is shown;
[0235] Figure 8 A schematic diagram of a process for applying a communication system and a communication method provided in an embodiment of the present application to screen projection is shown;
[0236] Figure 9 A schematic diagram of a screen projection direction selection interface provided in an embodiment of the present application is shown;
[0237] Figure 10 A structural block diagram of a communication device applied to a first electronic device provided in an embodiment of the present application is shown;
[0238] Figure 11 A structural block diagram of a communication device applied to a second electronic device provided in an embodiment of the present application is shown;
[0239] Figure 12 The figure shows a structural block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0240] In the following description, specific details such as specific system structures and techniques are provided for purposes of illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obscuring the description of the present application with unnecessary detail.
[0241] It should be understood that the term "and / or" used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
[0242] As used in this specification and the appended claims, the term "if" may be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context.
[0243] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0244] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present application. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.
[0245] For example, Figure 1 The following shows an application scenario of a communication system and a communication method. Figure 1 , the first electronic device 11 is connected to the network device 13, and the second electronic device 12 is also connected to the network device 13. The first electronic device 11 and the second electronic device 12 can be in the same local area network. Alternatively, the first electronic device 11 and the second electronic device 12 can also be in different local area networks. When the first electronic device 11 and the second electronic device 12 are in different local area networks, the two local area networks need to achieve transparent transmission, that is, the devices in the two local area networks can communicate and connect.
[0246] The first electronic device 11 and the second electronic device 12 may be electronic devices that support multi-device collaboration technology, such as smart phones, laptops, desktop computers, tablet computers, wearable devices, in-vehicle devices, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), smart TVs, projection devices, augmented reality (AR) / virtual reality (VR) devices, etc. The embodiments of the present application do not impose any restrictions on the specific types of the first electronic device 11 and the second electronic device 12. The network device 13 may be a network device that can provide local area network access, such as a wireless router, access point, or wireless access point.
[0247] Among them, multi-device collaboration technologies may include Digital Living Network Alliance (DLNA), Cast+ (CAST+), Airplay, etc., but are not limited to these.
[0248] In some embodiments, the communication system and method can be applied to screen projection scenarios. When applied to screen projection, the first electronic device 11 is a transmitting device and the second electronic device 12 is a receiving device. When the first electronic device 11 receives a screen projection instruction from the user, it searches for at least one second electronic device 12 that can be used for screen projection in the local area network and projects the screen to the second electronic device 12. It should be noted that the communication system and method provided in this application can also be applied to other device search scenarios, such as device pairing, AirDrop, and other scenarios.
[0249] In the prior art, after the first electronic device 11 responds to the screen projection instruction, it will multicast a search request in the local area network. When at least one second electronic device 12 receives the search request, it will send a unicast search response message to the first electronic device 11. The first electronic device 11 displays the information of each second electronic device 12 that can be used for screen projection on the screen based on the received search response message. Then, the first electronic device 11 receives the screen projection confirmation instruction from the user and determines the second electronic device 12 to be projected. The first electronic device 11 sends the screen projection information to the determined second electronic device 12 through the network device 13. After receiving the screen projection information from the first electronic device, the second electronic device 12 displays the projected screen on the screen.
[0250] However, if the LAN environment is unstable and causes packet loss, this may cause a delay in the transmission of the search request multicast by the first electronic device 11 to devices in the LAN, or the search request multicast by the first electronic device 11 may be lost during transmission. This may also cause a delay or loss in the search response message sent by the second electronic device 12 to the first electronic device 11. This may in turn prevent the first electronic device 11 from quickly and effectively searching for a usable second electronic device 12.
[0251] The unstable network environment of the LAN may include situations such as excessive data traffic in the LAN and poor network signals of devices accessing the LAN wirelessly.
[0252] To this end, the present application provides a communication system and a communication method, including:
[0253] Within a first distance from a second electronic device, the first electronic device establishes a connection with the second electronic device in a first short-range wireless communication mode. In response to the establishment of the connection in the first short-range wireless communication mode, the first electronic device and the second electronic device respectively send a first search request message and a second search request message in a multicast or broadcast manner. The first electronic device receives the second search request message from the second electronic device. In response to the second search request message, the first electronic device outputs second identification information related to the second electronic device, and the second identification information includes at least one second projection screen identification. The second electronic device receives the first search request message from the first electronic device. In response to the first search request message, the second electronic device outputs first identification information related to the first electronic device, and the first identification information includes at least one first projection screen identification. Wherein, the first projection screen identification and the second projection screen identification both correspond to the same projection mode between the first electronic device and the second electronic device. The first distance is the distance at which the first electronic device and the second electronic device can communicate through the first short-range wireless communication mode.
[0254] In the present application, the first electronic device sends a first search request message in a multicast or broadcast manner in response to the establishment of the first short-range wireless communication connection. The second electronic device sends a second search request message in a multicast or broadcast manner in response to the establishment of the first short-range wireless communication connection. The first electronic device and the second electronic device perform a two-way search in response to the same action. At the same time, the first search request message multicast or broadcast by the first electronic device contains the first identification information, and the second search request message multicast or broadcast by the second electronic device contains the second identification information. Therefore, when the first electronic device receives the second search request message or the second electronic device receives the first search request message, it can cast the screen according to the identification information in the search request message, which can effectively reduce the probability of failure of the screen casting search and improve the efficiency of the device screen casting search.
[0255] For example, Figure 2 The figure shows a schematic diagram of the structure of an electronic device using a communication system and a communication method. Figure 2In the embodiment, the electronic device 200 may be a first electronic device or a second electronic device. The electronic device 200 may include a processor 210, an external memory interface 220, an internal memory 221, a universal serial bus (USB) interface 230, a charging management module 240, a power management module 241, a battery 242, an antenna 1, an antenna 2, a mobile communication module 250, a wireless communication module 260, an audio module 270, a speaker 270A, a receiver 270B, a microphone 270C, an earphone interface 270D, a sensor module 280, a button 290, a motor 291, an indicator 292, a camera 293, a display 294, and a subscriber identification module (SIM) card interface 295. The sensor module 280 may include a pressure sensor 280A, a gyroscope sensor 280B, an air pressure sensor 280C, a magnetic sensor 280D, an acceleration sensor 280E, a distance sensor 280F, a proximity light sensor 280G, a fingerprint sensor 280H, a temperature sensor 280J, a touch sensor 280K, an ambient light sensor 280L, a bone conduction sensor 280M, etc.
[0256] It should be understood that the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the electronic device 200. In other embodiments of the present application, the electronic device 200 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0257] For example, when the electronic device 200 is a mobile phone, a tablet computer, or a smart TV, it may include all of the components shown in the figure, or may include only some of the components shown in the figure.
[0258] The processor 210 may include one or more processing units. For example, the processor 210 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors.
[0259] The controller may be the nerve center and command center of the electronic device 200. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.
[0260] Processor 210 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 210 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 210. If processor 210 needs to use the same instruction or data again, it can directly retrieve it from the memory. This avoids duplicate accesses, reduces processor 210 latency, and thus improves system efficiency.
[0261] In some embodiments, the processor 210 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface.
[0262] The I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 210 may include multiple I2C bus lines. The processor 210 may be coupled to the touch sensor 280K, charger, flash, camera 293, etc. via different I2C bus interfaces. For example, the processor 210 may be coupled to the touch sensor 280K via the I2C interface, enabling communication between the processor 210 and the touch sensor 280K via the I2C bus interface, thereby implementing the touch function of the electronic device 200.
[0263] The I2S interface can be used for audio communication. In some embodiments, the processor 210 can include multiple I2S buses. The processor 210 can be coupled to the audio module 270 via the I2S bus to enable communication between the processor 210 and the audio module 270. In some embodiments, the audio module 270 can transmit audio signals to the wireless communication module 260 via the I2S interface.
[0264] The PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 270 and the wireless communication module 260 can be coupled via a PCM bus interface.
[0265] In some embodiments, the audio module 270 may also transmit audio signals to the wireless communication module 260 via a PCM interface. Both the I2S interface and the PCM interface may be used for audio communication.
[0266] The UART interface is a universal serial data bus used for asynchronous communication. This bus can be a bidirectional communication bus. It converts the data to be transmitted between parallel communication and serial communication.
[0267] In some embodiments, a UART interface is typically used to connect the processor 210 to the wireless communication module 260. For example, the processor 210 communicates with the Bluetooth module in the wireless communication module 260 via the UART interface to implement Bluetooth functionality. In some embodiments, the audio module 270 can transmit audio signals to the wireless communication module 260 via the UART interface, enabling the playback of music via Bluetooth headphones.
[0268] The MIPI interface can be used to connect the processor 210 to peripheral devices such as the display screen 294 and the camera 293. MIPI interfaces include the camera serial interface (CSI) and the display serial interface (DSI). In some embodiments, the processor 210 and the camera 293 communicate via the CSI interface to implement the camera function of the electronic device 200. The processor 210 and the display screen 294 communicate via the DSI interface to implement the display function of the electronic device 200.
[0269] The GPIO interface can be configured through software. The GPIO interface can be configured as a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 210 to the camera 293, the display 294, the wireless communication module 260, the audio module 270, the sensor module 280, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
[0270] USB interface 230 is an interface that complies with USB standards and specifications, and may be a Mini USB interface, a Micro USB interface, a USB Type-C interface, or the like. USB interface 230 can be used to connect a charger to charge electronic device 200, or to transfer data between electronic device 200 and peripheral devices. It can also be used to connect headphones to play audio. This interface can also be used to connect other electronic devices, such as AR devices.
[0271] It is understood that the interface connection relationship between the modules illustrated in the embodiment of the present application is merely an illustrative illustration and does not constitute a structural limitation on the electronic device 200. In other embodiments of the present application, the electronic device 200 may also adopt a different interface connection method from the above embodiment, or a combination of multiple interface connection methods.
[0272] The charging management module 240 is configured to receive charging input from a charger. The charger can be either a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 240 can receive charging input from the wired charger via the USB interface 230. In some wireless charging embodiments, the charging management module 240 can receive wireless charging input via the wireless charging coil of the electronic device 200. While charging the battery 242, the charging management module 240 can also provide power to the electronic device via the power management module 241.
[0273] The power management module 241 is used to connect the battery 242, the charging management module 240, and the processor 210. The power management module 241 receives input from the battery 242 and / or the charging management module 240 and provides power to the processor 210, the internal memory 221, the external memory, the display 294, the camera 293, and the wireless communication module 260. The power management module 241 can also be used to monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage, impedance), etc.
[0274] In some other embodiments, the power management module 241 may also be provided in the processor 210. In some other embodiments, the power management module 241 and the charging management module 240 may also be provided in the same device.
[0275] The wireless communication function of the electronic device 200 can be implemented through the antenna 1, the antenna 2, the mobile communication module 250, the wireless communication module 260, the modem processor and the baseband processor.
[0276] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 200 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antennas can be used in conjunction with a tuning switch.
[0277] The mobile communication module 250 can provide wireless communication solutions, including 2G / 3G / 4G / 5G, for the electronic device 200. The mobile communication module 250 may include at least one filter, a switch, a power amplifier, a low-noise amplifier (LNA), and the like. The mobile communication module 250 can receive electromagnetic waves from the antenna 1, filter and amplify the received electromagnetic waves, and transmit them to the modem processor for demodulation. The mobile communication module 250 can also amplify the signals modulated by the modem processor and convert them into electromagnetic waves for radiation via the antenna 1.
[0278] In some embodiments, at least some functional modules of the mobile communication module 250 may be provided in the processor 210. In some embodiments, at least some functional modules of the mobile communication module 250 and at least some functional modules of the processor 210 may be provided in the same device.
[0279] The modem processor may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After being processed by the baseband processor, the low-frequency baseband signal is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 270A, the receiver 270B, etc.) or displays an image or video through the display screen 294. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 210 and be set in the same device as the mobile communication module 250 or other functional modules.
[0280] The wireless communication module 260 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 200. The wireless communication module 260 can be one or more devices integrating at least one communication processing module. The wireless communication module 260 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 210. The wireless communication module 260 can also receive the signal to be sent from the processor 210, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0281] In some embodiments, antenna 1 of electronic device 200 is coupled to mobile communication module 250, and antenna 2 is coupled to wireless communication module 260, so that electronic device 200 can communicate with a network and other devices via wireless communication technology. Wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology, etc. GNSS may include the global positioning system (GPS), the global navigation satellite system (GLONASS), the Beidou navigation satellite system (BDS), the quasi-zenith satellite system (QZSS) and / or the satellite based augmentation system (SBAS).
[0282] Electronic device 200 implements display functionality through a GPU, display screen 294, and an application processor. A GPU is a microprocessor for image processing that connects display screen 294 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 210 may include one or more GPUs that execute program instructions to generate or modify display information.
[0283] Display screen 294 is used to display images, videos, and the like. For example, in the embodiments of the present application, the instructional videos and user action screen videos are shown. Display screen 294 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-oLed, or a quantum dot light-emitting diode (QLED). In some embodiments, electronic device 200 may include one or N display screens 294, where N is a positive integer greater than one.
[0284] The electronic device 200 can implement a shooting function through an ISP, a camera 293, a video codec, a GPU, a display screen 294, and an application processor.
[0285] The ISP processes data fed back by camera 293. For example, when taking a photo, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, which is then passed to the ISP for processing and transformed into a visible image. The ISP can also perform algorithmic optimization for image noise, brightness, and skin tone. The ISP can also optimize parameters such as exposure and color temperature of the captured scene. In some embodiments, the ISP can be located within camera 293.
[0286] The camera 293 is used to capture still images or videos. The object generates an optical image through the lens and is projected onto the photosensitive element. The focal length of the lens can be used to indicate the camera's field of view. The smaller the focal length of the lens, the larger the lens's field of view. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, and then transmits the electrical signal to the ISP for conversion into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard format such as RGB, YUV, etc.
[0287] In the present application, the electronic device 200 may include cameras 293 with two or more focal lengths.
[0288] The digital signal processor is used to process digital signals. In addition to processing digital image signals, it can also process other digital signals. For example, when the electronic device 200 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
[0289] Video codecs are used to compress or decompress digital video. Electronic device 200 may support one or more video codecs. This allows electronic device 200 to play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, and MPEG4.
[0290] The NPU is a neural network (NN) computing processor. Drawing on the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it rapidly processes input information and can continuously self-learn. The NPU can enable intelligent cognitive applications in electronic device 200, such as image recognition, face recognition, speech recognition, and text comprehension.
[0291] In an embodiment of the present application, the NPU or other processors can be used to perform operations such as analyzing and processing images in the video stored in the electronic device 200.
[0292] The external memory interface 220 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 200. The external memory card communicates with the processor 210 via the external memory interface 220 to implement data storage functions. For example, files such as music and videos can be stored on the external memory card.
[0293] The internal memory 221 can be used to store computer executable program code, which includes instructions. The processor 210 executes various functional applications and data processing of the electronic device 200 by running the instructions stored in the internal memory 221. The internal memory 221 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system and an application required for at least one function (such as a sound playback function, an image playback function, etc.). The data storage area can store data created during the use of the electronic device 200 (such as audio data, a phone book, etc.).
[0294] In addition, the internal memory 221 may include a high-speed random access memory and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
[0295] The electronic device 200 can implement audio functions through the audio module 270, the speaker 270A, the receiver 270B, the microphone 270C, the headphone jack 270D, and the application processor.
[0296] The audio module 270 is used to convert digital audio signals into analog audio signals for output, and is also used to convert analog audio input into digital audio signals. The audio module 270 can also be used to encode and decode audio signals. In some embodiments, the audio module 270 can be provided in the processor 210, or some functional modules of the audio module 270 can be provided in the processor 210.
[0297] Speaker 270A, also called a "horn," is used to convert audio electrical signals into sound signals. Electronic device 200 can listen to music or listen to hands-free calls through speaker 270A. For example, the speaker can play the comparison and analysis results provided in the embodiments of the present application.
[0298] The receiver 270B, also called a "handset", is used to convert audio electrical signals into sound signals. When the electronic device 200 receives a call or a voice message, the user can place the receiver 270B close to the ear to hear the voice.
[0299] The microphone 270C, also known as a "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to the microphone 270C to input the sound signal into the microphone 270C. The electronic device 200 can be provided with at least one microphone 270C. In other embodiments, the electronic device 200 can be provided with two microphones 270C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 200 can also be provided with three, four or more microphones 270C to collect sound signals, reduce noise, identify the source of sound, realize directional recording function, etc.
[0300] The headphone jack 270D is used to connect a wired headphone and can be a USB interface 230 or a 3.5mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.
[0301] The pressure sensor 280A is used to sense pressure signals and convert them into electrical signals. In some embodiments, the pressure sensor 280A can be set on the display screen 294. There are many types of pressure sensors 280A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. A capacitive pressure sensor can be a device including at least two parallel plates with conductive material. When force acts on the pressure sensor 280A, the capacitance between the electrodes changes. The electronic device 200 determines the intensity of the pressure based on the change in capacitance. When a touch operation is applied to the display screen 294, the electronic device 200 detects the intensity of the touch operation based on the pressure sensor 280A. The electronic device 200 can also calculate the position of the touch based on the detection signal of the pressure sensor 280A.
[0302] In some embodiments, touch operations applied to the same touch location but with different touch operation intensities may correspond to different operation instructions. For example, when a touch operation with a touch operation intensity less than a first pressure threshold is applied to a short message application icon, an instruction to view short messages is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold is applied to a short message application icon, an instruction to create a new short message is executed.
[0303] The gyroscope sensor 280B can be used to determine the motion posture of the electronic device 200. In some embodiments, the angular velocity of the electronic device 200 around three axes (i.e., x, y, and z axes) can be determined by the gyroscope sensor 280B. The gyroscope sensor 280B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyroscope sensor 280B detects the angle of the electronic device 200 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the electronic device 200 through reverse movement to achieve anti-shake. The gyroscope sensor 280B can also be used for navigation and somatosensory game scenes.
[0304] The air pressure sensor 280C is used to measure air pressure. In some embodiments, the electronic device 200 calculates the altitude using the air pressure value measured by the air pressure sensor 280C to assist in positioning and navigation.
[0305] The magnetic sensor 280D includes a Hall sensor. The electronic device 200 can use the magnetic sensor 280D to detect the opening and closing of the flip case. In some embodiments, when the electronic device 200 is a flip phone, the electronic device 200 can detect the opening and closing of the flip cover based on the magnetic sensor 280D. Based on the detected opening and closing status of the case or flip cover, features such as automatic unlocking of the flip cover can be configured.
[0306] Accelerometer 280E can detect the magnitude of acceleration of electronic device 200 in all directions (generally three axes). When electronic device 200 is stationary, it can detect the magnitude and direction of gravity. It can also be used to identify the electronic device's posture, enabling applications such as switching between landscape and portrait modes and pedometers.
[0307] The distance sensor 280F is used to measure distance. The electronic device 200 can measure distance using infrared or laser. In some embodiments, when shooting a scene, the electronic device 200 can use the distance sensor 280F to measure distance to achieve fast focusing.
[0308] The proximity light sensor 280G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 200 emits infrared light outward through the light emitting diode. The electronic device 200 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 200. When insufficient reflected light is detected, the electronic device 200 can determine that there is no object near the electronic device 200. The electronic device 200 can use the proximity light sensor 280G to detect that the user is holding the electronic device 200 close to the ear to talk, so as to automatically turn off the screen to save power. The proximity light sensor 280G can also be used in leather case mode and pocket mode to automatically unlock and lock the screen.
[0309] Ambient light sensor 280L is used to sense ambient light brightness. Electronic device 200 can adaptively adjust the brightness of display screen 294 based on the perceived ambient light brightness. Ambient light sensor 280L can also be used to automatically adjust white balance when taking photos. Ambient light sensor 280L can also work with proximity light sensor 280G to detect whether electronic device 200 is in a pocket to prevent accidental touches.
[0310] The fingerprint sensor 280H is used to collect fingerprints. The electronic device 200 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photography, fingerprint answering calls, etc.
[0311] The temperature sensor 280J is used to detect temperature. In some embodiments, the electronic device 200 uses the temperature detected by the temperature sensor 280J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 280J exceeds a threshold, the electronic device 200 reduces the performance of the processor located near the temperature sensor 280J to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device 200 heats the battery 242 to prevent the electronic device 200 from shutting down abnormally due to low temperature. In other embodiments, when the temperature is lower than another threshold, the electronic device 200 boosts the output voltage of the battery 242 to prevent abnormal shutdown due to low temperature.
[0312] The touch sensor 280K is also called a "touch panel." The touch sensor 280K can be disposed on the display screen 294. The touch sensor 280K and the display screen 294 form a touch screen, also called a "touch screen." The touch sensor 280K is used to detect touch operations applied thereto or in the vicinity thereof. The touch sensor can transmit the detected touch operations to the application processor to determine the type of touch event. Visual output related to the touch operations can be provided via the display screen 294. In other embodiments, the touch sensor 280K can also be disposed on the surface of the electronic device 200, at a location different from that of the display screen 294.
[0313] Bone conduction sensor 280M can acquire vibration signals. In some embodiments, bone conduction sensor 280M can acquire vibration signals from vibrating bones in the human body. Bone conduction sensor 280M can also contact the human pulse to receive blood pressure signals.
[0314] In some embodiments, the bone conduction sensor 280M can also be installed in headphones, forming a bone conduction headset. The audio module 270 can parse the vibration signal of the vocal bone obtained by the bone conduction sensor 280M to extract the voice signal, thus implementing the voice function. The application processor can parse the heart rate information based on the blood pressure signal obtained by the bone conduction sensor 280M, thus implementing the heart rate detection function.
[0315] The buttons 290 include a power button, a volume button, and the like. The buttons 290 may be mechanical buttons or touch buttons. The electronic device 200 may receive key inputs and generate key signal inputs related to user settings and function control of the electronic device 200.
[0316] Motor 291 can generate vibration prompts. Motor 291 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 294, motor 291 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.
[0317] The indicator 292 may be an indicator light, which may be used to indicate the charging status, power level change, messages, missed calls, notifications, etc.
[0318] The SIM card interface 295 is used to connect a SIM card. The SIM card can be connected to and separated from the electronic device 200 by inserting it into or removing it from the SIM card interface 295. The electronic device 200 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 295 can support Nano SIM cards, Micro SIM cards, SIM cards, etc. Multiple cards can be inserted into the same SIM card interface 295 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 295 can also be compatible with different types of SIM cards. The SIM card interface 295 can also be compatible with external memory cards. The electronic device 200 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the electronic device 200 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 200 and cannot be separated from the electronic device 200.
[0319] For example, Figure 3 Schematic diagram of the software structure of an electronic device that uses the application communication system and communication method provided in an embodiment of the present application. The operating system in the first electronic device or the second electronic device can be Android, Microsoft Windows, Apple Mobile Operating System (iOS), or Harmony OS, etc. Here, the operating system of the first electronic device or the second electronic device is Harmony OS as an example for explanation.
[0320] In some embodiments, the HarmonyOS system can be divided into four layers, including the kernel layer, the system service layer, the framework layer, and the application layer, and the layers communicate with each other through software interfaces.
[0321] like Figure 3 As shown in Figure 1, the kernel layer includes the Kernel Abstraction Layer (KAL) and the driver subsystem. The KAL includes multiple kernels, such as the Linux kernel and LiteOS, a lightweight IoT kernel. The driver subsystem includes the Hardware Driver Foundation (HDF). The HDF provides unified peripheral access and a framework for driver development and management. The multi-kernel kernel layer can select the appropriate kernel for processing based on system requirements.
[0322] The system service layer is the core capability set of the Hongmeng system. The system service layer provides services to applications through the framework layer. This layer may include:
[0323] System basic capability subsystem set: provides basic capabilities for the operation, scheduling, migration and other operations of distributed applications on multiple devices of the Hongmeng system. It may include subsystems such as distributed soft bus, distributed data management, distributed task scheduling, multi-language runtime, public basic library, multi-mode input, graphics, security, artificial intelligence (AI), user program framework, etc. Among them, the multi-language runtime provides C or C++ or JavaScript (JS) multi-language runtime and basic system class libraries, and can also provide a runtime for Java programs statically compiled by the compiler (that is, the part developed in Java language in the application or framework layer).
[0324] Basic software service subsystem set: Provides public and general software services for the Hongmeng system. This includes event notification, phone, multimedia, Design For X (DFX), MSDP & DV, and other subsystems.
[0325] Enhanced software service subsystems: These provide HarmonyOS with differentiated, device-specific, and enhanced software services. These services may include specialized smart screen services, wearable technology services, and IoT (Internet of Things) services.
[0326] Hardware service subsystem set: Provides hardware services for the Hongmeng system. This may include location services, biometric recognition, wearable hardware services, IoT hardware services, and other subsystems.
[0327] The framework layer provides user program frameworks and capability frameworks in multiple languages, including Java, C, C++, and JS, for Hongmeng OS application development. It also provides two user interface (UI) frameworks (a Java UI framework for Java and a JS UI framework for JS), as well as a multi-language framework for application programming interfaces (APIs) for various software and hardware services. The APIs supported by Hongmeng OS devices will vary depending on the system's componentization.
[0328] The application layer includes system applications and third-party non-system applications. System applications may include applications installed by default on electronic devices, such as the desktop, control bar, settings, and phone. Extended applications can be non-essential applications developed and designed by the manufacturer of the electronic device, such as electronic device managers, device migration, notes, weather, and other applications. Third-party non-system applications can be developed by other manufacturers but can run in the HarmonyOS system, such as games, navigation, social or shopping applications.
[0329] The applications of the Hongmeng system are composed of one or more meta-programs (Feature Ability, FA) or meta-services (Particle Ability, PA). Among them, FA has a UI interface and provides the ability to interact with users. PA has no UI interface and provides the ability to run tasks in the background and a unified data access abstraction. PA mainly provides support for FA, such as providing computing power as a background service, or providing data access capabilities as a data warehouse. Applications developed based on FA or PA can implement specific business functions, support cross-device scheduling and distribution, and provide users with a consistent and efficient application experience.
[0330] Multiple electronic devices running the Harmony system can achieve hardware mutual assistance and resource sharing through distributed soft bus, distributed device virtualization, distributed data management and distributed task scheduling.
[0331] For example, Figure 4 The schematic flow chart of the communication system and communication method provided by the present application is shown. As an example but not a limitation, the method can be applied to the first electronic device and the second electronic device mentioned above.
[0332] It should be noted that the communication system and communication method provided in this application can be applied to a variety of scenarios for searching for devices in a local area network, and are particularly suitable for screen projection scenarios. In this application, the screen projection scenario is used as an example for illustration, but is not limited to this.
[0333] It should also be noted that in this application, there is no limit on the number of first and second electronic devices. For example, there may be a situation where one first electronic device searches for multiple second electronic devices, or there may be a situation where multiple first electronic devices search for one second electronic device, or there may be a situation where multiple first electronic devices search for multiple second electronic devices. There is no limitation here.
[0334] In some embodiments, in order to implement the communication system and communication method provided by the present application, the device search program corresponding to the present method can be integrated into the device in the form of a system component or application. For example, the device search program can be integrated into the operating system as a system component, or integrated into a third-party application in the form of code. The third-party application can be a video playback application, a screen projection application, a live broadcast application, etc., which is not limited here.
[0335] refer to Figure 4 , the communication system and the communication method include:
[0336] S301: The first electronic device confirms that a connection with the second electronic device via the first short-range wireless communication method is successfully established.
[0337] S302: The second electronic device confirms that the connection with the first electronic device via the first short-range wireless communication method is successfully established.
[0338] In some embodiments, the successful establishment of a connection between the first electronic device and the second electronic device via the first short-range wireless communication method may be when the distance between the first electronic device and the second electronic device is less than the first distance. The first short-range wireless communication method includes one of Bluetooth, Near Field Communication (NFC), or Wi-Fi.
[0339] As an example, when both the first electronic device and the second electronic device support Bluetooth, when the distance between the first electronic device and the second electronic device is less than a first distance (i.e., the first electronic device and the second electronic device can communicate via Bluetooth), the first electronic device and the second electronic device can establish a connection via Bluetooth. Alternatively, the distance between the first electronic device and the second electronic device can be obtained based on the Bluetooth communication signal strength between the first electronic device and the second electronic device. When the distance between the first electronic device and the second electronic device is less than a second distance, the first electronic device and the second electronic device can establish a connection via Bluetooth.
[0340] In some other embodiments, the first electronic device can establish a connection with an accessory device of the second electronic device (a third electronic device) through a first short-range wireless communication method. After the first electronic device establishes a connection with the third electronic device through the first short-range wireless communication method, the second electronic device confirms through the third electronic device that the connection with the first electronic device through the first short-range wireless communication method is successfully established.
[0341] For example, suppose the first electronic device is a smartphone that supports Bluetooth and NFC. The second electronic device is a smart TV that supports Bluetooth. The smart TV can connect to a remote control (a third electronic device) via Bluetooth, and the remote control is equipped with an NFC chip. The action that triggers the smartphone to perform a device search can include the distance between the smartphone and the smart TV being less than a preset distance threshold, or the smartphone establishing a connection with the NFC chip of the remote control via NFC.
[0342] In some examples, a smartphone is connected to a smart TV via Bluetooth. When the smartphone enters the Bluetooth communication range of the smart TV, or when the Bluetooth signal strength determines that the distance between the smartphone and the smart TV is less than a preset distance threshold (for example, the distance threshold may be 2 meters), the smartphone establishes a connection with the smart TV via Bluetooth, and the smartphone multicasts or broadcasts a first search request message. Similarly, after establishing a connection with the smartphone, the smart TV may multicast or broadcast a second search request message.
[0343] In other embodiments, when a smartphone has its NFC function enabled and is placed close to a smart TV remote control, the smartphone's NFC chip establishes a connection with the NFC chip in the smart TV remote control, and the smartphone multicasts or broadcasts a first search request message. Similarly, after the smart TV confirms that a connection has been established between the smartphone and the remote control, it can multicast or broadcast a second search request message. When the remote control establishes a connection with the smartphone via NFC, the remote control can send a successful connection indication to the smart TV via Bluetooth. When the smart TV receives the successful connection indication, it confirms that the connection with the first electronic device via the first short-range wireless communication method has been successfully established.
[0344] In this embodiment, the smartphone and the smart TV both start device search after the smartphone is placed close to the remote control of the smart TV, thereby achieving a two-way search between the smartphone and the smart TV.
[0345] It should be noted that the establishment of the first short-range wireless communication connection in the above example is only an example, and the present application does not limit the method of establishing the first short-range wireless communication connection.
[0346] S303: In response to the establishment of the first short-range wireless communication connection, send a first search request message.
[0347] S304: In response to the establishment of the first short-range wireless communication connection, send a second search request message.
[0348] In some embodiments, at least one of the first search request message and the second search request message needs to include corresponding identification information. For example, the first search request message includes first identification information related to the first electronic device, and at the same time, the second search request message includes second identification information related to the second electronic device. Alternatively, when the first search request message includes the first identification information related to the first electronic device, the second search request message may not include the second identification information related to the second electronic device. Alternatively, when the second search request message includes the second identification information related to the second electronic device, the first search request message may not include the first identification information related to the first electronic device.
[0349] When the search request message received by the first electronic device or the second electronic device does not include identification information, a search response message including the identification information of the current electronic device can be generated based on the search request and sent to the corresponding electronic device. In the following examples, the case where both the first search request message and the second search request message include identification information is used as an example for explanation.
[0350] It should be noted that the "related" in the first identification information related to the first electronic device can be understood as identification information that can determine the unique first electronic device. For example, in the device information of the first device, information that can be used to identify the first device. For example, the first identification information may include at least one first projection identification, and at least one of the device name, device identity number (identity, ID), Internet protocol (IP) address, and media access control address (MAC address) of the first electronic device.
[0351] Similarly, the "related" in the second identification information related to the second electronic device can be understood as identification information that can determine a unique second electronic device. Such as information in the device information of the second device that can be used to identify the second device. For example, the second identification information may include at least one second projection identification, and at least one of the device name, device ID, IP address, and MAC address of the second electronic device.
[0352] The first projection screen identifier may include information that can be used for projection screen in the device information of the first electronic device. For example, the first projection screen identifier may include the device name, device ID, service type, IP address, MAC address, etc. of the first electronic device.
[0353] Similarly, the second projection screen identifier may include information in the device information of the second electronic device that can be used for projection screen. For example, the first projection screen identifier may include the device name, device ID, service type, IP address, MAC address, etc. of the first electronic device.
[0354] In this application, an M-search message in DLNA is taken as an example of the first search request message to illustrate it.
[0355] The M-search message after adding the device information field can be:
[0356] M-SEARCH*HTTP / 1.1
[0357] HOST:239.255.255.250:1900
[0358] MAN:"ssdp:discover"
[0359] MX: seconds to delay response
[0360] ST:search target
[0361] SELF_LOCATION: DevName, DevID, Service, Addr.
[0362] Among them, "M-SEARCH*" is the standard message header of the M-search message, and HTTP / 1.1 is used to indicate the Hyper Text Transfer Protocol (HTTP) version of the M-search message.
[0363] HOST is the DLNA forwarding host address, a multicast channel and port reserved by the Internet Assigned Numbers Authority (IANA) for the Simple Service Discovery Protocol (SSDP). "239.255.255.250:1900" is the default value specified by IANA.
[0364] MAN is the notification type, and the MAN type of M-search is defined as "ssdp:discover".
[0365] MX is the maximum waiting time, that is, the length of time to wait for a response during a search, which can be set according to actual conditions.
[0366] ST is a header required by SSDP and indicates the target that the device is searching for. The search target can be one of the following types:
[0367] ssdp:all: searches for all devices and services.
[0368] UPuP:rootdevice, indicating that only the root device is searched.
[0369] urn:schemas-UPnP-org:device:deviceType:v indicates a search for similar devices. The device type and version are defined by the Universal Plug and Play (UPnP) Forum Working Committee.
[0370] urn:schemas-UPnP-org:service:serviceType:v indicates a search for similar services. The service type and version are defined by the UPnP Forum Working Committee.
[0371] SELF_LOCATION indicates device information, including device name (DevName), device ID (DevID), service type (Service), and address (Addr). The address can be an IP address or a MAC address.
[0372] Similarly, the second search request may also be an M-search message, the structure of which is the same as that of the first search request message, and will not be described in detail here.
[0373] It should be noted that when the first electronic device multicasts or broadcasts the first search request message, it can send the first search request message to the host (HOST) port, that is, to port 1900 of 239.255.255.250. The second electronic device can continue to monitor port 1900. After the first electronic device sends the first search request message to port 1900, the second electronic device can monitor the first search request message and accept the first search request message. Similarly, when the second electronic device multicasts the second search request message, the method is the same and will not be repeated here.
[0374] It should also be noted that, to more effectively implement device search, the first electronic device or the second electronic device may continuously multicast or broadcast the corresponding search request at a certain frequency. For example, the first electronic device may multicast four first search request messages per second, and the second electronic device may multicast five second search request messages per second. This application does not impose any restrictions on the multicast frequency.
[0375] S305: In response to the second search request message, output second identification information related to the second electronic device.
[0376] S306: In response to the first search request message, output first identification information related to the first electronic device.
[0377] In some embodiments, when the first electronic device receives the second search request, it can parse the second search request, obtain the second identification information in the second search request, extract and display the device information of the second electronic device based on the second projection identifier in the second identification information.
[0378] For example, Figure 5 A schematic diagram of a scenario in which a first electronic device displays device information of a second electronic device is shown. Figure 5, the first electronic device 11 is a smart phone, and a video playback interface is displayed on the screen of the smart phone. On the video playback interface, a projection device display area 41 is displayed in a floating manner. The projection device display area 41 includes an available projection device selection area 42 and a cancel projection button 43. Among them, the prompt message "Please select a projection device" can be displayed at the top of the projection device display area 41 to prompt the user of the function of this area. In the available projection device selection area 42, the device information of at least one second electronic device is displayed. Since each second search request contains the device information corresponding to the second electronic device, the first electronic device can obtain the device information of the second electronic device corresponding to the second search request after parsing the received second search request, and display the device name (DevName) in the device information of the second electronic device in the available projection device selection area 42. For example, Figure 5 The first electronic device displays device information for two second electronic devices: one for the "smart screen in the living room" and the other for the "projector in the bedroom." This means the first electronic device has received second search requests from two second electronic devices. The first electronic device can also cancel screen projection by clicking the cancel screen projection button 43 and closing the projection device display area 41.
[0379] For example, Figure 6 A schematic diagram of a scenario in which a second electronic device displays device information of a first electronic device is shown. Figure 6 , where the second electronic device 12 is a smart TV. A video playback interface is displayed on the screen of the smart TV. On the video playback interface, a projection device display area 51 is displayed in a floating manner. The projection device display area 51 includes an available projection device selection area 52 and a cancel projection button 53. The projection device display area 51, available projection device selection area 52, and cancel projection button 53 of the smart TV are the same as those of the first electronic device and are not described in detail here. Figure 6 In the figure, the device information of a first electronic device "Xiao A's mobile phone" is displayed in the available projection device selection area 52, that is, the second electronic device receives a first search request from a first electronic device.
[0380] S307: The first electronic device sends a second search response message in response to the second search request message.
[0381] S308. The second electronic device sends a first search response message in response to the first search request message.
[0382] In some embodiments, the second search response message includes first identification information of the first electronic device, and the first search response message includes second identification information of the second electronic device, wherein the device information is the same as the identification information shown in S303 and S304.
[0383] By sending a search response message to the peer device, the number of times device information is sent can be increased, the probability of device search failure caused by packet loss due to poor network environment can be reduced, and the success rate of device search can be improved.
[0384] It should be noted that the sending of the first search request message and the sending of the second search response message are performed synchronously on the first electronic device and are independent of each other. The sending of the second search request message and the sending of the first search response message are performed synchronously on the second electronic device and are independent of each other.
[0385] S309: Determine whether the second identification information outputted by the first electronic device includes fourth identification information related to the second electronic device; if yes, execute S313; otherwise, execute S311.
[0386] S310: Determine whether the first identification information outputted by the second electronic device includes the third identification information related to the first electronic device; if yes, execute S314; otherwise, execute S312.
[0387] S311. The first electronic device outputs fourth identification information related to the second electronic device according to the first search response message.
[0388] Specifically, the second identification information outputted later includes the fourth identification information.
[0389] S312: The second electronic device outputs third identification information related to the first electronic device according to the second search response message.
[0390] Specifically, the first identification information outputted later includes the third identification information.
[0391] In some embodiments, the electronic device outputs identification information by displaying device information corresponding to the projection identifier on the screen of the electronic device based on the projection identifier included in the identification information. For example, the second electronic device outputs first identification information related to the first electronic device by displaying the device name of the first electronic device corresponding to a first projection identifier in the first identification on the second electronic device. The first electronic device outputs second identification information related to the second electronic device by displaying the device name of the second electronic device corresponding to a second projection identifier in the second identification on the first electronic device.
[0392] It should be noted that the second identification information output by the first electronic device includes the fourth identification information related to the second electronic device, indicating that the first electronic device has displayed the device information of the second device corresponding to the fourth projection identification in the fourth identification information. The first electronic device does not need to output again and can continue to execute S313.
[0393] The second identification information output by the first electronic device does not include the fourth identification information associated with the second electronic device, indicating that the first electronic device does not display the device information of the second device corresponding to the fourth projection identification in the fourth identification information. In other words, the first electronic device needs to execute S311 and output the fourth identification information. After outputting the fourth identification information, the output second identification information includes the fourth identification information.
[0394] Similarly, the output first identification information includes the third identification information related to the first electronic device, indicating that the second electronic device has displayed the device information of the first device corresponding to the third projection identification in the third identification information. The second electronic device does not need to output again and can continue to execute S314.
[0395] The first identification information output by the second electronic device does not include the third identification information related to the first electronic device, indicating that the second electronic device does not display the device information of the first device corresponding to the fourth projection identification in the third identification information. In other words, the second electronic device needs to execute S312 and output the third identification information. After outputting the third identification information, the output first identification information includes the third identification information.
[0396] refer to Figure 5 , if the device information contained in the first search response message received by the first electronic device is the same as the displayed device information, it is determined that the first electronic device has displayed the device information of the second electronic device. The same device information can be that at least one of the device ID and address is the same. For example, the device name of the second electronic device included in the first search response message is "Smart Screen in the Living Room", and the IP address is 192.168.50.12. The device name of a displayed second electronic device is also "Smart Screen in the Living Room", and the IP address is also 192.168.50.12, then the two second electronic devices are the same second electronic devices, that is, the first electronic device has displayed the device information of the second electronic device.
[0397] In some embodiments, device information with the same device name but different device ID and address is considered different device information. For example, the device name of the second electronic device included in the first search response message and the device name of the displayed second electronic device are both "Smart Screen in the Living Room", the IP address of the second electronic device included in the second search response message is 192.168.50.12, and the IP address of the displayed second electronic device is 192.168.50.101, then these two second electronic devices are considered different second electronic devices, that is, the device information of the second electronic device is not displayed on the first electronic device. S311 can be executed, and Figure 5 In the available projection device selection area 42, two "living room smart screens" are displayed. Figure 6 The scene shown.
[0398] For example, Figure 7 A schematic diagram shows another scenario in which a first electronic device displays device information of a second electronic device.
[0399] refer to Figure 7 In the available projection device selection area 42, the device information of three second electronic devices is displayed, but the device information of two of the second electronic devices is "the smart screen in the living room". In order to distinguish the two "smart screens in the living room", the device name and the IP address of the display device can be displayed at the same time. Figure 7 As shown, below the "Smart Screen in the Living Room", the IP address of the second electronic device is also shown for distinction.
[0400] It should be noted that other data can be displayed to distinguish between the two "living room smart screens." For example, the MAC address, the signal strength of the connection between the device and the wireless network device, etc., are not limited here.
[0401] The second electronic device implements the above method in the same manner as the first electronic device, which will not be described in detail here.
[0402] S313: Confirm whether the first electronic device receives the second user input. If so, execute S315; if not, end the device search process.
[0403] S314: Confirm whether the second electronic device receives the first user input. If so, execute S316; if not, end the device search process.
[0404] S315. The first electronic device responds to the second user input and sends a second screen projection request associated with the second screen projection identifier.
[0405] S316. The second electronic device responds to the first user input and sends a first screen projection request related to the first screen projection identifier.
[0406] In some embodiments, the second user input may be a click operation on the first electronic device. For example, if the first electronic device outputs at least one second projection screen identifier through the screen, the second user input may be a click operation on the area displaying the second projection screen identifier. The first user input is similar to the second user input and is not further described here.
[0407] refer to Figure 5 and Figure 7, the device information of multiple second electronic devices is displayed in the available projection device selection area 42. When the first electronic device receives a click operation acting on the device information display area, it is determined that the first electronic device has received an instruction to project the screen to the target second electronic device, and the first electronic device sends a second projection request related to the second projection identifier to the target second electronic device. The target second electronic device is the second electronic device indicated by the device information corresponding to the click operation area. For example, refer to Figure 5 When the click operation is performed on the area displaying the “Smart Screen in the Living Room”, the target second electronic device is the second electronic device corresponding to the “Smart Screen in the Living Room”.
[0408] In other embodiments, the second user input may also be voice input. That is, when the microphone of the first electronic device receives the wake-up voice instruction and the selection voice instruction, it determines that the second electronic device indicated by the selection voice instruction is the target second electronic device. For example, when the microphone of the first electronic device receives the audio data of "Xiaoyi Xiaoyi, cast the screen to the smart screen in the living room", the cloud server can recognize the voice instruction and extract the keyword "cast the screen to the smart screen in the living room". And based on the keyword, it is determined that the target second electronic device is the second electronic device corresponding to the "smart screen in the living room". Then, the first electronic device sends a second screen projection request associated with the second screen projection identifier to the target second electronic device.
[0409] The method of confirming whether the second electronic device has received the instruction to connect to the target first electronic device is the same as the method of confirming whether the first electronic device has received the instruction to connect to the target second electronic device, and will not be described in detail here.
[0410] In some embodiments, after the first electronic device sends a second screen projection request associated with a second screen projection identifier to the target second electronic device, the screen projection can be performed according to the following method.
[0411] For example, Figure 8 A schematic diagram of a process for applying a communication system and a communication method to screen projection is shown. Figure 8 , the process includes the following steps:
[0412] S601: A first electronic device receives an instruction to connect to a target second electronic device.
[0413] In some implementations, the instruction for connecting to the target second electronic device is the same as that in S313 and is not described in detail here.
[0414] S602: Is there an M-search message from the target second electronic device and does the M-search message include device information? If yes, execute S603; otherwise, execute S605.
[0415] It should be noted that the method of the present application requires the corresponding program to be integrated into the operating system or third-party program. Since when a communication system or a communication method is applied, there may be devices in the network that are not in the system provided by the present application or devices that do not use the method provided by the present application, these devices will be searched and discovered through existing technologies, and will not send M-search messages themselves, or the M-search messages sent will not include identification information. That is, there is no M-search message from the target second electronic device in the first electronic device, or there is an M-search message but the M-search message does not include identification information. In this case, the first electronic device can cast the screen through existing technologies, directly send the content to be cast to the target second electronic device, and display it on the target second electronic device.
[0416] When an M-search message from a target second electronic device exists in the first electronic device, and the M-search message includes the second identification information of the target second electronic device, it can be determined that the target second electronic device is the second electronic device in the communication system provided by this application or that the communication method provided by this application is applied, that is, the first electronic device and the second electronic device searched at the same time. Since both devices have searched, the direction of the screen projection cannot be determined, and S603 needs to be executed to determine the direction of the screen projection through the user.
[0417] S603: Display the screen projection direction selection interface, receive and respond to the screen projection direction selection operation.
[0418] For example, Figure 9 A schematic diagram of a projection direction selection interface is shown. In some embodiments, assuming that in the example of S313, the target second electronic device is determined to be the second electronic device corresponding to the "smart screen in the living room" through a click operation, and there is an M-search message from the second electronic device corresponding to the "smart screen in the living room". Then the first electronic device can show Figure 9 The interface in .
[0419] The first electronic device 11 is a smartphone. A video playback interface is displayed on the smartphone screen. A projection direction display area 71 is displayed in a floating manner above the video playback interface. The projection direction display area 71 includes a projection direction selection area 72 and function buttons 73. A prompt message "Please select a projection direction" may be displayed at the top of the projection direction display area 71 to inform the user of the function of this area.
[0420] In the projection direction selection area 72, the projection direction is displayed, for example, Figure 9, the projection direction can be displayed through text messages such as "Project the screen of this machine to the smart screen in the living room" or "Project the screen of the smart screen in the living room to this machine". It can also be displayed through icons and arrows, which are not limited in this application.
[0421] Function buttons 73 include a "Back" button and a "Cancel" button. The first electronic device can respond to a click on the "Cancel" button to cancel screen projection and close the projection direction display area 71. Alternatively, the first electronic device can respond to a click on the "Back" button to return to the previous interface and display the projection device display area 41.
[0422] Among them, the screen projection direction selection operation can be a click operation in the screen projection direction selection area 72. The click operation can be applied to the area displaying "Project the screen of this machine to the smart screen in the living room" or to the area displaying "Project the screen of the smart screen in the living room to this machine" to select the direction of the screen projection.
[0423] S604: Does the screen projection direction selection operation instruct the first electronic device to project the screen to the target second electronic device? If so, execute S605; otherwise, execute S606.
[0424] S605: The first electronic device sends the content to be projected to the target second electronic device.
[0425] In some embodiments, when sending the content to be projected to the target second electronic device, if the content to be projected is an image, the image data can be sent to the target second electronic device; if the content to be projected is a video, the video's Uniform Resource Locator (URL) can be sent to the target second electronic device; if the content to be projected is the interface of the first electronic device, when the first electronic device renders the interface, the rendering result of the interface can be sent to the target second electronic device. There is no limitation on the method of sending the content to be projected to the target second electronic device.
[0426] S606: The first electronic device sends a screen projection request to the target second electronic device.
[0427] In some embodiments, the screen projection request is used to instruct the second target device to initiate screen projection to the first electronic device, and the screen projection request includes device information of the first electronic device. The screen projection request may also include content requesting the second target device to project the screen. For example, requesting the target second electronic device to project the interface to the first electronic device.
[0428] S607: The first electronic device receives and displays the content to be projected sent by the target second electronic device according to the projection request.
[0429] Among them, the method in which the first electronic device receives the content to be projected sent by the target second electronic device according to the projection request is similar to that in S605 and will not be repeated here.
[0430] In the present application, when the communication system and the communication method are applied to the second electronic device, the process and method are the same as when applied to the first electronic device, and are not described in detail here.
[0431] It should be noted that when both the first electronic device and the second electronic device initiate screen projection, the screen projection request initiated later will overwrite the request initiated earlier, that is, the earlier screen projection request will be disconnected, and then the screen projection connection will be established and the screen will be projected according to the later screen projection request. For example, when the first electronic device responds to the operation and initiates screen projection to the second electronic device, the second electronic device also responds to the operation and initiates screen projection to the first electronic device. In this case, you can first disconnect the connection between the first electronic device and the second electronic device, and then establish a connection between the second electronic device and the first electronic device and project the screen.
[0432] In some other implementations, the communication system and communication method may further include:
[0433] The first electronic device responds to the first search instruction by multicasting or broadcasting a first search request message, where the first search request message includes first identification information related to the first electronic device, and the first identification information includes at least one first projection screen identifier. The second electronic device responds to the second search instruction by multicasting or broadcasting a second search request message, where the second search request includes second identification information related to the second electronic device, and the second identification information includes at least one second projection screen identifier.
[0434] Among them, the first search instruction and the second search instruction are issued to the first electronic device and the second electronic device respectively. The first search instruction can be generated by the operation trigger received by the first electronic device, which instructs the first electronic device to search for devices that can be used for screen projection. For example, the operation can be that the first electronic device receives the operation of the user clicking the screen projection button, or the first electronic device receives a gesture for instructing screen projection, or the first electronic device receives a voice message from the user instructing screen projection, etc., which are not limited here. Similarly, the second search instruction can be generated by the operation trigger received by the second electronic device, which instructs the second electronic device to search for devices that can be used for screen projection.
[0435] In this embodiment, the method for multicasting or broadcasting the first search request message and the second search request message is similar to that in S303 and S304 and is not described in detail here. After the multicast or broadcast, the steps shown in S305-S316 and the steps shown in S601-S607 may also be performed, which are also not described in detail here.
[0436] In this embodiment, the first electronic device responds to the first search instruction by multicasting or broadcasting a first search request message, and the second electronic device responds to the second search instruction by multicasting or broadcasting a second search request message. In this case, only one device needs to receive the search request message to obtain the device information of the other device and complete the device search, effectively reducing the probability of device search failure and improving device search efficiency.
[0437] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0438] Exemplarily, corresponding to the communication system and communication method provided in the above embodiments, Figure 10 The structure block diagram of the communication device applied to the first electronic device provided by the embodiment of the present application is shown. For the convenience of explanation, only the part related to the embodiment of the present application is shown. Figure 10 , the communication device includes:
[0439] The connection module 81 is configured to establish a connection with a second electronic device in a first short-range wireless communication manner within a first distance from the second electronic device.
[0440] The sending module 82 is configured to send a first search request message in a multicast or broadcast manner in response to establishment of a first short-range wireless communication connection.
[0441] The receiving module 83 is configured to receive a second search request message from a second electronic device.
[0442] The output module 84 is used to output second identification information related to the second electronic device in response to the second search request message, where the second identification information includes at least one second projection screen identification.
[0443] The second projection screen identifier corresponds to a projection screen mode between the first electronic device and the second electronic device. The first distance is a distance at which the first electronic device and the second electronic device can communicate via a first short-range wireless communication mode.
[0444] In some implementations, the sending module 82 is further configured to send a second search response message to the second electronic device in response to the second search request message.
[0445] The receiving module 83 is further configured to receive a first search response message from the second electronic device.
[0446] The sending module 82 is also used to send a second screen projection request related to the second screen projection identifier to the second electronic device in response to the first user input of the second screen projection identifier.
[0447] In some embodiments, the sending module 82 is also used to send a second screen projection request related to the second screen projection identifier to the second electronic device in response to the first user input of the second screen projection identifier, and the second screen projection request is used for the first electronic device to project the screen to the second electronic device.
[0448] In some implementations, the sending of the first search request message and the sending of the second search response message are performed synchronously on the first electronic device and are independent of each other.
[0449] In some embodiments, the output module 84 is further used to obtain the second identification information that has been output; when the second identification information that has been output includes fourth identification information related to the second electronic device, the fourth identification information related to the first electronic device is no longer output; when the second identification information that has been output does not include the fourth identification information related to the second electronic device, the fourth identification information related to the second electronic device is output.
[0450] For example, Figure 11 The following is a block diagram of a communication device for a second electronic device according to an embodiment of the present application. The communication device includes:
[0451] The connection module 91 is configured to establish a connection with a first electronic device in a first short-range wireless communication manner within a first distance from the first electronic device.
[0452] The sending module 92 is configured to send a second search request message in a multicast or broadcast manner in response to the establishment of the first short-range wireless communication connection.
[0453] The receiving module 93 is configured to receive a first search request message from the first electronic device.
[0454] The output module 94 is used to output first identification information related to the first electronic device in response to the first search request message, where the first identification information includes at least one first projection screen identification.
[0455] The first projection identifier corresponds to a projection mode between the first electronic device and the second electronic device. The first distance is a distance at which the first electronic device and the second electronic device can communicate via the first short-range wireless communication mode.
[0456] In some implementations, the sending module 92 is further configured to send a first search response message to the first electronic device in response to the first search request message.
[0457] The receiving module 93 is further configured to receive a second search response message from the first electronic device.
[0458] The sending module 92 is also used to send a first screen projection request related to the first screen projection identifier to the first electronic device in response to a second user input of the first screen projection identifier.
[0459] In some embodiments, the sending module 92 is also used to send a first screen projection request related to the first screen projection identifier to the first electronic device in response to a second user input of the first screen projection identifier, and the first screen projection request is used for the second electronic device to project the screen to the first electronic device.
[0460] In some implementations, the sending of the second search request message and the sending of the first search response message are performed synchronously on the second electronic device and are independent of each other.
[0461] In some embodiments, the output module 94 is further used to obtain the first identification information that has been output; when the first identification information that has been output includes the third identification information related to the first electronic device, the third identification information related to the first electronic device is no longer output; when the first identification information that has been output does not include the third identification information related to the first electronic device, the third identification information related to the first electronic device is output.
[0462] It should be noted that the information interaction, execution process and other contents between the above modules are based on the same concept as the method embodiment of this application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.
[0463] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0464] For example, Figure 12 This is a structural block diagram of an electronic device provided in one embodiment of the present application. The electronic device can be either a first electronic device or a second electronic device. Figure 12As shown, the electronic device 1000 of this embodiment includes: at least one processor 1001 ( Figure 12 Only one is shown), a memory 1002, and a computer program 1003 stored in the memory 1002 and executable on at least one processor 1001. When the processor 1001 executes the computer program 1003, the steps of the network switching method in the above-mentioned various embodiments are implemented.
[0465] The electronic device 1000 may be a device that supports 5G communication and VoLTE, such as a smartphone, a tablet computer, a wearable device, an augmented reality (AR) / virtual reality (VR) device, or a vehicle-mounted terminal. The electronic device may include, but is not limited to, a processor 1001 and a memory 1002. Those skilled in the art will appreciate that Figure 12 This is merely an example of the electronic device 1000 and does not constitute a limitation on the electronic device 1000 . The electronic device 1000 may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the electronic device 1000 may also include input and output devices, network access devices, etc.
[0466] The processor 1001 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor may be a microprocessor or any conventional processor.
[0467] In some embodiments, the memory 1002 may be an internal storage unit of the electronic device 1000, such as a hard disk or memory of the electronic device 1000. In other embodiments, the memory 1002 may also be an external storage device of the electronic device 1000, such as a plug-in hard disk equipped on the electronic device 1000, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. Furthermore, the memory 1002 may also include both an internal storage unit of the electronic device 1000 and an external storage device. The memory 1002 is used to store an operating system, application programs, a boot loader, data, and other programs, such as program code of a computer program. The memory 1002 may also be used to temporarily store data that has been output or is about to be output.
[0468] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned various method embodiments can be implemented.
[0469] An embodiment of the present application provides a computer program product. When the computer program product is run on a mobile terminal, the mobile terminal can implement the steps in the above-mentioned various method embodiments when executing the computer program product.
[0470] An embodiment of the present application provides a chip system, which includes a memory and a processor. The processor executes a computer program stored in the memory to implement the steps in the above-mentioned various method embodiments.
[0471] An embodiment of the present application provides a chip system, which includes a processor coupled to a computer-readable storage medium. The processor executes a computer program stored in the computer-readable storage medium to implement the steps in the above-mentioned method embodiments.
[0472] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program, when executed by the processor, can implement the steps of the above-mentioned various method embodiments. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include at least: any entity or device capable of carrying the computer program code to an electronic device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electric carrier signal, a telecommunication signal and a software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, a computer-readable medium cannot be an electric carrier signal or a telecommunication signal.
[0473] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.
[0474] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0475] In the embodiments provided in this application, it should be understood that the disclosed systems, methods, devices and electronic devices can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0476] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0477] Finally, it should be noted that the above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. A communication system comprising a first electronic device and a second electronic device, characterized in that: The first electronic device includes: a first processor; a first memory coupled to the first processor; and a first computer program, wherein the first computer program is stored in the first memory and, when the first computer program is executed by the first processor, causes the first electronic device to execute: Establishing a connection with the second electronic device in a first short-range wireless communication manner within a first distance from the second electronic device; In response to the establishment of the first short-range wireless communication connection, sending a first search request message in a multicast or broadcast manner; receiving a second search request message from the second electronic device; In response to the second search request message, output second identification information related to the second electronic device, where the second identification information includes at least one second screen projection identification; The second electronic device includes: a second processor; a second memory coupled to the second processor; and a second computer program, wherein the second computer program is stored in the second memory, and when the second computer program is executed by the second processor, causes the second electronic device to execute: Establishing a connection with the first electronic device using the first short-range wireless communication method within the first distance from the first electronic device; In response to the establishment of the first short-range wireless communication connection, sending the second search request message in a multicast or broadcast manner; receiving the first search request message from the first electronic device; In response to the first search request message, output first identification information related to the first electronic device, where the first identification information includes at least one first screen projection identification; The first screen projection identifier and the second screen projection identifier both correspond to the same screen projection mode between the first electronic device and the second electronic device; The first distance is a distance at which the first electronic device and the second electronic device can communicate with each other through the first short-range wireless communication method; The first search request message includes the first identification information; and / or the second search request message includes the second identification information.
2. The communication system according to claim 1, wherein: The first electronic device further performs: In response to the second search request message, sending a second search response message to the second electronic device; receiving a first search response message from the second electronic device; In response to the first user input of the second screen projection identifier, a second screen projection request related to the second screen projection identifier is sent to the second electronic device.
3. The communication system according to claim 1, wherein: The second electronic device further performs: In response to the first search request message, sending a first search response message to the first electronic device; receiving a second search response message from the first electronic device; In response to a second user input of the first screen projection identifier, a first screen projection request related to the first screen projection identifier is sent to the first electronic device.
4. The communication system according to claim 1, wherein: The first electronic device further performs: In response to the first user input of the second screen projection identifier, a second screen projection request related to the second screen projection identifier is sent to the second electronic device, and the second screen projection request is used for the first electronic device to project the screen to the second electronic device.
5. The communication system according to claim 1, wherein: The second electronic device further performs: In response to a second user input of the first screen projection identifier, a first screen projection request associated with the first screen projection identifier is sent to the first electronic device, where the first screen projection request is used to request the first electronic device to project the screen to the second electronic device.
6. The communication system according to claim 2, wherein: The sending of the first search request message and the sending of the second search response message are performed synchronously on the first electronic device and are independent of each other; The sending of the second search request message and the sending of the first search response message are performed synchronously on the second electronic device and are independent of each other.
7. The communication system according to claim 1 or 2, characterized in that The first search request message further includes: a standard message beginning field, a forwarding host address field, a notification type field, a maximum waiting time field, a search target field, and a first projection identification field; The second search request message also includes: a standard message start field, a forwarding host address field, a notification type field, a maximum waiting time field, a search target field, and a second projection identification field.
8. The communication system according to claim 6, wherein: The first search response message includes the second identification information; the second search response message includes the first identification information.
9. The communication system according to any one of claims 1 to 6, characterized in that: The first short-range wireless communication method includes: Bluetooth communication, near field communication, Wi-Fi communication or Zifeng wireless communication.
10. The communication system according to any one of claims 1 to 6, characterized in that: The first screen projection identifier includes a device name of the first electronic device; The outputting the first identification information related to the first electronic device includes: displaying a device name of the first electronic device on the second electronic device.
11. The communication system according to any one of claims 1 to 6, characterized in that: Before outputting the first identification information related to the first electronic device, the second electronic device further performs: Acquire the outputted first identification information; When the output first identification information includes the third identification information related to the first electronic device, the third identification information related to the first electronic device is no longer output; When the output first identification information does not include the third identification information related to the first electronic device, the third identification information related to the first electronic device is output.
12. The communication system according to any one of claims 1 to 6, characterized in that: The second screen projection identifier includes a device name of the second electronic device; The outputting the second identification information related to the second electronic device includes: displaying a device name of the second electronic device on the first electronic device.
13. The communication system according to any one of claims 1 to 6, characterized in that: Before outputting the second identification information related to the second electronic device, the first electronic device further performs: Acquire the output second identification information; When the output second identification information includes the fourth identification information related to the second electronic device, the fourth identification information related to the first electronic device is no longer output; When the output second identification information does not include the fourth identification information related to the second electronic device, the fourth identification information related to the second electronic device is output.
14. A communication system comprising a first electronic device and a second electronic device, characterized in that: The first electronic device includes: a first processor; a first memory coupled to the first processor; and a first computer program, wherein the first computer program is stored in the first memory and, when the first computer program is executed by the first processor, causes the first electronic device to execute: Establishing a connection with the second electronic device in a first short-range wireless communication manner within a first distance from the second electronic device; In response to the establishment of the first short-range wireless communication connection, sending a first search request message in a multicast or broadcast manner, where the first search request message does not include first identification information related to the first electronic device, and the first identification information includes at least one first projection screen identification; receiving a second search request message from the second electronic device; In response to the second search request message, output second identification information related to the second electronic device, where the second identification information includes at least one second screen projection identification; The second electronic device includes: a second processor; a second memory coupled to the second processor; and a second computer program, wherein the second computer program is stored in the second memory, and when the second computer program is executed by the second processor, causes the second electronic device to execute: Establishing a connection with the first electronic device using the first short-range wireless communication method within the first distance from the first electronic device; In response to the establishment of the first short-range wireless communication connection, sending the second search request message in a multicast or broadcast manner; receiving the first search request message from the first electronic device; In response to the first search request message, sending a first search response message to the first electronic device, wherein the first search response message includes the second identification information; The first screen projection identifier and the second screen projection identifier both correspond to the same screen projection mode between the first electronic device and the second electronic device; The first distance is a distance at which the first electronic device and the second electronic device can communicate with each other through the first short-range wireless communication method; The second search request message includes the second identification information.
15. The communication system according to claim 14, wherein: The first electronic device further performs: In response to the second search request message, sending a second search response message to the second electronic device; receiving the first search response message from the second electronic device, wherein the first search response message includes the second identification information; In response to the first user input of the second screen projection identifier, a second screen projection request related to the second screen projection identifier is sent to the second electronic device.
16. The communication system according to claim 14 or 15, characterized in that The second electronic device further performs: receiving a second search response message from the first electronic device, wherein the second search response message includes the first identification information; In response to a second user input of the first screen projection identifier, a first screen projection request related to the first screen projection identifier is sent to the first electronic device.
17. The communication system according to claim 14 or 15, characterized in that The sending of the first search request message and the receiving of the first search response message are performed synchronously with the receiving of the second search request message and the sending of the second search response message on the first electronic device and are independent of each other; The sending of the second search request message and the receiving of the second search response message are synchronously executed on the second electronic device with the receiving of the first search request message and the sending of the first search response message, and are independent of each other.
18. The communication system according to claim 14 or 15, characterized in that The first search request message further includes: a standard message beginning field, a forwarding host address field, a notification type field, a maximum waiting time field, and a search target field; The second search request message also includes: a standard message start field, a forwarding host address field, a notification type field, a maximum waiting time field, a search target field, and a second projection identification field.
19. A communication system comprising a first electronic device and a second electronic device, characterized in that: The first electronic device includes: a first processor; a first memory coupled to the first processor; and a first computer program, wherein the first computer program is stored in the first memory and, when the first computer program is executed by the first processor, causes the first electronic device to execute: Establishing a connection with the second electronic device in a first short-range wireless communication manner within a first distance from the second electronic device; In response to the establishment of the first short-range wireless communication connection, sending a first search request message in a multicast or broadcast manner; receiving a second search request message from the second electronic device; In response to the second search request message, sending a second search response message to the second electronic device, wherein the second search response message includes first identification information related to the first electronic device, and the first identification information includes at least one first projection screen identification; The second electronic device includes: a second processor; a second memory coupled to the second processor; and a second computer program, wherein the second computer program is stored in the second memory, and when the second computer program is executed by the second processor, causes the second electronic device to execute: Establishing a connection with the first electronic device using the first short-range wireless communication method within the first distance from the first electronic device; In response to the establishment of the first short-range wireless communication connection, sending the second search request message in a multicast or broadcast manner, where the second search request message does not include second identification information related to the second electronic device, and the second identification information includes at least one second screen projection identifier; receiving the first search request message from the first electronic device, and outputting first identification information related to the first electronic device in response to the first search request message, where the first identification information includes at least one first screen projection identifier; The first screen projection identifier and the second screen projection identifier both correspond to the same screen projection mode between the first electronic device and the second electronic device; The first distance is a distance at which the first electronic device and the second electronic device can communicate with each other through the first short-range wireless communication method; The first search request message includes the first identification information.
20. The communication system according to claim 19, wherein: The first electronic device further performs: receiving a first search response message from the second electronic device, wherein the first search response message includes the second identification information; In response to the first user input of the second screen projection identifier, a second screen projection request related to the second screen projection identifier is sent to the second electronic device.
21. The communication system according to claim 19 or 20, characterized in that The second electronic device further executes: sending a first search response message to the first electronic device in response to the first search request message; receiving the second search response message from the first electronic device, wherein the second search response message includes the first identification information; In response to a second user input of the first screen projection identifier, a first screen projection request related to the first screen projection identifier is sent to the first electronic device.
22. The communication system according to claim 19 or 20, characterized in that The sending of the first search request message and the receiving of the first search response message are performed synchronously with the receiving of the second search request message and the sending of the second search response message on the first electronic device and are independent of each other; The sending of the second search request message and the receiving of the second search response message are synchronously executed on the second electronic device with the receiving of the first search request message and the sending of the first search response message, and are independent of each other.
23. The communication system according to claim 19 or 20, characterized in that The first search request message further includes: a standard message beginning field, a forwarding host address field, a notification type field, a maximum waiting time field, a search target field, and a first projection identification field; The second search request message further includes: a standard message beginning field, a forwarding host address field, a notification type field, a maximum waiting time field, and a search target field.
24. A communication system comprising a first electronic device and a second electronic device, characterized in that: The first electronic device includes: a first processor; a first memory coupled to the first processor; and a first computer program, wherein the first computer program is stored in the first memory and, when the first computer program is executed by the first processor, causes the first electronic device to execute: establishing a connection with a third electronic device in a first short-range wireless communication manner within a first distance from the third electronic device, wherein the third electronic device is an accessory device of the second electronic device and the third electronic device is connected to the second electronic device; In response to the establishment of the first short-range wireless communication connection, sending a first search request message in a multicast or broadcast manner; receiving a first search response message from the second electronic device; In response to the first search response message, output second identification information related to the second electronic device, where the second identification information includes at least one second screen projection identification; receiving a second search request message from the second electronic device; In response to the second search request message, sending a second search response message to the second electronic device; The second electronic device includes: a second processor; a second memory coupled to the second processor; and a second computer program, wherein the second computer program is stored in the second memory, and when the second computer program is executed by the second processor, causes the second electronic device to execute: confirming that the distance between the first electronic device and the third electronic device is within the first distance, and establishing a connection with the third electronic device using the first short-range wireless communication method; In response to the establishment of the first short-range wireless communication connection, sending the second search request message in a multicast or broadcast manner; receiving the second search response message from the first electronic device; In response to the second search response message, output first identification information related to the first electronic device, where the first identification information includes at least one first screen projection identification; receiving the first search request message from the first electronic device; In response to the first search request message, sending the first search response message to the first electronic device; The sending of the first search request message and the receiving of the first search response message are synchronously executed on the first electronic device and are independent of each other, as are the receiving of the second search request message and the sending of the second search response message. The sending of the second search request message and the receiving of the second search response message are performed synchronously with the receiving of the first search request message and the sending of the first search response message on the second electronic device and are independent of each other; The first screen projection identifier and the second screen projection identifier both correspond to the same screen projection mode between the first electronic device and the second electronic device; The first distance is a distance at which the first electronic device and the third electronic device can communicate with each other through the first short-range wireless communication method; The first search request message includes the first identification information; and / or the second search request message includes the second identification information.
25. A communication method, applied to a communication system, wherein the communication system comprises a first electronic device and a second electronic device, characterized in that: The first electronic device establishes a connection with the second electronic device in a first short-range wireless communication manner within a first distance from the second electronic device; In response to the establishment of the first short-range wireless communication connection, the first electronic device and the second electronic device respectively send a first search request message and a second search request message in a multicast or broadcast manner; The first electronic device receives the second search request message from the second electronic device; In response to the second search request message, the first electronic device outputs second identification information related to the second electronic device, where the second identification information includes at least one second screen projection identification; The second electronic device receives the first search request message from the first electronic device; In response to the first search request message, the second electronic device outputs first identification information related to the first electronic device, where the first identification information includes at least one first screen projection identification; The first screen projection identifier and the second screen projection identifier both correspond to the same screen projection mode between the first electronic device and the second electronic device; The first distance is a distance at which the first electronic device and the second electronic device can communicate with each other through the first short-range wireless communication method; The first search request message includes the first identification information; and / or the second search request message includes the second identification information.
26. The method according to claim 25, characterized in that The method further comprises: In response to the second search request message, the first electronic device sends a second search response message to the second electronic device; The first electronic device receives a first search response message from the second electronic device; In response to a first user input of the second screen projection identifier, the first electronic device sends a second screen projection request associated with the second screen projection identifier to the second electronic device.
27. The method according to claim 25 or 26, characterized in that The method further comprises: In response to the first search request message, the second electronic device sends a first search response message to the first electronic device; The second electronic device receives a second search response message from the first electronic device; In response to a second user input of the first screen projection identifier, the second electronic device sends a first screen projection request related to the first screen projection identifier to the first electronic device.
28. The method according to claim 25 or 26, characterized in that The sending of the first search request message and the sending of the second search response message are performed synchronously on the first electronic device and are independent of each other; The sending of the second search request message and the sending of the first search response message are performed synchronously on the second electronic device and are independent of each other.
29. A communication method, applied to a communication system, wherein the communication system comprises a first electronic device and a second electronic device, characterized in that: The first electronic device establishes a connection with the second electronic device in a first short-range wireless communication manner within a first distance from the second electronic device; In response to the establishment of the first short-range wireless communication connection, the first electronic device and the second electronic device respectively send a first search request message and a second search request message in a multicast or broadcast manner; The first electronic device receives the second search request message from the second electronic device; In response to the second search request message, the first electronic device outputs second identification information related to the second electronic device, where the second identification information includes at least one second screen projection identifier, and the first electronic device sends a second search response message to the second electronic device; The second electronic device receives the second search response message from the first electronic device; In response to the second search response message, the second electronic device outputs first identification information related to the first electronic device, where the first identification information includes at least one first screen projection identification; The second electronic device receives the first search request message from the first electronic device; In response to the first search request message, the second electronic device sends a first search response message to the first electronic device; The first search request message does not include the first identification information; the second search response message includes the first identification information; The first screen projection identifier and the second screen projection identifier both correspond to the same screen projection mode between the first electronic device and the second electronic device; The first distance is a distance at which the first electronic device and the second electronic device can communicate with each other through the first short-range wireless communication method; The second search request message includes the second identification information.
30. The method according to claim 29, wherein The sending of the first search request message and the receiving of the first search response message are performed synchronously with the receiving of the second search request message and the sending of the second search response message on the first electronic device and are independent of each other; The sending of the second search request message and the receiving of the second search response message are synchronously executed on the second electronic device with the receiving of the first search request message and the sending of the first search response message, and are independent of each other.
31. A communication method, applied to a communication system, wherein the communication system comprises a first electronic device and a second electronic device, characterized in that: The first electronic device establishes a connection with the second electronic device in a first short-range wireless communication manner within a first distance from the second electronic device; In response to the establishment of the first short-range wireless communication connection, the first electronic device and the second electronic device respectively send a first search request message and a second search request message in a multicast or broadcast manner; The first electronic device receives a first search response message from the second electronic device; In response to the first search response message, the first electronic device outputs second identification information related to the second electronic device, where the second identification information includes at least one second screen projection identification; The first electronic device receives the second search request message from the second electronic device; In response to the second search request message, the first electronic device sends a second search response message to the second electronic device; The second electronic device receives the first search request message from the first electronic device; In response to the first search request message, the second electronic device outputs first identification information related to the first electronic device, the first identification information including at least one first screen projection identifier, and the second electronic device sends a first search response message to the first electronic device; The second search request message does not include the second identification information; the first search response message includes the second identification information; The first screen projection identifier and the second screen projection identifier both correspond to the same screen projection mode between the first electronic device and the second electronic device; The first distance is a distance at which the first electronic device and the second electronic device can communicate with each other through the first short-range wireless communication method; The first search request message includes the first identification information.
32. The method according to claim 31, characterized in that The sending of the first search request message and the receiving of the first search response message are performed synchronously with the receiving of the second search request message and the sending of the second search response message on the first electronic device and are independent of each other; The sending of the second search request message and the receiving of the second search response message are synchronously executed on the second electronic device with the receiving of the first search request message and the sending of the first search response message, and are independent of each other.
33. A communication method, applied to a communication system, wherein the communication system comprises a first electronic device and a second electronic device, characterized in that: The first electronic device establishes a connection with the third electronic device in a first short-range wireless communication manner within a first distance from a third electronic device, wherein the third electronic device is an accessory device of the second electronic device and is connected to the second electronic device; In response to the establishment of the first short-range wireless communication connection, the first electronic device and the second electronic device respectively send a first search request message and a second search request message in a multicast or broadcast manner; The first electronic device receives a first search response message from the second electronic device; In response to the first search response message, the first electronic device outputs second identification information related to the second electronic device, where the second identification information includes at least one second screen projection identification; The first electronic device receives the second search request message from the second electronic device; In response to the second search request message, the first electronic device sends a second search response message to the second electronic device; The second electronic device receives the second search response message from the first electronic device; In response to the second search response message, the second electronic device outputs first identification information related to the first electronic device, where the first identification information includes at least one first screen projection identification; The second electronic device receives the first search request message from the first electronic device; In response to the first search request message, the second electronic device sends the first search response message to the first electronic device; The sending of the first search request message and the receiving of the first search response message are synchronously executed on the first electronic device and are independent of each other, as are the receiving of the second search request message and the sending of the second search response message. The sending of the second search request message and the receiving of the second search response message are performed synchronously with the receiving of the first search request message and the sending of the first search response message on the second electronic device and are independent of each other; The first screen projection identifier and the second screen projection identifier both correspond to the same screen projection mode between the first electronic device and the second electronic device; The first distance is a distance at which the first electronic device and the third electronic device can communicate with each other through the first short-range wireless communication method; The first search request message includes the first identification information; and / or the second search request message includes the second identification information.
Citation Information
Patent Citations
Terminal device, method and system for realizing one-touch screen projection through remote controller
CN112351322A