WO2022171009A1 - 通信方法及电子设备 - Google Patents
通信方法及电子设备 Download PDFInfo
- Publication number
- WO2022171009A1 WO2022171009A1 PCT/CN2022/074686 CN2022074686W WO2022171009A1 WO 2022171009 A1 WO2022171009 A1 WO 2022171009A1 CN 2022074686 W CN2022074686 W CN 2022074686W WO 2022171009 A1 WO2022171009 A1 WO 2022171009A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- forwarding path
- terminal
- path
- target
- forwarding
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/70—Services for machine-to-machine communication [M2M] or machine type communication [MTC]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72469—User interfaces specially adapted for cordless or mobile telephones for operating the device by selecting functions from two or more displayed items, e.g. menus or icons
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/24—Multipath
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72448—User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
- H04M1/72454—User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72484—User interfaces specially adapted for cordless or mobile telephones wherein functions are triggered by incoming communication events
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N7/00—Television systems
- H04N7/14—Systems for two-way working
- H04N7/141—Systems for two-way working between two video terminals, e.g. videophone
- H04N7/147—Communication arrangements, e.g. identifying the communication as a video-communication, intermediate storage of the signals
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N7/00—Television systems
- H04N7/14—Systems for two-way working
- H04N7/15—Conference systems
- H04N7/152—Multipoint control units therefor
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W40/00—Communication routing or communication path finding
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W40/00—Communication routing or communication path finding
- H04W40/02—Communication route or path selection, e.g. power-based or shortest path routing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W40/00—Communication routing or communication path finding
- H04W40/02—Communication route or path selection, e.g. power-based or shortest path routing
- H04W40/12—Communication route or path selection, e.g. power-based or shortest path routing based on transmission quality or channel quality
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W40/00—Communication routing or communication path finding
- H04W40/02—Communication route or path selection, e.g. power-based or shortest path routing
- H04W40/22—Communication route or path selection, e.g. power-based or shortest path routing using selective relaying for reaching a BTS [Base Transceiver Station] or an access point
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/12—Shortest path evaluation
- H04L45/124—Shortest path evaluation using a combination of metrics
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/24—Traffic characterised by specific attributes, e.g. priority or QoS
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/28—Flow control; Congestion control in relation to timing considerations
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72403—User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
- H04M1/7243—User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages
- H04M1/72439—User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages for image or video messaging
Definitions
- the present application relates to the field of communication technologies, and in particular, to a communication method and an electronic device.
- terminals such as mobile phones to make calls such as video and voice with other users.
- voice or video calls as the service types of terminals become more and more abundant, the network topology and network environment become more and more complex, and the communication efficiency between terminals is currently not high.
- terminals such as mobile phones to communicate with other users such as video calls.
- scenarios such as a video call may include a multi-party communication scenario, which is a scenario involving communication between multiple terminals, such as a multi-party video call and a multi-party voice call.
- a multi-party video call a communication connection needs to be established between every two terminals in order to transfer data between the two terminals.
- a peer-to-peer (P2P) channel may be established between two terminals, and data such as video and audio between the two terminals may be transmitted through the P2P channel. It can be understood that when the number of terminals involved in the multi-party video call is larger, it is very likely that a P2P channel cannot be established between some terminals.
- a relay server needs to be deployed, so that the terminals that cannot communicate directly use the relay server to forward corresponding data.
- deploying more relay servers means increasing the complexity and cost of networking.
- the load of the relay server is often high, which affects the performance of the relay server.
- multiple terminals compete for communication resources such as the bandwidth of the relay server, which is very likely to cause some problems. The terminal cannot obtain enough communication resources and the communication efficiency is reduced.
- CRBT service that is, after the user selects and sets multimedia files such as CRBT music or video, when someone else calls the user, the other user, that is, the calling user, can hear the music preset by the called user or watch the preset video.
- Color vibration service that is, the calling user subscribes to multimedia resources (such as video, music), when the calling user initiates a call to the called user, the called user's terminal plays the multimedia resources ordered by the calling user.
- the present application provides a communication method and electronic device, which can improve the communication efficiency between terminals in communication scenarios such as video calls and voice calls.
- a communication method is provided.
- the method is applied to a first terminal or a component (such as a chip of the first terminal) that can be matched and used with the first terminal to realize the function of the first terminal.
- a component such as a chip of the first terminal
- the method includes:
- each first forwarding path in the at least one first forwarding path is available is used to carry the message between the first terminal and the second terminal;
- the path query response is used to indicate the at least one first forwarding path;
- each first forwarding path in the at least one first forwarding path consists of
- the multi-party communication is composed of a plurality of established point-to-point P2P links; and the message is sent through the target forwarding path in the at least one first forwarding path.
- the first terminal and the second terminal can be transferred by means of the established P2P link in the multi-party communication. data between terminals.
- the terminal because the terminal does not need to compete with other terminals for communication resources such as the bandwidth of the relay server, the communication resources of the terminal are guaranteed as much as possible, thereby improving the communication efficiency between the terminals.
- the first forwarding path is one.
- the method further includes:
- the target forwarding path is selected from the plurality of first forwarding paths
- the preset parameters include link-level parameters and/or path-level parameters, and for each first forwarding path, the link-level parameters include one or any combination of the following parameters: P2P composing the first forwarding path The delay of the link, the quality of service (QoS) of the P2P link that forms the first forwarding path, and the network type of the P2P link that forms the first forwarding path; the network type includes a wireless high-fidelity Wi-Fi network or a cellular network ;
- the path level parameter includes the number of transit devices of the first forwarding path.
- selecting the target forwarding path from the plurality of first forwarding paths includes:
- the preset strategy includes one or any combination of the following strategies: the delay of the target forwarding path is the lowest, the delay of the target forwarding path is less than or equal to the upper limit of the delay threshold, and the QoS of the target forwarding path is the best , the QoS value of the target forwarding path is within the preset QoS value range, the number of transit devices of the target forwarding path is the least, the number of transit devices of the target forwarding path is within the preset number range, and the number of transit devices of the target forwarding path is within the range of the preset number.
- the network type of the first P2P link is a preset network type; the preset network type includes a Wi-Fi network; the first P2P link is a P2P link connected by the first terminal or a P2P link connected by the second terminal P2P link.
- the target forwarding path is: the network type of the first P2P link is the first forwarding path with the lowest delay among the first forwarding paths of the preset network type; the first P2P link a P2P link connected to the first terminal or a P2P link connected to the second terminal;
- the target forwarding path is: the network type of the first P2P link is the first forwarding path with the best QoS among the first forwarding paths of the preset network type;
- the target forwarding path is: the network type of the first P2P link is the first forwarding path with the smallest number of transit devices in the first forwarding path of the preset network type;
- the target forwarding path is: the first forwarding path with the lowest delay among the first forwarding paths whose QoS value is within the range of the preset QoS value;
- the target forwarding path is: the first forwarding path with the smallest number of transit devices among the first forwarding paths whose QoS value is within the range of the preset QoS value;
- the target forwarding path is: the network type of the first P2P link in the first forwarding path whose QoS value is within the range of the preset QoS value is the first forwarding path of the preset network type;
- the target forwarding path is: the network type of the first P2P link in the first forwarding path whose delay is less than or equal to the delay threshold is the first forwarding path of the preset network type;
- the target forwarding path is: the first forwarding path with the best QoS among the first forwarding paths whose delay is less than or equal to the delay threshold;
- the target forwarding path is: the first forwarding path with the smallest number of transit devices among the first forwarding paths whose delay is less than or equal to the delay threshold;
- the target forwarding path is: the first forwarding path with the lowest delay among the first forwarding paths whose number of transit devices is within a preset number range;
- the target forwarding path is: a first forwarding path with the best QoS among the first forwarding paths whose number of transit devices is within a preset number range;
- the target forwarding path is: the network type of the first P2P link in the first forwarding path in which the number of transit devices is within a preset number range is the first forwarding path of the preset network type.
- each first forwarding path in the multiple first forwarding paths has a corresponding weight value, and the weight value of the first forwarding path is used to represent the quality of the first forwarding path ;
- the weight value W of the first forwarding path satisfies the following relationship:
- pi is the quantized value of the i -th link level parameter
- wi is the weight corresponding to pi
- N is the number of link level parameters
- M is the number of P2P links that form the first forwarding path
- the target forwarding path is a first forwarding path whose path quality represented by a weight value in the plurality of first forwarding paths is higher than a threshold.
- each first forwarding path has a corresponding weight value, and the weight value of the first forwarding path is used to represent the quality of the first forwarding path; the weight of the first forwarding path
- the value W satisfies the following relationship:
- pi is the quantized value of the i -th link level parameter
- wi is the weight corresponding to pi
- N is the number of link level parameters
- M is the number of P2P links forming the first forwarding path
- n relay is the quantized value of the path level parameter of the first forwarding path, and w relay is the weight corresponding to n relay ;
- the target forwarding path is a first forwarding path whose path quality represented by a weight value in the plurality of first forwarding paths is higher than a threshold.
- the message carries the target forwarding path or the target subpath
- the target forwarding path is composed of M P2P links; the source node of the target forwarding path is the first terminal, and the destination node of the target forwarding path is the second terminal; the target subpath is composed of all The adjacent M-1 P2P links in the M P2P links are formed, the source node of the target subpath is the next hop terminal of the first terminal, and the destination node of the target subpath is the The second terminal; M is an integer greater than or equal to 2.
- the sending a path query request to the server includes:
- the path query request is sent to the server.
- the present application provides a communication method, which is applied to a third terminal or a component (such as a chip of the third terminal) that can be matched and used with the third terminal to implement the functions of the third terminal.
- a third terminal or a component (such as a chip of the third terminal) that can be matched and used with the third terminal to implement the functions of the third terminal.
- the third terminal is located on the target forwarding path, and the method includes:
- the target forwarding path is composed of M P2P links; the source node of the target forwarding path is the first terminal, and the target forwarding path is the first terminal.
- the destination node of the forwarding path is the second terminal;
- the destination sub-path is composed of N adjacent P2P links in the M P2P links, and the source node of the destination sub-path is the third terminal , the destination node of the target subpath is the second terminal;
- M is an integer greater than or equal to 2
- N is a positive integer, and N is less than M;
- the packet is sent according to the second forwarding path.
- a communication method is provided, the method is applied to a server or a component (such as a chip of a server) that can be matched and used with the server to implement server functions, and the method includes:
- a path query request is received from the first terminal; the path query request is used to request at least one first forwarding path; each first forwarding path in the at least one first forwarding path can be used to carry the first terminal and the second forwarding path messages between terminals;
- a path query response is sent to the first terminal, where the path query response is used to indicate the at least one first forwarding path; It consists of established P2P links.
- the first forwarding path is one;
- the method further includes: selecting the first forwarding path from a plurality of available forwarding paths according to preset parameters; the available forwarding path can be used to carry packets between the first terminal and the second terminal forwarding path;
- the preset parameters include link-level parameters and/or path-level parameters, and for each available forwarding path, the link-level parameters include one or any combination of the following parameters: P2P links forming the available forwarding path time delay, quality of service QoS of the P2P link constituting the available forwarding path, network type of the P2P link constituting the available forwarding path; the network type includes a wireless high-fidelity Wi-Fi network or a cellular network; the path
- the level parameter includes the number of transit devices of the available forwarding path.
- selecting the first forwarding path from multiple available forwarding paths according to preset parameters includes:
- the preset strategy includes one or any combination of the following strategies: the delay of the first forwarding path is the lowest, the delay of the first forwarding path is less than or equal to the upper limit of the delay threshold, the delay of the first forwarding path is the lowest.
- the QoS is the best, the QoS value of the first forwarding path is within a preset range, the number of transit devices on the first forwarding path is the least, the number of transit devices on the first forwarding path is within a preset number range, the
- the network type of the first P2P link of the first forwarding path is a preset network type; the preset network type includes a Wi-Fi network; the first P2P link is a P2P link connected to the first terminal or the The P2P link to which the second terminal is connected.
- each available forwarding path has a corresponding weight value
- the weight value is used to represent the quality of the available forwarding path
- the weight value of the available forwarding path W satisfies the following relationship:
- pi is the quantized value of the i -th link level parameter
- wi is the weight corresponding to pi
- N is the number of link level parameters
- M is the number of P2P links forming the available forwarding path
- the first forwarding path is an available forwarding path whose path quality represented by a weight value is higher than a threshold among the multiple available forwarding paths.
- each available forwarding path has a corresponding weight value
- the weight value is used to represent the quality of the available forwarding path
- the weight value of the available forwarding path W satisfies the following relationship:
- pi is the quantized value of the i -th link level parameter
- wi is the weight corresponding to pi
- N is the number of link level parameters
- M is the number of P2P links that form the available forwarding path
- n relay is the quantized value of the path level parameter of the available forwarding path
- w relay is n The weight corresponding to the relay ;
- the first forwarding path is an available forwarding path whose path quality represented by a weight value is higher than a threshold among the multiple available forwarding paths.
- the method further includes:
- a link level parameter corresponding to the connected P2P link is received from each terminal that has established a P2P link in the multi-party communication.
- the method further includes:
- the preset policy is received from the first terminal.
- a communication device where the communication terminal may be a first terminal or a component (such as a chip of the first terminal) that can be matched and used with the first terminal to realize the function of the first terminal.
- the communication terminal includes:
- a sending unit configured to send a path query request to the server, where the path query request is used to request at least one first forwarding path; each first forwarding path in the at least one first forwarding path can be used to carry the first terminal messages with the second terminal;
- a receiving unit configured to receive a path query response from the server; the path query response is used to indicate the at least one first forwarding path; each first forwarding path in the at least one first forwarding path is sent by the multiple parties It is composed of multiple established point-to-point P2P links in communication;
- the sending unit is further configured to send the message through the target forwarding path in the at least one first forwarding path.
- a communication device where the communication terminal may be a third terminal or a component (such as a chip of the third terminal) that can be matched and used with the third terminal to realize the functions of the third terminal.
- the communication terminal is located on the target forwarding path, and the third terminal includes:
- a receiving unit configured to receive a packet sent by the first terminal to the second terminal through the target forwarding path, where the packet carries a second forwarding path; the second forwarding path is the target forwarding path or a target subpath ;
- the target forwarding path is used to carry the message between the first terminal and the second terminal, and the target forwarding path is composed of M P2P links;
- the source node of the target forwarding path is the first terminal, the target node of the target forwarding path is the second terminal;
- the target subpath is composed of N adjacent P2P links in the M P2P links, and the source node of the target subpath is
- the destination node of the target subpath is the second terminal;
- M is an integer greater than or equal to 2
- N is a positive integer, and N is less than M;
- a sending unit configured to send a packet according to the second forwarding path.
- a communication device in a sixth aspect, is provided, and the communication terminal may be a server or a component (such as a chip of the server) that can be matched and used with the server to realize the function of the server.
- the communication terminal may be a server or a component (such as a chip of the server) that can be matched and used with the server to realize the function of the server.
- the server includes:
- a receiving unit configured to receive a path query request from a first terminal; the path query request is used to request at least one first forwarding path; each first forwarding path in the at least one first forwarding path can be used to carry the first forwarding path A message between a terminal and a second terminal;
- a sending unit configured to send a path query response to the first terminal in response to the path query request, where the path query response is used to indicate the at least one first forwarding path; each first forwarding path is sent by the It is composed of multiple established P2P links in multi-party communication.
- a communication device in a seventh aspect, includes a module for implementing any possible method of the above-mentioned first aspect, or, the communication device includes a module for implementing any possible method of the above-mentioned second aspect, or, the communication device
- the apparatus includes means for implementing any possible method of the third aspect above.
- a communication method is provided, the method is applied to a first terminal or a device (such as a chip of the first terminal) that can be matched and used with the first terminal to realize the function of the first terminal, and the method includes: When a call occurs between the first terminal and the second terminal, prompt information is displayed on the call interface of the call, and the prompt information is used to prompt that the state information corresponding to the second terminal can be obtained; When the interface detects a user operation instruction for instructing to acquire the state information corresponding to the second terminal, the interface acquires the state information corresponding to the second terminal; and presents the state information corresponding to the second terminal.
- the status information corresponding to the communication peer can be acquired and presented in the call scene, that is, the shared ring tone/color tone information between the calling party and the called party is no longer the same, but can share each other's information. status, which helps to improve communication efficiency. For example, if the calling party knows that the called party is in the conference by acquiring and presenting the state information of the called party, the calling user does not need to wait for the called party to connect the call, but can hang up the call and call the called party later. Users, in this way, avoid wasting waiting time, save user time, and improve communication efficiency.
- the called party learns that the calling user who initiated the call is in a good mood at the moment, and the called party can choose to connect the call immediately and communicate with the calling user to improve communication efficiency.
- the user's audio-visual requirements can be met, and the user's audio-visual experience can be improved.
- the call between the first terminal and the second terminal includes:
- the first terminal initiates a call to the second terminal; or, the first terminal receives a call initiated by the second terminal.
- the acquiring the state information corresponding to the second terminal includes:
- An acquisition request is sent to the state server, where the acquisition request is used to request to acquire the state information corresponding to the second terminal, and the state information corresponding to the second terminal is received from the state server.
- the first terminal can actively initiate an acquisition request to the state server, so that the first terminal can acquire the latest state information corresponding to the second terminal with higher accuracy.
- the acquiring the state information corresponding to the second terminal includes: acquiring the state information corresponding to the second terminal stored in the first terminal and acquired in advance from the state server.
- the presenting the state information corresponding to the second terminal includes:
- the first terminal can present status information corresponding to the second terminal in various ways, so that the user's audiovisual experience can be improved.
- the status information corresponding to the second terminal includes status information of the second terminal and/or status information of a user of the second terminal.
- the status information of the second terminal includes at least one of the following information: location, environment information, power, and signal quality; and/or, the status information of the user of the second terminal includes At least one item of the following information: activities performed by the user, health status, and mood.
- the state information corresponding to the second terminal includes at least one of the following information: text, picture, audio, video, link, and applet.
- the multimedia content displayed by the terminal to the user is not limited to a specific type.
- it can display more colorful content forms such as text, photos, user-defined audio, and user-defined video, and the display method is more flexible.
- the presenting prompt information on the call interface of the call includes:
- the prompt information is presented on the call interface through text; or, the prompt information is presented on the call interface through a preset icon effect.
- the method further includes:
- a first comment message is sent to a message server, where the first comment message includes the first comment information, and the first comment message further includes the first state information or an identifier of the first state information.
- the method further includes:
- the acquiring state information corresponding to the first terminal includes:
- the internal component includes at least one of the following components: a sensor, a camera, and a position positioning component.
- the method further includes:
- the content of the second comment message is presented.
- the state server and the message server are the same server.
- the present application provides a communication method, which is applied to a first terminal or a device (such as a chip of the first terminal) that can be matched and used with the first terminal to realize the function of the first terminal, and the method includes:
- the call between the first terminal and the second terminal includes:
- the first terminal initiates a call to the second terminal; or, the first terminal receives a call initiated by the second terminal.
- the acquiring state information corresponding to the second terminal includes:
- the acquisition request is used to request acquisition of status information corresponding to the second terminal, and receive status information corresponding to the second terminal from the status server; or, acquire the first terminal Stored state information corresponding to the second terminal obtained in advance from the state server.
- the present application provides a communication system, the communication system includes a state server and a plurality of communication terminals, the plurality of communication terminals include a first terminal and a second terminal;
- the second terminal configured to send the status information corresponding to the second terminal to the status server;
- the state server configured to receive state information corresponding to the second terminal, and further configured to send the state information corresponding to the second terminal to the first terminal;
- the first terminal is configured to present prompt information on the call interface of the call when a call occurs between the first terminal and the second terminal, where the prompt information is used to prompt that the second terminal can be acquired
- the corresponding state information is also used to acquire the state information corresponding to the second terminal and present the state information corresponding to the second terminal when a user operation instruction for instructing to acquire the state information corresponding to the second terminal is detected through the call interface.
- Status information corresponding to the second terminal wherein the status information corresponding to the second terminal comes from the status server.
- the present application provides a communication device, which may be a first terminal or a component (such as a chip of the first terminal) that can be matched and used with the first terminal to realize the function of the first terminal.
- a communication device which may be a first terminal or a component (such as a chip of the first terminal) that can be matched and used with the first terminal to realize the function of the first terminal.
- the first terminal includes:
- a presentation unit configured to present prompt information on the call interface of the call when a call occurs between the first terminal and the second terminal, where the prompt information is used to prompt that the state corresponding to the second terminal can be obtained information;
- an acquiring unit configured to acquire the state information corresponding to the second terminal when a user operation instruction for instructing to acquire the state information corresponding to the second terminal is detected through the call interface;
- the presenting unit is further configured to present status information corresponding to the second terminal.
- the present application provides a communication device, which may be a first terminal or a component (such as a chip of the first terminal) that can be matched and used with the first terminal to realize the function of the first terminal.
- a communication device which may be a first terminal or a component (such as a chip of the first terminal) that can be matched and used with the first terminal to realize the function of the first terminal.
- the first terminal includes:
- an acquiring unit configured to acquire state information corresponding to the second terminal when a call occurs between the first terminal and the second terminal;
- a presentation unit configured to present status information corresponding to the second terminal.
- the present application provides an electronic device, the electronic device comprising: a processor and a memory, the memory is coupled to the processor, the memory is used for storing computer program code, and the computer program code includes a computer Instructions, when the processor reads the computer instructions from the memory, so that the electronic device performs the communication method according to any one of the eighth aspects, or performs any one of the ninth aspects. the described communication method.
- the present application provides a computer storage medium, comprising computer instructions, when the computer instructions are run on a terminal, the terminal is made to execute the communication method according to any one of the eighth aspects, or to execute The communication method according to any one of the ninth aspects.
- the present application provides a computer program product, which, when the computer program product runs on a computer, causes the computer to execute the communication method according to any one of the eighth aspects, or to execute the communication method as described in the ninth aspect.
- a sixteenth aspect provides a communication device comprising a module for implementing any one of the possible designs of the eighth aspect.
- a seventeenth aspect provides a communication device comprising a module for implementing any one of the possible designs of the ninth aspect.
- An eighteenth aspect provides an electronic device, comprising: a processor and a memory, the memory is coupled to the processor, the memory is used for storing computer program code, the computer program code includes computer instructions, when the The processor reads the computer instructions from the memory to cause the electronic device to perform a method as described in any of the above aspects and any of the possible implementations.
- an apparatus is provided, the apparatus is included in an electronic device, and the apparatus has the function of implementing any of the methods in the above-mentioned aspects and possible implementation manners.
- This function can be implemented by hardware or by executing corresponding software by hardware.
- the hardware or software includes at least one module or unit corresponding to the above-mentioned functions. For example, a receiving module or unit, a display module or unit, an acquisition module or unit, and a sending module or unit, etc.
- a twentieth aspect provides a computer-readable storage medium comprising computer instructions that, when executed on a computer, cause the computer to perform the method described in any of the above aspects and any of the possible implementations.
- a twenty-first aspect provides a computer program product that, when the computer program product runs on a computer, causes the computer to perform the method described in the above aspects and any of the possible implementations.
- a twenty-second aspect provides a chip system, including a processor, when the processor executes an instruction, the processor executes the method described in the above aspect and any one of the possible implementation manners.
- FIG. 1 is a schematic diagram of a connection mode between terminals according to an embodiment of the present application
- FIG. 2 and FIG. 3 are schematic diagrams 1 of a communication system architecture provided by an embodiment of the present application.
- FIG. 4 is a schematic structural diagram of a terminal according to an embodiment of the present application.
- FIG. 5 is a schematic diagram 1 of a software structure of a terminal according to an embodiment of the present application.
- FIG. 6-1 and FIG. 6-2 are schematic structural diagrams 1 of a server provided by an embodiment of the present application.
- FIG. 7 and FIG. 8 are schematic flowcharts of initiating multi-party communication provided by the embodiments of the present application.
- FIG. 9 is a schematic diagram of communication between terminals before a multi-party call is connected to the establishment of a P2P connection according to an embodiment of the present application.
- FIG. 10 is a schematic flowchart of a P2P connection establishment provided by an embodiment of the present application.
- FIG. 11 is a schematic diagram of a P2P connection establishment situation between terminals according to an embodiment of the present application.
- FIG. 12-1 and FIG. 12-2 are schematic diagrams of scenarios of the communication method provided by the embodiment of the present application.
- 12-3 is a schematic diagram of a licensed undirected graph provided by an embodiment of the present application.
- FIG. 13 is a schematic flowchart 1 of a communication method provided by an embodiment of the present application.
- FIG. 14 is a schematic diagram of a conventional method for multi-party communication by means of relay;
- FIG. 15-FIG. 17 is a schematic structural diagram 1 of a communication device provided by an embodiment of the present application.
- FIG. 18 is a schematic diagram of a chip system provided by an embodiment of the present application.
- FIG. 19 is a second schematic diagram of a system architecture provided by an embodiment of the present application.
- FIG. 20 is a second schematic diagram of a software architecture of a terminal according to an embodiment of the present application.
- FIG. 21 is a second schematic structural diagram of a server provided by an embodiment of the present application.
- FIG. 22 is a schematic diagram of status information provided by an embodiment of the present application.
- FIG. 23-1, FIG. 23-2, and FIG. 24 are schematic diagrams of scenarios for user input status information provided by an embodiment of the present application.
- 25 is a schematic diagram of obtaining status information through an instruction input by a user provided by an embodiment of the present application.
- 26 is a schematic diagram of acquiring status information through hardware provided by an embodiment of the present application.
- FIG. 27 is a schematic diagram of interaction between a terminal and a server according to an embodiment of the present application.
- Figures 28-1 to 28-6 are schematic diagrams of scenarios for acquiring and presenting status information according to an embodiment of the present application.
- FIG. 29 and FIG. 30 are schematic diagrams of using the authority of the status information provided by the embodiment of the present application.
- FIG. 31 is a schematic diagram of a call connection scenario provided by an embodiment of the present application.
- 32 is a schematic diagram of acquiring status information through an external device provided by an embodiment of the present application.
- FIG. 34 is a second schematic structural diagram of a communication apparatus provided by an embodiment of the present application.
- first and second are only used for descriptive purposes, and should not be construed as indicating or implying relative importance or implicitly indicating the number of indicated technical features.
- a feature defined as “first” or “second” may expressly or implicitly include one or more of that feature.
- plural means two or more.
- words such as “exemplary” or “for example” are used to represent examples, illustrations or illustrations. Any embodiments or designs described in the embodiments of the present application as “exemplary” or “such as” should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as “exemplary” or “such as” is intended to present the related concepts in a specific manner.
- different information may be carried by the same message, or may be carried by different messages respectively.
- This embodiment of the present application does not limit the specific bearing manner of the information.
- the P2P communication mode as a common communication mode in the field of computer networks, enables direct communication between devices to realize resource sharing and information exchange through a P2P channel (or P2P connection) between devices.
- FIG. 1 is a connection relationship between multiple terminals in a multi-party video call scenario.
- P2P channels are successfully established between terminal A and terminal B, terminal B and terminal E, terminal D and terminal C, terminal D and terminal A, terminal D and terminal B, and terminal D and terminal E.
- a relay channel is established between terminal A and terminal C, terminal A and terminal E, terminal C and terminal B, and terminal C and terminal E by means of a relay server.
- the signaling flow shown in FIG. 1 is used for the relay server to establish a relay channel with the corresponding terminal.
- the relay server needs to provide resources such as bandwidth to the corresponding terminal to establish a relay channel between the terminal and the relay server, so that the terminal can communicate with other terminals through the relay server through the relay channel. It can be seen that, due to the need to establish a relay channel, the resource consumption of a single relay server is usually large. In addition, with the proliferation of multi-party communication services such as multi-party video calls, the number of relay servers that need to be deployed is also increasing, which increases the complexity and cost of networking, and is not conducive to subsequent network maintenance.
- the embodiments of the present application provide a communication method, which can hand over the relay role of the relay server to one or more terminals that have established P2P links, that is, forwarding through one or more P2P links There is no need to forward data between terminals by means of a relay server. Therefore, the number of deployment servers can be reduced, thereby reducing the complexity and cost of networking.
- the communication system includes a terminal (such as the terminal 100a, the terminal 200a, and the terminal 400 shown in FIG. 1) and a server 300a.
- a direct P2P connection can be established between the terminals, and communication is performed through the P2P connection.
- a direct P2P connection is established between the terminal 100a and the terminal 200a. Therefore, the service packets between the terminal 100a and the terminal 200a can be transmitted through the P2P connection.
- a terminal that has established a P2P connection can be used as a relay for communication between other terminals.
- the terminal 100a can be used as a relay for the communication between the terminal 200a and the terminal 400, taking the terminal 200a sending a service packet to the terminal 400 as an example, that is, the terminal 200a first sends the terminal 100a to the terminal 100a through a direct P2P connection with the terminal 100a.
- the service packet is sent, and the terminal 100a forwards the service packet to the terminal 400 through the direct P2P connection with the terminal 400 .
- the terminals may communicate through the server 300a, that is, the server 300a acts as a relay for communication between the terminals.
- the terminal 400 sends the service packet to the terminal 200a, that is, the terminal 400 first sends the service packet to the server 300a, and then the server 300a forwards the service packet to the terminal 200a.
- the terminal 100a may establish a connection with the server 300a through one or more networks.
- the network may be a local area network (LAN) or a wide area network (WAN), such as the Internet.
- the network may be implemented using any known network communication protocol, which may be various wired or wireless communication protocols, such as Ethernet, universal serial bus (USB), FireWire, any cellular Internet communication protocol (such as 3G/4G/5G/future communication technology), Bluetooth, wireless fidelity (Wi-Fi), NFC or any other suitable communication protocol.
- FIG. 3 it is a schematic diagram of the architecture of another communication system provided by this embodiment of the present application.
- the system includes terminals (eg, terminal 100a, terminal 200a, and terminal 400), server 300a, and network address translation (NAT) devices (eg, NAT device 500, NAT device 600).
- terminals eg, terminal 100a, terminal 200a, and terminal 400
- server 300a e.g., server 300a
- NAT network address translation
- the terminal 100a and the terminal 200a are connected to different NAT devices, and it can be considered that the terminal 100a and the terminal 200a are in different intranets. Since different intranets may have different private Internet Protocol (IP) addresses, in order to enable the terminal 100a and the terminal 200a to communicate, NAT technology needs to be introduced, that is, the private IP addresses of the respective intranets are converted into their respective private IP addresses. The public IP address of the external network.
- IP Internet Protocol
- a P2P connection between the terminal 100a and the terminal 200a can be established.
- NAT traversal technology is introduced, and the server is used as an intermediary device to open up P2P connections between terminals in different intranets.
- the specific implementation of establishing a P2P connection between terminals through the NAT traversal technology will be described in detail below.
- the above-mentioned terminal may be, for example, a mobile phone, a tablet computer, a personal computer (PC), a personal digital assistant (PDA), a smart watch, a netbook, a wearable electronic device, an augmented reality technology (augmented reality, AR) equipment, virtual reality (virtual reality, VR) equipment, in-vehicle equipment, smart cars, smart audio, robots, etc., this application does not make special restrictions on the specific form of the terminal.
- augmented reality technology augmented reality, AR
- VR virtual reality
- in-vehicle equipment smart cars, smart audio, robots, etc.
- FIG. 4 shows a schematic diagram of the hardware structure of the above-mentioned terminal 100a.
- the structure of other terminals please refer to the structure of the terminal 100a.
- the terminal 100a may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, Mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, buttons 190, motor 191, indicator 192, camera 193, display screen 194, and user Identity module (subscriber identification module, SIM) card interface 195 and so on.
- SIM subscriber identification module
- the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and ambient light. Sensor 180L, bone conduction sensor 180M, etc.
- the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the terminal 100a.
- the terminal 100a may include more or less components than those shown in the drawings, or combine some components, or separate some components, or arrange different components.
- the illustrated components may be implemented in hardware, software, or a combination of software and hardware.
- the processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (neural-network processing unit, NPU), etc. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
- application processor application processor, AP
- modem processor graphics processor
- ISP image signal processor
- controller video codec
- digital signal processor digital signal processor
- baseband processor baseband processor
- neural-network processing unit neural-network processing unit
- the controller can generate an operation control signal according to the instruction operation code and timing signal, and complete the control of fetching and executing instructions.
- a memory may also be provided in the processor 110 for storing instructions and data.
- the memory in processor 110 is cache memory. This memory may hold instructions or data that have just been used or recycled by the processor 110 . If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby increasing the efficiency of the system.
- the processor 110 may include one or more interfaces.
- the interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transceiver (universal asynchronous transmitter) receiver/transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and / or universal serial bus (universal serial bus, USB) interface, etc.
- I2C integrated circuit
- I2S integrated circuit built-in audio
- PCM pulse code modulation
- PCM pulse code modulation
- UART universal asynchronous transceiver
- MIPI mobile industry processor interface
- GPIO general-purpose input/output
- SIM subscriber identity module
- USB universal serial bus
- the USB interface 130 is an interface that conforms to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like.
- the USB interface 130 can be used to connect a charger to charge the terminal 100a, and can also be used to transmit data between the terminal 100a and peripheral devices. It can also be used to connect headphones to play audio through the headphones.
- the interface can also be used to connect other electronic devices, such as AR devices.
- the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration, and does not constitute a structural limitation of the terminal 100a.
- the terminal 100a may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
- the charging management module 140 is used to receive charging input from the charger.
- the charger may be a wireless charger or a wired charger.
- the charging management module 140 may receive charging input from the wired charger through the USB interface 130 .
- the charging management module 140 may receive wireless charging input through the wireless charging coil of the terminal 100a. While the charging management module 140 charges the battery 142 , it can also supply power to the terminal through the power management module 141 .
- the power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 .
- the power management module 141 receives input from the battery 142 and/or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160.
- the power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, battery health status (leakage, impedance).
- the power management module 141 may also be provided in the processor 110 .
- the power management module 141 and the charging management module 140 may also be provided in the same device.
- the wireless communication function of the terminal 100a may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modulation and demodulation processor, the baseband processor, and the like.
- Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
- Each antenna in terminal 100a may be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
- the antenna 1 can be multiplexed as a diversity antenna of the wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
- the mobile communication module 150 may provide a wireless communication solution including 2G/3G/4G/5G etc. applied on the terminal 100a.
- the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA) and the like.
- the mobile communication module 150 can receive electromagnetic waves from the antenna 1, filter and amplify the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation.
- the mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and then turn it into an electromagnetic wave for radiation through the antenna 1 .
- at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110 .
- at least part of the functional modules of the mobile communication module 150 may be provided in the same device as at least part of the modules of the processor 110 .
- the modem processor may include a modulator and a demodulator.
- the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal.
- the demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing.
- the low frequency baseband signal is processed by the baseband processor and passed to the application processor.
- the application processor outputs sound signals through audio devices (not limited to the speaker 170A, the receiver 170B, etc.), or displays images or videos through the display screen 194 .
- the modem processor may be a stand-alone device.
- the modem processor may be independent of the processor 110, and may be provided in the same device as the mobile communication module 150 or other functional modules.
- the wireless communication module 160 may provide applications on the terminal 100a including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions.
- WLAN wireless local area networks
- BT wireless fidelity
- GNSS global navigation satellite system
- frequency modulation frequency modulation, FM
- NFC near field communication technology
- infrared technology infrared, IR
- the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
- the wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 .
- the wireless communication module 160 can also receive the signal to be sent from the processor 110 , perform frequency modulation on it, amplify it, and convert it into electromagnetic waves
- the terminal 100a may establish a wireless connection with other terminals or servers through the wireless communication module 160 (such as a WLAN module) and the antenna 2 to implement communication between the terminal 100a and other terminals or servers.
- the wireless communication module 160 such as a WLAN module
- the antenna 1 of the terminal 100a is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the terminal 100a can communicate with the network and other devices through wireless communication technology.
- the wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband 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.
- the GNSS may include a global positioning system (global positioning system, GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (quasi -zenith satellite system, QZSS) and/or satellite based augmentation systems (SBAS).
- GPS global positioning system
- GLONASS global navigation satellite system
- BDS Beidou navigation satellite system
- QZSS quasi-zenith satellite system
- SBAS satellite based augmentation systems
- the terminal 100a implements a display function through a GPU, a display screen 194, an application processor, and the like.
- the GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor.
- the GPU is used to perform mathematical and geometric calculations for graphics rendering.
- Processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
- Display screen 194 is used to display images, videos, and the like.
- Display screen 194 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 or an active-matrix organic light-emitting diode (active-matrix organic light).
- LED diode AMOLED
- flexible light-emitting diode flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (quantum dot light emitting diodes, QLED) and so on.
- the terminal 100a may include one or N display screens 194, where N is a positive integer greater than one.
- the terminal 100a can realize the shooting function through the ISP, the camera 193, the video codec, the GPU, the display screen 194 and the application processor.
- the ISP is used to process the data fed back by the camera 193 .
- the shutter is opened, the light is transmitted to the camera photosensitive element through the lens, the light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye.
- ISP can also perform algorithm optimization on image noise, brightness, and skin tone.
- ISP can also optimize the exposure, color temperature and other parameters of the shooting scene.
- the ISP may be provided in the camera 193 .
- Camera 193 is used to capture still images or video.
- the object is projected through the lens to generate an optical image onto the photosensitive element.
- the photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
- CMOS complementary metal-oxide-semiconductor
- the photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal.
- the ISP outputs the digital image signal to the DSP for processing.
- DSP converts digital image signals into standard RGB, YUV and other formats of image signals.
- the terminal 100a may include 1 or N cameras 193, where N is a positive integer greater than 1.
- a 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 terminal 100a selects a frequency point, the digital signal processor is used to perform Fourier transform on the energy of the frequency point, and so on.
- Video codecs are used to compress or decompress digital video.
- the terminal 100a may support one or more video codecs.
- the terminal 100a can play or record videos in multiple encoding formats, for example, moving picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4, and so on.
- MPEG moving picture experts group
- the NPU is a neural-network (NN) computing processor.
- NN neural-network
- Applications such as intelligent cognition of the terminal 100a can be implemented through the NPU, for example: image recognition, face recognition, speech recognition, text understanding, and the like.
- the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, so as to expand the storage capacity of the terminal 100a.
- the external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example to save files like music, video etc in external memory card.
- Internal memory 121 may be used to store computer executable program code, which includes instructions.
- the internal memory 121 may include a storage program area and a storage data area.
- the storage program area can store an operating system, an application program required for at least one function (such as a sound playback function, an image playback function, etc.), and the like.
- the storage data area may store data (such as audio data, phone book, etc.) created during the use of the terminal 100a.
- the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (UFS), and the like.
- the processor 110 executes various functional applications and data processing of the terminal 100a by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
- the terminal 100a may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playback, recording, etc.
- the audio module 170 is used for converting digital audio information into analog audio signal output, and also for converting analog audio input into digital audio signal. Audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be provided in the processor 110 , or some functional modules of the audio module 170 may be provided in the processor 110 .
- Speaker 170A also referred to as a "speaker" is used to convert audio electrical signals into sound signals.
- the terminal 100a can listen to music through the speaker 170A, or listen to a hands-free call.
- the receiver 170B also referred to as "earpiece" is used to convert audio electrical signals into sound signals.
- the terminal 100a answers a call or a voice message, it can answer the voice by placing the receiver 170B close to the human ear.
- the microphone 170C also called “microphone” or “microphone” is used to convert sound signals into electrical signals.
- the user can make a sound by approaching the microphone 170C through a human mouth, and input the sound signal into the microphone 170C.
- the terminal 100a may be provided with at least one microphone 170C.
- the terminal 100a may be provided with two microphones 170C, which can implement a noise reduction function in addition to collecting sound signals.
- the terminal 100a may further be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and implement directional recording functions.
- the earphone jack 170D is used to connect wired earphones.
- the earphone interface 170D may be the USB interface 130, or may be a 3.5mm open mobile terminal platform (OMTP) standard interface, a cellular telecommunications industry association of the USA (CTIA) standard interface.
- OMTP open mobile terminal platform
- CTIA cellular telecommunications industry association of the USA
- the keys 190 include a power-on key, a volume key, and the like. Keys 190 may be mechanical keys. It can also be a touch key.
- the terminal 100a may receive key input and generate key signal input related to user settings and function control of the terminal 100a.
- Motor 191 can generate vibrating cues.
- the motor 191 can be used for vibrating alerts for incoming calls, and can also be used for touch vibration feedback.
- touch operations acting on different applications can correspond to different vibration feedback effects.
- the motor 191 can also correspond to different vibration feedback effects for touch operations on different areas of the display screen 194 .
- Different application scenarios for example: time reminder, receiving information, alarm clock, games, etc.
- the touch vibration feedback effect can also support customization.
- the indicator 192 can be an indicator light, which can be used to indicate the charging state, the change of the power, and can also be used to indicate a message, a missed call, a notification, and the like.
- the SIM card interface 195 is used to connect a SIM card.
- the SIM card can be contacted and separated from the terminal 100a by inserting into the SIM card interface 195 or pulling out from the SIM card interface 195.
- the terminal 100a may support 1 or N SIM card interfaces, where N is a positive integer greater than 1.
- the SIM card interface 195 can support Nano SIM card, Micro SIM card, SIM card and so on. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the plurality of cards may be the same or different.
- the SIM card interface 195 can also be compatible with different types of SIM cards.
- the SIM card interface 195 is also compatible with external memory cards.
- the terminal 100a interacts with the network through the SIM card to realize functions such as call and data communication.
- the terminal 100a employs an eSIM, ie an embedded SIM card.
- the eSIM card can be embedded in the terminal 100a and cannot be separated from the terminal 100a.
- the software system of the terminal 100a may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture.
- the embodiments of the present invention take the Android system with a layered architecture as an example to illustrate the software structure of the terminal 100a.
- FIG. 5 is a block diagram of the software structure of the terminal 100a according to the embodiment of the present invention.
- the layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate with each other through software interfaces.
- the Android system is divided into four layers, which are, from top to bottom, an application layer, an application framework layer, an Android runtime (Android runtime) and a system library, and a kernel layer.
- the application layer can include a series of application packages.
- the application package can include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and so on.
- the application package further includes an audio and video calling application with an audio and video calling function, such as a WeChat application, a QQ application, facetime, Changlian Call, and the like.
- the audio and video call application may be a preset application program on the terminal 100a, or may be an application program downloaded by a user through an application market or other methods, and the embodiment of the present application does not limit the audio and video call application.
- Audio and video calls can be video calls or audio calls.
- the application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer.
- the application framework layer includes some predefined functions.
- the application framework layer may include window managers, content providers, view systems, telephony managers, resource managers, notification managers, and the like.
- a window manager is used to manage window programs.
- the window manager can get the size of the display screen, determine whether there is a status bar, lock the screen, take screenshots, etc.
- Content providers are used to store and retrieve data and make these data accessible to applications.
- the data may include video, images, audio, calls made and received, browsing history and bookmarks, phone book, etc.
- the view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and so on. View systems can be used to build applications.
- a display interface can consist of one or more views.
- the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures.
- the telephony manager is used to provide the communication function of the terminal 100a.
- the resource manager provides various resources for the application, such as localization strings, icons, pictures, layout files, video files, etc.
- the notification manager enables applications to display notification information in the status bar, which can be used to convey notification-type messages, and can automatically disappear after a brief pause without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc.
- the notification manager can also display notifications in the status bar at the top of the system in the form of graphs or scroll bar text, such as notifications of applications running in the background, and notifications that appear on the screen in the form of dialog windows. For example, text information is prompted in the status bar, a prompt tone is issued, the terminal vibrates, and the indicator light flashes.
- the application framework layer may further include:
- Android Runtime includes core libraries and a virtual machine.
- Android runtime is responsible for scheduling and management of the Android system.
- the core library consists of two parts: one is the function functions that the java language needs to call, and the other is the core library of Android.
- the application layer and the application framework layer run in virtual machines.
- the virtual machine executes the java files of the application layer and the application framework layer as binary files.
- the virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, safety and exception management, and garbage collection.
- a system library can include multiple functional modules. For example: surface manager (surface manager), media library (Media Libraries), 3D graphics processing library (eg: OpenGL ES), 2D graphics engine (eg: SGL), etc.
- the Surface Manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
- the media library supports playback and recording of a variety of commonly used audio and video formats, as well as still image files.
- the media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
- the 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
- 2D graphics engine is a drawing engine for 2D drawing.
- the kernel layer is the layer between hardware and software.
- the kernel layer contains at least display drivers, camera drivers, audio drivers, and sensor drivers.
- the structure of the server 300a may also refer to the structure of the terminal in FIG. 4 , and the server 300a may have more or less components than the structure shown in FIG. 4 , or combine some components, or split some components , or a different component arrangement.
- the illustrated components may be implemented in hardware, software, or a combination of software and hardware.
- the server 300a may include a processor 401 (optionally, including a processor 408), a memory 403, a transceiver 404, and the like.
- a channel may be included between the above-mentioned components for transmitting information between the above-mentioned components.
- Transceiver 404 for communicating with other devices or communication networks with protocols such as Ethernet, WLAN, etc.
- terminal 100a and the terminal 200a are both mobile phones as examples, which are described in a unified manner here.
- FIG. 6-2 shows another schematic structural diagram of the server 300a.
- the server 300a includes a path management module 301 and a path query module 302 .
- the path management module 301 of the server is used to manage available paths between terminals.
- the data between terminal 1 and terminal 2 can be transmitted through the available paths of terminal 3 and terminal 4, that is, terminal 1 sends the data to terminal 3, and terminal 3 sends the data to terminal 3.
- the data is sent to Terminal 4, and Terminal 4 sends the data to the target (ie, Terminal 2).
- Terminal 4 sends the data to the target (ie, Terminal 2).
- the data between the terminal 2 and the terminal 4 may be transmitted through the available path of the terminal 3 .
- the path query module 302 is configured to access the path management module 301 so as to obtain the available paths between the source terminal and the destination terminal from the path management module 301 . It is also used to exchange path-related information with the communication module of the terminal. For example, the source terminal sends a query request to the path query module 302 of the server 300a through the communication module, so as to query the available forwarding path to the destination terminal. For another example, the server 300a sends a query response to the terminal through the path query module 302, so as to feed back the available path queried by the source terminal to the source terminal.
- the path query module 302 and the path management module 301 may be implemented by, for example, the processor 401 and/or the processor 408 shown in FIG. 6-1 .
- the terminal as a mobile phone and an example of a user initiating a multi-party video call through a video call application of the mobile phone.
- the video call process usually includes three stages: call, connect, and hang up.
- the interface 501a of the mobile phone A includes a video call application icon, and the user A can operate the video call application icon.
- the mobile phone A displays the interface 502a shown in (2) of FIG. 7 .
- the interface 502a includes a plurality of contacts.
- User A may move multiple contacts into the group chat.
- the group chat interface includes a control 503a.
- User A can operate the control 503a, and in response to user A's operation such as clicking on the control 503a, the mobile phone A displays the interface shown in (4) of FIG. 7, and the interface includes the control 504a. In response to an operation such as a click on the control 504a by the user A, the mobile phone A displays the interface 505a shown in (5) of FIG. 7 .
- User A can select members to join the multi-party video call through the interface 505a, and click the "OK" button, so as to trigger the mobile phone A to send a call request to the server.
- the call request is used to request a video call with Bob's mobile phone B and Andy's mobile phone C.
- step 1 the user selects the members participating in the multi-party video call through the user interface (UI) of the mobile phone A, such as Bob and Andy, and enters the call through operations such as clicking the "OK" button instruction.
- step 2 In response to the call instruction input by the user on the user interface, the mobile phone A sends a first call request to the server.
- the first call request carries the information of the called device (ie, Bob's mobile phone and Andy's mobile phone).
- the information of the called device is, for example, but not limited to, the device ID and device type of the called device.
- the first call request carries the source device identifier and the call identifier.
- the call identifier is used to identify different calls, and the terminals associated with different calls are different. For example, terminal 1 initiates video call 1 to terminal 2 and terminal 3, and terminal 4 initiates video call 2 to terminal 5 and terminal 6.
- Step 3 The server initiates a second call request to each of the called devices (ie, the mobile phone B and the mobile phone C) according to the information of the called device (ie, the information of the mobile phone B and the mobile phone C).
- the second call request sent by the server to the mobile phone B and the second call request sent to the mobile phone C may include the same information, or may include different information.
- the second call request sent by the server to mobile phone B includes the NAT IP address of the network where mobile phone B is located, and the device identifier of mobile phone B
- the second call request sent by the server to mobile phone C includes the NAT IP address of the network where mobile phone C is located, and the device ID of mobile phone C device identification.
- the time when the server sends the second call request to the mobile phone B and the time when the server sends the second call request to the mobile phone C is not limited. That is, the server may first send the second call request to the mobile phone B, or may first send the second call request to the mobile phone C, or send the second call request to both at the same time.
- Step 4 In response to the call instruction input by user A on the user interface of mobile phone A, mobile phone A displays the calling interface of the calling party. Moreover, the server sends a second call request to Bob's mobile phone and Andy's mobile phone, and until Bob and Andy agree to answer the call, the call interface displayed by mobile phone A may always be the call interface. Optionally, the call interface includes Bob, Andy, and user A's avatar 506a.
- Step 5 In response to the second call request from the server, the mobile phone B displays the call interface of the called party to remind the user Bob that there is a video call to be answered.
- the mobile phone B can also prompt the user Bob in other ways, such as through a voice prompt .
- the embodiments of the present application do not limit the manner in which the mobile phone prompts the user.
- the mobile phone C displays the call interface of the called party to prompt the user Andy of the video call to be answered.
- Step 6 The mobile phone B receives the "answer" instruction entered by Bob in the call interface, such as clicking the "answer” button, or instructing "answer” by voice, or instructing to answer by other means.
- the mobile phone C receives the "answer" instruction entered by Andy in the call interface.
- Step 7 Bob's mobile phone feeds back the first call response (indicating that Bob answers the call) to the server in response to the answering instruction input by Bob on the call interface. Similarly, Andy's mobile phone also feeds back the call response to the server.
- the call response carries the source device identifier and the call identifier, and the call identifier is used to identify a call.
- the terminals associated with different calls are different. For example, terminal 1 initiates video call 1 to terminal 2 and terminal 3, and terminal 4 initiates video call 2 to terminal 5 and terminal 6.
- Step 8 The server sends a second call response to the mobile phone A.
- Step 9 When the server receives the first call response from the mobile phones of Bob and Andy, and learns that Bob and Andy have answered the call, the server triggers the P2P connection establishment process, which is used to try to establish a P2P connection between each two mobile phones. .
- Step 10 In response to the second call response from the server, the mobile phone A displays a call interface 507a.
- the mobile phone A When the mobile phone A receives the second call response from the server, indicating that the called mobile phone has agreed to join the call, then the mobile phone A displays the call interface 507a, which is the interface when the call is connected. As shown in FIG. 8, the call interface 507a includes an image window 508a.
- the image window 508a is used to display the image data corresponding to the mobile phone B and the mobile phone C, for example, to display the image data collected by the cameras of the mobile phone B and the mobile phone C.
- the mobile phone A can play the audio data carried by the second call response, that is, the audio data collected by the mobile phone C and the mobile phone B.
- the mobile phone can also send the collected audio data and/or video data to the mobile phone B and the mobile phone C through the server.
- the user Bob of the mobile phone B and the user Andy of the mobile phone C can pass the display screen during the video call. See the picture captured by mobile phone A, and hear the sound captured by mobile phone A.
- the communication between each two mobile phones requires the relay server, that is, The sender's mobile phone first sends the message to the relay server, and the relay server forwards the message to the receiver's mobile phone.
- the mobile phone A forwards the collected audio and/or video data to the mobile phone B and the mobile phone C through the server.
- Mobile phone B forwards the collected audio and/or video data to mobile phone A and mobile phone C through the server
- mobile phone C forwards the collected audio and/or video data to mobile phone A and mobile phone B through the server.
- the P2P connection establishment process is shown in Figure 10, and the process includes:
- the mobile phone A sends a request message for requesting the information of the second server to the first server.
- the first server is a server for triggering a P2P connection establishment process.
- it may be the server shown in FIG. 8 that receives the call response from the mobile phone.
- the second server is a server for establishing a P2P connection (such as implementing NAT traversal). It can handle hole punching control signaling.
- first server and the second server may be the same server. In other embodiments, the first server and the second server may be different servers.
- the information of the second server may be, for example, but not limited to, the IP address of the second server.
- the mobile phone A while sending the first call request to the first server, the mobile phone A sends a request message for requesting the information of the second server to the first server.
- a request message for requesting information of the second server is sent to the first server.
- mobile phone A sends a request message for requesting information from the second server at other times. For example, when the first server determines that it is necessary to trigger the establishment of a P2P connection between mobile phone A and mobile phone B, it may send a trigger message to mobile phone A, and the mobile phone In response to the trigger message, A sends a request message for requesting the second server to the first server.
- the mobile phone B sends a request message for requesting the information of the second server to the first server.
- the mobile phone B may, in response to the second call request, send a request message for requesting information of the second server to the first server.
- the mobile phone B may also send a request message for requesting the information of the second server to the first server at other times.
- the mobile phone B may send a request message to the mobile phone B.
- the trigger message the mobile phone B responds to the trigger message and sends a request message for requesting the second server to the first server.
- the embodiment of the present application does not limit the timing of sending the request message.
- the functions of the first server (or the second server) and the relay server in the embodiments of the present application are different. Specifically, the first server and the second server are used to control the establishment of a P2P path, which can be understood as servers on the control plane.
- the relay server is used to relay data between terminals, and can be understood as a server on the user plane (or data plane).
- the first server sends the information of the second server to the mobile phone B, and sends the information of the second server to the mobile phone A.
- the mobile phone A sends the NAT gateway address request information to the second server.
- the mobile phone A After acquiring information such as the address of the second server, the mobile phone A sends the NAT gateway address request information to the second server.
- the NAT gateway address request information is used to request the second server for a P2P connection peer, such as the address of the NAT gateway of mobile phone B.
- the mobile phone B sends the NAT gateway address request information to the second server.
- the NAT gateway address request information is used to request the second server for a P2P connection peer, such as the address of the NAT gateway of mobile phone A.
- the server sends the NAT gateway address of the mobile phone B to the mobile phone A, and sends the NAT gateway address of the mobile phone A to the mobile phone B.
- the mobile phone A sends a handshake (handshake) request message to the mobile phone B through the NAT gateway of the mobile phone B.
- the mobile phone B sends a handshake response message to the mobile phone A through the NAT gateway of the mobile phone A.
- the handshake response message is used to indicate that the handshake is successful.
- handshake refers to the handshake in the P2P hole punching process, which is used to align in time.
- mobile phone B sends a handshake request message to mobile phone A, and then mobile phone A sends a handshake response message to mobile phone B.
- the terminal that completes step 4a first sends the handshake request message. That is, in FIG. 10 , mobile phone A completes step 4a before mobile phone B.
- Mobile phone A sends a BIND request message to mobile phone B.
- mobile phone A when mobile phone A receives the handshake response message from mobile phone B, mobile phone A sends a BIND request message to mobile phone B, and the BIND request message includes the information of mobile phone A, including but not limited to the IP address and NAT type of mobile phone A.
- Mobile phone B sends a BIND response message to mobile phone A.
- the BIND response message carries the information of the mobile phone B, including but not limited to the IP address and NAT type of the mobile phone B.
- Mobile phone A sends a Direct request message to mobile phone B.
- the Direct request message may be, but is not limited to, a user datagram protocol (user datagram protocol, UDP) message.
- UDP user datagram protocol
- Mobile phone B sends a Direct response message to mobile phone A.
- mobile phone B after receiving the Direct request message from mobile phone A, mobile phone B sends a Direct response message to mobile phone A, so as to indicate that mobile phone B has received the Direct request message from mobile phone A.
- mobile phone B may try to resend the Direct response message.
- Mobile phone A sends a Direct Ack message to mobile phone B.
- mobile phone A receives the Direct response message from mobile phone B, it means that mobile phone B can receive the Direct request message from mobile phone A, that is, the P2P connection between mobile phone A and mobile phone B is connected in the direction from mobile phone A to mobile phone B ( That is, mobile phone A can send messages, and mobile phone B can receive messages).
- the P2P connection available in both directions, that is, mobile phone A can send messages, mobile phone B can receive messages, or mobile phone B can send messages, and mobile phone A can receive messages, it is also necessary to verify that the P2P connection is in the direction from mobile phone B to mobile phone A. Whether it is connected (that is, mobile phone B can send messages, and mobile phone A can receive messages).
- mobile phone A sends a Direct confirmation message to mobile phone B. If mobile phone B receives the Direct confirmation message, it can confirm that mobile phone A can receive the Direct response message from mobile phone B, that is, the relationship between mobile phone A and mobile phone B
- the P2P connection between mobile phones is connected in the direction from mobile phone B to mobile phone A.
- Mobile phone B sends a heartbeat message to mobile phone A.
- Mobile phone B receives the Direct confirmation message from mobile phone A, learns that the NAT traversal is successful, and sends a heartbeat message to mobile phone A.
- Mobile phone A sends a heartbeat message to mobile phone B.
- mobile phone A can also send a heartbeat message to mobile phone B.
- the mobile phone A reports the P2P connection establishment result to the second server.
- the P2P connection establishment result of mobile phone A includes the device identification of the local end of the P2P connection (that is, the device identification of mobile phone A), the identification of the opposite end device (the device identification of mobile phone B), Whether the P2P connection is established successfully. It can be understood that each terminal that has established a P2P link in the multi-party communication reports to the server the identification of the local device of the connected P2P link and the identification of the opposite end device of the connected P2P link. In this way, the server can know the network according to these identifications. topology information, so as to determine the number of transit devices in the forwarding path and other information.
- the P2P connection establishment result may also include link level parameters of the P2P connection, for example, including one or any combination of the following parameters: the delay corresponding to the P2P connection, the QoS value corresponding to the P2P connection, and the network corresponding to the P2P connection. type.
- This information can be used on the server side to calculate the target forwarding path for the user to send and receive data.
- information such as delay corresponding to the P2P connection may also be carried in other messages. It can be understood that each terminal that has established a P2P link in multi-party communication reports link level parameters of the connected P2P link to the server, so that the server can perform subsequent operations such as selecting a target forwarding path according to these parameters.
- the parameters related to the path are divided into link-level parameters and path-level parameters.
- the link-level parameter includes one or any combination of the following parameters: the delay of each P2P link composing the forwarding path, the QoS of each P2P link composing the forwarding path, the composition
- the network type of the P2P link of the forwarding path includes a wireless high-fidelity Wi-Fi network or a cellular network; and/or the path level parameter includes the number of transit devices of the forwarding path.
- the terminal reports the P2P connection establishment result and the preset policy to the server in the same message.
- the preset strategy includes one or any combination of the following strategies: the target forwarding path has the lowest delay, the target forwarding path has a delay less than or equal to the upper limit of the delay threshold, and the QoS of the target forwarding path
- the QoS value of the target forwarding path is within the range of the preset QoS value
- the number of transit devices of the target forwarding path is the smallest
- the number of transit devices of the target forwarding path is within the preset number range
- the target forwarding path has the least number of transit devices.
- the network type of the first P2P link of the path is a preset network type; the preset network type includes a Wi-Fi network; the first P2P link is a P2P link connected to the first terminal or the second terminal Connected P2P link.
- the device identifier may be, but is not limited to, a unique identifier generated by performing a hash operation on the user account and the device ID.
- the terminal can also encapsulate the P2P connection establishment result and the preset policy through different messages.
- the preset policy can also be encapsulated in the path query request.
- the mobile phone B reports the P2P connection establishment result to the second server.
- the P2P connection establishment result of the mobile phone B includes the device identification of the mobile phone B (the device identification of the local end), the device identification of the mobile phone A (the identification of the opposite end device), and whether the P2P connection is established successfully.
- the second server may update the available forwarding paths corresponding to the multiple terminals based on the P2P connection establishment results from the multiple terminals.
- every two mobile phones attempt to establish a P2P connection, and report the P2P connection establishment result to the server.
- the finally established P2P connection is shown in Figure 11.
- the communication is between mobile phone A and mobile phone C, and the P2P link directly connected between mobile phone A (first terminal) and mobile phone C (second terminal) is not established successfully
- the process for mobile phone A to send data to mobile phone C includes the following steps:
- Mobile phone A sends a path query request to the server.
- the path query request is used to request to query one or more first forwarding paths from mobile phone A to mobile phone C.
- the first forwarding path may be used to carry the message between the mobile phone A (ie the first terminal) and the mobile phone C (ie the second terminal).
- the first forwarding path may also be referred to as an available forwarding path.
- a P2P connection a P2P link, and the like may be the same concept.
- the mobile phone A sends a path query request to the server periodically or according to other strategies. Based on the path query request, the server may feed back path information for sending and receiving data to the mobile phone A.
- step 1b is an optional step, that is, step 1b does not need to be performed.
- the path query request carries the identifier of the source device (that is, the device that needs to send data), the identifier of the target device (that is, the sender of the data), and the like.
- the available forwarding path refers to a P2P forwarding path.
- the links that make up the available forwarding path are all P2P links.
- the available forwarding paths between mobile phone A and mobile phone C may include a P2P connection between mobile phone A and mobile phone B, and a P2P connection between mobile phone B and mobile phone C.
- the server sends a path query response to the mobile phone A (the first terminal).
- the path query response is used to indicate one or more first forwarding paths from the mobile phone A (the first terminal) to the mobile phone C (the second terminal).
- a path query response may include an index of multiple available forwarding paths. In this way, the mobile phone A can send data to the mobile phone C through the available forwarding paths formed by one or more P2P connections.
- the path query response does not include an available forwarding path. This means that there is no available forwarding path entirely composed of P2P connections. In this case, mobile phone A still sends data to mobile phone C through the relay channel.
- the path query response carries the source device identification (that is, the identification of mobile phone A) and the target device identification.
- the message structure of the path query response is shown in Table 4.
- the list of available forwarding paths includes one or more available forwarding paths, each available forwarding path may be represented by an ordered sequence, and the ordered sequence may be an ordered sequence of device identifiers included in the available forwarding path.
- the ordered sequence B-D-C indicates that data is forwarded by device B to device D, and then forwarded by device D to the available forwarding path of device C.
- the server determines an available forwarding path from the source device to the target device according to the P2P connection establishment results reported by multiple terminals. For example, according to the P2P connection establishment result between mobile phone A and mobile phone C, the server can learn that there are P2P connections between mobile phone A and mobile phone B, and mobile phone B and mobile phone C, and determine the available forwarding path between mobile phone A and mobile phone C accordingly. For example, the available forwarding path between mobile phone A and mobile phone C is forwarded through the P2P connection between mobile phone A and mobile phone B, and then forwarded through the P2P connection between mobile phone B and mobile phone C.
- the server sends a path query response to the mobile phone A through the relay channel with the mobile phone A.
- the mobile phone A determines the target forwarding path, and transmits the messages in the multi-party call through the target forwarding path.
- the target forwarding path is composed of multiple established P2P links in the multi-party communication. Specifically, M P2P links are included, where M is a positive integer greater than or equal to 2.
- the path query response fed back by the server to mobile phone A is: the available forwarding path is A-B-C, that is, mobile phone A first sends data to mobile phone B through the P2P connection with mobile phone B, and mobile phone B then sends data to mobile phone B through the P2P connection with mobile phone B.
- the P2P connection with mobile phone C forwards the data from mobile phone A to mobile phone C.
- the mobile phone A takes the available forwarding path as the target forwarding path, and sends the data to the mobile phone B through the P2P connection with the mobile phone B according to the target forwarding path.
- the path query response fed back by the server to the mobile phone A in step 2b may include multiple available forwarding paths.
- the target forwarding path is selected from a plurality of available forwarding paths.
- the preset parameters include link-level parameters and/or path-level parameters, and for each first forwarding path, the link-level parameters include one or any combination of the following parameters: forming the first forwarding path The delay of each P2P link, the QoS of each P2P link that constitutes the first forwarding path, the network type of the P2P link that constitutes the first forwarding path; the network type includes wireless high-fidelity Wi-Fi network or cellular network; and/or the path level parameter includes the number of transit devices of the first forwarding path.
- Link-level parameters may also include other parameters, such as link length, packet loss rate, and bandwidth.
- the path-level parameter may also include other parameters, and the embodiment of the present application does not limit the link-level parameter and the path-level parameter.
- Each of the above preset parameters may have corresponding quantization values.
- the quantized value corresponding to each network type may be determined according to the priority of the network type. For example, when the network type of the link is a Wi-Fi network, the priority is the highest, and the corresponding quantization value is the highest.
- the quantized value of the network type of each P2P link may also be determined according to other factors.
- the quantified value of the network type may be determined according to the network type of each P2P link forming the available forwarding path.
- the available forwarding path consists of two P2P links, the network type of P2P link 1 is Wi-Fi network, the Wi-Fi network corresponds to quantization value 1, the network type of P2P link 2 is cellular network, the cellular network corresponds to For quantization value 2, a total quantization value can be obtained by performing certain operations on quantization value 1 and quantization value 2, that is, the quantization value of the network type corresponding to the available forwarding path is obtained.
- selecting a target forwarding path from the multiple first forwarding paths according to the multiple first forwarding paths and preset parameters includes: according to the multiple first forwarding paths, all the The preset parameter and the preset policy are selected, and a target forwarding path is selected from the plurality of first forwarding paths.
- the preset strategy includes one or any combination of the following strategies: the target forwarding path has the lowest delay, the target forwarding path has a delay less than or equal to the upper limit of the delay threshold, and the target forwarding path has the lowest delay.
- the QoS of the path is the best, the QoS value of the target forwarding path is within the range of the preset QoS value, the number of transit devices of the target forwarding path is the least, and the number of transit devices of the target forwarding path is within the range of the preset number, so
- the network type of the first P2P link of the target forwarding path is a preset network type; the preset network type includes a Wi-Fi network; the first P2P link is a P2P link connected to the first terminal or the The P2P link to which the second terminal is connected.
- A-D-E there are two available forwarding paths from A to E.
- One is: A-D-E, and the other is: A-B-D-E.
- Links A-D and D-E use cellular networks.
- Links A-B use Wi-Fi networks.
- Links B-D and D-E both use cellular networks.
- Select A-B-D-E as the target forwarding path.
- the preset policy may also be other policies, and the embodiment of the present application does not limit the preset policy.
- the preset policy may also be that the sum of the link lengths of the forwarding path is the shortest, the packet loss rate is the lowest, and the bandwidth is the largest.
- the strategies in the embodiments of the present application may be used individually or in combination, and the embodiments of the present application will not list various combinations one by one due to space limitations.
- the terminal may also select the target forwarding path according to the following rules.
- the target forwarding path is: the network type of the first link is the first forwarding path with the lowest delay among the first forwarding paths of the preset network type;
- the target forwarding path is: the network type of the first link is the first forwarding path with the best QoS among the first forwarding paths of the preset network type;
- the target forwarding path is: the network type of the first link is the first forwarding path with the smallest number of transit devices among the first forwarding paths of the preset network type;
- the target forwarding path is: the first forwarding path with the lowest delay among the first forwarding paths whose QoS value is within the range of the preset QoS value;
- the target forwarding path is: the first forwarding path with the smallest number of transit devices among the first forwarding paths whose QoS value is within the range of the preset QoS value;
- the target forwarding path is: a first forwarding path whose network type is among the first forwarding paths whose QoS value is within the range of the preset QoS value;
- the target forwarding path is: a first forwarding path whose network type is a preset network type in the first forwarding path whose delay is less than or equal to the delay threshold;
- the target forwarding path is: the first forwarding path with the best QoS among the first forwarding paths whose delay is less than or equal to the delay threshold;
- the target forwarding path is: the first forwarding path with the smallest number of transit devices among the first forwarding paths whose delay is less than or equal to the delay threshold;
- the target forwarding path is: the first forwarding path with the lowest delay among the first forwarding paths whose number of transit devices is within a preset number range;
- the target forwarding path is: a first forwarding path with the best QoS among the first forwarding paths whose number of transit devices is within a preset number range;
- the target forwarding path is: the network type of the first link in the first forwarding path in which the number of transit devices is within the preset number range is the first forwarding path of the preset network type.
- the mobile phone A determines the target forwarding path, which can be implemented as follows: the mobile phone A calculates the weight of each available forwarding path between the source terminal device and the destination terminal device, and according to the weight of the available forwarding path, selects the forwarding path from the available forwarding path. Select one of the paths as the target forwarding path.
- the network topology can be represented by a weighted undirected graph.
- Forwarding paths in network topology can be abstracted as edges in a weighted undirected graph, and each available forwarding path can be abstracted as consisting of multiple edges.
- Each available forwarding path has a corresponding weight value.
- the weight value of the available forwarding path is used to represent the quality of the available forwarding path.
- the weight value W corresponding to the available forwarding path satisfies the following relationship: Among them, pi is the quantized value of the ith link level parameter, wi is the weight corresponding to pi , and N is the number of link level parameters.
- the weight value W of the available forwarding paths can also be expressed by the following formula: in, Same as the definition in the above embodiment, p j is the quantized value of the jth path level parameter, w j is the weight corresponding to p j , and L is the number of path level parameters.
- the weight value W of the available forwarding paths can be expressed by the following formula: n relay is the number of transit devices in the forwarding path, and w relay is the weight corresponding to n relay .
- the above link-level parameters and path-level parameters can both affect the quality of the path.
- the weight value corresponding to each parameter is used to adjust the proportion of each parameter in the overall weight value, so as to optimize the weight value of the available forwarding path as much as possible.
- the target forwarding path between any two points that is, to find an available forwarding path that meets certain conditions in a weighted undirected graph.
- a graph algorithm Dijskra algorithm, depth search, breadth search, Bellman-Ford algorithm, etc.
- the quality of the path represented by the weight value is higher than the threshold, and the available forwarding path is An available forwarding path can be used as the target forwarding path.
- the network topology includes 5 terminal devices, namely A, B, C, D, and E, wherein the figure shows the rights and Directed graph, in this weighted undirected graph, the available paths are abstracted into corresponding edges, namely edge a-edge e, each edge has a corresponding weight.
- the weight value of other edges please refer to the calculation method of the weight value of edge a.
- the available forwarding paths from device A to device E are A->D->E and A->B->D->E. Then, the weight values of the two available forwarding paths are:
- the weight of the available forwarding path A->D->E is: weight(b)+weight(e)+number of transit devices*w4; the number of transit devices in this path is 1, and the transit device is device D.
- the weight of the available forwarding path A->B->D->E is: weight(a)+weight(c)+weight(e)+number of transit devices*w4; the number of transit devices in this path is 2.
- the weight value of the available forwarding path A->D->E is the largest, and it is set that when the weight value of the available forwarding path is larger, the path quality of the available forwarding path is higher, then the available forwarding path A->D->E as the destination forwarding path. In this way, a forwarding path with the highest path quality can be selected to transmit the message.
- mobile phone A before mobile phone A calculates the target forwarding path, it needs to obtain information related to each available forwarding path, including but not limited to link-level parameters (such as delay, QoS value, network type) and/or path of the available forwarding paths. level parameter.
- This information can be sent to mobile phone A by the server.
- the server carries information such as delay, QoS, network type and the like related to the available forwarding path in the path query response fed back to the mobile phone A.
- the mobile phone A obtains information such as delay, QoS value, network type, etc. of the available forwarding path through other methods.
- the path query response does not include an available forwarding path.
- the list of available forwarding paths is empty.
- mobile phone A can send data according to the path of the prior art, that is, send the data to the server through the relay channel with the server, and then the server will forward the data from mobile phone A. to mobile phone C.
- mobile phone A sends the source device identification (that is, the identification of mobile phone A), the target device identification (that is, the identification of mobile phone C), the complete target forwarding path or the target sub-path (a part of the target forwarding path) It is encapsulated into the message to be sent and sent to the next hop terminal (such as mobile phone B).
- the target forwarding path is composed of M P2P links; the source node of the target forwarding path is the first terminal, and the destination node of the target forwarding path is the second terminal.
- the target subpath is composed of M-1 adjacent P2P links among the M P2P links
- the source node of the target subpath is the next-hop terminal of the first terminal
- the The target node of the target sub-path is the second terminal. That is to say, when mobile phone A sends a packet to the next hop mobile phone (such as mobile phone B), it can encapsulate the completed target forwarding path in the packet, or it can only encapsulate the latter part of the target forwarding path, as long as the next The jumping mobile phone (such as mobile phone B) can continue to forward the message.
- the next hop mobile phone such as mobile phone B
- mobile phone A can encapsulate, in a message sent to mobile phone B (not the destination node of the message), the identifier of the next hop mobile phone of mobile phone B, and the mobile phone identifiers several hops after the next hop mobile phone.
- the encapsulated data format is shown in Table 5:
- data that is, the content of the data plane packet, such as audio data collected by the microphone of the mobile phone A and/or image data collected by the camera.
- the srcDeviceId, destDeviceId, and path may be encapsulated in the message header or the message body, which is not limited in this embodiment of the present application.
- the target forwarding path For the format of the target forwarding path, see Forms of Available Forwarding Paths. For example, it may also be an ordered sequence of device identifiers included in the forwarding path.
- the target forwarding path from mobile phone A to mobile phone C is A-B-C shown in Figure 12-1.
- addressing in the message forwarding process can be accomplished by using methods such as Table 6, which can reduce the sending overhead of the sending terminal and the processing overhead of the receiving terminal.
- the third terminal may receive a packet sent by the first terminal to the second terminal through the target forwarding path, where the packet carries the second forwarding path; and send the message through the second forwarding path.
- the third terminal is located on the target forwarding path, and the second forwarding path is the target forwarding path or target sub-path; the target forwarding path is used to carry the communication between the first terminal and the second terminal
- the target forwarding path is composed of M P2P links; the source node of the target forwarding path is the first terminal, and the destination node of the target forwarding path is the second terminal;
- the The target subpath is composed of N adjacent P2P links among the M P2P links, the source node of the target subpath is the third terminal, and the destination node of the target subpath is the second terminal Terminal;
- M is an integer greater than or equal to 2
- N is a positive integer
- N is less than M.
- the target forwarding path from terminal A to terminal E is A-B-D-E.
- terminal D is located on this target forwarding path, and terminal D receives a packet from terminal B.
- the message can carry the completed target forwarding path, that is, A-B-D-E.
- the source node of the target forwarding path is terminal A (that is, the source terminal), and the destination node is terminal E (that is, the destination terminal).
- the packet received by terminal D from terminal B may also carry part of the target forwarding path (that is, the target sub-path), such as carrying D-E.
- the source node of the target sub-path is terminal D
- the destination node is terminal E
- the packet it receives from the terminal A may carry the target forwarding path (A-B-D-E).
- Mobile phone B forwards the data from mobile phone A to mobile phone C according to the target forwarding path.
- mobile phone B receives the data from mobile phone A, it parses the data and determines whether it is the target device. If so, it receives and processes the message; otherwise, it forwards the data from mobile phone A according to the target forwarding path. Give yourself the next hop device.
- the target forwarding path may also be determined by the server.
- the server selects a target forwarding path from multiple available forwarding paths according to preset parameters.
- the server selects the first forwarding path from multiple available forwarding paths according to preset parameters, including: selecting the first forwarding path from multiple available forwarding paths according to preset parameters and preset policies Describe the first forwarding path.
- preset parameters including: selecting the first forwarding path from multiple available forwarding paths according to preset parameters and preset policies Describe the first forwarding path.
- the terminal device can report the preset policy to the server.
- the terminal encapsulates the preset policy and the P2P connection establishment result (such as P2P link delay, QoS, etc.) in the same message.
- the terminal can also encapsulate the P2P connection establishment result and the preset policy through different messages.
- the preset policy can be encapsulated in the path query request.
- the server may determine the target forwarding path from the source terminal device to the destination terminal device based on the preset policies reported by the terminal device. For example, referring to Figure 12-2, the preset policy reported by mobile phone A to the server is to select the forwarding path with the lowest delay to transmit data.
- the server will send data from mobile phone A to mobile phone C.
- One of the available forwarding paths A-B-C and the available forwarding paths A-D-C between them is selected as the target forwarding path. Since the forwarding path A-B-C has the lowest delay among the available forwarding paths, the server takes the forwarding path A-B-C as the target forwarding path between mobile phone A and mobile phone C, and sends the target forwarding path to mobile phone A. In this way, the mobile phone A can send data to the mobile phone C through the target forwarding path A-B-C, that is, the mobile phone B acts as a relay. Mobile phone C can also send data to mobile phone A via mobile phone B according to the target forwarding path.
- the server when determining the forwarding path between mobile phone A and mobile phone C, may not only refer to the preset strategy of mobile phone A, but also combine the preset strategy reported by mobile phone C at the same time.
- the server may also select a target forwarding path according to the weight value of each available forwarding path.
- each available forwarding path has a corresponding weight value, and the weight value is used to represent the quality of the available forwarding path.
- the weight value W of the available forwarding path satisfies the following relationship:
- pi is the quantized value of the ith link-level parameter
- wi is the weight corresponding to pi
- N is the number of link-level parameters.
- M is the number of P2P links forming the available forwarding path
- the first forwarding path is an available forwarding path whose quality of the path represented by the weight value is higher than a threshold among the plurality of available forwarding paths.
- the weight value W of the available forwarding path satisfies the following relationship:
- pi is the quantized value of the ith link-level parameter
- wi is the weight corresponding to pi
- N is the number of link-level parameters.
- M is the number of P2P links that form the available forwarding path
- n relay is the path level parameter of the available forwarding path
- w relay is the corresponding of n relay Weights
- the first forwarding path is an available forwarding path whose quality of the path represented by the weight value is higher than a threshold among the plurality of available forwarding paths.
- FIG. 12-1 and FIG. 12-2 can also be represented by FIG. 13 .
- FIG. 13 For a specific description, refer to the embodiments corresponding to FIG. 12-1 and FIG. 12-2, and details are not repeated here.
- the video call method provided in the example can use the P2P connection between the mobile phone A and the mobile phone B, and the P2P connection between the mobile phone B and the mobile phone C to forward the data between the mobile phone A and the mobile phone C, without using the server to forward the data, Therefore, the number of deployment servers can be correspondingly reduced, which greatly reduces the networking complexity and networking cost.
- the above-mentioned server or each terminal, etc. may be divided into functional modules according to the above-mentioned method examples.
- each functional module may be divided into each function, or two or more functions may be integrated into one processing module.
- the above-mentioned integrated modules can be implemented in the form of hardware, and can also be implemented in the form of software function modules. It should be noted that, the division of modules in the embodiments of the present application is schematic, and is only a logical function division, and there may be other division manners in actual implementation.
- FIG. 15 shows a possible schematic structural diagram of a communication device involved in the above embodiment.
- the device may be the first terminal or a component (such as a chip system of the first terminal) that can be matched and used with the first terminal to realize the function of the first terminal.
- the apparatus may include: a sending unit 1502 , a receiving unit 1501 , and a processing unit 1503 .
- a sending unit 1502 configured to send a path query request to a server, where the path query request is used to request at least one first forwarding path; each first forwarding path in the at least one first forwarding path can be used to carry the first forwarding path the message between the terminal and the second terminal;
- the receiving unit 1501 receives a path query response from the server; the path query response is used to indicate the at least one first forwarding path; each first forwarding path in the at least one first forwarding path is communicated by the multiple parties It consists of several established point-to-point P2P links;
- the sending unit 1502 is further configured to send a packet through a target forwarding path in the at least one first forwarding path.
- the first forwarding path is one.
- a processing unit 1503 configured to select the target forwarding path from the plurality of first forwarding paths according to preset parameters
- selecting the target forwarding path from the plurality of first forwarding paths includes:
- the target forwarding path is: the network type of the first P2P link is the first forwarding path with the lowest delay among the first forwarding paths of the preset network type;
- the target forwarding path is: the network type of the first P2P link is the first forwarding path with the best QoS among the first forwarding paths of the preset network type;
- the target forwarding path is: the network type of the first P2P link is the first forwarding path with the smallest number of transit devices in the first forwarding path of the preset network type;
- the target forwarding path is: the first forwarding path with the lowest delay among the first forwarding paths whose QoS value is within the range of the preset QoS value;
- the target forwarding path is: the first forwarding path with the smallest number of transit devices among the first forwarding paths whose QoS value is within the range of the preset QoS value;
- the target forwarding path is: the network type of the first P2P link in the first forwarding path whose QoS value is within the range of the preset QoS value is the first forwarding path of the preset network type;
- the target forwarding path is: the network type of the first P2P link in the first forwarding path whose delay is less than or equal to the delay threshold is the first forwarding path of the preset network type;
- the target forwarding path is: the first forwarding path with the best QoS among the first forwarding paths whose delay is less than or equal to the delay threshold;
- the target forwarding path is: the first forwarding path with the smallest number of transit devices among the first forwarding paths whose delay is less than or equal to the delay threshold;
- the target forwarding path is: the first forwarding path with the lowest delay among the first forwarding paths whose number of transit devices is within a preset number range;
- the target forwarding path is: a first forwarding path with the best QoS among the first forwarding paths whose number of transit devices is within a preset number range;
- the target forwarding path is: the network type of the first P2P link in the first forwarding path in which the number of transit devices is within a preset number range is the first forwarding path of the preset network type.
- each first forwarding path in the multiple first forwarding paths has a corresponding weight value, and the weight value of the first forwarding path is used to represent the quality of the first forwarding path ;
- the weight value W of the first forwarding path satisfies the following relationship:
- pi is the quantized value of the i -th link level parameter
- wi is the weight corresponding to pi
- N is the number of link level parameters
- M is the number of P2P links that form the first forwarding path
- the target forwarding path is a first forwarding path whose path quality represented by a weight value in the plurality of first forwarding paths is higher than a threshold.
- each first forwarding path has a corresponding weight value, and the weight value of the first forwarding path is used to represent the quality of the first forwarding path; the weight of the first forwarding path
- the value W satisfies the following relationship:
- pi is the quantized value of the i -th link level parameter
- wi is the weight corresponding to pi
- N is the number of link level parameters
- M is the number of P2P links forming the first forwarding path
- n relay is the quantized value of the path level parameter of the first forwarding path, and w relay is the weight corresponding to n relay ;
- the target forwarding path is a first forwarding path whose path quality represented by a weight value in the plurality of first forwarding paths is higher than a threshold.
- the message carries the target forwarding path or the target subpath
- the target forwarding path is composed of M P2P links; the source node of the target forwarding path is the first terminal, and the destination node of the target forwarding path is the second terminal; the target subpath is composed of all The adjacent M-1 P2P links in the M P2P links are formed, the source node of the target subpath is the next hop terminal of the first terminal, and the destination node of the target subpath is the The second terminal; M is an integer greater than or equal to 2.
- another communication device may be a third terminal, or may be a component (such as a chip system of the third terminal) that is matched and used with the third terminal to realize the functions of the third terminal.
- the third terminal is located on the target forwarding path, and the third terminal may include: a receiving unit 1601 and a sending unit 1602 .
- a receiving unit 1601 configured to receive a packet sent by a first terminal to a second terminal through the target forwarding path, where the packet carries a second forwarding path; the second forwarding path is the target forwarding path or the target sub-path path; the target forwarding path is used to carry the message between the first terminal and the second terminal, and the target forwarding path is composed of M P2P links; the source node of the target forwarding path is the first terminal a terminal, the target node of the target forwarding path is the second terminal; the target subpath is composed of N adjacent P2P links among the M P2P links, and the source node of the target subpath is is the third terminal, and the destination node of the target subpath is the second terminal; M is an integer greater than or equal to 2, N is a positive integer, and N is less than M;
- the sending unit 1602 is configured to send a packet according to the second forwarding path.
- the apparatus further includes a processing unit 1603 for controlling actions of the apparatus, for example, controlling the receiving unit 1601 to perform a receiving action.
- a processing unit 1603 for controlling actions of the apparatus, for example, controlling the receiving unit 1601 to perform a receiving action.
- the device may be a server, or may be a component (such as a chip in the server) that is matched and used with the server to implement server functions.
- the apparatus includes: a receiving unit 1701 , a sending unit 1702 , and a processing unit 1703 .
- a receiving unit 1701 configured to receive a path query request from a first terminal; the path query request is used to request at least one first forwarding path; each first forwarding path in the at least one first forwarding path can be used to carry the a message between the first terminal and the second terminal;
- the sending unit 1702 is configured to, in response to the path query request, send a path query response to the first terminal, where the path query response is used to indicate the at least one first forwarding path; It is composed of multiple established P2P links in the multi-party communication.
- the first forwarding path is one.
- the processing unit 1703 is configured to select the first forwarding path from a plurality of available forwarding paths according to preset parameters; the available forwarding path can be used to carry packets between the first terminal and the second terminal forwarding path;
- selecting the first forwarding path from multiple available forwarding paths according to preset parameters includes:
- each available forwarding path has a corresponding weight value
- the weight value is used to represent the quality of the available forwarding path
- the weight value of the available forwarding path W satisfies the following relationship:
- pi is the quantized value of the i -th link level parameter
- wi is the weight corresponding to pi
- N is the number of link level parameters
- M is the number of P2P links forming the available forwarding path
- the first forwarding path is an available forwarding path whose path quality represented by a weight value is higher than a threshold among the multiple available forwarding paths.
- each available forwarding path has a corresponding weight value
- the weight value is used to represent the quality of the available forwarding path
- the weight value of the available forwarding path W satisfies the following relationship:
- pi is the quantized value of the i -th link level parameter
- wi is the weight corresponding to pi
- N is the number of link level parameters
- M is the number of P2P links that form the available forwarding path
- n relay is the quantized value of the path level parameter of the available forwarding path
- w relay is n The weight corresponding to the relay ;
- the first forwarding path is an available forwarding path whose path quality represented by a weight value is higher than a threshold among the multiple available forwarding paths.
- the receiving unit 1701 is further configured to receive link level parameters corresponding to the connected P2P link from each terminal that has established a P2P link in the multi-party communication.
- the receiving unit 1701 is further configured to receive the preset policy from the first terminal.
- the apparatus shown in FIG. 15 to FIG. 17 may further include a storage unit (not shown in the figures) for storing data or programs required by the apparatus.
- the receiving unit and the sending unit in the above-mentioned embodiments may be set in an integrated manner, or may be set up separately.
- the receiving unit and the sending unit shown in FIG. 15 to FIG. 16 may be implemented by, for example, the mobile communication module 150 and the wireless communication module 160 shown in FIG. 4 .
- the processing unit may be implemented by, for example, the processor 110 shown in FIG. 4 .
- the storage unit can be realized by, for example, a memory.
- the receiving unit and the transmitting unit shown in FIG. 17 can be implemented by, for example, the transceiver 404 shown in FIG. 6-1.
- the processing unit may be implemented by, for example, processor 401 and/or processor 408 shown in Figure 6-1.
- the storage unit may be implemented by, for example, the memory 403 shown in Figure 6-1.
- the processing unit shown in FIG. 17 may implement the functions of the path query module 302 and the path management module 301 shown in FIG. 6-2 .
- the chip system includes at least one processor 1101 and at least one interface circuit 1102 .
- the processor 1101 and the interface circuit 1102 may be interconnected by wires.
- interface circuitry 1102 may be used to receive signals from other devices, such as memory.
- the interface circuit 1102 may be used to send signals to other devices (eg, the processor 1101).
- the interface circuit 1102 may read the instructions stored in the memory and send the instructions to the processor 1101 .
- the chip system can be used in terminals or servers. When applied to the first terminal, when the instruction is executed by the processor 1101, the first terminal can be caused to perform each step performed by the first terminal in the foregoing embodiment.
- the third terminal when the instruction is executed by the processor 1101, the third terminal can be caused to execute each step executed by the second terminal in the foregoing embodiment.
- the server when the instructions are executed by the processor 1101, the server can be caused to perform various steps performed by the server in the above-described embodiments.
- the chip system may also include other discrete devices, which are not specifically limited in this embodiment of the present application.
- Embodiments of the present application further provide a computer-readable storage medium, where the computer-readable storage medium may include a computer program or instruction; when the computer program or instruction runs on a computer, the computer is made to perform the communication described in the foregoing method embodiments. method.
- Embodiments of the present application provide a computer program product, including a computer program or instructions, which, when the computer program or instructions are run on a computer, enable the computer to execute the method for multi-party communication described in the foregoing method embodiments.
- FIG. 19 is a schematic diagram of the architecture of a possible communication system to which the method is applicable.
- the communication system includes a terminal 100b, a terminal 200b, and a server 300b.
- server 300b is an application server.
- One or more application programs may be installed on the terminal 100b, and the installed application programs may correspond to one or more application servers. That is, the application program of the terminal 100b can communicate with the one or more application servers.
- the application server may be a server of an audio and video call application, and may provide an audio and video call function for the terminal 100b.
- the audio and video call function refers to a voice call function or a video call function.
- the video call function usually includes a voice call function, that is, during the video call, the user of the video call can see the other party's picture and hear the other party's voice.
- the terminal 100b may establish a connection with the server 300b through one or more networks.
- the network may be a local area network (LAN) or a wide area network (WAN), such as the Internet.
- the network may be implemented using any known network communication protocol, which may be various wired or wireless communication protocols, such as Ethernet, universal serial bus (USB), Firewire (FIREWIRE), any cellular Internet communication protocol (such as 3G/4G/5G/future communication technology), Bluetooth, wireless fidelity (Wi-Fi), NFC or any other suitable communication protocol.
- the terminal 200b can also establish a communication connection with the server 300b through one or more networks.
- the type of the network and the communication protocol used may refer to the network used by the terminal 100b to connect to the server 300b.
- the provided communication method is mainly described by taking an audio and video call application as an example.
- the audio and video calling application may be, for example, but not limited to, the Changlian calling application, the WeChat application, facetime (an audio and video calling software), and other applications with a video pass-through function.
- both the terminal 100b and the terminal 200b can determine and report their corresponding state information to the server 300b.
- the state information corresponding to the terminal is used to reflect the state of the terminal (such as insufficient power) and/or reflect the state of the user using the terminal (such as sleeping, exercising).
- the state information corresponding to the terminal includes the state information of the terminal and/or the state information of the user of the terminal.
- the terminal 100b and the terminal 200b may respectively obtain the state information of the other party from the server, so as to perform subsequent operations according to the state information of the other party.
- the terminal determines the status information, which may be determined by the terminal through hardware, such as data collected by wearable devices, sensors or other devices, or through data collected by the terminal through software (such as the Changlian call application).
- the terminal 100b to initiate a video call to the terminal 200b as an example, for example, when the user of the terminal 200b is taking a bath and it is inconvenient to answer the phone at this time, the user can set the status information through the terminal 200b to "in a bath" and report it to the server 300b the status information. Then, when the terminal 100b calls the terminal 200b, the state information corresponding to the terminal 200b can be obtained from the server 300b, that is, the user is taking a bath.
- the terminal 100b may also display the status information to the user of the terminal 100b through presentation methods such as text, sound, or pictures.
- the terminal 100b can prompt the user to reflect the state information corresponding to the terminal 200b, that is, the user is taking a bath. It can be seen that the information obtained by the terminal 100b is no longer limited to a single pre-selected multimedia resource, so it can meet the user's audiovisual needs to a greater extent.
- the user of the terminal 100b can know the current status of the user of the terminal 200b according to the status information prompted by the terminal 100b. Then, the user of the terminal 100b can leave a message or call later according to the current status of the user of the terminal 100b. , can improve communication efficiency.
- the above-mentioned terminal 100b has call capability and Internet access capability.
- the terminal 100b may be, for example, a mobile phone, a tablet computer, a smart screen (smart TV), a personal computer (PC), a personal digital assistant (PDA), a smart watch, a netbook, a wearable electronic device, or an augmented reality technology.
- augmented reality, AR equipment
- virtual reality virtual reality
- in-vehicle equipment smart cars, smart speakers, robots, etc.
- the specific form of the terminal 100b is not specifically limited in this application.
- the types of the terminal 200b and the terminal 100b may be the same or different.
- the terminal 100b is a mobile phone
- the terminal 200b is a tablet.
- the calling capability is not limited to calls provided by operators (such as calling by phone number), but can also include voice over internet protocol (voice over internet protocol) provided by mobile phone manufacturers or third-party companies (over the top, OTT). , VoIP) calls.
- operators such as calling by phone number
- voice over internet protocol voice over internet protocol
- OTT third-party companies
- the terminal 100b may be connected to an external device through the USB interface 130 to implement data communication between the terminal 100b and the external device.
- the terminal 100b may also be connected to the external device through other interfaces, or the terminal 100b may be connected to the external device through a wireless connection.
- the terminal 100b may collect sensing data through one or more external devices, and determine state information corresponding to the terminal 100b according to the sensing data. The state information corresponding to the terminal is used to provide the communication peer of the terminal.
- the terminal 100b may establish a wireless connection with the external device through the wireless communication unit 160 and the antenna 2, so as to realize data communication between the terminal 100b and the external device.
- the software system of the terminal 100b may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture.
- the embodiment of the present invention takes the Android system with a layered architecture as an example to exemplarily describe the software structure of the terminal 100b.
- FIG. 20 is a software architecture block diagram of the terminal 100b according to the embodiment of the present invention.
- the software architecture block diagram of the terminal 200b reference may be made to the software architecture block diagram of the terminal 100b.
- the layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate with each other through software interfaces.
- the Android system is divided into four layers, which are, from top to bottom, an application layer, an application framework layer, an Android runtime (Android runtime) and a system library, and a kernel layer.
- the application layer can include a series of application packages.
- the application package can include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and so on.
- the application package further includes an audio and video call application with an audio and video call function, such as a smooth connection call application, a WeChat application, a QQ application, and facetime.
- the audio and video call application may be a preset application program on the terminal 100b, an application program integrated in the system, or an application program downloaded by the user through the application market or other methods. Do limit.
- Applications also include applications capable of recording state information. Users can set state information through this type of application.
- the state information includes user state information for reflecting the user state, and terminal state information for reflecting the terminal state.
- the state information of the user of the terminal includes at least one item of the following information: the user's location, time, environmental information, activities performed by the user, health status, mood, and the like.
- the state information of the terminal includes, but is not limited to, at least one of the following information: power level, signal quality, location, environment information, and the like of the terminal. This embodiment of the present application does not limit the specific content of the status information.
- the user enters a piece of his own status information on the interface of the application: "I am on vacation, do not disturb”, “I am reading a book”, “I am eating”, “I am off work, I don't want to answer the phone”, "I have something to do with my secretary”, " A new batch of dishes has been added, come and taste", "The weather is really nice”, “I'm in a good mood at the moment”, “Vanke's new market is about to open, you need to contact me”.
- the application capable of recording the state information may be a preinstalled application in the terminal 100b, or may be an application subsequently downloaded through, for example, a third-party application store.
- This embodiment of the present application does not limit this.
- an application capable of recording status information may be a Changlian call application, a sticky note, a memo, and the like.
- the application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer.
- the application framework layer includes some predefined functions.
- the application framework layer may include window managers, content providers, view systems, telephony managers, resource managers, notification managers, and the like.
- a window manager is used to manage window programs.
- window programs For a specific introduction, please refer to the text corresponding to FIG. 5 .
- the application framework layer may further include a state awareness module, and the state awareness module may be used to monitor various environmental change information of the terminal 100b, sensor data, terminal operation data, user information through the application The state data set by the program (such as the Changlian Call APP), and the change information of the user's behavior, etc., in order to determine the state information.
- the state perception module can call a corresponding module (such as a WLAN chip included in the wireless communication unit 160 ) of the terminal 100b through a driver (such as a WLAN driver) at the kernel layer, so as to report state information to the server through the module (such as a WLAN chip).
- Android Runtime includes core libraries and a virtual machine.
- a system library can include multiple functional modules. For the specific introduction of the system library, refer to the corresponding embodiment in FIG. 5 .
- the kernel layer is the layer between hardware and software.
- the kernel layer contains at least display drivers, camera drivers, audio drivers, and sensor drivers.
- the structure of the server 300b may also refer to the structure of the terminal 100a in FIG. 4 , and the server 300b may have more or less components than the structure shown in FIG. 4 , or combine some components, or split some components components, or a different arrangement of components.
- the illustrated components may be implemented in hardware, software, or a combination of software and hardware.
- the structure of the server 300b can be seen in FIG. 6-1.
- FIG. 21 shows another schematic structural diagram of the server 300b.
- the server 300b includes a state information management module 201 and an authority query module 202 .
- the state information management module 201 of the server is used for interacting with the communication unit of the terminal (such as the WLAN module) about the content related to the state information. For example, it is used to receive the state information of the terminal or the state information of the user using the terminal from the terminal. For another example, it is also used to receive, from the first terminal, a query request for querying status information corresponding to the second terminal (including status information of the second terminal and/or status information of users using the second terminal).
- the permission query module 202 is configured to query the permission of the first terminal. That is, whether the first terminal has the right to access the state information corresponding to the second terminal.
- the state information management module 201 is further configured to feed back the state information corresponding to the second terminal to the first terminal when the first terminal has the right to access the state information corresponding to the second terminal.
- the terminal may acquire state information corresponding to the terminal in response to an instruction input by the user. Specifically, the terminal receives the state input instruction input by the user, the state input instruction is used to input the state information corresponding to the first terminal, and obtains the state information corresponding to the first terminal according to the state input instruction.
- the user can input a state input instruction through some application programs in the mobile phone, and set the state information. For example, the user's status information can be set: the user's location, the surrounding environment, the user's activities, and the user's mood. Of course, the user can also set the state information of the terminal through the application program.
- status information As shown in FIG. 22, several kinds of status information are listed, and the status information may also be other, and the specific content of the status information is not limited in this embodiment of the present application.
- the user may input his own status information through the operation interface of the Changlian call application.
- the user triggers the mobile phone to display the application main interface shown in (2) in Fig. 23-1 through the interface 501b, such as clicking on the icon of the Changlian call application, where the main application interface includes controls 502b, the user can trigger the mobile phone to display the status input interface 503b shown in (3) in FIG. 23-1 through an operation such as clicking on the control 502b.
- the state input interface 503b includes a control 504b for adding state information, and the user can trigger the mobile phone to display the state information editing interface 505b shown in (4) in Figure 23-1 through an operation such as clicking on the control 504b.
- the state information editing interface 505b further includes a file control 507b, through which the user can add some files to the input state information, such as adding pictures, audio, etc., to enrich the content of the state information.
- the user may input status information through the mobile phone keyboard on the interface 505b of the Changlian call application, for example, input "I am in a great mood today”.
- the state information editing interface 505b of the Changlian call application further includes a voice input control 506b, and the user can input state information through the voice input control 506b.
- the user inputs a voice command (state input command) to the mobile phone, for example, inputting "I am in a super good mood today".
- the mobile phone receives the voice command input by the user, and obtains the state information corresponding to the mobile phone according to the voice command.
- the mobile phone can also convert the speech into text, and present the converted text in the state information editing interface.
- the user can also input the status information in other ways than keyboard input and voice input, and the embodiments of the present application do not limit the specific manner in which the user inputs the status information.
- FIG. 23-1 shows the status information input by the user, that is, "I am in a great mood today", and the user can re-edit the status information at any time.
- the user can save the state information by, for example, clicking the "OK" control 508b shown in (5) in Figure 23-1.
- the user enters status information through a voice assistant application.
- the user can wake up the voice assistant by inputting a voice command or other operations (such as long pressing the navigation key), and the mobile phone displays the interface 601 shown in (1) in Figure 23-2.
- the interface 601 includes a voice input control 602 and a text input control 603 .
- the user can input status information through an operation such as clicking on the control 602, such as inputting a voice command "go to take a shower, answer the call later".
- the mobile phone recognizes the voice command input by the user, converts the voice command into text, and displays the interface shown in (2) in Figure 23-2 604. Display the text of "Go to take a bath, answer the call later" to the user.
- the style of the voice input control 602 shown in (2) in FIG. 23-2 and the style of the voice input control 602 shown in (1) in FIG. 23-2 may be different.
- the voice input control 602 may be displayed in the form of a sound spectrum and correspond to the sound input by the user.
- the voice assistant application has learned the status information by receiving the voice command input by the user, that is, the user needs to answer the call later when he goes to take a shower.
- the application for entering the status information may also be an application such as a memo, a sticky note, and the like. That is, the state awareness module can read the data of these applications and determine the state information based on the data.
- the process of exchanging state information between the state perception module and the application please refer to the process of interaction between the state perception module and the Changlian call application shown in FIG. 25 .
- the data is used as state information, and the state information is reported to the state perception module.
- Preset keywords can be associated with states.
- the preset keywords may be, for example, but not limited to, keywords such as mood, place, state, and time. The embodiment of the present application does not limit the specific content of the preset keyword.
- the first note includes a preset keyword, that is, the time 10:00-11:00, so the information of this note can be used as status information.
- the state information needs to be reported to the state perception module of the application framework layer, so that the state perception module can perform subsequent operations according to the state information.
- the Changlian call application obtains the status information, it actively reports the status information to the status perception module. For example, after the user clicks the "OK" control 508b shown in (5) in Figure 23-1, the channel status information obtained by the Changlian call application is "I feel very good today", then the Changlian call application reports the user to the status perception module of this status information.
- the status perception module may periodically or according to other conditions trigger to query the status information from the Changlian call application, and the Changlian call application responds to the query request from the status perception module , and report status information to the status perception module.
- the query period can be set to be shorter so that the status information can be updated quickly.
- the specific value of the query period can be flexibly set, which is not limited in this embodiment of the present application.
- the embodiments of the present application do not limit the conditions for triggering the state sensing module to query state information.
- the mobile phone can also determine the status information according to the sensing data collected by the internal components.
- the internal components include at least one of the following components: a sensor, a camera, a location positioning component (such as a GPS module).
- the sensors may include, but are not limited to, one or more of the following: acceleration sensors, gyroscopes, proximity sensors, and acceleration sensors, for implementing the collection of corresponding types of data.
- the camera can be used to collect images
- the location positioning component can be used to collect location information. In some cases, cameras and position-location components can also act as sensors.
- the state perception module may acquire the perception data collected by the microphone and the camera, and determine the state information based on the perception data. For example, the state perception module can identify the environment according to the audio data detected by the microphone and the image data collected by the camera, and recognize that the user is currently having a video conference. For another example, the state perception module can also determine the state of the user or the state of the terminal according to the data of the acceleration sensor, gyroscope, proximity sensor, acceleration sensor and other sensors, for example, the user is walking, running, driving, the terminal is low in battery power, etc.
- the state sensing module may acquire sensing data of sensors periodically or according to other strategies, and determine the state information according to the sensing numbers.
- the mobile phone may have insufficient power, or the corresponding status information obtained through its own application data or internal components is not accurate enough, or based on other considerations, for the purpose of data accuracy and other purposes, the mobile phone may also obtain the corresponding state information through an external device. status information.
- the external device may be an extension device of the mobile phone, such as an external camera, an external position positioning component, a sensor, and the like.
- the external device can also be other devices connected to the mobile phone, such as watches, bracelets, smart screens, etc. External devices can also be sensors on other devices connected to the phone, such as cameras and microphones on a car.
- the mobile phone may collect image data through an external camera, and the state sensing module determines the state of the user based on these images, for example, he is on an outing.
- the state perception module of the mobile phone can obtain data of the watch connected to the mobile phone, such as application data of the watch, and sensor data of the watch, and determine the user's state based on these data, such as running.
- the mobile phone can collect images through the camera on the connected car, and the status perception module determines based on the image data that the user's status is driving and the user's health status is good.
- Figure 26 shows an example of interaction between the state perception module and the sensor (or external device).
- the state sensing module can acquire the data of the sensor or external device, so as to determine the state information of the user or the terminal accordingly.
- the state perception module obtains the data (including state information) of the sensor (or external device), which can be the state perception module querying the sensor for state information according to cycles or events or other strategies, or the sensor (or external device) after acquiring the state information. , and actively report status information to the status perception module.
- the status information is determined by hardware such as sensors, and the status information is obtained in a more timely manner, and the status information can be obtained without waiting for the user to set.
- the state information may also be determined by a combination of hardware and software, so as to ensure the accuracy of the acquired state information as much as possible while the state information is timely.
- the mobile phone After the mobile phone obtains the status information, it needs to report the status information to the server. As a possible implementation manner, after acquiring the status information, the mobile phone actively sends the status information to the server. Or, the server queries the terminal for status information periodically or according to an event trigger, and in response to the query request from the server, the mobile phone sends the status information to the server.
- the mobile phone sends status information to the server, which may be that the mobile phone's status sensing module calls a corresponding communication unit (such as a WLAN module) to send the status information to the server through a driver (such as a WLAN driver) at the kernel layer.
- a corresponding communication unit such as a WLAN module
- a driver such as a WLAN driver
- the mobile phone can acquire and update the status information in time, and report the status information to the server.
- terminal 1 When a terminal, such as terminal 1, collects and reports the status information to the server according to the above embodiment, when another terminal (eg, terminal 2) calls terminal 1, terminal 2 can obtain the status information of terminal 1 from the server, so that the terminal The user of 2 can know the current state of the user of the terminal 1, and then can formulate different call strategies according to the current state of the user of the terminal 1. In this way, the user experience can be improved. For example, if the current state of the user of terminal 1 is in a conference, the user of terminal 2 can call the user of terminal 1 later. For another example, the user of terminal 1 is not in a good mood at the moment, then the user of terminal 2 may need to adjust the tone of the call, the wording, etc. when talking with the user of terminal 1.
- FIG. 28-1 is an interactive schematic diagram of a communication method provided by an embodiment of the present application.
- Bob's mobile phone ie, mobile phone B
- Bob's status information including Bob's status information and/or mobile phone B's status information
- a user inputs a call instruction through mobile phone A, for example, in the interface 701 shown in FIG. 28-1, clicks the video call control 703, or clicks the voice call control 702 in the interface 701.
- the technical solutions of the embodiments of the present application are described by taking the user clicking the video call control 703 to initiate a video call to Bob as an example.
- the mobile phone A In response to the user's operation on the control 703, the mobile phone A (ie the first terminal) sends an acquisition request to the server for requesting to acquire the state information corresponding to the mobile phone B (ie the second terminal).
- the mobile phone A receives the state information corresponding to the mobile phone B from the server.
- the mobile phone A can prompt the user of the mobile phone A with the status information of Bob.
- Bob's status information can be prompted to the user of mobile phone A by multimedia methods such as pictures, text, sound, and video.
- mobile phone A displays the interface 704 shown in Figure 28-1.
- the interface 704 may be a call interface, and the interface 704 includes Bob's status information, that is, in a conference.
- the status information is displayed to the user of mobile phone A in the form of text and pictures.
- the embodiment of the present application does not limit the specific display form of the status information.
- the state information corresponding to the mobile phone B is mainly obtained by the mobile phone A through the server.
- the mobile phone A obtains the state information corresponding to the mobile phone B, which can also be implemented as: obtaining the state information corresponding to the second terminal that is stored in the mobile phone A (the first terminal) and obtained in advance from the state server. That is, the mobile phone A can obtain and store the status information corresponding to the mobile phone B from the status server in advance, and subsequently, the mobile phone A can read the status information corresponding to the mobile phone B locally.
- the user may also trigger the mobile phone to display status information through operations such as an interface.
- the user triggers mobile phone A to display the interface 709 shown in Figure 28-2 by, for example, clicking on the Bob's name hotspot or Bob's avatar, and the interface 709 includes Bob's status information (in the meeting).
- prompt information may also be displayed to the user through a corresponding interface to prompt that the state information corresponding to the communication peer can be obtained.
- the prompt information is displayed through text.
- the prompt information is displayed through a preset icon effect.
- prompt information can also be presented in other ways (such as audio, animation effects, etc.).
- the text prompt information displayed to the user through text is displayed on the call, such as the call interface 708 "The state information of the counterparty can be obtained" is used to prompt that the state information corresponding to the second terminal can be obtained.
- a target user operation instruction for instructing to acquire the state information corresponding to the mobile phone B (second terminal) is detected through, for example, the call interface 708, the state information corresponding to the second terminal is acquired.
- mobile phone A obtains the status information corresponding to mobile phone B ( Figure 28- In 3, the mobile phone A obtains the status information corresponding to the mobile phone B through the status server as an example), and presents the status information corresponding to the mobile phone B (that is, in a conference).
- the user's operation is detected through the interface, which may be a click or slide operation generated by the user by touching the interface, or may refer to a hovering operation of the user's hand, that is, the user's hand and the screen There can be a certain distance between them, and the user's hand does not necessarily need to touch the screen.
- the interface may be a click or slide operation generated by the user by touching the interface, or may refer to a hovering operation of the user's hand, that is, the user's hand and the screen There can be a certain distance between them, and the user's hand does not necessarily need to touch the screen.
- the prompt information is presented by displaying a box outside the avatar.
- a frame with a flashing animation effect means that the state information corresponding to mobile phone B has been updated
- an animation effect of no frame flashing means that the state information corresponding to mobile phone B has not been updated.
- the user of the mobile phone A can obtain the latest status information corresponding to the mobile phone B from the status server after inputting an operation such as clicking on the avatar. Conversely, if there is no update, after the user of the mobile phone A inputs an operation such as clicking on the avatar, the state information corresponding to the mobile phone B that the mobile phone A has obtained from the state server in advance and stored locally can be obtained.
- the user can also prompt the interface effects of other shapes, sizes, and positions to prompt the user whether the status information of the communication peer is updated.
- prompt information may also be presented through other preset icon effects, so as to prompt the user that the state information corresponding to the communication peer can be obtained.
- the information about the first state information in the state information corresponding to the second terminal input by the first terminal may also be acquired.
- first comment information and send a first comment message to the message server, where the first comment message includes the first comment information and further includes the first state information or an identifier of the first state information. That is to say, there may be one or more pieces of status information corresponding to the second terminal, and the user of the first terminal may comment on part of the status information in the one or more pieces of status information.
- the mobile phone A presents the status information corresponding to the mobile phone B (that is, in a conference) through the interface 709, and the interface 709 may further include a control 710 for inputting comment information.
- the user can input through the control 710 such as a click operation to trigger the mobile phone A to display the interface 711 , the interface 711 includes an input box 712 , and input comment information in the input box 712 .
- interface 709 may directly include input box 712 for entering comment information.
- the embodiment of the present application does not limit the specific display manner of the interface.
- the user may perform an operation such as clicking on the "edit complete" control, and in response to this operation, mobile phone A sends a comment message to the message server, the comment message including the comment information (again. During a meeting, pay attention to rest), the comment message may further include the commented status information (ie, in a meeting) or the identification of the status information.
- the mobile phone B it receives the comment message sent by the message server, and displays the content of the comment message.
- the mobile phone B displays the content of the comment message, which can point to the user to prompt the receipt of new comment information, but does not display the specific content, that is, it does not display which state information the comment is made for, nor does it display the specific information of the user of mobile phone A. Comments (in a meeting again, take a break). For example, as shown in Figure 28-5, mobile phone B prompts the user of mobile phone B that there is new comment information, but the specific comment information is collapsed.
- Mobile phone B displays the content of the comment message, and can also point to the user to display specific comment information, as shown in Figure 28-6.
- the mobile phone B may also prompt the user with other information such as which user the comment information comes from.
- user A may set permissions for status information. Set which users the user A's status information is visible to and which users are invisible. The status information is visible to a certain user, indicating that when the user calls user A, the status information of the user A or the terminal used by the user A can be obtained from the server. If the state information of user A is not visible to a certain user, the user cannot obtain the state information of user A from the server.
- FIG. 29 is a schematic illustration of an interface operation for setting the visible range of status information.
- (1) in FIG. 29 shows an exemplary main interface 801 of the SmartChat application.
- the user can trigger the mobile phone to display the setting interface 803 shown in (2) in FIG. 29 by, for example, clicking on the setting option 802.
- the setting interface 803 includes a control 804 for setting the visible range of the status information, that is, setting the visible contacts of the status information.
- the user triggers the mobile phone to display the setting box 805 shown in (3) in FIG. 29 by, for example, clicking on the control 804 .
- the user can set the visible range of the status information through the setting box 805 .
- setting status information is only visible to contacts Andy and Sam.
- different visible ranges may also be set for different status information. For example, for more private status information, set friends to be visible. For non-private status information, set all contacts to be visible. In this way, the security of private data can be improved.
- different permissions may also be set for different terminals of the user.
- terminals with high privacy requirements such as mobile phones and office computers
- high-level permission requirements which are only visible to familiar people.
- terminals such as smart screens with low privacy requirements, it is visible to the average person.
- the specific settings can be flexibly set according to the actual application without limitation.
- users can also set the visibility range of status information through other applications other than Changlian Call.
- This embodiment of the present application does not limit the application for setting the visible range of status information and related interface operations.
- the mobile phone can also report the visible range of the status information to the server, so that the server can judge whether to feed back the status information of the called party to the corresponding calling party accordingly.
- a terminal that does not have access rights it does not display the prompt information "can obtain status information corresponding to the communication peer" during the call. For example, if (the user of) mobile phone A does not have the right to access mobile phone B, mobile phone A does not display the frame outside the avatar in Figure 28-4, so that the probability of attracting the user's attention can be reduced.
- the related function of "obtaining state information corresponding to the communication peer end" of the terminal may also be disabled, so as to reduce the probability that the terminal acquires the state information corresponding to the communication peer end.
- mobile phone A does not have permission to access mobile phone B.
- mobile phone A can display a frame outside the displayed avatar, but the user of mobile phone A is prohibited from inputting such as clicking The operation of this box is to prevent the user of the mobile phone A from acquiring the state information corresponding to the mobile phone B through this operation.
- the same user may hold multiple terminals, and the multiple terminals may be referred to as terminals associated with the user.
- multiple terminals associated with the user may have the same account, and certainly may have different accounts.
- Andy's mobile phone calls Bob, wherein, in step 2a, the query request sent by Andy's mobile phone to the server may carry the device identification of Andy's mobile phone and the device identification of Bob's mobile phone. According to the device identification of Bob's mobile phone, the server learns the visible range of Bob's status information to be queried, for example, the following table 7 is queried.
- the query request includes the identity of Andy's mobile phone
- the server finds that Andy's mobile phone is a device associated with the visible contact Andy by querying Table 7, and then Andy's mobile phone has permission to access Bob's state information. Therefore, the server returns Bob's status information to Andy's mobile phone, so that Andy can know Bob's current status through his mobile phone. Therefore, when the call is not connected, Andy's mobile phone can display the interface 704 shown in (1) in FIG. 30 , and the interface 704 indicates that Bob is in a meeting.
- the mobile phone C initiates a call to Bob, and queries the server for Bob's status information.
- the server learns that the mobile phone C is not the device associated with the visible contact of Bob's status information after the query.
- the mobile phone C does not have the right to access Bob's state information, and the server does not return Bob's state information to the mobile phone C.
- the server returns preset information to the mobile phone C, where the preset information may be information in the prior art.
- the mobile phone C performs subsequent operations according to the prior art. For example, during a call (the call is not connected), the call interface shown in (2) in FIG. 30 is displayed.
- the mobile phone C can display the real-time image captured by the front camera in the call interface 705 .
- two or more parties to the call may display an interface according to the prior art.
- the mobile phone may display Bob's status information before the mobile phone initiates a call until the call is connected.
- the mobile phone of the user A may display the call interface 706 shown in FIG. 31 (which may include the image captured by the front camera).
- FIG. 32 is another example of the communication method provided by this embodiment of the present application.
- Bob's mobile phone calls the camera on the in-vehicle terminal to collect images and learns that Bob is driving according to the images. Then the mobile phone reports the status information of Bob to the server, that is, he is driving. Subsequently, when someone calls Bob, the server may feed back Bob's status information to the calling party, so that the calling party knows that Bob is driving.
- the calling party may display the calling interface 707 shown in FIG. 32 .
- the communication method provided by the embodiment of the present application can freely customize the multimedia content provided by the terminal during the call process. . And the multimedia content can fully reflect the user's current state (such as mood, activity, etc.), and can enrich the user's audio-visual experience.
- the multimedia content displayed by the terminal to the user is not limited to a specific type, for example, more colorful content forms such as text, photos, user-defined audio, and user-defined video can be displayed,
- the presentation method is more flexible.
- FIG. 33 shows a schematic diagram of a communication method provided by an embodiment of the present application. The detailed implementation of this method can be found in the above-mentioned embodiments corresponding to FIG. 22 to FIG. 32 .
- the first terminal initiates an acquisition request to the server, and acquires the status information corresponding to the second terminal from the server in real time.
- the technical solutions of the embodiments of the present application are mainly described by taking the calling party obtaining the called state information from the server as an example.
- the called party can also obtain the calling state information from the server.
- the first terminal as the calling party when the first terminal initiates a call to the second terminal, status information corresponding to the second terminal may be acquired.
- the state information corresponding to the second terminal may be acquired.
- the called mobile phone can query the status information of the calling mobile phone from the server, so as to know the status of the calling party.
- the called mobile phone B can obtain the status information corresponding to the calling mobile phone A from the server, and display the status information corresponding to the mobile phone A to the user of the mobile phone B.
- the state information corresponding to the terminal includes any one or a combination of the following information: text, picture, audio, video, link, and applet.
- the state information corresponding to the second terminal is presented on the display interface of the first terminal, which can be specifically implemented as follows: using a user interface (user interface, UI) template and other methods to display text, Rich media forms such as pictures, videos, links, and small programs are displayed to the peer device in the form of an interface.
- UI user interface
- the above is mainly described by presenting the status information corresponding to the second terminal on the display interface of the first terminal as an example.
- the status information of the other party is displayed by means of sound, vibration, etc.
- user B sets the status information in the form of text, such as "running", through the Changlian call application.
- the mobile phone of user A calls the mobile phone of user B, and obtains the state information in the form of text corresponding to user B from the server.
- User A's mobile phone can use the text-to-speech (TTS) technology to convert the state information in the form of text into the form of speech, and broadcast it. In this way, user A can hear the status information of user B by placing his mobile phone next to his ear, such as "the user you dialed is running". experience.
- TTS text-to-speech
- state server and the message server may be the same server. Or, optionally, the state server and the message server are different servers.
- the mobile phones may call based on the phone number, or may initiate a call on the message sending interface, or search for the corresponding contact through the address book to make the call.
- the embodiment of the present application does not limit the scope of the call scenario.
- the terminal device can acquire and present the status information of the communication peer, which can improve the communication efficiency.
- the terminal device and the communication peer can transmit messages through the P2P connection that has been successfully established in the multi-party communication, without the need to use the relay server to transmit the message, that is, it is not used for other terminal devices to compete. Seizing communication resources can further improve communication efficiency.
- each functional module can be divided corresponding to each function, or two or more functions can be integrated. in a processing module.
- the above-mentioned integrated modules can be implemented in the form of hardware, and can also be implemented in the form of software function modules. It should be noted that, the division of modules in the embodiment of the present invention is schematic, and is only a logical function division, and there may be other division manners in actual implementation.
- FIG. 34 it is a schematic structural diagram of a possible structure of a communication apparatus provided by an embodiment of the present application based on functional module division.
- the communication device includes a presentation unit 1801 , an acquisition unit 1802 and a communication unit 1803 .
- the presentation unit 1801 is used to present relevant information. Exemplarily, prompt information is presented, status information corresponding to the communication peer end is presented, and a second comment message is presented. Wherein, presenting the status information corresponding to the communication peer end may be presenting the status information corresponding to the communication peer end through an interface; and/or playing a voice for prompting the state information corresponding to the communication peer end.
- the obtaining unit 1802 is configured to obtain relevant information. Exemplarily, the state information corresponding to the communication device is obtained, the state information corresponding to the communication opposite end is obtained, and the first comment information for the first state information of the communication opposite end input through the communication device is obtained.
- the communication unit 1803 is used to communicate with other devices. Exemplarily, it is used to send the first comment message carrying the first comment information to the message server. It can also be used to send the state information corresponding to the communication device to the state server. It can also be used to receive the second comment message sent by the message server.
- the obtaining unit 1802 is used to obtain the state information corresponding to the communication peer, which may be: sending an obtaining request to the state server through the communication unit 1803, and receiving a response from the state server through the communication unit 1803, and obtaining the corresponding correspondence of the communication end carried in the response status information.
- the obtaining unit 1802 is configured to obtain the state information corresponding to the communication peer end, and may also be: obtaining locally stored state information corresponding to the communication peer end that is pre-obtained from the state server.
- the functions of the above-mentioned communication unit 1803 may be implemented by the mobile communication unit 150 and/or the wireless communication unit 160 shown in FIG. 4 .
- the functions of the above-mentioned communication unit 1803 may be implemented by the processor 401 and/or the processor 408 shown in FIG. 6-1 .
- the acquiring unit 1802 and the presenting unit 1801 may be implemented by a processor. It can be understood that the presentation unit 1801 can also be implemented by, for example, a display screen, a speaker, and the like.
- the display screen presents the status information corresponding to the communication peer end in an interface manner
- the speaker plays a voice for prompting the state information corresponding to the communication peer end.
- the communication device may further include a storage module (not shown in FIG. 34 ).
- the storage module can be implemented by a memory.
- FIG. 34 is only an exemplary module division of a communication device, and the embodiment of the present application does not limit a specific module division manner.
- one or more modules can be split or combined or arranged in other ways.
- the communication unit can be used as a sub-module of the acquisition unit.
- the module division method shown in FIG. 21 may also be adopted.
- An embodiment of the present application further provides a chip system, and the structure of the chip system can be referred to in FIG. 18 .
- the processor 1101 and the interface circuit 1102 may be interconnected by wires.
- interface circuitry 1102 may be used to receive signals from other devices, such as memory.
- the interface circuit 1102 may be used to send signals to other devices (eg, the processor 1101).
- the interface circuit 1102 may read the instructions stored in the memory and send the instructions to the processor 1101 .
- the chip system can be used in a terminal or a server (state server or message server). When applied to the first terminal, when the instruction is executed by the processor 1101, the first terminal can be caused to perform each step performed by the first terminal in the foregoing embodiment.
- the second terminal When applied to the second terminal, when the instruction is executed by the processor 1101, the second terminal can be caused to perform each step performed by the second terminal in the foregoing embodiment.
- the instructions when executed by the processor 1101, can cause the server to perform various steps performed by the server in the above-described embodiments.
- the chip system may also include other discrete devices, which are not specifically limited in this embodiment of the present application.
- An embodiment of the present application further provides an apparatus, the apparatus is included in a terminal or a server, and the apparatus has a function of implementing the behavior of the first terminal or the second terminal or the state server or the message server in any of the methods in the foregoing embodiments.
- This function can be implemented by hardware or by executing corresponding software by hardware.
- the hardware or software includes at least one module or unit corresponding to the above-mentioned functions. For example, a presentation module or presentation unit, and an acquisition module or acquisition unit, and the like.
- the embodiments of the present application further provide a computer-readable storage medium, including computer instructions, when the computer instructions are executed on the first terminal or the second terminal or the state server or the message server (wherein the state server and the message server may be the same server) At the time, the first terminal or the second terminal is caused to execute any of the methods in the foregoing embodiments.
- Embodiments of the present application further provide a computer program product, which, when the computer program product runs on a computer, causes the computer to execute any of the methods in the foregoing embodiments.
- the terminal device, server, computer storage medium, or computer program product, etc. provided by the embodiments of the present application are all used to execute the corresponding methods provided above. Therefore, for the beneficial effects that can be achieved, reference may be made to the beneficial effects in the corresponding methods provided above, which will not be repeated here.
- the above-described embodiments may be implemented in whole or in part by software, hardware, firmware or any combination.
- the above-described embodiments may take the form of a computer program product, in whole or in part, comprising one or more computer instructions.
- the procedures or functions according to the embodiments of the present application are generated in whole or in part.
- the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
- Computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server, or data center over a wire (e.g. coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (eg infrared, wireless, microwave, etc.) means to another website site, computer, server or data center.
- a computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, a data center, or the like that includes an integration of one or more available media.
- the available media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, DVDs), or semiconductor media (eg, solid state disks (SSDs)), and the like.
- the disclosed apparatus and method may be implemented in other manners.
- the device embodiments described above are only illustrative.
- the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods.
- multiple units or components may be Incorporation may either be integrated into another device, or some features may be omitted, or not implemented.
- the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
- the units described as separate components may or may not be physically separated, and components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place, or may be distributed. to many different places. In the application process, some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
- each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
- the above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
- the integrated unit if implemented in the form of a software functional unit and sold or used as an independent product, may be stored in a computer-readable storage medium.
- the technical solutions of the embodiments of the present application can be embodied in the form of software products in essence, or the parts that make contributions to the prior art or the parts of the technical solutions, and the computer software products are stored in a storage medium , including several instructions to make a device (which may be a personal computer, a server, a network device, a single-chip computer or a chip, etc.) or a processor (processor) to execute all or part of the steps of the methods described in the various embodiments of the present application.
- the aforementioned storage medium includes: U disk, removable hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other media that can store program codes .
Landscapes
- Engineering & Computer Science (AREA)
- Signal Processing (AREA)
- Computer Networks & Wireless Communication (AREA)
- Human Computer Interaction (AREA)
- Multimedia (AREA)
- Environmental & Geological Engineering (AREA)
- Mobile Radio Communication Systems (AREA)
- Telephonic Communication Services (AREA)
Abstract
一种通信方法及电子设备,涉及通信技术领域,能够在诸如视频通话、语音通话等通信场景中,以提升终端之间的通信效率。所述方法应用于第一终端,所述方法包括:向服务器发送路径查询请求,从所述服务器接收路径查询响应;其中,所述路径查询请求用于请求至少一条第一转发路径;所述至少一条第一转发路径中每条第一转发路径可用于承载所述第一终端与第二终端之间的报文;所述路径查询响应用于指示所述至少一条第一转发路径;所述至少一条第一转发路径中每条第一转发路径由所述多方通信中多条已建成的点到点P2P链路组成;并通过所述至少一条第一转发路径中的目标转发路径发送报文。
Description
本申请要求于2021年2月10日提交国家知识产权局、申请号为202110185620.7、发明名称为“多方通信方法及电子设备”,于2021年2月10日提交国家知识产权局、申请号为202110185618.X、发明名称为“一种通信方法及电子设备”,2021年4月25日提交国家知识产权局、申请号为202110448981.6、发明名称为“通信方法及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及通信技术领域,尤其涉及通信方法及电子设备。
目前,用户可以很方便地使用诸如手机等终端与其他用户进行诸如视频、语音等通话。在诸如语音或视频通话等场景中,随着终端的业务类型越来越丰富,网络拓扑以及网络环境越来越复杂,目前终端之间的通信效率并不高。
发明内容
目前,用户可以很方便地使用诸如手机等终端与其他用户进行诸如视频通话等通信。
在一些方案中,视频通话等场景可以包括多方通信场景,多方通信场景即涉及多个终端之间通信的场景,比如多方视频通话,多方语音通话。以多方视频通话为例,在多方视频通话场景中,每两个终端之间需建立通信连接,以便于传递该两个终端之间的数据。在一些方案中,两个终端之间可以建立点对点(peer-to-peer,P2P)通道,并通过P2P通道传递该两个终端之间的视频、音频等数据。可以理解,当多方视频通话所涉及的终端的数量越多,很有可能存在某些终端之间无法建立P2P通道的情况。这种情况下,需部署中继服务器,使得无法直接通信的终端之间借助中继服务器转发相应数据。但是,部署较多的中继服务器意味着增加组网的复杂度和组网成本。并且,对于已部署的中继服务器来说,中继服务器负载往往较高,影响中继服务器的性能,进一步的,多个终端争抢中继服务器的带宽等通信资源,极有可能导致某些终端无法获取足够的通信资源而降低通信效率。
在一些方案中,在视频通话等场景中,为了向用户提供个性化的功能,电信运营商推出了诸如彩铃、彩振等业务。彩铃业务,即用户选择并设置彩铃音乐或者视频等多媒体文件之后,当其他人呼叫该用户,该其他用户,即主叫用户即可听到被叫用户预先设置的音乐或看到预先设置的视频。彩振业务,即主叫用户订购多媒体资源(比如视频、音乐),当该主叫用户向被叫用户发起呼叫时,被叫用户的终端上播放主叫用户订购的多媒体资源。
由此看出,目前的彩铃、彩振业务仅能由主叫用户或被叫用户预先选购所需展示的多媒体资源,能够呈现的多媒体资源固定,用户并不能从呈现的多媒体资源获知通信对端的信息,通信效率较低。并且,目前提供的多媒体资源较为单一,无法满足用 户丰富的视听需求。
可见,目前的视频通话等场景中,均无法为终端提供较高的通信效率。
为了解决目前终端之间的通信效率低的问题,本申请提供的一种通信方法及电子设备,能够在诸如视频通话、语音通话等通信场景中,提升终端之间的通信效率。
第一方面,提供一种通信方法,该方法应用于第一终端或能够与第一终端匹配使用以实现第一终端功能的组件(比如第一终端的芯片),以应用在第一终端为例,所述方法包括:
向服务器发送路径查询请求,并从所述服务器接收路径查询响应;其中,所述路径查询请求用于请求至少一条第一转发路径;所述至少一条第一转发路径中每条第一转发路径可用于承载所述第一终端与第二终端之间的报文;所述路径查询响应用于指示所述至少一条第一转发路径;所述至少一条第一转发路径中每条第一转发路径由所述多方通信中多条已建成的点到点P2P链路组成;并通过所述至少一条第一转发路径中的目标转发路径发送报文。
由上可见,在多方通信场景中,当第一终端与第二终端之间无法建立直连的P2P链路时,可以借助该多方通信中已建立的P2P链路来中转第一终端和第二终端之间的数据。如此,一方面,无需借助中继服务器转发终端之间的数据,或可以降低中继服务器的部署数量,进而能够降低组网复杂度和组网成本。另一方面,对于终端来说,因为该终端不用和其它终端争抢中继服务器的带宽等通信资源,尽可能保障了终端的通信资源,进而提高终端之间的通信效率。
在一种可能的设计中,所述第一转发路径为一条。
在一种可能的设计中,所述第一转发路径为多条;所述方法还包括:
根据预设参数,从所述多条第一转发路径中选择所述目标转发路径;
所述预设参数包括链路级别参数和/或路径级别参数,对于每条第一转发路径,所述链路级别参数包括如下参数中的一个或任意组合:组成所述第一转发路径的P2P链路的时延、组成所述第一转发路径的P2P链路的服务质量QoS、组成所述第一转发路径的P2P链路的网络类型;网络类型包括无线高保真Wi-Fi网络或蜂窝网;所述路径级别参数包括所述第一转发路径的中转设备数目。
在一种可能的设计中,根据预设参数,从所述多条第一转发路径中选择所述目标转发路径,包括:
根据所述预设参数以及预设策略,从所述多条第一转发路径中选择所述目标转发路径;
所述预设策略包括如下策略中的一个或任意组合:所述目标转发路径的时延最低,所述目标转发路径的时延小于或等于时延阈值上限,所述目标转发路径的QoS最佳,所述目标转发路径的QoS值在预设QoS值范围内,所述目标转发路径的中转设备数目最少,所述目标转发路径的中转设备数目在预设数目范围内,所述目标转发路径的第一P2P链路的网络类型为预设网络类型;预设网络类型包括Wi-Fi网络;所述第一P2P链路为所述第一终端连接的P2P链路或所述第二终端连接的P2P链路。
在一种可能的设计中,所述目标转发路径为:第一P2P链路的网络类型为预设网络类型的第一转发路径中时延最低的第一转发路径;所述第一P2P链路为所述第一终 端连接的P2P链路或所述第二终端连接的P2P链路;
或,所述目标转发路径为:第一P2P链路的网络类型为预设网络类型的第一转发路径中QoS最佳的第一转发路径;
或,所述目标转发路径为:第一P2P链路的网络类型为预设网络类型的第一转发路径中中转设备数目最少的第一转发路径;
或,所述目标转发路径为:QoS值在预设QoS值范围内的第一转发路径中时延最低的第一转发路径;
或,所述目标转发路径为:QoS值在预设QoS值范围内的第一转发路径中中转设备数目最少的第一转发路径;
或,所述目标转发路径为:QoS值在预设QoS值范围内的第一转发路径中第一P2P链路的网络类型为预设网络类型的第一转发路径;
或,所述目标转发路径为:时延小于或等于时延阈值的第一转发路径中第一P2P链路的网络类型为预设网络类型的第一转发路径;
或,所述目标转发路径为:时延小于或等于时延阈值的第一转发路径中QoS最佳的第一转发路径;
或,所述目标转发路径为:时延小于或等于时延阈值的第一转发路径中中转设备数目最少的第一转发路径;
或,所述目标转发路径为:中转设备数目在预设数目范围内的第一转发路径中时延最低的第一转发路径;
或,所述目标转发路径为:中转设备数目在预设数目范围内的第一转发路径中QoS最佳的第一转发路径;
或,所述目标转发路径为:中转设备数目在预设数目范围内的第一转发路径中第一P2P链路的网络类型为预设网络类型的第一转发路径。
所述目标转发路径为所述多条第一转发路径中权重值表征的路径质量高于阈值的第一转发路径。
n
relay是所述第一转发路径的路径级别参数的量化值,w
relay是n
relay对应的权重;
所述目标转发路径为所述多条第一转发路径中权重值表征的路径质量高于阈值的第一转发路径。
在一种可能的设计中,所述报文携带所述目标转发路径或目标子路径;
所述目标转发路径由M个P2P链路组成;所述目标转发路径的源节点为所述第一终端,所述目标转发路径的目的节点为所述第二终端;所述目标子路径由所述M个P2P链路中的相邻M-1个P2P链路组成,所述目标子路径的源节点为所述第一终端的下一跳终端,所述目标子路径的目的节点为所述第二终端;M为大于或等于2的整数。
在一种可能的设计中,所述向服务器发送路径查询请求,包括:
在所述第一终端与所述第二终端之间的P2P链路未建立成功的情况下,向所述服务器发送所述路径查询请求。
第二方面,本申请提供一种通信方法,该方法应用于第三终端或能够与第三终端匹配使用以实现第三终端功能的组件(比如第三终端的芯片)。以应用在第三终端为例,该第三终端位于目标转发路径上,所述方法包括:
接收第一终端通过所述目标转发路径向第二终端发送的报文,所述报文携带第二转发路径;所述第二转发路径是所述目标转发路径或目标子路径;所述目标转发路径用于承载所述第一终端与第二终端之间的报文,所述目标转发路径由M个P2P链路组成;所述目标转发路径的源节点为所述第一终端,所述目标转发路径的目的节点为所述第二终端;所述目标子路径由所述M个P2P链路中的相邻N个P2P链路组成,所述目标子路径的源节点为所述第三终端,所述目标子路径的目的节点为所述第二终端;M为大于或等于2的整数,N为正整数,N小于M;
根据所述第二转发路径发送报文。
第三方面,提供一种通信方法,所述方法应用于服务器或能够与服务器匹配使用以实现服务器功能的组件(比如服务器的芯片),所述方法包括:
从第一终端接收路径查询请求;所述路径查询请求用于请求至少一条第一转发路径;所述至少一条第一转发路径中每条第一转发路径可用于承载所述第一终端与第二终端之间的报文;
响应于所述路径查询请求,向所述第一终端发送路径查询响应,所述路径查询响应用于指示所述至少一条第一转发路径;每条第一转发路径由所述多方通信中多条已建成的P2P链路组成。
在一种可能的设计中,所述第一转发路径为多条。
在一种可能的设计中,所述第一转发路径为一条;
所述方法还包括:根据预设参数,从多条可用转发路径中选择所述第一转发路径;所述可用转发路径为可用于承载所述第一终端与所述第二终端之间报文的转发路径;
所述预设参数包括链路级别参数和/或路径级别参数,对于每条可用转发路径,所述链路级别参数包括如下参数中的一个或任意组合:组成所述可用转发路径的P2P链路的时延、组成所述可用转发路径的P2P链路的服务质量QoS、组成所述可用转发路径的P2P链路的网络类型;网络类型包括无线高保真Wi-Fi网络或蜂窝网;所述路 径级别参数包括所述可用转发路径的中转设备数目。
在一种可能的设计中,所述根据预设参数,从多条可用转发路径中选择所述第一转发路径,包括:
根据所述预设参数以及预设策略,从所述多条可用转发路径中选择所述第一转发路径;
所述预设策略包括如下策略中的一个或任意组合:所述第一转发路径的时延最低、所述第一转发路径的时延小于或等于时延阈值上限、所述第一转发路径的QoS最佳、所述第一转发路径的QoS值在预设范围内、所述第一转发路径的中转设备数目最少、所述第一转发路径的中转设备数目在预设数目范围内、所述第一转发路径的第一P2P链路的网络类型为预设网络类型;预设网络类型包括Wi-Fi网络;所述第一P2P链路为所述第一终端连接的P2P链路或所述第二终端连接的P2P链路。
所述第一转发路径为所述多条可用转发路径中权重值表征的路径质量高于阈值的可用转发路径。
其中,p
i为第i个链路级别参数的量化值,w
i为p
i对应的权重,N为链路级别参数的数目;
为所述可用转发路径的第j条P2P链路的权重,M为组成所述可用转发路径的P2P链路数目;n
relay是所述可用转发路径的路径级别参数的量化值,w
relay是n
relay对应的权重;
所述第一转发路径为所述多条可用转发路径中权重值表征的路径质量高于阈值的可用转发路径。
在一种可能的设计中,所述方法还包括:
从所述多方通信中已建立P2P链路的每一终端接收所连接P2P链路对应的链路级别参数。
在一种可能的设计中,所述方法还包括:
从所述第一终端接收所述预设策略。
第四方面,提供一种通信装置,该通信终端可以是第一终端或能够与第一终端匹配使用以实现第一终端功能的组件(比如第一终端的芯片)。以该通信装置为第一终端为例,所述第一终端包括:
发送单元,用于向服务器发送路径查询请求,所述路径查询请求用于请求至少一条第一转发路径;所述至少一条第一转发路径中每条第一转发路径可用于承载所述第 一终端与第二终端之间的报文;
接收单元,用于从所述服务器接收路径查询响应;所述路径查询响应用于指示所述至少一条第一转发路径;所述至少一条第一转发路径中每条第一转发路径由所述多方通信中多条已建成的点到点P2P链路组成;
所述发送单元,还用于通过所述至少一条第一转发路径中的目标转发路径发送报文。
第五方面,提供一种通信装置,该通信终端可以是第三终端或能够与第三终端匹配使用以实现第三终端功能的组件(比如第三终端的芯片)。以该通信装置为第三终端为例,该第三终端位于目标转发路径上,所述第三终端包括:
接收单元,用于接收第一终端通过所述目标转发路径向第二终端发送的报文,所述报文携带第二转发路径;所述第二转发路径是所述目标转发路径或目标子路径;所述目标转发路径用于承载所述第一终端与第二终端之间的报文,所述目标转发路径由M个P2P链路组成;所述目标转发路径的源节点为所述第一终端,所述目标转发路径的目的节点为所述第二终端;所述目标子路径由所述M个P2P链路中的相邻N个P2P链路组成,所述目标子路径的源节点为所述第三终端,所述目标子路径的目的节点为所述第二终端;M为大于或等于2的整数,N为正整数,N小于M;
发送单元,用于根据所述第二转发路径发送报文。
第六方面,提供一种通信装置,该通信终端可以是服务器或能够与服务器匹配使用以实现服务器功能的组件(比如服务器的芯片)。以该通信装置为服务器为例,该服务器包括:
接收单元,用于从第一终端接收路径查询请求;所述路径查询请求用于请求至少一条第一转发路径;所述至少一条第一转发路径中每条第一转发路径可用于承载所述第一终端与第二终端之间的报文;
发送单元,用于响应于所述路径查询请求,向所述第一终端发送路径查询响应,所述路径查询响应用于指示所述至少一条第一转发路径;每条第一转发路径由所述多方通信中多条已建成的P2P链路组成。
第七方面,提供一种通信装置,该通信装置包括用于实现上述第一方面任意可能方法的模块,或,该通信装置包括用于实现上述第二方面任意可能方法的模块,或,该通信装置包括用于实现上述第三方面任意可能方法的模块。
第八方面,提供一种通信方法,所述方法应用于第一终端或能够和第一终端匹配使用以实现第一终端功能的装置(比如第一终端的芯片),所述方法包括:在所述第一终端与第二终端之间发生呼叫时,在所述呼叫的呼叫界面上呈现提示信息,所述提示信息用于提示可获取所述第二终端对应的状态信息;在通过所述呼叫界面检测到用于指示获取所述第二终端对应的状态信息的用户操作指示时,获取所述第二终端对应的状态信息;呈现所述第二终端对应的状态信息。
通过该方法,能够在呼叫场景中获取并呈现通信对端对应的状态信息,也就是主叫、被叫之间共享的不再是千人一面的彩铃/彩振信息,而是可以分享彼此的状态,如此有助于提升通信效率。比如,主叫通过获取并呈现被叫的状态信息,得知被叫在会议中,则主叫用户无需继续等待被叫用户接通该呼叫,而是可以挂断呼叫,稍后再 呼叫被叫用户,如此,避免浪费等待时间,节约用户时间,提升通信效率。再比如,被叫通过获取并呈现主叫的状态信息,获知发起呼叫的主叫用户此时心情很好,则被叫可以选择立即接通该呼叫,并和主叫用户进行通信,提升通信效率。
此外,通过呈现通信对端的状态信息,能够满足用户的视听需求,提升用户的视听体验。
在一种可能的设计中,所述第一终端与第二终端之间发生呼叫包括:
所述第一终端向所述第二终端发起呼叫;或者,所述第一终端接收到所述第二终端发起的呼叫。
在一种可能的设计中,所述获取所述第二终端对应的状态信息包括:
向状态服务器发送获取请求,所述获取请求用于请求获取所述第二终端对应的状态信息,并从所述状态服务器接收所述第二终端对应的状态信息。在需要获取第二终端对应的状态信息时,第一终端可以主动向状态服务器发起获取请求,这样一来,第一终端可以获取到第二终端对应的最新的状态信息,准确性更高。
或者,所述获取所述第二终端对应的状态信息包括:获取所述第一终端存储的预先从所述状态服务器获取的所述第二终端对应的状态信息。
在一种可能的设计中,所述呈现所述第二终端对应的状态信息包括:
在所述第一终端的显示界面上呈现所述第二终端对应的状态信息;和/或,播放用于提示所述第二终端对应的状态信息的语音。第一终端可以通过多种方式呈现第二终端对应的状态信息,从而能够提升用户的视听体验。
在一种可能的设计中,所述第二终端对应的状态信息包括所述第二终端的状态信息和/或所述第二终端的用户的状态信息。
在一种可能的设计中,所述第二终端的状态信息包括如下信息中的至少一项:位置、环境信息、电量、信号质量;和/或,所述第二终端的用户的状态信息包括如下信息中的至少一项:所述用户进行的活动、健康状况、心情。
在一种可能的设计中,所述第二终端对应的状态信息包括如下信息中的至少一项:文本、图片、音频、视频、链接、小程序。
可见,终端向用户展示的多媒体内容不局限于特定类型,比如可以展示文本、照片、用户自定义的音频、用户自定义的视频等更丰富多彩的内容形态,展示方式更加灵活。
在一种可能的设计中,所述在所述呼叫的呼叫界面上呈现提示信息包括:
在所述呼叫界面上通过文字呈现所述提示信息;或者,在所述呼叫界面上通过预设图标效果呈现所述提示信息。
在一种可能的设计中,在所述呈现所述第二终端对应的状态信息之后,所述方法还包括:
获取所述第一终端输入的针对所述第二终端对应的状态信息中的第一状态信息的第一评论信息;
向消息服务器发送第一评论消息,所述第一评论消息包括所述第一评论信息,所述第一评论消息还包括所述第一状态信息或所述第一状态信息的标识。
在一种可能的设计中,所述方法还包括:
获取所述第一终端对应的状态信息;
向所述状态服务器发送所述第一终端对应的状态信息,所述第一终端对应的状态信息用于提供给所述第一终端的通信对端,所述第一终端的通信对端包括所述第二终端。
在一种可能的设计中,所述获取所述第一终端对应的状态信息,包括:
通过所述第一终端的内部组件或所述第一终端所连接的外部设备获取所述第一终端对应的状态信息;和/或,接收所述用户输入的状态输入指令,所述状态输入指令用于输入所述第一终端对应的状态信息,并根据所述状态输入指令获取所述第一终端对应的状态信息。
在一种可能的设计中,所述内部组件包括如下组件中的至少一个:传感器、摄像头、位置定位组件。
在一种可能的设计中,所述方法还包括:
接收所述消息服务器发送的第二评论消息,所述第二评论消息包括第二评论信息以及所述第一终端对应的状态信息中的第二状态信息,所述第二评论信息为所述第二终端输入的针对所述第二状态信息的评论信息;
呈现所述第二评论消息的内容。
在一种可能的设计中,所述状态服务器和所述消息服务器为同一服务器。
第九方面,本申请提供一种通信方法,该方法应用于第一终端或能够和第一终端匹配使用以实现第一终端功能的装置(比如第一终端的芯片),所述方法包括:
在所述第一终端与第二终端之间发生呼叫时,获取所述第二终端对应的状态信息;
呈现所述第二终端对应的状态信息。
在一种可能的设计中,所述第一终端与第二终端之间发生呼叫包括:
所述第一终端向所述第二终端发起呼叫;或者,所述第一终端接收到所述第二终端发起的呼叫。
在一种可能的设计中,所述获取所述第二终端对应的状态信息,包括:
向状态服务器发送获取请求,所述获取请求用于请求获取所述第二终端对应的状态信息,并从所述状态服务器接收所述第二终端对应的状态信息;或者,获取所述第一终端存储的预先从所述状态服务器获取的所述第二终端对应的状态信息。
第十方面,本申请提供一种通信系统,所述通信系统包括状态服务器和多个通信终端,所述多个通信终端包括第一终端和第二终端;
所述第二终端,用于向所述状态服务器发送所述第二终端对应的状态信息;
所述状态服务器,用于接收所述第二终端对应的状态信息,还用于向所述第一终端发送所述第二终端对应的状态信息;
所述第一终端,用于在所述第一终端与第二终端之间发生呼叫时,在所述呼叫的呼叫界面上呈现提示信息,所述提示信息用于提示可获取所述第二终端对应的状态信息,还用于在通过所述呼叫界面检测到用于指示获取所述第二终端对应的状态信息的用户操作指示时,获取所述第二终端对应的状态信息,并呈现所述第二终端对应的状态信息,其中,所述第二终端对应的状态信息来自所述状态服务器。
第十一方面,本申请提供一种通信装置,该装置可以是第一终端或能够与第一终端匹配使用以实现第一终端功能的组件(比如第一终端的芯片)。以该装置为第一终端为例,该第一终端包括:
呈现单元,用于在所述第一终端与第二终端之间发生呼叫时,在所述呼叫的呼叫界面上呈现提示信息,所述提示信息用于提示可获取所述第二终端对应的状态信息;
获取单元,用于在通过所述呼叫界面检测到用于指示获取所述第二终端对应的状态信息的用户操作指示时,获取所述第二终端对应的状态信息;
所述呈现单元,还用于呈现所述第二终端对应的状态信息。
第十二方面,本申请提供一种通信装置,该装置可以是第一终端或能够与第一终端匹配使用以实现第一终端功能的组件(比如第一终端的芯片)。以该装置为第一终端为例,该第一终端包括:
获取单元,用于在所述第一终端与第二终端之间发生呼叫时,获取所述第二终端对应的状态信息;
呈现单元,用于呈现所述第二终端对应的状态信息。
第十三方面,本申请提供一种电子设备,该电子设备包括:处理器和存储器,所述存储器与所述处理器耦合,所述存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令,当所述处理器从所述存储器中读取所述计算机指令,以使得所述电子设备执行如第八方面中任一项所述的通信方法,或执行如第九方面中任一项所述的通信方法。
第十四方面,本申请提供一种计算机存储介质,包括计算机指令,当所述计算机指令在终端上运行时,使得所述终端执行如第八方面中任一项所述的通信方法,或执行如第九方面中任一项所述的通信方法。
第十五方面,本申请提供一种计算机程序产品,当所述计算机程序产品在计算机上运行时,使得所述计算机执行如第八方面中任一项所述的通信方法,或执行如第九方面中任一项所述的通信方法。
第十六方面,提供一种通信装置,该装置包括用于实现第八方面中任一项可能设计的模块。
第十七方面,提供一种通信装置,该装置包括用于实现第九方面中任一项可能设计的模块。
第十八方面,提供一种电子设备,包括:处理器、存储器,所述存储器与所述处理器耦合,所述存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令,当所述处理器从所述存储器中读取所述计算机指令,以使得所述电子设备执行如上述任一方面及其中任一种可能的实现方式中所述的方法。
第十九方面,提供一种装置,该装置包含在电子设备中,该装置具有实现上述方面及可能的实现方式中任一方法的功能。该功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。硬件或软件包括至少一个与上述功能相对应的模块或单元。例如,接收模块或单元、显示模块或单元、采集模块或单元、以及发送模块或单元等。
第二十方面,提供一种计算机可读存储介质,包括计算机指令,当计算机指令在计算机上运行时,使得计算机执行如上述任一方面及其中任一种可能的实现方式中所 述的方法。
第二十一方面,提供一种计算机程序产品,当计算机程序产品在计算机上运行时,使得计算机执行如上述方面中及其中任一种可能的实现方式中所述的方法。
第二十二方面,提供一种芯片系统,包括处理器,当处理器执行指令时,处理器执行如上述方面中及其中任一种可能的实现方式中所述的方法。
图1为本申请实施例提供的一种终端之间的连接方式示意图;
图2、图3为本申请实施例提供的通信的系统架构示意图一;
图4为本申请实施例提供的一种终端的结构示意图;
图5为本申请实施例提供的一种终端的软件结构示意图一;
图6-1、图6-2为本申请实施例提供的服务器的结构示意图一;
图7、图8为本申请实施例提供的发起多方通信的流程示意图;
图9为本申请实施例提供的多方通话接通到P2P连接建立前终端之间通信的示意图;
图10为本申请实施例提供的P2P连接建立的流程示意图;
图11为本申请实施例提供的终端之间的P2P连接建立情况的示意图;
图12-1、图12-2为本申请实施例供提的通信方法的场景示意图;
图12-3为本申请实施例提供的有权无向图的示意图;
图13为本申请实施例提供的通信方法的流程示意图一;
图14为常规的通过中继方式进行多方通信的方法示意图;
图15-图17为本申请实施例提供的通信装置的结构示意图一;
图18为本申请实施例提供的芯片系统的示意图;
图19为本申请实施例提供的系统架构的示意图二;
图20为本申请实施例提供的终端的软件架构的示意图二;
图21为本申请实施例提供的服务器的结构示意图二;
图22为本申请实施例提供的状态信息的示意图;
图23-1、图23-2、图24为本申请实施例提供的用户输入状态信息的场景示意图;
图25为本申请实施例提供的通过用户输入的指令获取状态信息的示意图;
图26为本申请实施例提供的通过硬件获取状态信息的示意图;
图27为本申请实施例提供的终端与服务器之间交互的示意图;
图28-1至图28-6为本申请实施例提供的获取并呈现状态信息的场景示意图;
图29、图30为本申请实施例提供的状态信息的权限的使用示意图;
图31为本申请实施例提供的呼叫接通的场景示意图;
图32为本申请实施例提供的通过外部设备获取状态信息的示意图;
图33为本申请实施例提供的通信方法的流程示意图二;
图34为本申请实施例提供的通信装置的结构示意图二。
在本申请实施例的描述中,除非另有说明,“/”表示或的意思,例如,A/B可以表 示A或B;本文中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。
以下,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。在本申请实施例的描述中,除非另有说明,“多个”的含义是两个或两个以上。
在本申请实施例中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请实施例中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。
本申请实施例中,不同信息可通过同一条消息承载,也可分别由不同消息承载。本申请实施例不限制信息的具体承载方式。
P2P通信模式,作为计算机网络领域的常用通信模式,通过设备间的P2P通道(或称P2P连接),可以使设备之间直接通信以实现资源共享和信息交换。
在多方通信场景下,比如多方通话,视频会议等,难以保证每两个设备之间的P2P通道均建立成功。当部分设备之间无法成功建立直连的P2P通道时,需部署中继服务器,从而使无法通过P2P通道直连的设备借助中继服务器进行中继通信。示例性的,图1为多方视频通话场景下,多个终端间的连接关系。其中,终端A与终端B、终端B与终端E、终端D与终端C、终端D与终端A、终端D与终端B、终端D与终端E之间均成功建立P2P通道。终端A与终端C、终端A与终端E、终端C与终端B、终端C与终端E之间均借助中继服务器建立中继通道。图1所示的信令流用于中继服务器与相应终端建立中继通道。
目前,随着终端数量的增多,诸如多方视频通话等多方通信场景中可能存在越来越多未能成功建立P2P直连通道的终端。这样一来,需中继服务器提供诸如带宽等资源给相应终端,以便建立该终端与中继服务器之间的中继通道,从而该终端可借助该中继通道通过中继服务器与其他终端通信。由此可见,由于需要建立中继通道,单个中继服务器的资源消耗通常较大。此外,随着诸如多方视频通话等多方通信业务的激增,所需部署中继服务器的数量也日益增加,增加了组网复杂度和组网成本,不利于网络后续的维护。
为此,本申请实施例提供一种通信方法,可以将中继服务器的中继作用移交给已建立P2P链路的一个或多个终端,也就是,通过一个或多个P2P链路构成的转发路径来转发终端之间的数据,无需借助中继服务器转发终端之间的数据,因此,可降低部署服务器的数量,进而降低组网复杂度和成本。
如图2所示,为本申请实施例提供的一种通信系统的结构示意图,本申请实施例提供的连接建立的方法可应用该通信系统。具体的,该通信系统包括终端(比如图1所示的终端100a、终端200a、终端400)以及服务器300a。
其中,终端之间可以建立直连的P2P连接,并通过P2P连接通信。示例性的,图1中,终端100a和终端200a之间建立了直连的P2P连接,因此,终端100a和终 端200a之间的业务报文可以通过该P2P连接进行传输。
或者,可以将已建立P2P连接的终端作为其他终端之间通信的中继。示例性的,可以将终端100a作为终端200a和终端400通信的中继,以终端200a向终端400发送业务报文为例,即终端200a先通过与终端100a之间的直连P2P连接向终端100a发送业务报文,再由终端100a通过与终端400之间的直连P2P连接向终端400转发该业务报文。
或者,终端之间可以通过服务器300a通信,即服务器300a作为终端之间通信的中继。以终端400向终端200a发业务报文时,即终端400先向服务器300a发送业务报文,再由服务器300a将业务报文转发给终端200a。
具体的,终端100a可以通过一个或多个网络与服务器300a建立连接。其中,网络可以是局域网(local area networks,LAN),也可以是广域网(wide area networks,WAN),例如互联网。网络可使用任何已知的网络通信协议来实现,上述网络通信协议可以是各种有线或无线通信协议,诸如以太网、通用串行总线(universal serial bus,USB)、火线(FIREWIRE)、任何蜂窝网通信协议(如3G/4G/5G/未来通信技术)、蓝牙、无线保真(wireless fidelity,Wi-Fi)、NFC或任何其他合适的通信协议。
在另一些场景中,建立P2P连接的多个终端可能位于不同内网。示例性的,参见图3,为本申请实施例提供的另一通信系统的架构示意。该系统包括终端(比如终端100a、终端200a以及终端400)、服务器300a以及网络地址转换(network address translation,NAT)设备(比如NAT设备500、NAT设备600)。
由图3可以看出,终端100a和终端200a连接到不同NAT设备,可视为终端100a和终端200a处于不同内网。由于不同内网可能有不同的私有网际互连协议(internet protocol,IP)地址,因此,为了使得终端100a和终端200a能够通信,还需引入NAT技术,即将各自内部网络的私有IP地址转换为各自外部网络的公有IP地址。
之后,在NAT技术的基础上,可以建立终端100a和终端200a之间的P2P连接。
作为一种可能的实现方式,引入NAT穿越技术,借助服务器作为媒介设备,打通不同内网中终端之间的P2P连接。通过NAT穿越技术建立终端之间P2P连接的具体实现,将在下文详细阐述。
示例性的,上述的终端例如可以为手机、平板电脑、个人计算机(personal computer,PC)、个人数字助理(personal digital assistant,PDA)、智能手表、上网本、可穿戴电子设备、增强现实技术(augmented reality,AR)设备、虚拟现实(virtual reality,VR)设备、车载设备、智能汽车、智能音响、机器人等,本申请对终端的具体形式不做特殊限制。
图4示出了上述终端100a的硬件结构示意图。其他终端的结构可参见终端100a的结构。
终端100a可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170, 扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。
可以理解的是,本发明实施例示意的结构并不构成对终端100a的具体限定。在本申请另一些实施例中,终端100a可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。
其中,USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为终端100a充电,也可以用于终端100a与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。
可以理解的是,本发明实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对终端100a的结构限定。在本申请另一些实施例中,终端100a也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理 模块140可以通过终端100a的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为终端供电。
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。
终端100a的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。
天线1和天线2用于发射和接收电磁波信号。终端100a中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。
移动通信模块150可以提供应用在终端100a上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。
无线通信模块160可以提供应用在终端100a上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。
在本申请的一些实施例中,终端100a可以通过无线通信模块160(比如WLAN 模块)和天线2与其他终端或服务器建立无线连接,以实现终端100a和其他终端或服务器之间的通信。
在一些实施例中,终端100a的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得终端100a可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(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,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。
终端100a通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,终端100a可以包括1个或N个显示屏194,N为大于1的正整数。
终端100a可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,终端100a可以包括1个或N个摄像头193,N为大于1的正整数。
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当终端100a在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。
视频编解码器用于对数字视频压缩或解压缩。终端100a可以支持一种或多种视频编解码器。这样,终端100a可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现终端100a的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展终端100a的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储终端100a使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器110通过运行存储在内部存储器121的指令,和/或存储在设置于处理器中的存储器的指令,执行终端100a的各种功能应用以及数据处理。
终端100a可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。终端100a可以通过扬声器170A收听音乐,或收听免提通话。
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当终端100a接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。终端100a可以设置至少一个麦克风170C。在另一些实施例中,终端100a可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,终端100a还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。
耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放终端平台(open mobile terminal platform,OMTP)标准接口,美国蜂 窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。终端100a可以接收按键输入,产生与终端100a的用户设置以及功能控制有关的键信号输入。
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。
SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和终端100a的接触和分离。终端100a可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口195可以支持Nano SIM卡,Micro SIM卡,SIM卡等。同一个SIM卡接口195可以同时插入多张卡。所述多张卡的类型可以相同,也可以不同。SIM卡接口195也可以兼容不同类型的SIM卡。SIM卡接口195也可以兼容外部存储卡。终端100a通过SIM卡和网络交互,实现通话以及数据通信等功能。在一些实施例中,终端100a采用eSIM,即:嵌入式SIM卡。eSIM卡可以嵌在终端100a中,不能和终端100a分离。
终端100a的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本发明实施例以分层架构的Android系统为例,示例性说明终端100a的软件结构。
图5是本发明实施例的终端100a的软件结构框图。
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,以及内核层。
应用程序层可以包括一系列应用程序包。
如图3所示,应用程序包可以包括相机,图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,短信息等应用程序。
在本申请的一些实施例中,应用程序包还包括具有音视频通话功能的音视频通话应用,例如:微信应用、QQ应用、facetime、畅连通话等。音视频通话应用可以是终端100a上预置的应用程序,也可以是用户通过应用市场或其他方式下载的应用程序,本申请实施例对音视频通话应用不做限定。音视频通话可以是视频通话,也可以是音频通话。
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。
如图3所示,应用程序框架层可以包括窗口管理器,内容提供器,视图系统,电话管理器,资源管理器,通知管理器等。
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。电话管理器用于提供终端100a的通信功能。例如通话状态的管理(包括接通,挂断等)。资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,终端振动,指示灯闪烁等。
在本申请的一些实施例中,应用程序框架层还可以包括:
Android Runtime包括核心库和虚拟机。Android runtime负责安卓系统的调度和管理。核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。
系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。2D图形引擎是2D绘图的绘图引擎。
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。
需要说明的是,服务器300a的结构也可以参考图4的终端的结构,服务器300a可以具有比图4所示的结构更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
例如,如图6-1所示,服务器300a可以包括处理器401(可选的,包括处理器408)、存储器403、收发器404等。
其中,上述各组件之间可包括一通路,用于在上述组件之间传送信息。
收发器404,用于诸如以太网,WLAN等协议与其他设备或通信网络通信。
处理器、存储器的详细内容请参考图4的终端中相关结构的描述,这里不再赘述。
下文以终端100a、终端200a均为手机举例,对本申请实施例提供的技术方案进行详细说明,在此统一说明。
图6-2示出了服务器300a的另一种结构示意。服务器300a包括路径管理模块301和路径查询模块302。
其中,服务器的路径管理模块301,用于管理终端之间的可用路径。以终端1至终端4之间的可用路径为例,可以通过终端3、终端4这一可用路径传输终端1与终端2之间的数据,即终端1将数据发给终端3,终端3再将数据发给终端4,终端4将数据发给目标(即终端2)。再比如,可以通过终端3这一可用路径传输终端2和终端4之间的数据。
路径查询模块302,用于访问路径管理模块301,以便从路径管理模块301中获取源终端与目的终端之间的可用路径。还用于与终端的通信模块交互路径相关信息。比如,源终端通过通信模块向服务器300a的路径查询模块302发送查询请求,以便查询到目的终端的可用转发路径。再比如,服务器300a通过路径查询模块302向终端发送查询响应,以便将源终端查询的可用路径反馈给源终端。
其中,路径查询模块302和路径管理模块301可由诸如图6-1所示的处理器401和/或处理器408实现。
下文以终端为手机,用户通过手机的视频通话应用发起多方视频通话举例,对本申请实施例提供的技术方案进行详细说明。
视频通话流程通常包括呼叫、接通、挂断三个阶段。
首先,先介绍视频通话流程中的呼叫阶段。
用户可以通过视频通话应用发起多方视频通话。如图7的(1)所示,手机A的界面501a包括视频通话应用图标,用户A可对该视频通话应用图标进行操作。响应于用户A在界面501a输入的操作,比如点击视频通话应用的操作,手机A显示图7的(2)所示界面502a。该界面502a包括多个联系人。在一些场景中,用户A可将多个联系人移入到群聊中。如图7的(3)所示,为一种示例性的群聊界面,该群聊界面包括控件503a。用户A可对该控件503a进行操作,响应于用户A对控件503a的诸如点击操作,手机A显示图7的(4)所示界面,该界面包括控件504a。响应于用户A对控件504a的诸如点击操作,手机A显示图7的(5)所示界面505a。用户A可以通过界面505a选择加入本次多方视频通话的成员,并点击“确定”按钮,以便触发手机A向服务器发送呼叫请求。该呼叫请求用于请求与Bob的手机B、Andy的手机C进行视频通话。
如下,结合图8来介绍手机A、服务器、手机B以及手机C之间的交互流程。如图8所示,具体的,步骤1、用户通过手机A的用户界面(user interface,UI)选择参与多方视频通话的成员,比如Bob、Andy,并通过诸如点击“确定”按钮的操作输入呼叫指令。步骤2、响应于用户在用户界面输入的呼叫指令,手机A向服务器发送第一呼叫请求。其中,第一呼叫请求携带被叫设备(即Bob的手机以及Andy的手机)的信息。被叫设备的信息比如但不限于是被叫设备的设备ID、设备类型。或者,作为另一种可能的实现方式,如下表1所示,第一呼叫请求携带源设备标识和通话标识。
表1
| 关键字段 | 字段含义 |
| srcDeviceId | 源设备标识 |
| Roomid | 通话标志 |
其中,通话标识,用来标识不同通话,不同通话关联的终端不同。比如,终端1向终端2、终端3发起视频通话1,终端4向终端5、终端6发起视频通话2。
步骤3、服务器根据被叫设备的信息(即手机B、手机C的信息)向各个被叫设备(即手机B、手机C)发起第二呼叫请求。
需要说明的是,服务器向手机B发送的第二呼叫请求与向手机C发送的第二呼叫请求可以包括相同的信息,也可以包括不同信息。比如,服务器向手机B发送的第二呼叫请求包括手机B所在网络的NAT IP地址、手机B的设备标识,服务器向手机C发送的第二呼叫请求包括手机C所在网络的NAT IP地址、手机C的设备标识。
并且,服务器向手机B发送第二呼叫请求的时间与向手机C发送第二呼叫请求的时间先后不限。即,服务器可以先向手机B发送第二呼叫请求,也可以先向手机C发送第二呼叫请求,或,同时向两者发送第二呼叫请求。
步骤4、响应于用户A在手机A的用户界面输入的呼叫指令,手机A显示呼叫方的呼叫界面。且,从服务器向Bob的手机以及Andy的手机发送第二呼叫请求,到Bob以及Andy同意接听该呼叫期间,手机A显示的呼叫界面可以一直是该呼叫界面。可选的,该呼叫界面包括Bob、Andy以及用户A的头像506a。
步骤5、响应于来自服务器的第二呼叫请求,手机B显示被叫方的呼叫界面,以提示用户Bob有待接听的视频通话,当然,手机B也可以通过其他方式提示用户Bob,比如通过语音提示。本申请实施例不限制手机提示用户的方式。
类似的,响应于来自服务器的第二呼叫请求,手机C显示被叫方的呼叫界面,以提示用户Andy有待接听的视频通话。
步骤6、手机B接收Bob在呼叫界面中输入的“接听”指令,比如点击“接听”按钮,或语音指示“接听”,或通过其他方式指示接听。
手机C接收Andy在呼叫界面中输入的“接听”指令。
可以理解,当被呼叫方接听该通话呼叫,说明该通话接通。
步骤7、Bob的手机响应于Bob在呼叫界面输入的接听指令,向服务器反馈第一呼叫响应(表明Bob接听该呼叫)。类似的,Andy的手机也向服务器反馈呼叫响应。
可选的,呼叫响应携带源设备标识以及通话标识,通话标识用于标识一次通话。不同通话关联的终端不同。比如,终端1向终端2、终端3发起视频通话1,终端4向终端5、终端6发起视频通话2。
步骤8、服务器向手机A发送第二呼叫响应。
步骤9、当服务器从Bob、Andy的手机接收第一呼叫响应,获知Bob、Andy已接听该呼叫,此时服务器触发P2P连接建立流程,该流程用于尝试在每两个手机之间建立P2P连接。
步骤10、响应于来自服务器的第二呼叫响应,手机A显示通话界面507a。
当手机A接收到来自服务器的第二呼叫响应,说明被叫手机已同意加入本次通 话,那么,手机A显示通话界面507a,通话界面507a即通话接通情况下的界面。如图8所示,该通话界面507a包括图像窗口508a。图像窗口508a用于显示手机B、手机C对应的图像数据,比如,显示手机B、手机C的摄像头采集的图像数据。
且,手机A能够播放第二呼叫响应携带的音频数据,即手机C、手机B采集的音频数据。
可以理解的是,手机也可以将采集的音频数据和/或视频数据通过服务器发送给手机B、手机C,如此,手机B的用户Bob、手机C的用户Andy就能够在视频通话中通过显示屏看到手机A采集的画面,听到手机A采集的声音。
可以看出,在Bob、Andy接听呼叫,即用户A、Bob、Andy均成功加入该多方视频通话中后,到P2P连接建立成功之前,每两个手机之间的通信需借助中继服务器,即发送方的手机先向中继服务器发送报文,由中继服务器将报文转发至接收方的手机。具体的,在P2P连接建立成功之前如图9所示,手机A将采集的音频和/或视频数据通过服务器向手机B、手机C转发。手机B将采集的音频和/或视频数据通过服务器向手机A、手机C转发,手机C将采集的音频和/或视频数据通过服务器向手机A、手机B转发。
其中,以建立手机A和手机B之间的P2P连接为例,P2P连接建立流程如图10所示,该流程包括:
1a、手机A向第一服务器发送用于请求第二服务器信息的请求消息。
其中,第一服务器是用于触发P2P连接建立流程的服务器。比如,可以是图8所示的接收来自手机的呼叫响应的服务器。
第二服务器为用于建立P2P连接(比如实现NAT穿越)的服务器。其可以处理打洞控制信令。
在一些实施例中,第一服务器和第二服务器可以是同一服务器。在另一些实施例中,第一服务器和第二服务器可以是不同的服务器。
第二服务器的信息比如可以但不限于是第二服务器的IP地址。
以图8为例,手机A在向第一服务器发送第一呼叫请求的同时,向该第一服务器发送用于请求第二服务器信息的请求消息。或者,在向第一服务器发送第一呼叫请求之后,向该第一服务器发送用于请求第二服务器信息的请求消息。或者,手机A在其他时机发送用于请求第二服务器信息的请求消息,比如,可以在第一服务器确定需触发建立手机A与手机B之间的P2P连接时,向手机A发送触发消息,手机A响应该触发消息,向第一服务器发送用于请求第二服务器的请求消息。
1a、手机B向第一服务器发送用于请求第二服务器信息的请求消息。
仍以图8为例,手机B可以响应于第二呼叫请求,向第一服务器发送用于请求第二服务器信息的请求消息。手机B也可以在其他时机向第一服务器发送用于请求第二服务器信息的请求消息,比如,可以在第一服务器确定需触发建立手机A与手机B之间的P2P连接时,向手机B发送触发消息,手机B响应该触发消息,向第一服务器发送用于请求第二服务器的请求消息,本申请实施例对发送该请求消息的时机不进行限制。
需要说明的是,本申请实施例中的第一服务器(或第二服务器)与中继服务器的 作用是不同的。具体的,第一服务器、第二服务器用于控制建立P2P路径,可以理解为是控制面的服务器。中继服务器用于中继终端之间的数据,可理解为用户面(或数据面)的服务器。
2a、第一服务器向手机B发送第二服务器的信息,以及向手机A发送第二服务器的信息。
3a、手机A向第二服务器发送NAT网关地址请求信息。
可以理解,手机A获取第二服务器的地址等信息后,向第二服务器发送NAT网关地址请求信息。NAT网关地址请求信息用于向第二服务器请求P2P连接对端,比如手机B的NAT网关的地址。
3a、手机B向第二服务器发送NAT网关地址请求信息。
NAT网关地址请求信息用于向第二服务器请求P2P连接对端,比如手机A的NAT网关的地址。
4a、服务器向手机A发送手机B的NAT网关地址,以及向手机B发送手机A的NAT网关地址。
5a、手机A通过手机B的NAT网关向手机B发送握手(handshake)请求消息。
6a、手机B通过手机A的NAT网关向手机A发送握手响应消息。
握手响应消息,用于指示本次握手成功。
需要注意的是,此处的握手是指P2P打洞流程上的握手,用来在时间上对齐。
当然也可能是手机B向手机A发送握手请求消息,再由手机A向手机B发送握手响应消息。作为一种可能的实现方式,由先完成步骤4a的终端发送握手请求消息。即图10中,手机A比手机B先完成步骤4a。
7a、手机A向手机B发送BIND请求消息。
其中,当手机A接收到来自手机B的握手响应消息,手机A向手机B发送BIND请求消息,BIND请求消息包括手机A的信息,包括但不限于手机A的IP地址、NAT类型。
8a、手机B向手机A发送BIND响应消息。
其中,BIND响应消息携带手机B的信息,包括但不限于手机B的IP地址、NAT类型。
9a、手机A向手机B发送Direct请求消息。
其中,Direct请求消息可以但不限于是用户数据报协议(user datagram protocol,UDP)消息。手机A向手机B发送Direct请求消息后,若网络信号较差,在第一时间段内未收到来自手机B的Direct响应消息,则手机A可以尝试重新发送该Direct请求消息。
10a、手机B向手机A发送Direct响应消息。
可选的,手机B接收到来自手机A的Direct请求消息后,向手机A发送Direct响应消息,以便指示手机B已接收到来自手机A的Direct请求消息。
作为一种可能的实现方式,手机B向手机A发送Direct响应消息后,若在第二时间段内未收到来自手机A的Direct Ack消息,则手机B可以尝试重新发送该Direct 响应消息。
11a、手机A向手机B发送Direct确认(Direct Ack)消息。
如果手机A收到来自手机B的Direct响应消息,说明手机B能够接收到来自手机A的Direct请求消息,即手机A与手机B之间的P2P连接在手机A到手机B的方向是通的(即能够实现手机A发送消息,手机B接收消息)。为了使得该P2P连接在双向均可用,即可以实现手机A发送消息,手机B接收消息,也可以实现手机B发送消息,手机A接收消息,还需验证该P2P连接在手机B到手机A的方向是否是通的(即能够实现手机B发送消息,手机A接收消息)。
作为一种可能的实现方式,手机A向手机B发送Direct确认消息,若手机B接收到Direct确认消息,则其可以确认手机A能够接收来自手机B的Direct响应消息,即手机A与手机B之间的P2P连接在手机B到手机A的方向是通的。
当手机A与手机B之间的P2P连接在双向均可用,则NAT穿越成功。
12a、手机B向手机A发送心跳消息。
手机B接收到来自手机A的Direct确认消息,获知NAT穿越成功,则向手机A发送心跳消息。
13a、手机A向手机B发送心跳消息。
与手机B向手机A发送心跳消息类似,在NAT穿越成功后,手机A也可以向手机B发送心跳消息。
14a、手机A向第二服务器上报P2P连接建立结果。
作为一种可能的实现方式,如下表2所示,手机A的P2P连接建立结果包括P2P连接的本端设备标识(即手机A的设备标识)、对端设备标识(手机B的设备标识)、P2P连接是否建立成功。可以理解,多方通信中已建立P2P链路的每一终端均向服务器上报所连接P2P链路的本端设备标识、所连接P2P链路的对端设备标识,如此,服务器可以根据这些标识获知网络拓扑信息,以便确定转发路径的中转设备数目等信息。
表2
可选的,P2P连接建立结果还可包括P2P连接的链路级别参数,比如,包括如下参数中的一个或任意组合:P2P连接对应的时延、P2P连接对应的QoS值、P2P连接 对应的网络类型。这些信息可用于服务器侧计算用户收发数据的目标转发路径。在另一些实施例中,P2P连接对应的时延等信息还可以携带在其他消息中。可以理解,多方通信中已建立P2P链路的每一终端均向服务器上报其所连接P2P链路的链路级别参数,以便服务器根据这些参数执行后续诸如选择目标转发路径的操作。
需要说明的是,本申请实施例中,路径相关的参数分为链路级别参数和路径级别参数。对于每条转发路径,所述链路级别参数包括如下参数中的一个或任意组合:组成该转发路径的每一P2P链路的时延、组成该转发路径的每一P2P链路的QoS、组成该转发路径的P2P链路的网络类型;网络类型包括无线高保真Wi-Fi网络或蜂窝网;和/或所述路径级别参数包括该转发路径的中转设备数目。
可选的,终端在同一条消息中向服务器上报P2P连接建立结果与预设策略。其中,所述预设策略包括如下策略中的一个或任意组合:所述目标转发路径的时延最低,所述目标转发路径的时延小于或等于时延阈值上限,所述目标转发路径的QoS最佳,所述目标转发路径的QoS值在预设QoS值范围内,所述目标转发路径的中转设备数目最少,所述目标转发路径的中转设备数目在预设数目范围内,所述目标转发路径的第一P2P链路的网络类型为预设网络类型;预设网络类型包括Wi-Fi网络;所述第一P2P链路为所述第一终端连接的P2P链路或所述第二终端连接的P2P链路。设备标识比如可以但不限于是对用户账号、设备ID进行哈希(hash)运算后生成的唯一标识符。
或者,终端也可通过不同消息封装P2P连接建立结果和预设策略。比如,预设策略还可以封装在路径查询请求中。
15a、手机B向第二服务器上报P2P连接建立结果。
手机B的P2P连接建立结果包括手机B的设备标识(本端设备标识)、手机A的设备标识(对端设备标识)、P2P连接是否建立成功。
可以理解,第二服务器可基于来自多个终端的P2P连接建立结果,更新多个终端分别对应的可用转发路径。
上述多方视频通话场景下,按照图10所示的P2P连接建立流程,每2个手机之间均尝试建立P2P连接,并向服务器上报P2P连接建立结果。例如:最终建立的P2P连接如图11所示,以手机A和手机C之间通信,且手机A(第一终端)与手机C(第二终端)之间直连的P2P链路未建立成功为例,如图12-1所示,手机A向手机C发数据的流程包括如下步骤:
1b、手机A向服务器发送路径查询请求。
路径查询请求用于请求查询手机A到手机C的一条或多条第一转发路径。第一转发路径可用于承载所述手机A(即第一终端)与手机C(即第二终端)之间的报文。第一转发路径也可称为可用转发路径。
本申请实施例中,在不加以特殊说明的情况下,P2P连接、P2P链路等可以是相同概念。
作为一种可能的实现方式,手机A周期性或按照其他策略向服务器发送路径查询请求。服务器可基于路径查询请求,向手机A反馈用于收发数据的路径信息。
或者,服务器更新路径之后,向终端发送更新的路径信息。该中实现方式中,步 骤1b为可选步骤,即无需执行步骤1b。
路径查询请求携带源设备(即需发送数据的设备)标识、目标设备(即数据的送达方)标识等。
作为一种可能的实现方式,路径查询请求的消息结构如表3所示:
表3
| 关键字段 | 说明 |
| srcDeviceId | 源设备标识 |
| destDeviceId | 目标设备标识 |
本申请实施例中,可用转发路径指的是P2P转发路径。换句话说,组成可用转发路径的链路均为P2P链路。以图11为例,手机A与手机C之间的可用转发路径,可以包括手机A到手机B之间的P2P连接,以及手机B再到手机C之间的P2P连接。
2b、服务器向手机A(第一终端)发送路径查询响应。
路径查询响应用于指示手机A(第一终端)到手机C(第二终端)的一条或多条第一转发路径。比如,路径查询响应可以包括多条可用转发路径的索引。如此,手机A可以通过一个或多个P2P连接构成的可用转发路径向手机C发送数据。
或者,路径查询响应不包括可用转发路径。这就意味着,不存在一条完全由P2P连接构成的可用转发路径,此种情况下,手机A仍通过中继通道向手机C发送数据。
可选的,路径查询响应携带源设备标识(即手机A的标识)、目标设备标识
(即手机C的标识)、可用转发路径列表等。
作为一种可能的实现方式,路径查询响的消息结构如表4所示;
表4
| 关键字段 | 说明 |
| srcDeviceId | 源设备标识 |
| destDeviceId | 目标设备标识 |
| pathList | 可用转发路径列表 |
其中,可用转发路径列表包括一条或多条可用转发路径,每条可用转发路径可以用一个有序序列表示,有序序列可以是该可用转发路径包括的设备标识的有序序列。例如:有序序列B-D-C表示数据由设备B转发到设备D,再由设备D转发到设备C的可用转发路径。
作为一种可能的实现方式,服务器根据多个终端上报的P2P连接建立结果,确定源设备到目标设备的可用转发路径。比如,服务器根据手机A-手机C的P2P连接建立结果,可获知手机A与手机B,手机B与手机C之间均建立有P2P连接,并据此确定手机A与手机C之间可用转发路径,比如,手机A与手机C之间的可用转发路径是通过手机A与手机B之间的P2P连接转发,再通过手机B与手机C之间的P2P连接转发。
作为一种可能的实现方式,服务器通过与手机A之间的中继通道向手机A发送路径查询响应。
3b、手机A确定目标转发路径,并通过目标转发路径传输多方通话中的报文。
其中,目标转发路径由所述多方通信中多个已建成的P2P链路组成。具体的,包括M个P2P链路,M为大于或等于2的正整数。
容易理解,手机A收到路径查询响应后,若路径查询响应包括一条可用转发路径,则手机A确定该一条可用转发路径作为目标转发路径,并通过该目标转发路径将数据发送给下一跳手机。比如,如图12-1所示,服务器向手机A反馈的路径查询响应是:可用转发路径为A-B-C,即手机A先通过与手机B之间的P2P连接向手机B发送数据,手机B再通过与手机C之间的P2P连接向手机C转发来自手机A的数据。则手机A将该可用转发路径作为目标转发路径,并按照该目标转发路径将数据通过与手机B之间的P2P连接发送给手机B。
或,在另一些情况下,步骤2b中服务器向手机A反馈的路径查询响应可以包括多条可用转发路径,这种情况下,手机A可以根据所述多条可用转发路径以及预设参数,从多条可用转发路径中选择所述目标转发路径。
其中,所述预设参数包括链路级别参数和/或路径级别参数,对于每条第一转发路径,所述链路级别参数包括如下参数中的一个或任意组合:组成所述第一转发路径的每一P2P链路的时延、组成所述第一转发路径的每一P2P链路的QoS、组成所述第一转发路径的P2P链路的网络类型;网络类型包括无线高保真Wi-Fi网络或蜂窝网;和/或所述路径级别参数包括所述第一转发路径的中转设备数目。链路级别参数还可以包括其他参数,比如链路长度、丢包率、带宽。路径级别参数还可以包括其他参数,本申请实施例对链路级别参数以及路径级别参数不限制。
上述各预设参数可以有相应量化值。可选的,以网络类型的量化值为例,可以根据网络类型的优先级确定各网络类型对应的量化值。比如,链路的网络类型是Wi-Fi网络时,优先级最高,对应的量化值最高。或者,还可以根据其他因素确定各P2P链路的网络类型的量化值。
可选的,以某一条可用转发路径为例,可以根据组成该可用转发路径的各P2P链路的网络类型,确定网络类型的量化值。比如,该可用转发路径由两条P2P链路组成,P2P链路1的网络类型为Wi-Fi网络,Wi-Fi网络对应量化值1,P2P链路2的网络类型为蜂窝网络,蜂窝网络对应量化值2,可以将量化值1和量化值2进行一定运算后得到一个总的量化值,即得到该条可用转发路径对应的网络类型的量化值。
作为一种可能的实现方式,根据所述多个第一转发路径以及预设参数,从所述多个第一转发路径中选择目标转发路径,包括:根据所述多个第一转发路径、所述预设参数以及预设策略,从所述多个第一转发路径中选择目标转发路径。
上文已指出,所述预设策略包括如下策略中的一个或任意组合:所述目标转发路径的时延最低,所述目标转发路径的时延小于或等于时延阈值上限,所述目标转发路径的QoS最佳,所述目标转发路径的QoS值在预设QoS值范围内,所述目标转发路径的中转设备数目最少,所述目标转发路径的中转设备数目在预设数目范围内,所述目标转发路径的第一P2P链路的网络类型为预设网络类型;预设网络类型包括Wi-Fi网络;所述第一P2P链路为所述第一终端连接的P2P链路或所述第二终端连接的P2P链路。
示例性,以预设策略为:选择当前使用Wi-Fi网络的P2P链路组成的可用转发路 径作为目标转发路径为例,如图12-3所示,A到E有两条可用转发路径,其一是:A-D-E,其二是:A-B-D-E,链路A-D,D-E均使用蜂窝网络,链路A-B使用Wi-Fi网络,链路B-D,D-E均使用蜂窝网络,则选择A-B-D-E作为目标转发路径。
在另一些实施例中,预设策略还可以为其他策略,本申请实施例对预设策略不进行限制。比如,预设策略还可以是转发路径的链路长度总和最短、丢包率最低、带宽最大。本申请实施例的各策略可单独或结合使用,本申请实施例限于篇幅就不再一一列举各种组合方式。
在另一些实施例中,终端还可按照如下规则选择目标转发路径。
所述目标转发路径为:第一链路的网络类型为预设网络类型的第一转发路径中时延最低的第一转发路径;
或,所述目标转发路径为:第一链路的网络类型为预设网络类型的第一转发路径中QoS最佳的第一转发路径;
或,所述目标转发路径为:第一链路的网络类型为预设网络类型的第一转发路径中中转设备数目最少的第一转发路径;
所述目标转发路径为:QoS值在预设QoS值范围内的第一转发路径中时延最低的第一转发路径;
或,所述目标转发路径为:QoS值在预设QoS值范围内的第一转发路径中中转设备数目最少的第一转发路径;
或,所述目标转发路径为:QoS值在预设QoS值范围内的第一转发路径中网络类型为的第一转发路径;
或,所述目标转发路径为:时延小于或等于时延阈值的第一转发路径中网络类型为预设网络类型的第一转发路径;
或,所述目标转发路径为:时延小于或等于时延阈值的第一转发路径中QoS最佳的第一转发路径;
或,所述目标转发路径为:时延小于或等于时延阈值的第一转发路径中中转设备数目最少的第一转发路径;
或,所述目标转发路径为:中转设备数目在预设数目范围内的第一转发路径中时延最低的第一转发路径;
或,所述目标转发路径为:中转设备数目在预设数目范围内的第一转发路径中QoS最佳的第一转发路径;
或,所述目标转发路径为:中转设备数目在预设数目范围内的第一转发路径中第一链路的网络类型为预设网络类型的第一转发路径。
在另一些实施例中,手机A确定目标转发路径,可以实现为:手机A计算源终端设备到目的终端设备之间的每一可用转发路径的权重,并根据可用转发路径的权重,从可用转发路径中选择一条作为目标转发路径。
其中,可以用有权无向图表示网络拓扑。网络拓扑中的转发路径可抽象为有权无向图中的边,每一可用转发路径可抽象为由多条边构成。每条可用转发路径具有对应的权重值。所述可用转发路径的权重值用于表征所述可用转发路径的质量高低。可选的,可用转发路径对应的权重值W满足如下关系:
其中, p
i为第i个链路级别参数的量化值,w
i为p
i对应的权重,N为链路级别参数的数目。
为该可用转发路径的第j条P2P链路(在有权无向图中抽象为边)的权重值,M为组成该可用转发路径的P2P链路(抽象为边)的数目。这些参数可以根据需求灵活配置。
上述链路级别参数、路径级别参数均可影响路径的质量高低。各个参数对应的权重值用来调整各参数在整体权重值中的占比情况,以尽可能的优化可用转发路径的权重值。
求取任意两点之间的目标转发路径,即在有权无向图中寻找W满足一定条件的可用转发路径。可选的,可根据图算法(Dijskra算法、深度搜索、广度搜索、Bellman-Ford算法等),所述多个可用转发路径中权重值表征的路径质量高于阈值的可用转发路径,并将该可用转发路径作为所述目标转发路径。
示例性的,如图12-3所示:该网络拓扑包括5个终端设备,分别为A、B、C、D、E,其中,图中示出了由该网络拓扑抽象得到的有权无向图,在该有权无向图中,可用路径被抽象为相应的边,分别为边a-边e,每条边具有相应权重。以影响路径选择的指标为时延、QoS、网络类型为例,边a的权重值weight(a)满足如下关系:weight(a)=边a的时延值*w1+Qos值*w2+网络类型的量化值*w3。其他边的权重值的计算方式可参见边a的权重值计算方法。
假设需确定设备A->设备E的目标转发路径,设备A到设备E的可用转发路径为A->D->E以及A->B->D->E。那么,这两条可用转发路径的权重值分别为:
可用转发路径A->D->E的权重值为:weight(b)+weight(e)+中转设备数*w4;该路径的中转设备数是1,中转设备为设备D。
可用转发路径A->B->D->E的权重值为:weight(a)+weight(c)+weight(e)+中转设备数*w4;该路径的中转设备数是2。
假设可用转发路径A->D->E的权重值最大,并且设定当可用转发路径的权重值越大,可用转发路径的路径质量越高,则将可用转发路径A->D->E作为目标转发路径。如此,能够选择出一条路径质量最高的转发路径用作传输报文。
需要说明的是,手机A计算目标转发路径之前,需要获取各可用转发路径相关的信息,包括但不限于可用转发路径的链路级别参数(比如时延、QoS值、网络类型)和/或路径级别参数。这些信息可以由服务器发给手机A。作为一种可能的实现方式,服务器在向手机A反馈的路径查询响应中携带可用转发路径相关的时延、QoS、网络类型等信息。或者,手机A通过其他方式获取可用转发路径的时延、QoS 值、网络类型等信息。
或,在另一些情况下,路径查询响应不包括可用转发路径。比如可用转发路径列表为空,这种情况下,手机A可以按照现有技术的路径发送数据,即将数据通过与服务器之间的中继通道发送给服务器,再由服务器将来自手机A的数据转发给手机C。
作为一种可能的实现方式,手机A将源设备标识(即手机A的标识)、目标设备标识(即手机C的标识)、完整的目标转发路径或目标子路径(目标转发路径中的一部分)封装到待发送的报文中,并发送给下一跳终端(比如手机B)。其中,如上文指出,所述目标转发路径由M个P2P链路组成;所述目标转发路径的源节点为所述第一终端,所述目标转发路径的目的节点为所述第二终端。这里,所述目标子路径由所述M个P2P链路中的相邻M-1个P2P链路组成,所述目标子路径的源节点为所述第一终端的下一跳终端,所述目标子路径的目的节点为所述第二终端。也就是说,手机A向下一跳手机(比如手机B)发送报文时,可在报文中封装完成的目标转发路径,也可仅封装目标转发路径的后一部分,只要能够让该下一跳手机(比如手机B)能将报文继续转发即可。比如,手机A可以在发往手机B(不是报文的目的节点)的报文中封装手机B的下一跳手机的标识,以及该下一跳手机之后几跳的手机标识。
比如,以待发送数据中封装完整的目标转发路径为例,封装后的数据格式如表5所示:
表5
| 关键字段 | 字段含义 |
| srcDeviceId | 源设备标识 |
| destDeviceId | 目标设备标识 |
| path | 目标转发路径(A-B-C) |
| data | 数据面报文内容 |
其中,data,即数据面报文内容,比如为手机A的麦克风采集的音频数据和/或摄像头采集的图像数据。srcDeviceId、destDeviceId、path可以封装在报文头或报文体,本申请实施例对此不限制。
目标转发路径的格式可以参见可用转发路径的形式。比如,也可以是转发路径包括的设备标识的有序序列。示例性的,手机A到手机C的目标转发路径为图12-1所示的A-B-C。
再比如,以待发送数据中封装目标转发路径的一部分为例,封装后的数据格式如表6所示:
表6
| 关键字段 | 字段含义 |
| srcDeviceId | 源设备标识 |
| destDeviceId | 目标设备标识 |
| part of path | 目标转发路径的一部分(B-C) |
| data | 数据面报文内容 |
可见,采用诸如表6的方式,在报文中封装完成目标转发路径的一部分,即可完成报文转发过程中的寻址,能够降低发送终端的发送开销,以及降低接收终端的处理开销。
对于目标转发路径上的中转终端(以第三终端为例)来说,第三终端可以接收第一终端通过目标转发路径向第二终端发送的报文,所述报文携带第二转发路径;并通过第二转发路径发送报文。
其中,所述第三终端位于所述目标转发路径上,所述第二转发路径是所述目标转发路径或目标子路径;所述目标转发路径用于承载所述第一终端与第二终端之间的报文,所述目标转发路径由M个P2P链路组成;所述目标转发路径的源节点为所述第一终端,所述目标转发路径的目的节点为所述第二终端;所述目标子路径由所述M个P2P链路中的相邻N个P2P链路组成,所述目标子路径的源节点为所述第三终端,所述目标子路径的目的节点为所述第二终端;M为大于或等于2的整数,N为正整数,N小于M。以图12-3为例,假设终端A到终端E的目标转发路径为A-B-D-E,对于中转终端D来说,终端D位于这条目标转发路径上,终端D接收到来自终端B的报文,该报文可以携带完成的目标转发路径,即A-B-D-E,该目标转发路径的源节点为终端A(即源终端),目的节点为终端E(即目的终端),该目标转发路径由M=3条P2P链路组成。终端D从终端B接收的报文也可以携带目标转发路径中的部分(即目标子路径),比如携带D-E,该目标子路径的源节点为终端D,目的节点为终端E,该目标子节点由目标转发路径(A-B-D-E)中的N=1条P2P链路(即终端D到终端E的这条P2P链路)组成。
再比如,对于中转终端B来说,其从终端A接收的报文可携带目标转发路径(A-B-D-E)。或者,其从终端A接收的报文携带目标子路径(B-D-E)。可以看出,目标子路径由目标转发路径中的相邻N=2条P2P链路(即终端B到终端D的P2P链路以及终端D到终端E的P2P链路)组成。
4b、手机B根据目标转发路径将来自手机A的数据转发给手机C。
容易理解,手机B在收到来自手机A的数据后,解析该数据,并判断自己是否为目标设备,如果是,则接收并处理报文;否则,根据目标转发路径将来自手机A的数据转发给自己的下一跳设备。
在另一些实施例中,还可以由服务器确定目标转发路径。
作为一种可能的实现方式,服务器根据预设参数,从多条可用转发路径中选择一条目标转发路径。
其中,预设参数的介绍可参见上述实施例。
作为另一种可能的实现方式,服务器根据预设参数,从多条可用转发路径中选择所述第一转发路径,包括:根据预设参数以及预设策略,从多条可用转发路径中选择所述第一转发路径。其中,预设策略的介绍可参见上述实施例。
具体的,上文已提到,终端设备可以向服务器上报预设策略,比如,终端在同一条消息中封装预设策略和P2P连接建立结果(比如P2P链路的时延、QoS等)。或者,终端也可通过不同消息封装P2P连接建立结果和预设策略。比如,可以将预设策略封装在路径查询请求中。那么,服务器可以基于终端设备上报的这些预设策略确定 源终端设备到目的终端设备的目标转发路径。比如,参见图12-2,手机A向服务器上报的预设策略是选取时延最低的转发路径传输数据,那么,响应于手机A查询到手机C的可用转发路径,服务器在手机A到手机C之间的可用转发路径A-B-C和可用转发路径A-D-C中选取一条作为目标转发路径。由于在可用转发路径中转发路径A-B-C的时延最低,因此,服务器将转发路径A-B-C作为手机A与手机C之间的目标转发路径,并向手机A发送目标转发路径。如此,手机A可以通过目标转发路径A-B-C,即由手机B作为中继向手机C发送数据。手机C也可以根据目标转发路径,经由手机B将数据发送给手机A。
在本申请实施例中,服务器在确定手机A到手机C之间的转发路径时,不仅可以参考手机A的预设策略,还可以同时结合手机C上报的预设策略。
作为另一种可能的实现方式,服务器还可以根据每条可用转发路径的权重值,选择目标转发路径。
其中,每条可用转发路径具有对应的权重值,所述权重值用于表征所述可用转发路径的质量高低。
所述第一转发路径为所述多个可用转发路径中权重值表征的路径质量高于阈值的可用转发路径。
其中,p
i为第i个链路级别参数的量化值,w
i为p
i对应的权重,N为链路级别参数的数目。
为所述可用转发路径的第j条P2P链路的权重,M为组成所述可用转发路径的P2P链路数目;n
relay是所述可用转发路径的路径级别参数,w
relay是n
relay对应的权重;
所述第一转发路径为所述多个可用转发路径中权重值表征的路径质量高于阈值的可用转发路径。
图12-1、图12-2对应的方法流程还可以用图13表示。具体的描述可参见图12-1、图12-2对应的实施例,这里不再赘述。
可见,与图14中,当手机A与手机C之间并未成功建立P2P连接,手机A与手机C之间的数据需借助服务器转发,消耗服务器的带宽等较多资源相比,本申请实施例提供的视频通话的方法,可以借助手机A与手机B之间的P2P连接,以及手机B与手机C之间的P2P连接来转发手机A与手机C之间的数据,无需借助服务器转发数据,因此,可相应降低部署服务器的数量,极大降低了组网复杂度和组网成本。
本申请实施例可以根据上述方法示例对上述服务器或各终端等进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集 成在一个处理模块中。上述集成的模块及可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。需要说明的是,本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
在采用集成的单元的情况下,图15示出了上述实施例中所涉及的一种通信装置的可能的结构示意图。该装置可以为第一终端或能够和第一终端匹配使用以实现第一终端功能的组件(比如第一终端的芯片系统)。以该装置是第一终端为例,该装置可包括:发送单元1502、接收单元1501、处理单元1503。
发送单元1502,用于向服务器发送路径查询请求,所述路径查询请求用于请求至少一条第一转发路径;所述至少一条第一转发路径中每条第一转发路径可用于承载所述第一终端与第二终端之间的报文;
接收单元1501,从所述服务器接收路径查询响应;所述路径查询响应用于指示所述至少一条第一转发路径;所述至少一条第一转发路径中每条第一转发路径由所述多方通信中多条已建成的点到点P2P链路组成;
发送单元1502,还用于通过所述至少一条第一转发路径中的目标转发路径发送报文。
在一种可能的设计中,所述第一转发路径为一条。
在一种可能的设计中,所述第一转发路径为多条;
处理单元1503,用于根据预设参数,从所述多条第一转发路径中选择所述目标转发路径;
预设参数的介绍可参见上述方法实施例。
在一种可能的设计中,根据预设参数,从所述多条第一转发路径中选择所述目标转发路径,包括:
根据所述预设参数以及预设策略,从所述多条第一转发路径中选择所述目标转发路径;
所述预设策略的介绍可参见上述方法实施例。
在一种可能的设计中,或,所述目标转发路径为:第一P2P链路的网络类型为预设网络类型的第一转发路径中时延最低的第一转发路径;
或,所述目标转发路径为:第一P2P链路的网络类型为预设网络类型的第一转发路径中QoS最佳的第一转发路径;
或,所述目标转发路径为:第一P2P链路的网络类型为预设网络类型的第一转发路径中中转设备数目最少的第一转发路径;
或,所述目标转发路径为:QoS值在预设QoS值范围内的第一转发路径中时延最低的第一转发路径;
或,所述目标转发路径为:QoS值在预设QoS值范围内的第一转发路径中中转设备数目最少的第一转发路径;
或,所述目标转发路径为:QoS值在预设QoS值范围内的第一转发路径中第一P2P链路的网络类型为预设网络类型的第一转发路径;
或,所述目标转发路径为:时延小于或等于时延阈值的第一转发路径中第一P2P链路的网络类型为预设网络类型的第一转发路径;
或,所述目标转发路径为:时延小于或等于时延阈值的第一转发路径中QoS最佳的第一转发路径;
或,所述目标转发路径为:时延小于或等于时延阈值的第一转发路径中中转设备数目最少的第一转发路径;
或,所述目标转发路径为:中转设备数目在预设数目范围内的第一转发路径中时延最低的第一转发路径;
或,所述目标转发路径为:中转设备数目在预设数目范围内的第一转发路径中QoS最佳的第一转发路径;
或,所述目标转发路径为:中转设备数目在预设数目范围内的第一转发路径中第一P2P链路的网络类型为预设网络类型的第一转发路径。
所述目标转发路径为所述多条第一转发路径中权重值表征的路径质量高于阈值的第一转发路径。
n
relay是所述第一转发路径的路径级别参数的量化值,w
relay是n
relay对应的权重;
所述目标转发路径为所述多条第一转发路径中权重值表征的路径质量高于阈值的第一转发路径。
在一种可能的设计中,所述报文携带所述目标转发路径或目标子路径;
所述目标转发路径由M个P2P链路组成;所述目标转发路径的源节点为所述第一终端,所述目标转发路径的目的节点为所述第二终端;所述目标子路径由所述M个P2P链路中的相邻M-1个P2P链路组成,所述目标子路径的源节点为所述第一终端的下一跳终端,所述目标子路径的目的节点为所述第二终端;M为大于或等于2的整数。
参见图16,为本申请实施例提供的另一通信装置,该装置可以为第三终端,或可以是与第三终端匹配使用以实现第三终端功能的组件(比如第三终端的芯片系统)。以该装置为第三终端为例,所述第三终端位于目标转发路径上,该第三终端可以包括:接收单元1601、发送单元1602。
接收单元1601,用于接收第一终端通过所述目标转发路径向第二终端发送的报文,所述报文携带第二转发路径;所述第二转发路径是所述目标转发路径或目标子路 径;所述目标转发路径用于承载所述第一终端与第二终端之间的报文,所述目标转发路径由M个P2P链路组成;所述目标转发路径的源节点为所述第一终端,所述目标转发路径的目的节点为所述第二终端;所述目标子路径由所述M个P2P链路中的相邻N个P2P链路组成,所述目标子路径的源节点为所述第三终端,所述目标子路径的目的节点为所述第二终端;M为大于或等于2的整数,N为正整数,N小于M;
发送单元1602,用于根据所述第二转发路径发送报文。
可选的,该装置还包括处理单元1603,用于控制该装置的动作,比如,控制接收单元1601执行接收动作。
参见图17,为本申请实施例提供的又一通信装置,该装置可以为服务器,或者可以是与服务器匹配使用以实现服务器功能的组件(比如服务器中的芯片)。该装置包括:接收单元1701、发送单元1702、处理单元1703。
接收单元1701,用于从第一终端接收路径查询请求;所述路径查询请求用于请求至少一条第一转发路径;所述至少一条第一转发路径中每条第一转发路径可用于承载所述第一终端与第二终端之间的报文;
发送单元1702,用于响应于所述路径查询请求,向所述第一终端发送路径查询响应,所述路径查询响应用于指示所述至少一条第一转发路径;每条第一转发路径由所述多方通信中多条已建成的P2P链路组成。
在一种可能的设计中,所述第一转发路径为多条。
在一种可能的设计中,所述第一转发路径为一条。
处理单元1703,用于根据预设参数,从多条可用转发路径中选择所述第一转发路径;所述可用转发路径为可用于承载所述第一终端与所述第二终端之间报文的转发路径;
在一种可能的设计中,所述根据预设参数,从多条可用转发路径中选择所述第一转发路径,包括:
根据所述预设参数以及预设策略,从所述多条可用转发路径中选择所述第一转发路径;
所述第一转发路径为所述多条可用转发路径中权重值表征的路径质量高于阈值的可用转发路径。
其中,p
i为第i个链路级别参数的量化值,w
i为p
i对应的权重,N为链路级别参数的数目;
为所述可用转发路径的第j条P2P链路的权重,M为组成所述 可用转发路径的P2P链路数目;n
relay是所述可用转发路径的路径级别参数的量化值,w
relay是n
relay对应的权重;
所述第一转发路径为所述多条可用转发路径中权重值表征的路径质量高于阈值的可用转发路径。
在一种可能的设计中,所述接收单元1701,还用于从所述多方通信中已建立P2P链路的每一终端接收所连接P2P链路对应的链路级别参数。
在一种可能的设计中,所述接收单元1701,还用于从所述第一终端接收所述预设策略。
可选的,图15-图17所示装置还可以包括存储单元(并未在图中示出),用于存储装置所需数据或程序等。上述实施例中的接收单元、发送单元可以集成设置,可以分立设置。
图15-图16所示的接收单元、发送单元可以通过诸如图4所示移动通信模块150、无线通信模块160实现。处理单元可以通过诸如图4所示的处理器110实现。存储单元可以通过诸如存储器实现。
图17所示的接收单元、发送单元可以通过诸如图6-1所示收发器404实现。处理单元可以通过诸如图6-1所示的处理器401和/或处理器408实现。存储单元可以通过诸如图6-1所示存储器403实现。在另一些实施例中,可选的,图17所示的处理单元可以实现图6-2所示路径查询模块302和路径管理模块301的功能。
本申请实施例还提供一种芯片系统,如图18所示,该芯片系统包括至少一个处理器1101和至少一个接口电路1102。处理器1101和接口电路1102可通过线路互联。例如,接口电路1102可用于从其它装置(例如存储器)接收信号。又例如,接口电路1102可用于向其它装置(例如处理器1101)发送信号。示例性的,接口电路1102可读取存储器中存储的指令,并将该指令发送给处理器1101。该芯片系统可用于终端或服务器。当应用于第一终端时,当指令被处理器1101执行时,可使得第一终端执行上述实施例中的第一终端执行的各个步骤。当应用于第三终端时,当指令被处理器1101执行时,可使得第三终端执行上述实施例中的第二终端执行的各个步骤。当应用于服务器时,当指令被处理器1101执行时,可使得服务器执行上述实施例中的服务器执行的各个步骤。当然,该芯片系统还可以包含其他分立器件,本申请实施例对此不作具体限定。
本申请实施例还提供一种计算机可读存储介质,该计算机可读存储介质可以包括计算机程序或指令;当该计算机程序或指令计算机上运行时,使得该计算机执行上述方法实施例所述的通信方法。
本申请实施例提供一种计算机程序产品,包括计算机程序或指令,当该计算机程序或指令在计算机上运行时,使得该计算机执行上述方法实施例所述的多方通信的方法。
本申请实施例还提供一种通信方法,如图19所示,为该方法适用的可能的通信系统的架构示意图。具体的,该通信系统包括终端100b、终端200b以及服务器300b。
在一些实施例中,服务器300b为应用服务器。终端100b上可以安装一个或多个 应用程序,安装的应用程序可以对应一个或多个应用服务器。也就是说,终端100b的应用程序可以与该一个或多个应用服务器进行通信。例如:应用服务器可以是音视频通话应用的服务器,可以为终端100b提供音视频通话功能等。
在本申请实施例中,音视频通话功能,指的是语音通话功能或视频通话功能。视频通话功能通常包括语音通话功能,即在视频通话过程中,视频通话的用户能够看到对方的画面和听到对方的声音。
具体的,终端100b可以通过一个或多个网络与服务器300b建立连接。其中,网络可以是局域网(local area networks,LAN),也可以是广域网(wide area networks,WAN),例如互联网。网络可使用任何已知的网络通信协议来实现,上述网络通信协议可以是各种有线或无线通信协议,诸如以太网、通用串行总线(universal serial bus,USB)、火线(FIREWIRE)、任何蜂窝网通信协议(如3G/4G/5G/未来通信技术)、蓝牙、无线保真(wireless fidelity,Wi-Fi)、NFC或任何其他合适的通信协议。
类似的,终端200b也可以通过一个或多个网络与服务器300b建立通信连接。该网络的类型和使用的通信协议可以参见终端100b连接到服务器300b所使用的网络。
在本申请实施例中,主要以音视频通话应用为例对提供的通信方法进行说明。音视频通话应用例如可以但不限于是畅连通话应用、微信应用、facetime(一种音视频通话软件),以及其他具有视频通过功能的应用。
本申请实施例中,终端100b和终端200b均可以确定并向服务器300b上报各自对应的状态信息。其中,终端对应的状态信息用于反映该终端的状态(比如电量不足)和/或反映使用该终端的用户的状态(比如在睡觉、在运动)。换言之,所述终端对应的状态信息包括所述终端的状态信息和/或所述终端的用户的状态信息。后续,在呼叫过程中,终端100b和终端200b可以分别从服务器获取对方的状态信息,以便根据对方的状态信息执行后续操作。
其中,终端确定状态信息,可以是终端通过硬件,比如穿戴设备或传感器或其他设备采集的数据确定状态信息,也可以终端通过软件(比如畅连通话应用)采集的数据确定状态信息。
以终端100b向终端200b发起视频呼叫为例,比如,当终端200b的用户在洗澡,此时不方便接听电话,则用户可以通过终端200b设定状态信息为“在洗澡”,并向服务器300b上报该状态信息。那么,当终端100b呼叫该终端200b时,可以从服务器300b获取终端200b对应的状态信息,即用户正在洗澡。终端100b还可以通过文字、声音、或者图片等展现方式将该状态信息展示给终端100b的用户。可见,终端100b可以向用户提示能够反映终端200b对应的状态信息,即用户正在洗澡。可见,终端100b获得的信息不再局限于单一预选的多媒体资源,因此能够较大程度上满足用户的视听需求。此外,终端100b的用户可以根据终端100b提示的状态信息知道终端200b的用户的当前状态,那么,终端100b的用户可以根据终端100b的用户的当前状态,采取留言或稍后再打的方式,如此,能够提升沟通效率。
示例性的,上述的终端100b具有呼叫能力和上网能力。终端100b例如可以为手机、平板电脑、智慧屏(智能电视)、个人计算机(personal computer,PC)、个人数字助理(personal digital assistant,PDA)、智能手表、上网本、可穿戴电子设备、 增强现实技术(augmented reality,AR)设备、虚拟现实(virtual reality,VR)设备、车载设备、智能汽车、智能音响、机器人等,本申请对终端100b的具体形式不做特殊限制。终端200b与终端100b的类型可以相同,也可以不同。比如,终端100b为手机、终端200b为平板。终端200b的结构可参考终端100b,不再赘述。其中,呼叫能力不仅限于运营商提供的呼叫(比如通过电话号码呼叫),也可包括由手机厂商或者第三方公司(over the top,OTT)提供的基于网际互连协议的语音(voice over internet protocol,VoIP)呼叫。
终端100b的硬件结构示意图可参见图4,不再赘述。
其中,在本申请的一些实施例中,终端100b可以通过USB接口130连接外部设备,以实现终端100b与外部设备之间的数据通信。当然,终端100b也可能通过其他接口连接外部设备,或者终端100b通过无线连接方式连接外部设备。在本申请实施例中,终端100b可通过一个或多个外部设备采集感应数据,并根据该感应数据确定终端100b对应的状态信息。终端对应的状态信息用于提供给该终端的通信对端。
在一些实施例中,终端100b可以通过无线通信单元160和天线2与外部设备建立无线连接,以实现终端100b和外部设备的数据通信。
终端100b的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本发明实施例以分层架构的Android系统为例,示例性说明终端100b的软件结构。
图20是本发明实施例的终端100b的软件架构框图。终端200b的软件架构框图可参见终端100b的软件架构框图。
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,以及内核层。
应用程序层可以包括一系列应用程序包。
如图20所示,应用程序包可以包括相机,图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,短信息等应用程序。
在本申请的一些实施例中,应用程序包还包括具有音视频通话功能的音视频通话应用,例如:畅连通话应用、微信应用、QQ应用、facetime等。音视频通话应用可以是终端100b上预置的应用程序,也可以是系统中集成的应用程序,也可以是用户通过应用市场或其他方式下载的应用程序,本申请实施例对音视频通话应用不做限定。
应用程序还包括能够记录状态信息的应用。用户能够通过该类应用设置状态信息。状态信息包括用于反映用户状态的用户状态信息,以及用于反映终端状态的终端状态信息。终端的用户的状态信息包括如下信息中的至少一项:用户所处的位置、时间、环境信息、用户进行的活动、健康状况、心情等。终端的状态信息包括但不限于如下信息中的至少一项:终端的电量、信号质量、位置、环境信息等。本申请实施例不限制状态信息的具体内容。示例性的,用户在应用的界面输入一段自身的状态信息“在休假,勿打扰”、“在看书”、“在吃饭”、“下班了,不想接电话”、“有事联系我秘书”、“新增加一批菜品,来品尝”、“天气真好”、“此刻心情很好”、 “万科新盘开盘在即,需要联系我”。
能够记录状态信息的应用可以为终端100b中预装应用,也可以是后续通过诸如第三方应用商店下载的应用。本申请实施例对此不进行限制。比如,能够记录状态信息的应用可以是畅连通话应用、便签、备忘录等。
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。
如图20所示,应用程序框架层可以包括窗口管理器,内容提供器,视图系统,电话管理器,资源管理器,通知管理器等。
窗口管理器用于管理窗口程序。具体介绍可参见图5对应的文字。
在本申请的一些实施例中,应用程序框架层还可以包括状态感知(statement awareness)模块,该状态感知模块可用于监听终端100b的各种环境变化信息、传感器数据、终端运行数据、用户通过应用程序(比如畅连通话APP)设置的状态数据、以及用户行为的变化信息等,以便确定状态信息。而后,状态感知模块可通过内核层的驱动(比如WLAN驱动)调用终端100b的相应模块(比如无线通信单元160包括的WLAN芯片),以便通过该模块(比如WLAN芯片)向服务器上报状态信息。
Android Runtime包括核心库和虚拟机。系统库可以包括多个功能模块。系统库的具体介绍可参见图5对应实施例。
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。
需要说明的是,服务器300b的结构也可以参考图4的终端100a的结构,服务器300b可以具有比图4所示的结构更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
例如,在一个示例中,服务器300b的结构可参见图6-1。
图21示出了服务器300b的另一种结构示意。服务器300b包括状态信息管理模块201和权限查询模块202。
其中,服务器的状态信息管理模块201,用于与终端的通信单元(比如WLAN模块)交互与状态信息相关的内容。比如,用于从终端接收终端的状态信息或使用该终端的用户的状态信息。再比如,还用于从第一终端接收用于查询第二终端对应的状态信息(包括第二终端的状态信息和/或使用第二终端的用户的状态信息)的查询请求。
权限查询模块202,用于查询第一终端的权限。即第一终端是否具有访问第二终端对应的状态信息的权限。
状态信息管理模块201,还用于当第一终端具有访问第二终端对应的状态信息的权限,则向第一终端反馈第二终端对应的状态信息。
如下以终端100b、终端200b均为手机为例,对本申请实施例的技术方案进行详细阐述。
在本申请的一些实施例中,终端可以响应于用户输入的指令获取该终端对应的状态信息。具体的,终端接收所述用户输入的状态输入指令,所述状态输入指令用于输 入所述第一终端对应的状态信息,并根据所述状态输入指令获取所述第一终端对应的状态信息。示例性的,用户可以通过手机中的某些应用程序输入状态输入指令,并设置状态信息。比如可以设置用户的状态信息:用户所处的位置、周围环境、用户进行的活动、用户的心情。当然,用户也可以通过应用程序设置终端的状态信息。
如图22所示列举出几种状态信息,状态信息还可以是其他,本申请实施例对状态信息的具体内容不做限制。
示例性的,用户可以通过畅连通话应用的操作界面来输入自己的状态信息。比如,参见图23-1中(1),用户通过界面501b诸如点击畅连通话应用图标的操作触发手机显示图23-1中(2)所示的应用主界面,在该应用主界面包括控件502b,用户可以通过诸如点击该控件502b的操作触发手机显示图23-1中(3)所示的状态录入界面503b。该状态录入界面503b包括添加状态信息的控件504b,用户可通过诸如点击控件504b的操作触发手机显示图23-1中(4)所示的状态信息编辑界面505b。用户可在该状态信息编辑界面505b中输入一些信息。可选的,该状态信息编辑界面505b还包括文件控件507b,用户可以通过该文件控件507b为输入的状态信息添加一些文件,比如添加进图片、音频等,以丰富状态信息的内容。
在一些实施例中,用户可以在畅连通话应用的界面505b通过手机键盘输入状态信息,比如,输入“今天心情超级好”。
在另一些实施例中,可选的,畅连通话应用的状态信息编辑界面505b还包括语音输入控件506b,用户可以通过该语音输入控件506b输入状态信息。具体的,用户向手机输入语音指令(状态输入指令),比如,输入“今天心情超级好”。手机接收到用户输入的语音指令,并根据该语音指令获取手机对应的状态信息。手机还可以将语音转换为文本,并将转换得到的文本呈现在该状态信息编辑界面中。
当然,用户还可以通过除了诸如键盘输入、语音输入之外的其他方式输入状态信息,本申请实施例对用户输入状态信息的具体方式不做限制。
如图23-1中(5)示出了用户输入的状态信息,即“今天心情超级好”,用户可以随时重新编辑该状态信息。当确定状态信息已编辑好,用户可以通过诸如点击图23-1中(5)所示的“确定”控件508b来保存该状态信息。
以上仅示例性的示出了一种可能的界面示意以及对应的界面操作。本申请实施例中还可以通过其他界面或界面操作来实现在手机中录入状态信息。比如,可以在图23-1中(2)所示应用主界面的设置项的子菜单中设置“录入此刻状态”的选项。或,在畅连通话应用的其他界面的其他子菜单中设置“录入此刻状态”选项。本申请实施例不对具体的界面类型以及界面操作做限制。
在另一些实施例中,用户通过语音助手应用输入状态信息。示例性的,用户可以通过输入语音指令或其他操作(比如长按导航键)唤醒语音助手,手机显示图23-2中(1)所示界面601。该界面601包括语音输入控件602和文本输入控件603。其中,用户可通过诸如点击控件602的操作输入状态信息,比如输入语音指令“去洗澡,来电稍后接听”。手机响应于用户点击图23-2中(1)所示的语音输入控件602,识别用户输入的语音指令,将该语音指令转换为文字,并显示图23-2中(2)所示的界面604,将“去洗澡,来电稍后接听”的文字展示给用户。
这里,图23-2中(2)所示的语音输入控件602与图23-2中(1)所示的语音输入控件602的样式可以不同,在图23-2中(2)所示界面604中,语音输入控件602可以显示为声音频谱的样子,并对应用户输入的声音。
至此,语音助手应用通过接收用户输入的语音指令获知到状态信息,即用户去洗澡,需要稍后接听来电。
在另一些实施例中,用于录入状态信息的应用还可以是备忘录、便签等应用。即状态感知模块可以读取这些应用的数据,并基于数据确定状态信息。状态感知模块与该应用之间交互状态信息的流程可参见图25所示状态感知模块与畅连通话应用之间交互的流程。
可选的,上述应用的数据中带有预设关键字时,才将该数据作为状态信息,并向状态感知模块上报该状态信息。预设关键字可以和状态有关。预设关键字比如可以但不限于为心情、场所、状态、时间等关键字。本申请实施例并不限制预设关键字的具体内容。
比如,如图24所示,为备忘录应用的主界面,其中包括3条笔记,第一条笔记包括预设关键字,即时间10:00-11:00,因此可以将这条笔记的信息作为状态信息。
可以理解,当上述应用获取了用户输入的状态信息后,还需将状态信息上报至应用程序框架层的状态感知模块,以便状态感知模块根据状态信息执行后续操作。
以用户通过畅连通话应用输入状态信息为例,作为一种可能的实现方式,参见图25中(1),畅连通话应用在获取到状态信息后,主动向状态感知模块上报状态信息。比如,用户点击图23-1中(5)所示的“确定”控件508b后,畅连通话应用获取道状态信息是“今天心情超级好”,那么,畅连通话应用向状态感知模块上报用户的该状态信息。
作为另一种可能的实现方式,参见图25中的(2),状态感知模块可周期性或按其他条件触发向畅连通话应用查询状态信息,畅连通话应用响应于状态感知模块的查询请求,向状态感知模块上报状态信息。查询周期可设置的较短,以便能够较快的更新状态信息。查询周期具体的数值可灵活设置,本申请实施例不做限制。本申请实施例不限制触发状态感知模块查询状态信息的条件。
在另一些实施例中,手机还可以根据内部组件采集的感知数据确定状态信息。内部组件包括如下组件中的至少一个:传感器、摄像头、位置定位组件(比如GPS模块)。其中,传感器可包括但不限于如下一种或多种:加速度传感器、陀螺仪、接近传感器、加速度传感器,用于实现对应类型数据的采集。摄像头可用于采集图像,位置定位组件可用于采集位置信息。某些情况下,摄像头、位置定位组件也可以作为传感器。
以通过终端的传感器(比如麦克风)、摄像头获取终端对应的状态信息为例,作为一种可能的实现方式,状态感知模块可获取麦克风、摄像头采集的感知数据,并基于感知数据确定状态信息。例如:状态感知模块可以根据通过麦克风检测到的音频数据、摄像头采集到的图像数据进行环境识别,识别出用户当前正在开视频会议等。又例如:状态感知模块还可以根据加速度传感器、陀螺仪、接近传感器、加速度传感器等传感器的数据,确定出用户的状态或终端的状态,例如:用户走路、跑步、开车、 终端电量不足等。
作为一种可能的实现方式,状态感知模块可周期性或按照其他策略获取传感器的感知数据,并根据这些感知数目确定状态信息。
在另一些实施例中,手机可能电量不足,或通过自身的应用数据或内部组件获取的对应的状态信息不够准确,或基于其他考虑,为了数据准确性等目的,手机还可以通过外部设备获取对应的状态信息。外部设备可以是手机的扩展设备,比如外接摄像头、外部的位置定位组件、传感器等。外部设备也可以是与手机连接的其他设备,比如手表、手环、智慧屏等。外部设备也可以是与手机连接的其他设备上的传感器,比如车机上的摄像头和麦克风。
示例性的,手机可以通过外接摄像头采集图像数据,状态感知模块基于这些图像确定用户的状态比如是在郊游。再比如,手机的状态感知模块可以获取与手机连接的手表的数据,比如,手表的应用程序数据,再比如手表的传感器数据,并基于这些数据确定用户的状态比如是在跑步。再比如,当用户在车内,手机可通过与之连接的车机上的摄像头采集图像,状态感知模块基于这些图像数据确定用户的状态是在开车,且用户的健康状态良好。
如图26示出了状态感知模块与传感器(或外部设备)之间的交互示例。如此,状态感知模块能够获取传感器或外部设备的数据,以便于据此确定用户或终端的状态信息。
状态感知模块获取传感器(或外部设备)的数据(包括状态信息),可以是状态感知模块按照周期或事件或其他策略向传感器查询状态信息,也可以是传感器(或外部设备)在获取状态信息后,主动向状态感知模块上报状态信息。
相比于用户设置状态信息,通过传感器等硬件确定状态信息,获取状态信息更为及时,无需等待用户设置,即可获取状态信息。
在另一些实施例中,还可以通过硬件和软件结合方式确定状态信息,以便在及时状态信息的同时,尽可能保证获取的状态信息的准确性。
手机获取到状态信息之后,还需将状态信息上报至服务器。作为一种可能的实现方式,手机获取到状态信息之后,主动向服务器发送状态信息。或,服务器周期性或按照事件触发向终端查询状态信息,响应于服务器的查询请求,手机向服务器发送状态信息。
如图27所示,手机向服务器发送状态信息,可以是手机的状态感知模块通过内核层的驱动(比如WLAN驱动)调用相应通信单元(比如WLAN模块)向服务器发送状态信息。
通过上述实施例,手机可及时获取并更新状态信息,并向服务器上报状态信息。
当某一终端,比如终端1按照上述实施例采集并向服务器上报了状态信息之后,当有其他终端(比如终端2)呼叫终端1,终端2可以从服务器中获取终端1的状态信息,从而终端2的用户可以了解终端1的用户的当前状态,进而可以根据终端1的用户的当前状态制定不同通话策略。如此,能够提升用户的使用体验。比如,终端1的用户当前状态是正在会议中,那么,终端2的用户可以稍后再呼叫终端1的用户。再比如,终端1的用户当前心情不太好,那么,终端2的用户在与终端1的用户进行 通话时,可能需要调整通话语气、言语措辞等。
图28-1为本申请实施例提供的一种通信方法的交互示意图。首先,Bob的手机(即手机B)按照上述实施例向服务器上报Bob的状态信息(包括Bob的状态信息和/或手机B的状态信息)。后续,某个用户通过手机A输入呼叫指令,比如,在图28-1所示界面701中,点击视频呼叫控件703,或点击界面701中的语音呼叫控件702。这里以用户点击视频呼叫控件703向Bob发起视频呼叫为例对本申请实施例的技术方案进行说明。响应于用户对控件703的操作,手机A(即第一终端)向服务器发送获取请求,用于请求获取所述手机B(即第二终端)对应的状态信息。手机A接收来自服务器的手机B对应的状态信息。手机A在获得Bob的状态信息后,可以将Bob的状态信息提示给手机A的用户。Bob的状态信息可以以图片、文字、声音、视频等多媒体方式提示给手机A的用户。比如,手机A在获得Bob的状态信息后,显示图28-1所示界面704,界面704可以是呼叫界面,该界面704包括Bob的状态信息,即会议中。这里,状态信息是以文字加图片的形式展示给手机A的用户。本申请实施例对状态信息的具体展示形式不做限制。
上述主要以手机A通过服务器获取手机B对应的状态信息。可选的,手机A获取手机B对应的状态信息,还可以实现为:获取所述手机A(第一终端)存储的预先从状态服务器获取的所述第二终端对应的状态信息。即手机A可以预先从状态服务器获取并存储手机B对应的状态信息,后续,手机A可以从本地读取手机B对应的状态信息。
在另一些实施例中,在选择多方通信的对象(比如Bob和Mike)后,还可以由用户通过界面等操作触发手机显示状态信息。比如,在如图28-2所示的界面708中,用户通过诸如点击Bob姓名热区或Bob头像触发手机A显示如图28-2所示界面709,该界面709包括Bob的状态信息(在开会)。
在另一些实施例中,在呼叫过程中,还可以通过相应界面向用户展示提示信息,用以提示可以获取通信对端对应的状态信息。可选的,通过文字显示所述提示信息。或者,可选的,通过预设图标效果显示所述提示信息。或者,还可以通过其他方式呈现提示信息(比如音频、动画效果等)。
以通过文字向用户展示提示信息为例,参见图28-3,手机A在检测到与手机B(即第二终端)之间的呼叫时,在该呼叫的诸如呼叫界面708上显示文字提示信息“可获取对方的状态信息”,以便用于提示可获取所述第二终端对应的状态信息。在通过诸如所述呼叫界面708检测到用于指示获取所述手机B(第二终端)对应的状态信息的目标用户操作指示时,获取所述第二终端对应的状态信息。比如,在通过图28-3所示呼叫界面708检测到用户对该文字区域的诸如点击操作(还可以是向手机A输入语音等操作),手机A获取手机B对应的状态信息(图28-3中以手机A通过状态服务器获取手机B对应的状态信息为例),并呈现所述手机B对应的状态信息(即会议中)。
需要说明的是,本申请实施例中,通过界面检测到用户的操作,可以是用户通过触摸该界面产生的诸如点击、滑动操作,也可以指用户手部的悬浮操作,即用户的手与屏幕之间可以相隔一定距离,用户的手不一定必要接触屏幕。
以通过预设图标效果显示所述提示信息为例,参见图28-4,通过在头像外显示一个框呈现提示信息。可选的,还可以根据框的颜色提示手机B对应的状态信息是否有更新,比如,框为红色代表手机B对应的状态信息有更新,框为灰色代表手机B对应的状态信息未更新。或者,可选的,以其他方式提示手机B对应的状态信息是否有更新。比如,框有闪烁的动画效果代表手机B对应的状态信息有更新,框没有闪烁的动画效果代表手机B对应的状态信息没有更新。或者,还可以有其他方式提示手机B对应的状态信息是否有更新。
如果手机B对应的状态信息有更新,则手机A的用户输入诸如点击头像的操作后,可从状态服务器获取手机B对应的最新的状态信息。反之,如果没有更新,则手机A的用户输入诸如点击头像的操作后,可获取手机A预先从状态服务器获取并存储在本地的手机B对应的状态信息。
或者,可选的,不局限于在头像外显示一个框。还可以用户提示其他形状、大小、位置的界面效果,用于向用户提示通信对端的状态信息是否有更新。
或者,可选的,还可以通过其他预设图标效果呈现提示信息,以便向用户提示可获取通信对端对应的状态信息。
在另一些实施例中,在第一终端呈现所述第二终端对应的状态信息之后,还可以获取所述第一终端输入的针对所述第二终端对应的状态信息中的第一状态信息的第一评论信息,并向消息服务器发送第一评论消息,所述第一评论消息包括所述第一评论信息,还包括所述第一状态信息或所述第一状态信息的标识。也就是说,第二终端对应的状态信息可以有一条或多条,第一终端的用户可以对一条或多条状态信息中的部分状态信息进行评论。
示例性的,参见图28-5,手机A通过界面709呈现所述手机B对应的状态信息(即会议中),该界面709还可以包括控件710,用于输入评论信息。用户可通过该控件710输入诸如点击操作触发手机A显示界面711,该界面711包括输入框712,并在输入框712内输入评论信息。或者,界面709可以直接包括用于输入评论信息的输入框712。本申请实施例对界面的具体展示方式不做限制。
仍参见图28-5,用户编辑完评论信息,可以执行诸如点击“编辑完成”控件的操作,响应于该操作,手机A向消息服务器发送评论消息,所述评论消息包括所述评论信息(又在开会了,注意休息),评论消息还可包括所述所评论的状态信息(即会议中)或所述该状态信息的标识。对于手机B,其接收消息服务器发送的评论消息,并显示所述评论消息的内容。
其中,手机B显示评论消息的内容,可以指向用户提示接收到新的评论信息,但不显示具体的内容,即不显示是针对哪一状态信息作出的评论,也不显示手机A的用户的具体评论(又在开会了,注意休息)。比如,如图28-5中所示,手机B向手机B的用户提示有新的评论信息,但具体的评论信息被折叠。
手机B显示评论消息的内容,还可以指向用户展示具体的评论信息,比如图28-6所示。可选的,手机B还可以向用户提示该评论信息是来自哪一用户等其他信息。
在另一些实施例中,用户A可针对状态信息设置权限。设置用户A的状态信息对哪些用户可见,对哪些用户不可见。状态信息对某个用户可见,表示当该用户呼叫 用户A时,可以从服务器获取到该用户A或用户A所使用终端的状态信息。用户A的状态信息对某用户不可见,则该用户不能够从服务器获取到用户A的状态信息。
示例性的,参见图29,为一种设置状态信息的可见范围的界面操作示意。以通过畅连通话应用设置状态信息的可见范围为例,图29中(1)所示为畅连通话应用的一种示例性的主界面801,该界面801包括设置选项802。用户可通过诸如点击设置选项802触发手机显示图29中(2)所示设置界面803,该设置界面803包括控件804,用于设置状态信息的可见范围,即设置状态信息的可见联系人。用户通过诸如点击该控件804触发手机显示图29中(3)所示设置框805。用户可以通过该设置框805设置状态信息的可见范围。比如,设置状态信息仅被联系人Andy和Sam可见。
可选的,还可以针对不同状态信息设置不同的可见范围。比如,比较私密的状态信息,设置好友可见。对于不私密的状态信息,设置全部联系人可见。如此,可提升隐私数据的安全性。
可选的,对于同一用户来说,还可以针对该用户的不同终端设置不同权限。比如,对于隐私要求比较高的手机、办公电脑等终端,设置高级别的权限要求,仅对熟悉的人可见。对于隐私要求较低的智慧屏等终端,对一般人均可见。具体设置可根据实际应用灵活设置,不做限制。
或者,用户还可以通过畅连通话外的其他应用设置状态信息的可见范围。本申请实施例对用于设置状态信息可见范围的应用以及相关界面操作不做限制。
可选的,手机还可以将状态信息的可见范围上报给服务器,以便服务器据此判断是否向相应呼叫方反馈被叫方的状态信息。
可选的,对于不具有访问权限的终端,其在通话过程中不显示“可获取通信对端对应的状态信息”的提示信息。比如,若手机A(的用户)不具有访问手机B的权限,则手机A不显示如图28-4中头像外的框,如此,可以降低引起用户注意的概率。
可选的,还可以通过将该终端的“获取通信对端对应的状态信息”相关功能禁用,来降低该终端获取到通信对端对应的状态信息的概率。比如,如图28-4所示,手机A不具有访问手机B的权限,则作为一种可能的实现方式,手机A可以显示所示头像外的框,但是,禁止手机A的用户输入诸如点击该框的操作,以防止手机A的用户通过该操作获取到手机B对应的状态信息。
需要说明的是,同一用户可能持有多个终端,该多个终端可称为该用户所关联的终端。本申请实施例中,用户关联的多个终端可能具有同一账号,当然也可以有不同账号。
示例性的,如图30中(1)所示,Andy的手机呼叫Bob,其中,步骤2a中,Andy的手机向服务器发送的查询请求可以携带Andy手机的设备标识和Bob手机的设备标识。服务器根据Bob手机的设备标识获知需查询Bob状态信息的可见范围,比如查询如下表7。
表7
进一步的,查询请求中包括Andy手机的标识,服务器通过查询上述表7,获知Andy手机是可见联系人Andy关联的设备,则Andy的手机具有访问Bob状态信息的权限。因此,服务器向Andy的手机返回Bob的状态信息,以便Andy能够通过其手机获知Bob的当前状态。于是,在未接通该呼叫的过程中,Andy的手机可显示图30中(1)所示界面704,该界面704提示Bob正在会议中。
又比如,如图30中(2)所示,手机C向Bob发起呼叫,并向服务器查询Bob的状态信息,服务器经查询获知该手机C不是Bob状态信息的可见联系人关联的设备,则由于手机C不具有访问Bob状态信息的权限,服务器不向该手机C返回Bob的状态信息。可选的,服务器向手机C返回预设信息,该预设信息可以是现有技术的信息。手机C接收到预设信息后,按照现有技术执行后续操作。比如,在呼叫(呼叫未接通)过程中,显示图30中(2)所示的呼叫界面。示例性的,当手机C的前置摄像头打开,手机C可在呼叫界面705中显示前置摄像头采集的实时图像。
如图30中(1)所示,当Andy呼叫Bob时,若得知Bob正在会议中,那么,其可以选择稍后再呼叫Bob,这样,既可以减轻对呼叫对Bob正在开会的干扰,也能减少Andy的等待时间,即Andy可以在得知Bob正在忙之后,立即取消该呼叫。能够避免Andy一直等待该呼叫被接听浪费时间的问题,提升用户的使用体验。
在另一些实施例中,当用户发起的呼叫接通之后,通话的双方或多方可按照现有技术显示界面。比如,如图31所示,在手机发起呼叫到该通话被接通之前,该手机可以显示Bob的状态信息。在该通话被接听后,该用户A的手机可显示图31所示通话界面706(可包括前置摄像头采集的图像)。
示例性的,图32为本申请实施例提供的通信方法的又一示例。Bob的手机调用车载终端上的摄像头采集图像,并根据该图像获知Bob正在开车。则手机向服务器上报Bob的该状态信息,即正在开车。后续,当有人呼叫Bob,服务器可向主叫方反馈Bob的状态信息,以便主叫方获知Bob正在开车。可选的,在呼叫过程中,主叫方可显示图32所示呼叫界面707。
相比于现有的彩铃/彩振业务只能选择特定类型多媒体信息,比如音乐、视频、图片等,不够灵活,本申请实施例提供的通信方法,可以自由定制呼叫过程中终端提供的多媒体内容。且该多媒体内容能够充分反映用户当时状态(比如心情、活动等),能够丰富用户的视听感受。
且,本申请实施例的通信方法中,终端向用户展示的多媒体内容不局限于特定类型,比如可以展示文本、照片、用户自定义的音频、用户自定义的视频等更丰富多彩的内容形态,展示方式更加灵活。
图33示出了本申请实施例提供的通信方法的示意图。该方法的详细实现可参加上述图22-图32对应的实施例。其中,图33中以第一终端向服务器发起获取请求, 实时从服务器获取第二终端对应的状态信息为例。
上述实施例中,主要以主叫从服务器获取被叫的状态信息为例来说明本申请实施例的技术方案,在另一些实施例中,被叫也可以从服务器获取主叫的状态信息。以第一终端为主叫为例,当所述第一终端向所述第二终端发起呼叫时,可以获取第二终端对应的状态信息。或者,以第一终端为被叫为例,当所述第一终端接收到所述第二终端发起的呼叫时,可以获取第二终端对应的状态信息。
作为一种可能的方式,当检测到被叫用户在被叫手机附近,被叫手机可以从服务器查询主叫手机的状态信息,以便获知主叫方的状态。如图33所示,被叫手机B可以从服务器获取主叫手机A对应的状态信息,并将手机A对应的状态信息展示给手机B的用户。
本申请实施例中,所述终端对应的状态信息包括如下任一项或多项信息的组合:文本、图片、音频、视频、链接、小程序。作为一种可能的方式方式,在所述第一终端的显示界面上呈现所述第二终端对应的状态信息,具体可以实现为:使用用户界面(user interface,UI)模板等方式,将文本、图片、视频、链接、小程序等富媒体形态以界面形式展示给对端设备。
上述主要以在所述第一终端的显示界面上呈现所述第二终端对应的状态信息为例进行说明,第一终端可以通过其他方式展示对方终端的状态信息,比如播放用于提示所述第二终端对应的状态信息的语音。比如以声音、震动等方式展示对方的状态信息。
示例性的,用户B通过畅连通话应用设置文本形态的状态信息,如“在跑步”。用户A的手机呼叫用户B的手机,并从服务器获知用户B对应的文本形态的状态信息。用户A的手机可以借助文本转语音(text to speech,TTS)技术,将文本形态的状态信息转换为语音形态,并进行播报。如此,用户A的手机放在耳朵旁边就可以听到用户B的状态信息,如“您所拨打的用户正在跑步”,该体验与正常拨打电话收听回铃音的体验能够无缝融合,提升用户体验。
需要说明的是,所述状态服务器和所述消息服务器可以为同一服务器。或者,可选的,状态服务器与消息服务器为不同服务器。
本申请实施例中,手机之间可以基于电话号码进行呼叫,或者,也可以在发消息界面发起呼叫、也可以通过通讯录查找相应联系人进行呼叫,本申请实施例不限制呼叫的场景范围。
在一些实施例中,在通信过程中,终端设备可以获取并呈现通信对端的状态信息,能够提升通信效率。并且,当参与通信过程的终端设备有多个,终端设备与通信对端可以借助多方通信中已建立成功的P2P连接传输报文,无需借助中继服务器传输报文,即不用于其他终端设备争抢通信资源,能够进一步提升通信效率。
本申请实施例可以根据上述方法示例对上述第一终端或第二终端或服务器等进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。需要说明的是,本发明实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
如图34所示,为本申请实施例基于功能模块划分提供的通信装置的一种可能的结构示意图。该通信装置包括呈现单元1801、获取单元1802以及通信单元1803。
呈现单元1801,用于呈现相关信息。示例性的,呈现提示信息,呈现通信对端对应的状态信息,呈现第二评论消息。其中,呈现通信对端对应的状态信息,可以是通过界面呈现所述通信对端对应的状态信息;和/或,播放用于提示所述通信对端对应的状态信息的语音。
获取单元1802,用于获取相关信息。示例性的,获取该通信装置对应的状态信息,获取通信对端对应的状态信息,获取通过该通信装置输入的针对通信对端的第一状态信息的第一评论信息。
通信单元1803,用于与其他装置进行通信。示例性的,用于向消息服务器发送携带第一评论信息的第一评论消息。还可用于向所述状态服务器发送该通信装置对应的状态信息。还可用于接收消息服务器发送的第二评论消息。
获取单元1802,用于获取通信对端对应的状态信息,可以是:通过通信单元1803向状态服务器发送获取请求,并通过通信单元1803从状态服务器接收响应,获取该响应中携带的通信对端对应的状态信息。
获取单元1802,用于获取通信对端对应的状态信息,还可以是:获取本地存储的预先从所述状态服务器获取的所述通信对端对应的状态信息。
作为一种可能的实现方式,当通信装置为终端,上述通信单元1803的功能可以由图4所示移动通信单元150和/或无线通信单元160实现。当通信装置为服务器,上述通信单元1803的功能可以由图6-1所示的处理器401和/或处理器408实现。
作为一种可能的实现方式,获取单元1802、呈现单元1801可由处理器实现。可以理解,呈现单元1801还可以由诸如显示屏、扬声器等实现。比如,由显示屏以界面方式呈现通信对端对应的状态信息,由扬声器播放用于提示通信对端对应的状态信息的语音。
可选的,通信装置还可以包括存储模块(并未在图34中示出)。作为一种可能的实现方式,存储模块可由存储器实现。
图34仅是通信装置的一种示例性的模块划分,本申请实施例并不限制具体的模块划分方式。比如,可以将某一个或多个模块再进行拆分或组合或其他布局方式。比如,通信单元可作为获取单元的子模块。
再比如,当通信装置为服务器,还可以采用图21所示模块划分方式。
本申请实施例还提供一种芯片系统,芯片系统的结构可以参见图18。处理器1101和接口电路1102可通过线路互联。例如,接口电路1102可用于从其它装置(例如存储器)接收信号。又例如,接口电路1102可用于向其它装置(例如处理器1101)发送信号。示例性的,接口电路1102可读取存储器中存储的指令,并将该指令发送给处理器1101。该芯片系统可用于终端或服务器(状态服务器或消息服务器)。当应用于第一终端时,当指令被处理器1101执行时,可使得第一终端执行上述实施例中的第一终端执行的各个步骤。当应用于第二终端时,当指令被处理器1101执行时,可使得第二终端执行上述实施例中的第二终端执行的各个步骤。当应用于服务器时,当指令被处理器1101执行时,可使得服务器执行上述实施例中的服 务器执行的各个步骤。当然,该芯片系统还可以包含其他分立器件,本申请实施例对此不作具体限定。
本申请实施例还提供一种装置,该装置包含在终端或服务器中,该装置具有实现上述实施例中任一方法中第一终端或第二终端或状态服务器或消息服务器行为的功能。该功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。硬件或软件包括至少一个与上述功能相对应的模块或单元。例如,呈现模块或呈现单元、以及获取模块或获取单元等。
本申请实施例还提供一种计算机可读存储介质,包括计算机指令,当计算机指令在第一终端或第二终端或状态服务器或消息服务器(其中,状态服务器和消息服务器可以是同一服务器)上运行时,使得第一终端或第二终端执行如上述实施例中任一方法。
本申请实施例还提供一种计算机程序产品,当计算机程序产品在计算机上运行时,使得计算机执行如上述实施例中任一方法。
本申请实施例提供的终端设备、服务器、计算机存储介质或计算机程序产品等均用于执行上文所提供的对应的方法。因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
上述实施例可以全部或部分通过软件,硬件,固件或者任意组合实现。当使用软件程序实现时,上述实施例可以全部或部分地以计算机程序产品的形式出现,计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行计算机程序指令时,全部或部分地产生按照本申请实施例的流程或功能。
其中,所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心传输。计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。该可用介质可以是磁性介质,(例如,软盘,硬盘、磁带)、光介质(例如,DVD)或者半导体介质(例如固态硬盘(solid state disk,SSD))等。
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如 多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是物理上分开的,或者也可以不是物理上分开的,作为单元显示的部件可以是一个物理单元或多个物理单元,即可以位于一个地方,或者也可以分布到多个不同地方。在应用过程中,可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一个设备(可以是个人计算机,服务器,网络设备,单片机或者芯片等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。
Claims (24)
- 一种通信方法,其特征在于,所述方法应用于第一终端,所述方法包括:向服务器发送路径查询请求,所述路径查询请求用于请求至少一条第一转发路径;所述至少一条第一转发路径中每条第一转发路径可用于承载所述第一终端与第二终端之间的报文;从所述服务器接收路径查询响应;所述路径查询响应用于指示所述至少一条第一转发路径;所述至少一条第一转发路径中每条第一转发路径由所述多方通信中多条已建成的点到点P2P链路组成;通过所述至少一条第一转发路径中的目标转发路径发送报文。
- 根据权利要求1所述的通信方法,其特征在于,所述第一转发路径为一条。
- 根据权利要求1所述的通信方法,其特征在于,所述第一转发路径为多条;所述方法还包括:根据预设参数,从所述多条第一转发路径中选择所述目标转发路径;所述预设参数包括链路级别参数和/或路径级别参数,对于每条第一转发路径,所述链路级别参数包括如下参数中的一个或任意组合:组成所述第一转发路径的P2P链路的时延、组成所述第一转发路径的P2P链路的服务质量QoS、组成所述第一转发路径的P2P链路的网络类型;网络类型包括无线高保真Wi-Fi网络或蜂窝网;所述路径级别参数包括所述第一转发路径的中转设备数目。
- 根据权利要求3所述的通信方法,其特征在于,根据预设参数,从所述多条第一转发路径中选择所述目标转发路径,包括:根据所述预设参数以及预设策略,从所述多条第一转发路径中选择所述目标转发路径;所述预设策略包括如下策略中的一个或任意组合:所述目标转发路径的时延最低,所述目标转发路径的时延小于或等于时延阈值上限,所述目标转发路径的QoS最佳,所述目标转发路径的QoS值在预设QoS值范围内,所述目标转发路径的中转设备数目最少,所述目标转发路径的中转设备数目在预设数目范围内,所述目标转发路径的第一P2P链路的网络类型为预设网络类型;预设网络类型包括Wi-Fi网络;所述第一P2P链路为所述第一终端连接的P2P链路或所述第二终端连接的P2P链路。
- 根据权利要求3所述的通信方法,其特征在于,所述目标转发路径为:第一P2P链路的网络类型为预设网络类型的第一转发路径中时延最低的第一转发路径;所述第一P2P链路为所述第一终端连接的P2P链路或所述第二终端连接的P2P链路;或,所述目标转发路径为:第一P2P链路的网络类型为预设网络类型的第一转发路径中QoS最佳的第一转发路径;或,所述目标转发路径为:第一P2P链路的网络类型为预设网络类型的第一转发路径中中转设备数目最少的第一转发路径;或,所述目标转发路径为:QoS值在预设QoS值范围内的第一转发路径中时延最低的第一转发路径;或,所述目标转发路径为:QoS值在预设QoS值范围内的第一转发路径中中转 设备数目最少的第一转发路径;或,所述目标转发路径为:QoS值在预设QoS值范围内的第一转发路径中第一P2P链路的网络类型为预设网络类型的第一转发路径;或,所述目标转发路径为:时延小于或等于时延阈值的第一转发路径中第一P2P链路的网络类型为预设网络类型的第一转发路径;或,所述目标转发路径为:时延小于或等于时延阈值的第一转发路径中QoS最佳的第一转发路径;或,所述目标转发路径为:时延小于或等于时延阈值的第一转发路径中中转设备数目最少的第一转发路径;或,所述目标转发路径为:中转设备数目在预设数目范围内的第一转发路径中时延最低的第一转发路径;或,所述目标转发路径为:中转设备数目在预设数目范围内的第一转发路径中QoS最佳的第一转发路径;或,所述目标转发路径为:中转设备数目在预设数目范围内的第一转发路径中第一P2P链路的网络类型为预设网络类型的第一转发路径。
- 根据权利要求1-7中任一项所述的通信方法,其特征在于,所述报文携带所述目标转发路径或目标子路径;所述目标转发路径由M个P2P链路组成;所述目标转发路径的源节点为所述第一终端,所述目标转发路径的目的节点为所述第二终端;所述目标子路径由所述M个P2P链路中的相邻M-1个P2P链路组成,所述目标子路径的源节点为所述第一终 端的下一跳终端,所述目标子路径的目的节点为所述第二终端;M为大于或等于2的整数。
- 根据权利要求1-8中任一项所述的通信方法,其特征在于,所述向服务器发送路径查询请求,包括:在所述第一终端与所述第二终端之间的P2P链路未建立成功的情况下,向所述服务器发送所述路径查询请求。
- 一种通信方法,其特征在于,所述方法应用于第三终端;所述第三终端位于目标转发路径上,所述方法包括:接收第一终端通过所述目标转发路径向第二终端发送的报文,所述报文携带第二转发路径;所述第二转发路径是所述目标转发路径或目标子路径;所述目标转发路径用于承载所述第一终端与第二终端之间的报文,所述目标转发路径由M个P2P链路组成;所述目标转发路径的源节点为所述第一终端,所述目标转发路径的目的节点为所述第二终端;所述目标子路径由所述M个P2P链路中的相邻N个P2P链路组成,所述目标子路径的源节点为所述第三终端,所述目标子路径的目的节点为所述第二终端;M为大于或等于2的整数,N为正整数,N小于M;根据所述第二转发路径发送报文。
- 一种通信方法,其特征在于,所述方法应用于服务器,所述方法包括:从第一终端接收路径查询请求;所述路径查询请求用于请求至少一条第一转发路径;所述至少一条第一转发路径中每条第一转发路径可用于承载所述第一终端与第二终端之间的报文;响应于所述路径查询请求,向所述第一终端发送路径查询响应,所述路径查询响应用于指示所述至少一条第一转发路径;每条第一转发路径由所述多方通信中多条已建成的P2P链路组成。
- 根据权利要求11所述的通信方法,其特征在于,所述第一转发路径为多条。
- 根据权利要求11所述的通信方法,其特征在于,所述第一转发路径为一条;所述方法还包括:根据预设参数,从多条可用转发路径中选择所述第一转发路径;所述可用转发路径为可用于承载所述第一终端与所述第二终端之间报文的转发路径;所述预设参数包括链路级别参数和/或路径级别参数,对于每条可用转发路径,所述链路级别参数包括如下参数中的一个或任意组合:组成所述可用转发路径的P2P链路的时延、组成所述可用转发路径的P2P链路的服务质量QoS、组成所述可用转发路径的P2P链路的网络类型;网络类型包括无线高保真Wi-Fi网络或蜂窝网;所述路径级别参数包括所述可用转发路径的中转设备数目。
- 根据权利要求13所述的通信方法,其特征在于,所述根据预设参数,从多条可用转发路径中选择所述第一转发路径,包括:根据所述预设参数以及预设策略,从所述多条可用转发路径中选择所述第一转发路径;所述预设策略包括如下策略中的一个或任意组合:所述第一转发路径的时延最低、所述第一转发路径的时延小于或等于时延阈值上限、所述第一转发路径的QoS 最佳、所述第一转发路径的QoS值在预设范围内、所述第一转发路径的中转设备数目最少、所述第一转发路径的中转设备数目在预设数目范围内、所述第一转发路径的第一P2P链路的网络类型为预设网络类型;预设网络类型包括Wi-Fi网络;所述第一P2P链路为所述第一终端连接的P2P链路或所述第二终端连接的P2P链路。
- 根据权利要求11-16中任一项所述的通信方法,其特征在于,所述方法还包括:从所述多方通信中已建立P2P链路的每一终端接收所连接P2P链路对应的链路级别参数。
- 根据权利要求11-17中任一项所述的通信方法,其特征在于,所述方法还包括:从所述第一终端接收所述预设策略。
- 一种第一终端,其特征在于,所述第一终端包括:发送单元,用于向服务器发送路径查询请求,所述路径查询请求用于请求至少一条第一转发路径;所述至少一条第一转发路径中每条第一转发路径可用于承载所述第一终端与第二终端之间的报文;接收单元,用于从所述服务器接收路径查询响应;所述路径查询响应用于指示所述至少一条第一转发路径;所述至少一条第一转发路径中每条第一转发路径由多方通信中多条已建成的点到点P2P链路组成;所述发送单元,还用于通过所述至少一条第一转发路径中的目标转发路径发送报文。
- 一种第三终端,其特征在于,所述第三终端位于目标转发路径上,所述第三 终端包括:接收单元,用于接收第一终端通过所述目标转发路径向第二终端发送的报文,所述报文携带第二转发路径;所述第二转发路径是所述目标转发路径或目标子路径;所述目标转发路径用于承载所述第一终端与第二终端之间的报文,所述目标转发路径由M个P2P链路组成;所述目标转发路径的源节点为所述第一终端,所述目标转发路径的目的节点为所述第二终端;所述目标子路径由所述M个P2P链路中的相邻N个P2P链路组成,所述目标子路径的源节点为所述第三终端,所述目标子路径的目的节点为所述第二终端;M为大于或等于2的整数,N为正整数,N小于M;发送单元,用于根据所述第二转发路径发送报文。
- 一种服务器,其特征在于,包括:接收单元,用于从第一终端接收路径查询请求;所述路径查询请求用于请求至少一条第一转发路径;所述至少一条第一转发路径中每条第一转发路径可用于承载所述第一终端与第二终端之间的报文;发送单元,用于响应于所述路径查询请求,向所述第一终端发送路径查询响应,所述路径查询响应用于指示所述至少一条第一转发路径;每条第一转发路径由多方通信中多条已建成的P2P链路组成。
- 一种电子设备,其特征在于,包括:处理器和存储器,所述存储器与所述处理器耦合,所述存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令,当所述处理器从所述存储器中读取所述计算机指令,以使得所述电子设备执行如权利要求1-9中任一项所述的通信方法,或执行如权利要求10所述的通信方法,或执行如权利要求11-18中任一项所述的通信方法。
- 一种计算机可读存储介质,其特征在于,包括计算机指令,当所述计算机指令在终端上运行时,使得所述终端执行如权利要求1-9中任一项所述的通信方法,或执行如权利要求10所述的通信方法,或执行如权利要求11-18中任一项所述的通信方法。
- 一种计算机程序产品,其特征在于,当所述计算机程序产品在计算机上运行时,使得所述计算机执行如权利要求1-9中任一项所述的通信方法,或执行如权利要求10所述的通信方法,或执行如权利要求11-18中任一项所述的通信方法。
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| EP22752170.5A EP4277225A4 (en) | 2021-02-10 | 2022-01-28 | COMMUNICATION METHOD AND ELECTRONIC DEVICE |
Applications Claiming Priority (6)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202110185618 | 2021-02-10 | ||
| CN202110185620 | 2021-02-10 | ||
| CN202110185618.X | 2021-02-10 | ||
| CN202110185620.7 | 2021-02-10 | ||
| CN202110448981.6A CN114915944A (zh) | 2021-02-10 | 2021-04-25 | 通信方法及电子设备 |
| CN202110448981.6 | 2021-04-25 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2022171009A1 true WO2022171009A1 (zh) | 2022-08-18 |
Family
ID=77589159
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2022/074686 Ceased WO2022171009A1 (zh) | 2021-02-10 | 2022-01-28 | 通信方法及电子设备 |
Country Status (3)
| Country | Link |
|---|---|
| EP (1) | EP4277225A4 (zh) |
| CN (1) | CN113382392B (zh) |
| WO (1) | WO2022171009A1 (zh) |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115473841A (zh) * | 2022-09-06 | 2022-12-13 | 中国联合网络通信集团有限公司 | 网络路径的确定方法、装置及存储介质 |
| WO2024046347A1 (zh) * | 2022-09-01 | 2024-03-07 | 华为技术有限公司 | 一种数据分享方法、系统及相关装置 |
| CN120729782A (zh) * | 2025-08-28 | 2025-09-30 | 中国船舶集团有限公司第七一九研究所 | 基于潜水系统的报警方法及系统 |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114461325B (zh) * | 2022-01-29 | 2025-08-15 | 北京声智科技有限公司 | 信息显示方法、装置、系统、设备、介质及计算机程序 |
| CN114844990A (zh) * | 2022-04-27 | 2022-08-02 | 咪咕音乐有限公司 | 信息处理方法、装置、电子设备和可读存储介质 |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20070014241A1 (en) * | 2005-07-14 | 2007-01-18 | Banerjee Dwip N | Resolver caching of a shortest path to a multihomed server as determined by a router |
| WO2011124121A1 (zh) * | 2010-04-07 | 2011-10-13 | 中兴通讯股份有限公司 | 网间数据通讯系统及方法 |
| CN105024844A (zh) * | 2014-04-30 | 2015-11-04 | 中国电信股份有限公司 | 一种计算跨域路由的方法、服务器以及系统 |
| CN109640028A (zh) * | 2018-11-16 | 2019-04-16 | 视联动力信息技术股份有限公司 | 一种将多个视联网终端和多个互联网终端进行组会的方法和装置 |
| CN109995653A (zh) * | 2019-04-15 | 2019-07-09 | 深圳市迅雷网络技术有限公司 | 跨节点的数据传输方法、装置、系统及可读存储介质 |
| CN110612708A (zh) * | 2017-05-09 | 2019-12-24 | 思科技术公司 | 基于性能路由网络业务 |
Family Cites Families (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1917483A (zh) * | 2006-08-30 | 2007-02-21 | 中国移动通信集团公司 | 信息发送方法 |
| CN101267615A (zh) * | 2007-03-14 | 2008-09-17 | 乐金电子(中国)研究开发中心有限公司 | 一种手机信息提示方法及使用该方法的手机 |
| CN103139741A (zh) * | 2011-11-22 | 2013-06-05 | 珠海德百祺科技有限公司 | 一种基于用户状态的通信管理方法及系统 |
| CN103593794B (zh) * | 2012-08-14 | 2017-03-15 | 腾讯科技(深圳)有限公司 | 信息交互的实现方法和装置 |
| CN104580757A (zh) * | 2014-12-29 | 2015-04-29 | 北京奇虎科技有限公司 | 一种电话状态分享方法和装置 |
| CN104580719B (zh) * | 2014-12-29 | 2017-12-12 | 北京奇虎科技有限公司 | 一种通话控制方法和装置 |
| US10588170B2 (en) * | 2017-06-02 | 2020-03-10 | Apple Inc. | Suspended baseband state |
| CN110351413A (zh) * | 2019-07-26 | 2019-10-18 | 维沃移动通信有限公司 | 通话请求处理方法、装置和移动终端 |
-
2021
- 2021-04-25 CN CN202110462672.4A patent/CN113382392B/zh active Active
-
2022
- 2022-01-28 EP EP22752170.5A patent/EP4277225A4/en active Pending
- 2022-01-28 WO PCT/CN2022/074686 patent/WO2022171009A1/zh not_active Ceased
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20070014241A1 (en) * | 2005-07-14 | 2007-01-18 | Banerjee Dwip N | Resolver caching of a shortest path to a multihomed server as determined by a router |
| WO2011124121A1 (zh) * | 2010-04-07 | 2011-10-13 | 中兴通讯股份有限公司 | 网间数据通讯系统及方法 |
| CN105024844A (zh) * | 2014-04-30 | 2015-11-04 | 中国电信股份有限公司 | 一种计算跨域路由的方法、服务器以及系统 |
| CN110612708A (zh) * | 2017-05-09 | 2019-12-24 | 思科技术公司 | 基于性能路由网络业务 |
| CN109640028A (zh) * | 2018-11-16 | 2019-04-16 | 视联动力信息技术股份有限公司 | 一种将多个视联网终端和多个互联网终端进行组会的方法和装置 |
| CN109995653A (zh) * | 2019-04-15 | 2019-07-09 | 深圳市迅雷网络技术有限公司 | 跨节点的数据传输方法、装置、系统及可读存储介质 |
Non-Patent Citations (1)
| Title |
|---|
| See also references of EP4277225A4 |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2024046347A1 (zh) * | 2022-09-01 | 2024-03-07 | 华为技术有限公司 | 一种数据分享方法、系统及相关装置 |
| CN115473841A (zh) * | 2022-09-06 | 2022-12-13 | 中国联合网络通信集团有限公司 | 网络路径的确定方法、装置及存储介质 |
| CN115473841B (zh) * | 2022-09-06 | 2023-06-23 | 中国联合网络通信集团有限公司 | 网络路径的确定方法、装置及存储介质 |
| CN120729782A (zh) * | 2025-08-28 | 2025-09-30 | 中国船舶集团有限公司第七一九研究所 | 基于潜水系统的报警方法及系统 |
Also Published As
| Publication number | Publication date |
|---|---|
| EP4277225A4 (en) | 2024-07-10 |
| CN113382392A (zh) | 2021-09-10 |
| EP4277225A1 (en) | 2023-11-15 |
| CN113382392B (zh) | 2023-03-24 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2022171009A1 (zh) | 通信方法及电子设备 | |
| CN114173000B (zh) | 一种回复消息的方法、电子设备和系统、存储介质 | |
| CN113676902B (zh) | 一种提供无线上网的系统、方法及电子设备 | |
| JP7268275B2 (ja) | 着信があるときに電子デバイス上に映像を提示するための方法、および電子デバイス | |
| CN110198362B (zh) | 一种在联系人中添加智能家居设备的方法及系统 | |
| US12578913B2 (en) | Display method, electronic device, and system | |
| EP4187872A1 (en) | Task processing method and related electronic device | |
| CN111131019B (zh) | 一种多路http通道复用的方法及终端 | |
| CN116137639A (zh) | 一种跨设备音频数据传输的方法和电子设备 | |
| WO2022127670A1 (zh) | 一种通话方法、相关设备和系统 | |
| WO2022222691A1 (zh) | 一种通话处理方法及相关设备 | |
| CN115914983A (zh) | 数据交互方法、电子设备及计算机可读存储介质 | |
| CN115509651A (zh) | 一种屏幕共享的方法及相关设备 | |
| CN114520887B (zh) | 一种视频通话背景切换方法及第一终端设备 | |
| CN114915944A (zh) | 通信方法及电子设备 | |
| CN116709225B (zh) | 通话方法、电子设备、网络设备及系统 | |
| CN114466100A (zh) | 配件主题自适应方法、装置和系统 | |
| CN114697438B (zh) | 一种利用智能设备进行通话的方法、装置、设备及存储介质 | |
| CN114095600A (zh) | 配件主题自适应方法、装置和系统 | |
| WO2024260185A1 (zh) | 一种数据传输的方法、终端及系统 | |
| WO2024159925A1 (zh) | 一种投屏方法、投屏系统和电子设备 | |
| WO2020216144A1 (zh) | 一种添加邮件联系人的方法和电子设备 | |
| CN114449103B (zh) | 提醒方法、图形用户界面及终端 | |
| CN114900583B (zh) | 控制视频彩振播放的方法和装置 | |
| WO2024067037A1 (zh) | 一种服务调用方法、系统和电子设备 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 22752170 Country of ref document: EP Kind code of ref document: A1 |
|
| ENP | Entry into the national phase |
Ref document number: 2022752170 Country of ref document: EP Effective date: 20230809 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |

