CN-122028014-A - Equipment communication method and electronic equipment
Abstract
The application provides a device communication method and electronic equipment. The first electronic device receives first information input by a user in a first communication application. In the case where the first electronic device and the second electronic device of the second member of the first communication application are communicable through the server, the first electronic device may send the first information to the second electronic device through the server, the second electronic device being a device of the second member. In the case where the first electronic device and the second electronic device are not communicable through the server, the first electronic device may send the first information to the second electronic device through an end-to-end D2D communication technique. According to the method, the electronic equipment of the contact person in the first communication application can dynamically switch communication modes based on the communication state, and the communication modes can comprise communication through a server and communication through a D2D communication technology, so that communication between the electronic equipment of the contact person in the first communication application can be realized.
Inventors
- ZHOU YAN
- DAI WEI
- WANG LIANG
- LI XIAOLONG
- SHI WENJUN
- LI TAO
- HUANG WEI
Assignees
- 华为技术有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20250922
Claims (20)
- 1. A device communication method applied to a first electronic device, the method comprising installing a first communication application in the first electronic device, the method comprising: The first electronic device displays a first user interface of the first communication application, the first user interface comprising information of a first member in the communication application in communication with a second member, the first electronic device being a device of the first member; the first electronic equipment receives first information input by a user in the first user interface; in the case that a first electronic device and a second electronic device can communicate through a server, the first electronic device transmits the first information to the second electronic device through the server, the second electronic device being a device of the second member; In the event that a first electronic device and the second electronic device are not communicable through the server, the first electronic device transmits the first information to the second electronic device through an end-to-end D2D communication technology.
- 2. The method of claim 1, wherein the first electronic device transmitting the first information to the second electronic device via the server comprises the first electronic device transmitting the first information to the second electronic device via the server based on any one of a cellular network, a local area network, and a fixed network; the D2D communication technology comprises any one or more of a point-to-point connection communication technology, a multicast communication technology and a broadcast communication technology.
- 3. The method according to claim 2, wherein the point-to-point connection communication technology comprises any one or more of Bluetooth connection and star flash connection; The multicast communication technology comprises any one or more of Bluetooth multicast communication technology and star flash multicast communication technology; the broadcast communication technology comprises any one or more of Bluetooth broadcast communication technology and star flash broadcast communication technology.
- 4. A method according to any of claims 1-3, wherein before the first electronic device displays the first user interface of the first communication application, the method further comprises: The first electronic device displaying a second user interface of the first communication application, the second user interface including options of the second member; the first electronic device displays a first user interface of the first communication application, and specifically includes: The first electronic device receives and responds to a first operation of options for the second member, and displays the first user interface.
- 5. A method according to any of claims 1-3, wherein before the first electronic device displays the first user interface of the first communication application, the method further comprises: The first electronic device displaying a third user interface of the first communication application, the third user interface including an option of the first chat group, the first chat group including the first member and the second member; the first electronic device displays a first user interface of the first communication application, and specifically includes: The first electronic device receives and responds to a second operation of options for the first chat group, and displays the first user interface.
- 6. The method of claim 5, wherein the first chat group further comprises a third member, the method further comprising: In the case where the first electronic device and the third electronic device are not communicable through the server, the first electronic device transmits the first information to the third electronic device, which is a device of the third member, through the D2D communication technology.
- 7. A method according to any of claims 1-3, wherein before the first electronic device displays the first user interface of the first communication application, the method further comprises: The first electronic device displays a third user interface of the first communication application, the third user interface including options of the first chat group, the first chat group including the first member, the second member; The first electronic device receives and responds to a third operation, and sends first subgroup management information to the second electronic device, wherein the first subgroup management information is used for inviting the second member to join a first real-time intercom subgroup; the first electronic device displays the first user interface of the first communication application, and specifically includes: after the second member joins the first real-time intercom subgroup, the first electronic device displays the first user interface of the first communication application.
- 8. The method according to claim 7, wherein the first electronic device sends first subgroup management information to the second electronic device, specifically comprising: In the case that the first electronic device and the second electronic device can communicate through the server, the first electronic device sends the first subgroup management information to the second electronic device through the server; Or alternatively In the case where the first electronic device and the second electronic device are not communicable through the server, the first electronic device transmits the first subgroup management information to the second electronic device through the D2D communication technology.
- 9. The method of claim 8, wherein the first chat group further comprises a third member, the method further comprising: The first electronic device sends second subgroup management information to the third electronic device, wherein the second subgroup management information is used for inviting the third member to join the first real-time intercom subgroup; after the second member joins the first real-time intercom subgroup, the first electronic device displays the first user interface of the first communication application, comprising in particular: after the second member, the third member, and the first real-time intercom subgroup are joined, the first electronic device displays the first user interface of the first communication application.
- 10. The method according to claim 9, wherein the first electronic device sends second subgroup management information to the third electronic device, specifically comprising: In the case that the first electronic device and the third electronic device can communicate through the server, the first electronic device sends the second subgroup management information to the third electronic device through the server; Or alternatively In the case where the first electronic device and the third electronic device are not communicable through the server, the first electronic device transmits the second subgroup management information to the third electronic device through the D2D communication technology.
- 11. The method according to claim 9 or 10, characterized in that the method further comprises: in the case that the first electronic device and the third electronic device can communicate through the server, the first electronic device sends the first information to the third electronic device through the server; In the case where the first electronic device and the third electronic device are not communicable through the server, the first electronic device transmits the first information to the second electronic device through an end-to-end D2D communication technology.
- 12. The method of claim 9 or 10, wherein in the event that the first electronic device and the second electronic device are not communicable through the server, the first electronic device and the third electronic device are not communicable through the server, after the second member, the third member join the first real-time intercom subgroup, the method further comprises: The first electronic device sends third subgroup management information to devices of other members in the first chat group through the D2D communication technology, wherein the third subgroup management information comprises a first group member list; The first electronic device receives first subgroup member information sent by the second electronic device through the D2D communication technology, wherein the first subgroup member information comprises a first number of members with D2D communication capability with the second electronic device in the first real-time intercom subgroup; The first electronic device receives second subgroup member information sent by the third electronic device through the D2D communication technology, wherein the second subgroup member information comprises a second number of members with D2D communication capability with the third electronic device in the first real-time intercom subgroup.
- 13. The method of claim 12, wherein the first subgroup management information further comprises any one or more of a group ID of the first chat group, a number of the first real-time intercom subgroup, location information of the first electronic device, an account ID of the first member, a network identification of the first electronic device; And/or the number of the groups of groups, The first subgroup member information also comprises any one or more of the following information of the position of the second electronic equipment and the network identifier of the second electronic equipment; And/or the number of the groups of groups, The second subgroup member information further comprises any one or more of position information of the third electronic device and network identification of the third electronic device.
- 14. The method of claim 12 or 13, wherein the number of members in the first group member list is determined by the first electronic device based on the number of subgroup member information sent by the devices of other members in the first real-time intercom subgroup received by the first electronic device via the D2D communication technology; And/or the number of the groups of groups, The first number is determined by the second electronic device based on the first subgroup management information received by the second electronic device and the number of subgroup member information sent by other member devices in the first real-time intercom subgroup through the D2D communication technology; And/or the number of the groups of groups, The second number is determined by the third electronic device based on the first subgroup management information received by the third electronic device and the number of subgroup member information sent by the devices of other members in the first real-time intercom subgroup through the D2D communication technology.
- 15. The method of any of claims 7-14, wherein the first communication application further comprises a fourth member, the method further comprising: The first electronic device receives a first joining message sent by a fourth electronic device through the D2D communication technology, the fourth electronic device being a device of the fourth member, And responding to the first joining message, and if the first electronic equipment determines that the number of the members in the first real-time intercom subgroup is smaller than a first preset number, joining the fourth member into the first real-time intercom subgroup by the first electronic equipment.
- 16. The method of any of claims 12-14, wherein after the first electronic device receives the first subgroup member information sent by the second electronic device, the method further comprises: In the case that the number of the members in the first group member list is smaller than the first number, the first electronic device sends a first change sub-group main message to the second electronic device through the D2D communication technology, wherein the first change sub-group main message is used for indicating the second member to serve as a sub-group main of the real-time intercom sub-group; The first electronic device sends third subgroup member information to the second electronic device through the D2D communication technology, wherein the third subgroup member information comprises the number of members with D2D communication capability with the first electronic device in the first real-time intercom subgroup; The first electronic device receives fourth subgroup management information sent by the second electronic device through the D2D communication technology, wherein the fourth subgroup management information comprises a second group member list.
- 17. The method of any of claims 12-14, wherein after the first electronic device receives the first subgroup member information sent by the second electronic device, the method further comprises: The first electronic device receives a second change sub-group main message sent by the second electronic device through the D2D communication technology, wherein the second change sub-group main message is used for requesting the second member to serve as a sub-group main of the real-time intercom sub-group, and the second change sub-group main message is sent after the second electronic device confirms that the number of members in the first group member list is smaller than the first number; In the case that the number of the members in the first group member list is less than the first number, the first electronic device sends a first confirmation change sub-group main message to the second electronic device through the D2D communication technology, wherein the first confirmation change sub-group main message is used for indicating the second member to be a sub-group main of the real-time intercom sub-group; The first electronic device sends third subgroup member information to the second electronic device through the D2D communication technology, wherein the third subgroup member information comprises the number of members with D2D communication capability with the first electronic device in the first real-time intercom subgroup; the first electronic device receives fourth subgroup management information sent by the second electronic device through the D2D communication technology, the fourth subgroup management information comprises a second group member list, and the fourth subgroup management information is sent after the second electronic device receives the first confirmation change subgroup main message.
- 18. The method of claim 16 or 17, wherein after the first electronic device transmits third subgroup member information to the devices of other members of the first chat group via the D2D communication technology, the method further comprises: And under the condition that the fourth subgroup management information sent by the second electronic device is not received for more than a first time period and the number of members with D2D communication capability with the first electronic device is the largest in the first real-time intercom subgroup, the first electronic device sends fifth subgroup management information to the devices of other members in the first chat group through the D2D communication technology, and the fifth subgroup management information comprises a third group member list.
- 19. The method of any of claims 12-18, wherein the first real-time intercom subgroup comprises a first cluster and a second cluster, the cluster owner of the first cluster being the first electronic device and the cluster owner of the second cluster being the second electronic device, the first electronic device being configured to send sixth subgroup management information to devices of other members of the first cluster via the D2D communication technology, the second electronic device being configured to send seventh subgroup management information to devices of other members of the second cluster via the D2D communication technology; Wherein the sixth subgroup management information includes a fourth group member list, and the seventh subgroup management information includes a fifth group member list.
- 20. The method of claim 19, wherein the first communication application further comprises a fifth member, the method further comprising: The first electronic device receives a second joining message sent by the fifth electronic device through the D2D communication technology, wherein the fifth electronic device is a device of the fifth member; In response to the second join message, the first electronic device joins the fifth member in the first cluster if the first electronic device determines that the number of members in the first cluster is less than a second preset number.
Description
Equipment communication method and electronic equipment Technical Field The present application relates to the field of terminal technologies, and in particular, to a device communication method and an electronic device. Background With the development of terminal technology, electronic devices can communicate with each other through a network when the network exists. If one electronic device has a network, the other electronic device has no network, or neither electronic device has a network, communication between the two electronic devices is impossible. In some scenarios, for example, in a non-network scenario such as outdoor remote areas or off-country where roaming is not enabled or base stations are damaged, communication between electronic devices is not possible, which causes inconvenience to the life and security of users. Disclosure of Invention The application provides a device communication method and electronic equipment. The electronic devices of the contacts in the first communication application may dynamically switch communication modes based on the communication state, and the communication modes may include communication through a server and communication through a D2D communication technology, so as to enable communication between the electronic devices of the contacts in the first communication application. In a first aspect, the present application provides a device communication method. The method is applied to first electronic equipment, a first communication application is installed in the first electronic equipment, the method comprises the steps that the first electronic equipment displays a first user interface of the first communication application, the first user interface comprises information of a first member in the communication application and information of a second member, the first electronic equipment is equipment of the first member, the first electronic equipment receives the first information input by a user in the first user interface, the first electronic equipment sends the first information to the second electronic equipment through a server when the first electronic equipment and the second electronic equipment can communicate through the server, the second electronic equipment is equipment of the second member, and the first electronic equipment sends the first information to the second electronic equipment through an end-to-end D2D communication technology when the first electronic equipment and the second electronic equipment can not communicate through the server. Optionally, if the first electronic device is switched from a state in which the first electronic device can communicate with the second electronic device through the server to a state in which the first electronic device cannot communicate with the second electronic device through the server, the first electronic device may switch to the D2D communication technology to communicate with the second electronic device. If the first electronic device is switched from a state in which the first electronic device can not communicate with the second electronic device through the server to a state in which the first electronic device can communicate with the second electronic device through the server, the first electronic device can be switched to communicate with the second electronic device through the server. That is, the first electronic device and the second electronic device may dynamically switch communication modes. The first electronic device sends first information to the second electronic device through the server, wherein the first electronic device sends the first information to the second electronic device through the server based on any one of a cellular network, a local area network and a fixed network, and the D2D communication technology comprises any one or more of a point-to-point connection communication technology, a multicast communication technology and a broadcast communication technology. The point-to-point connection communication technology comprises any one or more of Bluetooth connection and star flash connection, the multicast communication technology comprises any one or more of Bluetooth multicast communication technology and star flash multicast communication technology, and the broadcast communication technology comprises any one or more of Bluetooth broadcast communication technology and star flash broadcast communication technology. Optionally, the first electronic device sends the first information to the second electronic device through an end-to-end D2D communication technology, which may also mean that the first electronic device sends the first information to the second electronic device based on the end-to-end D2D communication technology through a mode of transferring between other devices. According to the method, the electronic equipment of the contact person in the first communication application can dynamically switch communication modes based on the commun