WO2021238884A1 - 一种即时通信方法及设备 - Google Patents

一种即时通信方法及设备 Download PDF

Info

Publication number
WO2021238884A1
WO2021238884A1 PCT/CN2021/095625 CN2021095625W WO2021238884A1 WO 2021238884 A1 WO2021238884 A1 WO 2021238884A1 CN 2021095625 W CN2021095625 W CN 2021095625W WO 2021238884 A1 WO2021238884 A1 WO 2021238884A1
Authority
WO
WIPO (PCT)
Prior art keywords
application
user
electronic device
interface
content
Prior art date
Application number
PCT/CN2021/095625
Other languages
English (en)
French (fr)
Inventor
陶强
王磊
方卫庆
高光远
Original Assignee
华为技术有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to EP21814135.6A priority Critical patent/EP4145776A4/en
Priority to US17/927,643 priority patent/US20230308403A1/en
Publication of WO2021238884A1 publication Critical patent/WO2021238884A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/04Real-time or near real-time messaging, e.g. instant messaging [IM]
    • H04L51/046Interoperability with other network applications or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0633Lists, e.g. purchase orders, compilation or processing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/04Real-time or near real-time messaging, e.g. instant messaging [IM]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/07User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail characterised by the inclusion of specific contents
    • H04L51/10Multimedia information

Definitions

  • This application relates to the field of communication technology, and in particular to an instant communication method and device.
  • instant messaging applications such as WeChat (applications, hereinafter referred to as applications or apps) can implement instant messaging and sharing data between different terminals by constructing an in-app contact list/address book.
  • instant messaging applications can only be used to complete the receiving and sending of instant messages.
  • browser applications share web pages
  • shopping apps share product links
  • video playback software share video links, and other scenarios.
  • the first user opens the first application on device A, such as Huawei Video, and shares episode X of "Metro Man and Women" that is currently playing through the second application, such as WeChat, to share content with the second user.
  • the second user As shown in Figure 1A, the second user’s device B receives the Huawei video link from device A via WeChat. The second user clicks on the video link to enter the Huawei Video applet or Huawei Video app to watch the video. At this time, if the second user wants to To send a message to the first user, you can only exit the video playback interface and return to the WeChat chat interface.
  • the first user browses products in Huawei Mall, and shares the products in his shopping cart, such as Huawei Band 4Pro, to the second user through WeChat.
  • the second user s device B receives the product link via WeChat.
  • the second user clicks on the link to enter the Huawei Mall applet or the Huawei Mall app shopping interface.
  • the second user and the first user cannot access the Huawei Mall app.
  • Direct communication of course, cannot share shopping carts, and cannot achieve collaborative shopping.
  • the embodiments of the present invention provide an instant communication method, a communication system, and an electronic device, which realize sharing of content in a first application through a second application, so that users can send and receive instant messages on an interface in the first application.
  • an embodiment of the present invention provides a communication system, including a first electronic device and a second electronic device, the first electronic device displays a first interface of a first application, and the first interface includes a first option;
  • the first electronic device In response to the operation of the first option, the first electronic device sends a link to the first content to the second electronic device through a second application, where the first content is provided by the first application content;
  • the second electronic device displays a first dialog interface of a third application.
  • the first dialog interface includes a first user identifier and a second option.
  • the second option is associated with the link of the first content.
  • a user identifier is used to identify a user who operates the first electronic device, and the third application corresponds to the second application;
  • the second electronic device displays a second interface of a fourth application, the second interface includes the first content and the third option, and the fourth application corresponds to the The first application;
  • the second electronic device In response to the operation on the third option, the second electronic device sends a first message to the first electronic device through the third application.
  • the content in the first application is shared through the second application, so that a user who operates the second electronic device can send an instant message to the first electronic device on the interface in the first application.
  • the first electronic device displays a third interface of the first application, and the third interface includes prompt information, and the prompt information is used to prompt that the second user has entered.
  • the second user prompts the first user in time when opening the first content, and the beneficial effect of real-time notification to the user is obtained.
  • the third interface further includes a second user identification and the first message, the second user identification is used to identify the second user, and the second user is the operator The user of the second electronic device.
  • the first user receives the instant message sent by the second user in the first application in real time. In this way, the first user can communicate with the second user instantly without leaving the first application.
  • the first message is a text message, a voice message, a voice call request, or a video call request.
  • the first user and the second user receive and send instant messages, and conduct voice chat or video chat within the first application.
  • the first user and the second user can communicate in real time while sharing the first content, which improves the user's experience of using the device.
  • the link association between the second option and the first content includes: the second option is a card or a control that includes the first content link.
  • the first application is a video application or an audio application
  • the first content is a video or audio
  • the playing time of the video or audio is first timing
  • the playing time of the video or audio is the second time
  • the first time is the same as the second time.
  • the first user controls the playback time of the video or audio, so that the first user and the second user can watch the video or listen to the audio synchronously.
  • the first electronic device displays a fifth interface of the first application, the fifth interface includes the first content, and the play time of the first content is the third time , Wherein the third time is different from the first time;
  • the second electronic device displays a sixth interface of the fourth application, the sixth interface includes the first content, and the playing time of the first content is a fourth time, wherein the fourth time is equal to The third time is the same.
  • the first user controls the fast forward or fast rewind of the video or audio, so that the first user and the second user can watch the video or listen to the audio synchronously.
  • the first application is a shopping application
  • the first content is a commodity
  • the second interface further includes a fourth option
  • the second electronic device displays a first shopping cart and a second shopping cart in the fourth application, wherein the first shopping cart corresponds to the first user , The second shopping cart corresponds to a second user, and the first user is different from the second user.
  • the shopping cart products of the first user and the second user can be displayed synchronously in the shopping application, so that the first user can see the shopping cart products of the second user, and the second user can see the first user’s shopping cart products.
  • the user's shopping cart items can be displayed synchronously in the shopping application, so that the first user can see the shopping cart products of the second user, and the second user can see the first user’s shopping cart products.
  • the user's shopping cart items can be displayed synchronously in the shopping application, so that the first user can see the shopping cart products of the second user, and the second user can see the first user’s shopping cart products.
  • the second electronic device displaying the first shopping cart and the second shopping cart in the fourth application includes:
  • the second electronic device also displays a third shopping cart in the fourth application, and the products in the third shopping cart are the sum of the products in the first shopping cart and the products in the second shopping cart.
  • the first application is a map application
  • the first content is navigation information
  • the second interface of the fourth application further includes the first user identifier and the second user Identification
  • the second user identification is used to identify a user operating the second electronic device
  • the first user identification is also used to indicate the geographic location of the first electronic device
  • the second user identification is also used to Indicates the geographic location of the second electronic device.
  • an embodiment of the present invention provides an instant messaging method, which is applied to a second electronic device with a display screen, and the method includes:
  • the second electronic device displays a first dialog interface of a third application, the first dialog interface includes a first user identifier and a second option, the second option is associated with a link of the first content, and the first user The identifier is used to identify the user operating the first electronic device;
  • the first content is the content provided by the first application for the first electronic device, and the link of the first content is sent by the first electronic device to the second electronic device through the second application, so
  • the third application corresponds to the second application
  • the second electronic device displays a second interface of a fourth application, the second interface includes the first content and the third option, and the fourth application corresponds to the The first application;
  • the second electronic device In response to the operation on the third option, the second electronic device sends a first message to the first electronic device through the third application.
  • the content in the first application is shared through the second application, so that a user who operates the second electronic device can send an instant message to the first electronic device on the interface in the first application.
  • the first message is a text message, a voice message, a voice call request, or a video call request.
  • the first user and the second user receive and send instant messages, and conduct voice chat or video chat within the first application.
  • the second user can communicate with the first user in real time while opening the first content, which improves the user's experience of using the device.
  • the link association between the second option and the first content includes: the second option is a card or a control that includes the first content link.
  • the first application is a video application or an audio application
  • the first content is a video or audio
  • the playing time of the video or audio is first timing
  • the playing time of the video or audio is the second time
  • the first time is the same as the second time.
  • the first user controls the playback time of the video or audio, so that the first user and the second user can watch the video or listen to the audio synchronously.
  • the second electronic device displays a sixth interface of the fourth application, the sixth interface includes the first content, and the playing time of the first content is the fourth time , The fourth time is the same as the third time;
  • the third time is the playing time of the first content when the first electronic device displays the fifth interface of the first application, and the third time is different from the first time.
  • the first user controls the fast forward or fast rewind of the video or audio, so that the first user and the second user can watch the video or listen to the audio synchronously.
  • the first application is a shopping application
  • the first content is a commodity
  • the second interface further includes a fourth option
  • the second electronic device displays a first shopping cart and a second shopping cart in the fourth application, wherein the first shopping cart corresponds to the first user , The second shopping cart corresponds to a second user, and the first user is different from the second user.
  • the shopping cart products of the first user and the second user can be displayed synchronously in the shopping application, so that the second user can see both the products in his shopping cart and the shopping cart products of the first user. .
  • the second electronic device displaying the first shopping cart and the second shopping cart in the fourth application includes:
  • the second electronic device also displays a third shopping cart in the fourth application, and the products in the third shopping cart are the sum of the products in the first shopping cart and the products in the second shopping cart.
  • the first application is a map application
  • the first content is navigation information
  • the second interface of the fourth application further includes the first user identifier and the second user Identification
  • the second user identification is used to identify a user operating the second electronic device
  • the first user identification is also used to indicate the geographic location of the first electronic device
  • the second user identification is also used to Indicates the geographic location of the second electronic device.
  • an embodiment of the present application provides an electronic device, including: one or more processors; and a memory, in which code is stored.
  • the electronic device is caused to execute the instant communication method executed by the electronic device in any one of the possible implementation manners of the second aspect.
  • an embodiment of the present invention provides a computer storage medium including computer instructions, which when the computer instructions run on an electronic device, cause the electronic device to execute the instant messaging method in any one of the possible implementation manners of the second aspect.
  • an embodiment of the present invention provides a computer program product, which when the computer program product runs on a computer, causes the computer to execute the instant messaging method in any one of the possible implementation manners of the second aspect.
  • Figures 1A-1B are a sharing scenario in the prior art
  • FIG. 2A is a schematic diagram of the architecture of a communication system provided by an embodiment of the present invention.
  • 2B is a schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present invention.
  • 2C is a diagram of a software system architecture according to an embodiment of the present invention.
  • 2D is another software system architecture diagram according to an embodiment of the present invention.
  • 3A-3M are schematic diagrams of a set of interfaces provided by an embodiment of the present invention.
  • FIGS. 4A-4H are schematic diagrams of another set of interfaces provided by an embodiment of the present invention.
  • FIG. 5 is an operation sequence diagram of video sharing according to an embodiment of the present invention.
  • FIG. 6 is a sequence diagram of another video sharing operation provided by an embodiment of the present invention.
  • FIGS. 7A-7K are schematic diagrams of another set of interfaces provided by an embodiment of the present invention.
  • FIGS. 8A-8D are schematic diagrams of another set of interfaces provided by an embodiment of the present invention.
  • FIG. 9 is a sequence diagram of an operation of commodity sharing provided by an embodiment of the present invention.
  • FIGS. 10A-10G are schematic diagrams of another set of interfaces provided by an embodiment of the present invention.
  • FIG. 11 is a flowchart of an instant messaging method provided by an embodiment of the present invention.
  • FIG. 12 is a schematic structural diagram of another electronic device provided by an embodiment of the present invention.
  • first and second are only used for descriptive purposes, and cannot be understood as implying or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, the features defined with “first” and “second” may explicitly or implicitly include one or more of these features. In the description of the embodiments of the present application, unless otherwise specified, “multiple” The meaning is two or more.
  • the embodiment of the present invention provides an instant messaging method, which can be applied to the communication system (also referred to as the content sharing system) 100 shown in FIG. 2A.
  • the communication system 200 may include N (N is an integer greater than 1) electronic devices. These N electronic devices can be interconnected through a communication network.
  • the foregoing communication network may be a wired network or a wireless network.
  • the aforementioned communication network may be a local area network (LAN), or a wide area network (wide area network, WAN), such as the Internet.
  • LAN local area network
  • WAN wide area network
  • the above-mentioned communication network can be implemented using any known network communication protocol.
  • the above-mentioned network communication protocol can be various wired or wireless communication protocols, such as Ethernet, universal serial bus (USB), Firewire (FIREWIRE), Global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (wideband code) division multiple access (WCDMA), time-division code division multiple access (TDSCDMA), long term evolution (LTE), Bluetooth, wireless fidelity (WiFi), NFC, Internet-based Protocol voice call (voice over Internet protocol, VoIP), communication protocol supporting network slicing architecture, or any other suitable communication protocol.
  • USB universal serial bus
  • Firewire FIREWIRE
  • GSM Global system for mobile communications
  • GPRS general packet radio service
  • CDMA code division multiple access
  • WCDMA wideband code division multiple access
  • TDSCDMA time-division code division multiple access
  • LTE long term evolution
  • Bluetooth wireless fidelity
  • WiFi Internet-based Protocol voice call
  • VoIP Internet-based Protocol voice call
  • VoIP Internet-based Protocol
  • each electronic device in the communication system 200 can be interconnected through one or more servers after logging in to their respective accounts (such as Huawei accounts), and the above servers can also be implemented through the cloud.
  • various electronic devices in the communication system 200 may establish a Wi-Fi connection through a Wi-Fi protocol.
  • the embodiment of the present invention is suitable for a first electronic device to share content in a first application with a second electronic device, such as the sharing scenarios shown in FIG. 1A and FIG. 1B.
  • the content sharing is completed through a second application installed in both the first electronic device and the second electronic device, and the second application is an instant messaging application.
  • the second application may be an application pre-installed before the device leaves the factory, such as Huawei's Changlian application, or a third-party application downloaded or installed after the user purchases the device, such as WeChat.
  • the second application can create a background message channel for each sharing, and the first application can use this channel to send, receive messages, and make voice calls or video calls between the first electronic device and the second electronic device.
  • the second application Based on the original content sharing, the second application establishes a communication connection for the sharing parties, and the user can communicate based on the communication connection without leaving the first application.
  • the instant communication method provided by the embodiments of the present invention can be applied to mobile phones, tablet computers, wearable devices, in-vehicle devices, augmented reality (AR)/virtual reality (VR) devices, notebook computers, and super mobile personal computers
  • AR augmented reality
  • VR virtual reality
  • UMPC ultra-mobile personal computer
  • netbooks netbooks
  • PDAs personal digital assistants
  • FIG. 2B shows a schematic diagram of the structure of the electronic device 100.
  • the electronic device 100 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, and an antenna 2.
  • Mobile communication module 150 wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone jack 170D, sensor module 180, buttons 190, motor 191, indicator 192, camera 193, display screen 194, and Subscriber identification module (subscriber identification module, SIM) card interface 195, etc.
  • 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 structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100.
  • the electronic device 100 may include more or fewer components than shown, or combine certain components, or split certain components, or arrange different components.
  • the illustrated components can be implemented in hardware, software, or a combination of software and hardware.
  • the processor 110 may include one or more processing units.
  • the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), and 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 (NPU), etc.
  • AP application processor
  • modem processor modem processor
  • GPU graphics processing unit
  • image signal processor image signal processor
  • ISP image signal processor
  • controller video codec
  • digital signal processor digital signal processor
  • DSP digital signal processor
  • NPU neural-network processing unit
  • the different processing units may be independent devices or integrated in one or more processors.
  • the controller can generate operation control signals according to the instruction operation code and timing signals to complete the control of fetching and executing instructions.
  • a memory may also be provided in the processor 110 to store instructions and data.
  • the memory in the processor 110 is a cache memory.
  • the memory can store 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 directly called from the memory. Repeated accesses are avoided, the waiting time of the processor 110 is reduced, and the efficiency of the system is improved.
  • the processor 110 may include one or more interfaces.
  • the interface can 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, and a universal asynchronous transmitter (universal asynchronous transmitter) interface.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • PCM pulse code modulation
  • UART universal asynchronous transmitter
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM subscriber identity module
  • USB Universal Serial Bus
  • the charging management module 140 is used to receive charging input from the charger.
  • the charger can be a wireless charger or a wired charger.
  • the charging management module 140 may receive the charging input of the wired charger through the USB interface 130.
  • the charging management module 140 may receive the wireless charging input through the wireless charging coil of the electronic device 100. While the charging management module 140 charges the battery 142, it can also supply power to the electronic device through the power management module 141.
  • the power management module 141 is used to connect 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, and 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 electronic device 100 can be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor.
  • the antenna 1 and the antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in the electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
  • antenna 1 can be multiplexed as a diversity antenna of a wireless local area network.
  • the antenna can be used in combination with a tuning switch.
  • the mobile communication module 150 may provide a wireless communication solution including 2G/3G/4G/5G and the like applied to the electronic device 100.
  • the mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), and the like.
  • the mobile communication module 150 can receive electromagnetic waves by the antenna 1, and perform processing such as filtering, amplifying and transmitting the received electromagnetic waves to the modem processor for demodulation.
  • the mobile communication module 150 can also amplify the signal modulated by the modem processor, and convert it into electromagnetic wave radiation via 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 and at least part of the modules of the processor 110 may be provided in the same device.
  • 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.
  • the demodulator then 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 then passed to the application processor.
  • the application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.), or displays an image or video through the display screen 194.
  • the modem processor may be an independent device.
  • the modem processor may be independent of the processor 110 and be provided in the same device as the mobile communication module 150 or other functional modules.
  • the wireless communication module 160 can provide applications on the electronic device 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), and global navigation satellites.
  • WLAN wireless local area networks
  • BT wireless fidelity
  • GNSS global navigation satellite system
  • FM frequency modulation
  • 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 may also receive a signal to be sent from the processor 110, perform frequency modulation, amplify it, and convert it into electromagnetic waves to radiate through the antenna 2.
  • the antenna 1 of the electronic device 100 is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the electronic device 100 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 (wideband code division multiple access, WCDMA), time-division code division multiple access (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 the global positioning system (GPS), the global navigation satellite system (GLONASS), the Beidou navigation satellite system (BDS), and the 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 electronic device of the embodiment of the present invention can send various messages and voice signals to other electronic devices in the communication system 200 as shown in FIG. 2 through the antenna 1 through the mobile communication module 150, or receive various messages sent in the communication system 200 ,voice signal.
  • the electronic device of the embodiment of the present invention can also send and receive various messages and voice signals from other electronic devices in the communication system 200 via the antenna 2 through the wireless communication module 160.
  • the electronic device 100 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, connected to the display 194 and the application processor. GPU is used to perform mathematical and geometric calculations and for graphics rendering.
  • the processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
  • the display screen 194 is used to display images, videos, and the like.
  • the display screen 194 includes a display panel.
  • the display panel can adopt liquid crystal display (LCD), organic light-emitting diode (OLED), active matrix organic light-emitting diode or active-matrix organic light-emitting diode (active-matrix organic light-emitting diode).
  • LCD liquid crystal display
  • OLED organic light-emitting diode
  • active-matrix organic light-emitting diode active-matrix organic light-emitting diode
  • AMOLED flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (QLED), etc.
  • the electronic device 100 may include one or N display screens 194, and N is a positive integer greater than one.
  • the electronic device 100 can realize a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.
  • the ISP is used to process the data fed back from the camera 193. For example, when taking a picture, the shutter is opened, the light is transmitted to the photosensitive element of the camera through the lens, the light signal is converted into an electrical signal, and the photosensitive element of the camera transfers the electrical signal to the ISP for processing and is converted into an image visible to the naked eye.
  • ISP can also optimize the image noise, brightness, and skin color. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene.
  • the ISP may be provided in the camera 193.
  • the camera 193 is used to capture still images or videos.
  • the object generates an optical image through the lens and is projected to 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 transfers the electrical signal to the ISP to convert it into a digital image signal.
  • ISP outputs digital image signals to DSP for processing.
  • DSP converts digital image signals into standard RGB, YUV and other formats of image signals.
  • the electronic device 100 may include one or N cameras 193, and N is a positive integer greater than one.
  • Digital signal processors are used to process digital signals. In addition to digital image signals, they can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the energy of the frequency point.
  • Video codecs are used to compress or decompress digital video.
  • the electronic device 100 may support one or more video codecs. In this way, the electronic device 100 can play or record videos in multiple encoding formats, such as: moving picture experts group (MPEG) 1, MPEG2, MPEG3, MPEG4, and so on.
  • MPEG moving picture experts group
  • MPEG2 MPEG2, MPEG3, MPEG4, and so on.
  • NPU is a neural-network (NN) computing processor.
  • NN neural-network
  • the NPU can realize applications such as intelligent cognition of the electronic device 100, such as image recognition, face recognition, voice recognition, text understanding, and so on.
  • the external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100.
  • the external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example, save music, video and other files in an external memory card.
  • the internal memory 121 may be used to store computer executable program code, where the executable program code 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, at least one application program (such as a sound playback function, an image playback function, etc.) required by at least one function.
  • the data storage area can store data (such as audio data, phone book, etc.) created during the use of the electronic device 100.
  • the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), and the like.
  • the processor 110 executes various functional applications and data processing of the electronic device 100 by running instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
  • the electronic device 100 can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor. For example, music playback, recording, etc.
  • the audio module 170 is used to convert digital audio information into an analog audio signal for output, and is also used to convert an analog audio input into a digital audio signal.
  • the audio module 170 can also be used to encode and decode audio signals.
  • the audio module 170 may be provided in the processor 110, or part of the functional modules of the audio module 170 may be provided in the processor 110.
  • the speaker 170A also called “speaker” is used to convert audio electrical signals into sound signals.
  • the electronic device 100 can listen to music through the speaker 170A, or listen to a hands-free call.
  • the receiver 170B also called a "handset" is used to convert audio electrical signals into sound signals.
  • the electronic device 100 answers a call or voice message, it can receive the voice by bringing the receiver 170B close to the human ear.
  • the microphone 170C also called “microphone”, “microphone”, is used to convert sound signals into electrical signals.
  • the user can make a sound by approaching the microphone 170C through the human mouth, and input the sound signal into the microphone 170C.
  • the electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C, which can implement noise reduction functions in addition to collecting sound signals. In other embodiments, the electronic device 100 may also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and realize directional recording functions.
  • the earphone interface 170D is used to connect wired earphones.
  • the earphone interface 170D may be a USB interface 130, or a 3.5mm open mobile terminal platform (OMTP) standard interface, or a cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
  • OMTP open mobile terminal platform
  • CTIA cellular telecommunications industry association
  • the button 190 includes a power-on button, a volume button, and so on.
  • the button 190 may be a mechanical button. It can also be a touch button.
  • the electronic device 100 may receive key input, and generate key signal input related to user settings and function control of the electronic device 100.
  • the motor 191 can generate vibration prompts.
  • the motor 191 can be used for incoming call vibration notification, and can also be used for touch vibration feedback.
  • touch operations that act on different applications can correspond to different vibration feedback effects.
  • Acting on touch operations in different areas of the display screen 194, the motor 191 can also correspond to different vibration feedback effects.
  • Different application scenarios for example: time reminding, receiving information, alarm clock, games, etc.
  • the touch vibration feedback effect can also support customization.
  • the indicator 192 may be an indicator light, which may be used to indicate the charging status, power change, or to indicate messages, missed calls, notifications, and so on.
  • the SIM card interface 195 is used to connect to the SIM card.
  • the SIM card can be inserted into the SIM card interface 195 or pulled out from the SIM card interface 195 to achieve contact and separation with the electronic device 100.
  • the electronic device 100 interacts with the network through the SIM card to implement functions such as call and data communication.
  • the electronic device 100 adopts an eSIM, that is, an embedded SIM card.
  • the eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
  • FIG. 2C shows a software architecture diagram of a communication system provided by an embodiment of the present application.
  • the communication system may include two or more electronic devices.
  • FIG. 2C exemplarily shows electronic device A (hereinafter referred to as device A) and electronic device B (hereinafter referred to as device B).
  • device A and device B may include a first application and a second application, respectively.
  • the first application may be an application pre-installed before the device leaves the factory, such as a Huawei video application, or a third-party application downloaded by the device.
  • the first application includes an open software development kit (SDK), an application root directory (AppBase), and an application interface (AppUi).
  • SDK software development kit
  • AppBase application root directory
  • AppUi application interface
  • the open SDK includes a sharing module, which provides two sharing modes: common sharing mode and collaborative sharing mode, corresponding to two application programming interfaces (API) respectively.
  • the first application calls the common sharing mode API, which can only realize common sharing; after calling the collaborative sharing mode API, after sharing the content, the second application will establish a background message channel for the first application on the two devices to communicate instantly.
  • the second application is an instant messaging application.
  • the second application can be either an application pre-installed before the device leaves the factory, such as Huawei's Changlian application, or a third-party application downloaded by the device, such as WeChat.
  • Changlian App is a social application that supports mobile operating systems on mobile devices such as smartphones and tablets. It is an instant messaging software that comes with Huawei devices.
  • the second application may include a message service (Message Service) component, an address book (Contact) module, a call interface (CallUI) module, a message chat interface (MessageUI) module, a floating message chat interface (Float MessageUI) module, basic message components and audio Video call basic components.
  • the second application may also include an activity (activity) module, a multimedia effect (mediaeffect) module, etc.
  • the embodiment of the present application does not impose any restrictions on the modules or components in the second application.
  • the second application of device A and the second application of device B communicate through the cloud.
  • the open SDK of the first application and the Message Service component of the second application transmit messages through the Binder.
  • the first application can share content with the Message Service component of the second application through the sharing API.
  • the method of message transmission is not limited to the Binder mechanism. Any system-process communication method can transmit messages between the first application and the second application, such as pipes, signals and traces, and sockets. ), message queue (Message), shared memory (Share Memory), semaphore (Semaphore), etc.
  • the embodiments of the present application do not impose any restrictions on the message transmission means of cross-process communication.
  • the first application of device A When the first application of device A receives the user's operation to share content through the second application, the first application calls the API of the collaborative sharing mode through the open SDK to send the content to the second application.
  • the Message Service component of the second application parses the received message content, and judges it as a collaborative sharing mode through the subsequent mParallelShare field.
  • the second application creates a cross-process message channel with the first application based on the collaborative sharing mode. For example, the Binder mechanism may be used for message transmission.
  • the Message Service component further encapsulates the message content other than the mParallelShare field into a card, displays the card in the chat window in the MessageUI module, and completes the message sending through the message basic component.
  • the second application of device B After receiving the message, the second application of device B displays a card in the chat window of the MessageUI module, such as the video link card 343 in FIG. 3D, that is, the content of device A has been shared to device B.
  • the second application of device A sends the channel establishment message to the second application of device B through the message basic component.
  • the second application of device B receives the channel establishment message, and the MessageUI module refreshes the message card to display the collaborative sharing entry, as shown in the control 351 in FIG. 3E.
  • the first application of device B further determines that it is in the collaborative sharing mode, and sets the HwParallelShareChannel object by calling the collaborative sharing mode API through the open SDK, and the second application creates a cross-process message channel between the second application of device B and the first application based on the object.
  • Device A internally establishes a cross-process message channel between the second application and the first application, indicating that the second application allocates a background message channel to the first application. It can be done by opening the message api of the SDK (not shown in the figure) Receive and send background messages of the second application. The same is true for device B.
  • the cross-process message channel between the second application of device B and the first application enables the message in the second application of device B to communicate with the first application.
  • the second application of device A and the second application of device B complete the message forwarding through the cloud, including shared content and background messages.
  • the second application provides a Float MessageUI, that is, a floating message chat interface, through which the user can chat through the second application without leaving the first application.
  • the first application can send specific application data through the background message channel, such as currently playing video information, progress information, shopping cart information, etc., to implement a specific user scenario.
  • FIG. 2D shows another software system architecture diagram provided by an embodiment of the present application.
  • the software system may include two or more electronic devices.
  • FIG. 2D exemplarily shows electronic device A (hereinafter referred to as device A) and electronic device B (hereinafter referred to as device B).
  • the device A and the device B may include a first application and a second application.
  • the first application includes an open SDK, an application root directory (AppBase), and an application interface (AppUi).
  • the open SDK and AppBase are the same as the open SDK and AppBase of the first application shown in FIG. 2C.
  • the application interface (AppUi) of the first application shown in FIG. 2D includes messageUI, which is used to provide a message input window on the interface of the first application, and the user can input text or voice. information.
  • the second application includes a message service (Message Service) component, an address book (Contact) module, a call interface (CallUI) module, a message chat interface (MessageUI) module, a message basic component, and an audio and video call basic component.
  • Message Service message service
  • Contact address book
  • CallUI call interface
  • MessageUI message chat interface
  • message basic component a message basic component
  • audio and video call basic component an audio and video call basic component.
  • the first application After both the device A and the device B have established a background message channel, the first application provides the MessageUI, that is, the message input window. After the user of device A enters a text or voice message, the first application sends the input message to the Message Service component of the second application through the message channel, and then forwards the message to the second application of device B via the message basic component of the second application Basic components. Device B then sends the message to the first application of device B through the Message Service component of the second application through the message channel, and the MessageUI provided by the first application displays the message.
  • the MessageUI that is, the message input window.
  • the first application sends the input message to the Message Service component of the second application through the message channel, and then forwards the message to the second application of device B via the message basic component of the second application Basic components.
  • Device B then sends the message to the first application of device B through the Message Service component of the second application through the message channel, and the MessageUI provided by the first application displays the message.
  • the user A needs to open the user interface (also called the UI interface) of the video application on the mobile phone A.
  • the user interface also called the UI interface
  • FIG. 3A exemplarily shows a user interface 310 of a video application displayed on an electronic device such as a smart phone.
  • Video applications are one or more applications that provide users with video content on mobile devices such as smart phones and tablets, and can also be called "video software". Users can watch, download or upload video content through video applications.
  • Video applications can be video applications that come with the device, such as Huawei Video shown in Figure 3A, or video applications released by a third party that require users to download and install, such as iQiyi Video, Youku Video, etc.
  • Audio applications can be audio applications that come with the device, such as Huawei Music, or audio applications released by third parties that require users to download and install, such as NetEase Cloud Music, Kugou Music, QQ Music, etc.
  • the user interface 310 of the video application includes the video content 311 being played by the mobile phone A, a comment button 312, a favorite button 313, and a sharing button 314.
  • the video content 311 may have a title, for example, "Live World Cup Football Match 2018 Belgium VS England Group Match”.
  • the comment button 312 is used to trigger the opening of the user comment area.
  • the favorite button 313 can be used to trigger the favorite of the video to the video favorite folder.
  • the sharing button 314 can be used to trigger the opening of the video sharing interface.
  • the mobile phone A may receive an input operation (for example, a single click) of the user on the sharing button 314 in FIG. 3A, and in response to the input operation, the mobile phone A may display a video sharing interface 320 as shown in FIG. 3B.
  • an input operation for example, a single click
  • the video sharing interface 320 includes a sharing card 321 and the video content being played.
  • the sharing card 321 includes a Sina Weibo button 322, a WeChat button 323, a Changlian watch together button 324, and a Changlian button 325.
  • the Sina Weibo button 322 can be used to trigger the opening of the Sina Weibo sharing interface.
  • the WeChat button 323 can be used to trigger the opening of the WeChat sharing interface.
  • the Changlian Watch Together button 324 can be used to trigger the opening of the Changlian application's Watch Together sharing interface.
  • the Changlian button 325 can be used to trigger the opening of the sharing interface of the Changlian application.
  • the copy link button 326 can be used to copy the video link to the clipboard.
  • the more button 327 can be used to trigger opening more sharing-related functions.
  • the cancel button 328 can be used to cancel this sharing.
  • the Changlian watch together button 324 can provide the first sharing mode
  • the Changlian button 325 can provide the second sharing mode.
  • the first sharing mode is collaborative sharing, which is used to share a video link to a Changlian app contact.
  • the shared Changlian app contact opens the video link card and watches the video synchronously with the sharing party.
  • the second sharing mode is ordinary sharing, which is used to share the video link to the Changlian application contact. Similar to that shown in Figure 1A, the shared Changlian application contact opens the video link card to watch the video from the beginning.
  • the mobile phone A can receive the user's input operation (for example, click) on the Changlian view button 324 or the Changlian button 325 in FIG. 3B, and in response to the input operation, the mobile phone A may display an interface 330 as shown in FIG. 3C.
  • the interface 330 includes a search button 331 and a recently chatted contact list 332.
  • the search button 331 can be used to quickly find contacts in the Changlian application.
  • the recently chatted contact list 332 includes the contacts that the mobile phone A has recently chatted with through the Changlian application, and each contact includes the contact avatar and nickname, for example, the user B avatar button 333 and the user B's nickname button 334.
  • Mobile phone A clicks on the avatar or nickname button of user B to share the video link to user B.
  • Mobile phone A can receive the user's input operation (for example, click) on the avatar button 333 or nickname button 334 of user B in FIG. 3C.
  • mobile phone A will broadcast the live broadcast of the 2018 Belgium VS England group match video.
  • the link is shared with mobile phone B. After sharing, if user A chooses to stay in the video application and continue to watch the played video content, mobile phone A will display the video playback interface.
  • user B opens the Changlian application on mobile phone B, selects user A, and enters the chat interface with user A, which can be displayed as shown in Figure 3D
  • the Changlian chat interface 340 includes a user B avatar button 341, a user A avatar button 342, a video link card 343, a call button 344, a more button 346, an input box 345, a play button 348, and a voice input button. 347.
  • the user B avatar button 341 and the user A avatar button 342 can be used to trigger the opening of an interface displaying user information.
  • the video link card 343 can be used to trigger the opening of the shared video link.
  • a "watch together" icon is displayed on the card to prompt the user to click the card to watch the video synchronously with the user A.
  • the call button 344 can be used to trigger the opening of the call interface with user A.
  • the more button 346 can be used to trigger opening of more functions related to the Changlian application.
  • the input box 345 can be used to trigger the opening of the input text message.
  • the voice input button 347 can be used to trigger a voice message input.
  • the Changlian chat interface 350 includes a user B avatar button, a user A avatar button, a video link card 353, a call button, a more button, an input box, a play button 354, and a voice input button.
  • the video link card 353 can be used to trigger the opening of the shared video link.
  • a control 351 is displayed below the video link card 353, and the control 351 is used to display a collaborative sharing portal, such as "see together”.
  • a control 352 may be included below the video link card 353.
  • the control 352 is used to display the screen projection entry, such as "smart screen play”. After the user clicks, the video playback content is projected to the smart screen for playback. If the user clicks the play button 354 of the video link card 353, the video link will be opened to watch the video from the beginning. If the user clicks on the control 351, the video link will be opened to watch the video synchronously with the user A.
  • user B opens the Changlian application on mobile phone B, selects user A, and enters the chat interface with user A, as shown in Figure 3E-1
  • the Changlian chat interface 350 as shown or the Changlian chat interface 355 as shown in FIG. 3E-2.
  • the Changlian chat interface 355 includes a user B avatar button, a user A avatar button, a video link card 356, a call button, a more button, an input box, a play button 357, and a voice input button.
  • the video link card 356 can be used to trigger the opening of the shared video link. If the user clicks the play button 357 of the video link card 356, the video link will be opened to watch the video from the beginning.
  • Mobile phone B can receive the user's input operation (for example, click) on the play button in FIG. 3D or the control 351 in FIG. 3E.
  • the smooth connection application of mobile phone B automatically pulls up the video application and opens as shown in FIG. 3F 360 video playback interface.
  • the video playback interface 360 includes a video progress control 361, a pause button 362, a next episode button 363, a smooth connection button 364, a message input box control 365, a volume control 366, and a voice input button 367.
  • the video progress control 361 can be used to indicate the current video playback progress, and the user can drag the control 361 to change the video playback progress.
  • the currently playing video titled "Live World Cup 2018 Belgium VS England Group Match" has a duration of 41 minutes and 50 seconds, and the current playback progress is 20 minutes and 00 seconds.
  • the control 361 indicates that there is 20 in the middle of the progress bar. Minute location.
  • the pause button 362 can be used to trigger a temporary stop of the current video playback.
  • the next episode button 363 can be used to trigger the opening of the next video.
  • the Changlian button 364 can be used to trigger the activation of the voice chat or video chat function provided by the Changlian application.
  • the message input box control 365 can be used to trigger the opening of the message input interface.
  • the volume control 366 can be used to indicate the current volume, and the user can drag the control 366 to adjust the volume to increase or decrease.
  • the voice input button 367 can be used to trigger a voice message input.
  • the video playback progress is the video playback progress of the video sharing interface 320 shown in FIG. 3B. That is, when user B chooses to synchronously watch the video shared by user A, mobile phone B automatically adjusts the video playback progress to be consistent with the video playback progress of mobile phone A after starting the video application. In this embodiment, when user A shares the video, the playback progress is 20 minutes 00 seconds. Therefore, the video playback progress of mobile phone B automatically jumps to 20 minutes 00 seconds.
  • the video playback volume of mobile phone B is also consistent with the playback volume of mobile phone A.
  • mobile phone B After mobile phone B opens the video playback interface 360 as shown in Figure 3F, mobile phone B sends a message to mobile phone A indicating that user B has chosen to watch the video shared by user A simultaneously, and has started the video playback interface.
  • mobile phone B sends a message to mobile phone A.
  • the message sent by the mobile phone A may be "user B has entered the theater", and the mobile phone A displays the message on the video playing interface 370 after receiving the message.
  • mobile phone A displays a message notification that user B has entered the theater.
  • the video playback interface 370 of the mobile phone A displays a message prompt 371, for example, the content of the message prompt is "User B has entered the theater.”
  • the video playback interface 370 of the mobile phone A also includes a video progress control 372, a pause button, a next episode button, a smooth connection button, a message input box control 373, and a volume control.
  • the above buttons or controls have the same functions as the buttons or controls in the video playback interface 360 of mobile phone B, and will not be repeated here.
  • the mobile phone A can receive the user's input operation (for example, clicking) on the control 373 in FIG. 3G, and in response to the input operation, the mobile phone A opens the message input interface 380 as shown in FIG. 3H.
  • the message input interface 380 includes a palette button 382, a message input box 383, a message sending control 384, and a keyboard control 385.
  • the palette button 382 can be used to control the color of the input message, the display position of the input message in the playback interface, and so on.
  • the message input box 383 can be used to display the text selected by the user through the keyboard control 385, for example, "Kane scored a goal just now.” After the user clicks the message sending control 384 after completing the input, the message input interface 380 can display the content of the chat message, for example, the avatar or nickname of the user A, and the text message that the user chooses to send.
  • the video playback interface of mobile phone B also displays the above message content simultaneously, including the avatar or nickname of user A, and the text message that user A chooses to send. See the video playback interface 375 of FIG. 3I .
  • mobile phone B can receive an input operation (for example, click) for control 365 in Figure 3I, and in response to the input operation, mobile phone B opens as shown in Figure 3J Message input interface 390.
  • the message input interface 390 includes a palette button, a message input box, a message sending control, and a keyboard control.
  • the above buttons or controls have the same functions as the buttons or controls in the message input interface 380 of the mobile phone A, and will not be repeated here.
  • User B enters text through keyboard controls, for example, "play back and see the goal”.
  • the message input interface 390 displays the chat message content, including the avatar or nickname of the user B, and the text message that the user B chooses to send, and is displayed in the video playback interface 393 of the mobile phone A, see FIG. 3K.
  • the mobile phone A can receive an input operation (for example, drag, release) of the video progress control 372 by the user A, and in response to the input operation, enters the video playback interface 394 as shown in FIG. 3L.
  • an input operation for example, drag, release
  • the video playback interface 394 includes new video playback content 395 and a video progress control 372.
  • the video playback content 395 may be different from the content played by the video content 311 at 20 minutes, for example, a scene where Kane scores a goal.
  • the video progress control 372 is displayed at the 18th minute and 30th position of the video progress bar.
  • the video application of mobile phone A sends the user's rewind video information to the Changlian application of mobile phone B, and the Changlian application of mobile phone B sends the message to the video application of mobile phone B.
  • Mobile phone B parses the message and controls the video to rewind to the video
  • the position at 18 minutes and 30 seconds is shown in Figure 3M.
  • the video playback interface of mobile phone B also displays video playback content 395, and its video progress control 361 is also displayed at the 18th minute and 30th second of the video progress bar.
  • the chat between user A and user B during video playback is performed in the AppUi module provided by the video application.
  • the application interface (AppUi) of the video application includes messageUI, which is used to provide a message input window on the interface of the video application, and the user can input text or voice messages.
  • Message input box control 365, voice input button 367, message input interface 390, palette button, message input box, message sending control and keyboard control, as well as the display of voice or text messages input by user A and user B, etc., are all displayed by video Applications such as provided by Huawei Video.
  • the chat between user A and user B during the video playback process may also be provided by the Changlian application with a chat user interface, and real-time voice chat may be performed.
  • the Changlian application includes a floating message chat interface (Float MessageUI) module, which is used to provide a message input window on the interface of the video application, and the user can input text or voice information.
  • Float MessageUI floating message chat interface
  • the smooth connection button, message input box control 373, voice input button, message input interface 380, palette button 382, message input box 383, message sending control 384, and keyboard control 385 of mobile phone A are shown in Figures 3F-3M.
  • the mobile phone A may share the played video link to the group selected by the user after receiving the user's selection of a group.
  • the user A opens the Changlian sharing interface 410 in the video application, and selects the group 412 whose group name is "XXXXXX Group".
  • the mobile phone A can receive the user's input operation (for example, click) on the group 412, and in response to the input operation, the members in the group receive the video link shared by the user A.
  • the mobile phone B may display a smooth chat interface 420.
  • the Changlian chat interface 420 includes a user A avatar button, a user B avatar button, a user C avatar button 421, a video link card, a call button, a Changlian button, more buttons, a voice input button, a collaborative sharing portal, and smart screen playback.
  • the user C avatar button 421 can be used to trigger the opening of user information.
  • the mobile phone C can also display the corresponding Changlian chat interface. User B and User C can click the collaborative sharing portal to watch the video together with User A, or they can choose not to click to enter.
  • user B in group 412 clicks on the collaborative sharing portal to watch a video with user A
  • mobile phone B presents a video playback interface 430
  • the video playback progress and current volume are the same as those of mobile phone A.
  • Mobile phone A control.
  • User A and user B can interact and chat on the video playing interface 430.
  • a smooth link button 431 is provided on the video playback interface 430 to trigger the activation of the voice chat or video chat function provided by the smooth link application.
  • User B clicks or long presses the Changlian button 431, and the video call and voice call options shown in FIG. 4D appear.
  • mobile phone A After the user selects the voice call option, as shown in FIG. 4E, mobile phone A will display a voice call interface 440. If the user clicks on "Video Call", the video chat window can be opened and hovered on the current video playback interface, presenting a picture-in-picture effect. The user can change the size of the video chat window or hide the video chat window.
  • the voice call interface 440 includes the avatar 441 of the user B, the answer button 442, and the hang up button 443.
  • the avatar 441 of user B can be used to prompt user B to invite you to a voice call.
  • the answer button 442 can be used to trigger the establishment of a voice call connection.
  • the hang up button 443 can be used to close the voice call.
  • the voice call interface 440 may also include a mute button.
  • the above-mentioned voice window including the avatar 441 of user B, the answer button 442 and the hang-up button 443 can be changed in position and size, and can be automatically hidden.
  • mobile phone A and mobile phone B establish a voice call connection.
  • user A and user B can watch the video while making a voice call.
  • user B voice requests user A to replay Kane's goal just now, user A drags the video progress bar, as shown in Figures 4F and 4G, both user A and user B can watch Kane's shot.
  • the voice call interface 450 includes a voice chat window 451, and the voice chat window 451 includes the avatar 452 of the user B, the hands-free button 453, and the hang up button 454.
  • the avatar 452 of the user B can be used to prompt the object and the time of the voice call with the user A, for example, 00:06 seconds shown in 4F.
  • the hands-free button 453 can be used to trigger the hands-free function of turning on the voice call. If the user turns on the hands-free, the commentary sound of the ball game will be temporarily reduced. Or, the user has cast the mobile phone A to the smart screen to play, and after the voice connection is established, the mobile phone A temporarily weakens the commentary sound of the ball game, so that the user can have a voice chat.
  • the hang up button 454 can be used to close the voice call.
  • the voice call interface 450 may also include a mute button.
  • the voice chat window 451 can be changed in position and size, and can be automatically hidden.
  • the voice call interface 460 includes a voice chat window 461, and the voice chat window 461 includes the avatar 462 of the user A, the hands-free button 463, and the hang up button 464.
  • the avatar 462 of the user A can be used to prompt the object and the time of the voice call with the user B, for example, 00:06 seconds shown in 4G.
  • the functions of the hands-free button 463 and the hang-up button 464 are similar to those of the hands-free button 453 and the hang-up button 454 shown in FIG. 4F, and will not be repeated here.
  • the user C in the group 412 does not click the collaborative sharing portal, and the mobile phone C still presents a smooth chat interface, and the user C receives and sends messages in the chat interface.
  • FIG. 5 shows a sequence diagram of an operation of video sharing.
  • the equipment involved in the flowchart of the method includes equipment A and equipment interacting with equipment A.
  • the interaction device may be the device B and the device C shown in FIG. 4, and the devices A-C interact through the communication network shown in FIG. 1.
  • the devices A-C can exemplarily refer to the system architecture shown in FIG. 2C.
  • the first application shown in FIG. 5 may be a video application, and the second application may be an instant messaging application such as a Changlian application.
  • the method includes:
  • the video is shared in the first sharing mode.
  • device A may receive an input operation (for example, clicking a share button) for the user to share the first content, and in response to the input operation, device A displays a content sharing interface, where the content sharing interface can refer to the above-mentioned FIG. 3B The video sharing interface 320 shown. Sharing the video in the first sharing mode may be for the user A to click on the button 324 to share the video with the user operating the device B as shown in FIG. 3B.
  • the first application program calls the collaborative sharing API through the integrated open SDK (see FIG. 2C, the first application software structure of the device A).
  • the first application program makes the device operating system execute the command of the application program by calling the API.
  • the collaborative sharing API includes an interface, and the interface includes a target scene (targetScene), a shared content information (HwCaasShareInfo) function, and a collaborative sharing channel (HwParallelShareChannel) function.
  • the target scene (targetScene) is used to indicate scene objects such as sent messages.
  • S502 Send HwCaasShareInfo video information.
  • the video information is shared content information (HwCaasShareInfo) carried by the collaborative sharing API.
  • HwCaasShareInfo includes:
  • Sharing mode (mParallelShare: 0: ordinary sharing; 1: collaborative sharing);
  • Voice call function (mMakeCall: whether to start the voice call function; 0: no; 1: yes);
  • Sharing type (mShareType: shopping, news/webpage, short video, long video, music, text);
  • Sharing information (mShareInfo: message content, title, content, etc.);
  • Thumbnail (mThumbBitmap: Thumbnail);
  • Web page link (mWebUrl: h5 page address);
  • Streaming media link (mStreamUrl: streaming media online playback address);
  • mExtraInfo other message content; current progress of video playback, current location information, current music progress information, current shopping cart information, etc.
  • the MessageService component of the second application in the device A parses the message content, and judges whether it is a collaborative sharing mode through the mParallelShare field.
  • the other message content in the first message is encapsulated into a card, and the card is displayed in the chat window of the MessageUI module.
  • the second application sends the first message to the device B through the message base component.
  • device B may display a card in the second application, for example, the video link card 343 shown in FIG. 3D.
  • a cross-process message channel between the second application and the first application in device A is created.
  • the cross-process message channel is implemented through the collaborative sharing channel (HwParallelShareChannel).
  • the collaborative sharing channel (HwParallelShareChannel) is used to send and receive data between the first application and the second application, and is set when the collaborative sharing API is called, thereby establishing a cross-process message channel between the first application and the second application.
  • the channel function is defined as including sending and receiving application information (AppMessage) and sending and receiving chat messages (ChatMessage).
  • the application information includes an avatar (mIdIcon), a nickname (mIdDescription), and message content (message content).
  • the chat message includes an avatar, nickname, plain text, voice, video, picture, small file, preset label, and geographic location.
  • the second application After the establishment of the cross-process message channel between the second application in the device A and the first application is completed, the second application sends a channel establishment message to the second application of the device B through the message basic component.
  • the second application of the device B receives the channel establishment message, the MessageUI module refreshes the message card, and displays the viewing portal, as shown in the control 351 in FIG. 3E or the video link card 343 in 3D.
  • the user clicks on the entry to watch together, such as the control 351 in FIG. 3E or the play button of the 3D video link card 343, and the MessageUI module of the device B automatically opens the corresponding first application through the mAppUrl information.
  • the sharing mode mParallelShare and other information mExtraInfo in the first message are parsed.
  • mExtraInfo which is filled by the video application of device A and parsed by the video application of device B.
  • the format of the information is defined by the video application, and the following format can be defined as a reference:
  • the current playing time is 20min; the current playing volume is 65%.
  • the first content is played in the video application, and the playback parameters are the parsed parameters.
  • the playback parameters are the parsed parameters.
  • a video playback interface 360 is shown in FIG. 3F.
  • S508 Send a message for entering the room through the message channel.
  • Device B sends the message of entering the room through the sendAppMessage method of the HwParallelShareChannel object.
  • the format of the message content mMessageInfo is customized by the video application, and the following format can be defined as a reference: JoinRoom:1.
  • the message is sent to the MessageService component of the second application, and the MessageService component determines that it is an application message (AppMessage), and forwards it to the device A through the message basic component.
  • AppMessage application message
  • the second application of device A determines that it is AppMessage, and forwards it to the corresponding first application through onAppMessageReceive of the collaborative sharing channel (HwParallelShareChannel).
  • the first application of device A parses mMessageInfo as a room entry message, refreshes the video playback interface, and reminds the user to enter the theater, such as the message prompt 371 in FIG. 3G.
  • User A sends a chat message through the sendChatMessage method of the HwParallelShareChannel object, and fills in the content according to the established chat message format.
  • the second application After the second application receives the message, it judges that it is chatMessage, parses the content of the message, refreshes the chat interface MessageUI, and forwards the message to device B through the basic message component. After receiving the message, device B judges that it is chatMessage, refreshes the chat interface MessageUI, and passes The onChatMessageReceive method of the HwParallelShareChannel object is forwarded to the corresponding video application.
  • the video application parses the chatMessage after receiving it, and refreshes the UI to display the chat message.
  • the video application encapsulates the fast-forward video message, which is encapsulated by AppChannelMessage, and the message content mMessageInfo format is customized by the video application.
  • the following format can be defined as a reference:
  • S515 Send the control message through the message channel.
  • the sharing parties chat during the video playback process, and the chat user interface is provided by the Changlian application, and real-time voice chat can be performed.
  • FIG. 6 shows a specific operation sequence diagram of voice chat
  • device A and device B can exemplarily refer to the system architecture shown in FIG. 2D.
  • the first application shown in FIG. 6 may be a video application
  • the second application may be an instant messaging application such as a Changlian application.
  • the steps S601-S605 of device A sharing the video to device B through the Changlian application are the same as steps S501-505 in FIG. 5, and steps S607-S610 are the same as steps S506-509 in FIG. 5 The same steps will not be repeated here.
  • the video application of the device A calls the API interface provided by the Changlian application to set the floating chat window to be displayed.
  • the process of setting the display is for example:
  • step 611 After the device B receives the shared video, and after the user clicks on the watch together entry to start the video application, the video application calls the API interface provided by the second application to set the floating chat window to be displayed.
  • the specific process of setting the display is the same as step 606.
  • the FloatMessageUI module of the second application provides a floating chat interface, from which the user inputs and sends a chat message.
  • the floating chat interface of device B displays a new message notification, and the user can view and reply to messages in the floating chat interface provided by FloatMessageUI.
  • S615 The user opens a voice call in the FloatMessageUI module of the device A, and initiates a voice call request. After the request is initiated, the CallUI can be displayed, that is, the call UI, or the FloatMessageUI module can be directly refreshed to display the call status.
  • S616 The voice call request is sent to the device B through the audio and video call basic component of the device A.
  • S617 Device B displays the call/incoming call notification.
  • the audio and video call component establishes a voice channel, and both parties enter the same voice channel, thereby establishing a voice call connection and conducting a real-time call.
  • the user can hang up through CallUI.
  • the voice call function while watching the video together can be initiated in the floating chat interface, or directly when sharing the video, that is, when the collaborative sharing API is called, specify whether to start the voice call in ShareInfo ; If it is, start the voice call and the floating UI at the same time, and send the logo to the other party. After the other party analyzes the logo, the floating call UI will be displayed synchronously.
  • the foregoing video sharing embodiment provides an API interface through the second application, and supports all first applications to use the message channel to build their own instant messaging capabilities.
  • the first application allows the user to send chat information, and realizes its own instant chat function.
  • the first application can also send its own business information through the message channel.
  • the video progress information can be synchronized to watch the video together.
  • the business information is packaged in a certain format and sent through the message channel, and received and parsed by the recipient’s first application. Into business information.
  • the message channel supports sending text, pictures, music, videos, web pages, applications and other formats.
  • FIG. 7A exemplarily shows a user interface 710 of a shopping application displayed on an electronic device such as a smart phone.
  • Shopping applications are one or more applications on mobile devices such as smartphones and tablets that provide users with online purchases of goods. They can also be referred to as “shopping software", “online shopping applications”, and “mall applications”. The user can find, browse or purchase the goods provided in the application through the shopping application.
  • the shopping application can be a shopping application that comes with the device, such as the Huawei Mall shown in Figure 7A, or a shopping application published by a third party that requires users to download and install, such as JD.com, Taobao, Tmall, Yihaodian, etc.
  • the user interface 710 of the video application includes a product image 711, a product name 712, a product price 713, a share button 714, a favorite button 715, a shopping cart button 716, and a buy now button that device A is viewing. 717, commodity discount 718, and shopping cart button 719.
  • the product picture 711 may have one or more pictures, and may also include a product introduction video.
  • the product name 712 is used to display the product brand, category, function, etc., for example, "Huawei Band 4Pro Colorful Dial NFC Smart Swipe".
  • the commodity price 713 can be used to identify the selling price of the commodity.
  • the sharing button 714 can be used to trigger the opening of the commodity sharing interface.
  • the favorite button 715 is used to trigger the function of adding the product to the personal favorite.
  • the add to shopping cart button 716 can be used to trigger the addition of the product to the shopping cart of the current user.
  • the buy now button 717 can be used to trigger the operation of buying the commodity immediately.
  • the commodity discount 718 can be used to display the current or future discount activities of the commodity, such as "half price for the second item”.
  • the shopping cart button 719 can be used to trigger entry into the user's shopping cart interface.
  • the device A may receive an input operation (for example, a click) of the user on the sharing button 714 in FIG. 7A, and in response to the input operation, the device A may display a product sharing interface 720 as shown in FIG. 7B.
  • an input operation for example, a click
  • the product sharing interface 720 includes a share card 721, a Sina Weibo button 722, a WeChat button 723, a circle of friends button 724, a smooth link button 725, a copy link button 726, a more button 727, and a cancel button. 728.
  • the sharing card 721 is used to display multiple buttons that can be shared and a cancel button.
  • the Sina Weibo button 722 can be used to trigger the opening of the Sina Weibo sharing interface.
  • the WeChat button 723 can be used to trigger the opening of the WeChat sharing interface.
  • the Moments button 724 can be used to trigger the WeChat Moments release interface.
  • the Changlian button 725 can be used to trigger the opening of the sharing interface of the Changlian application, which is the aforementioned second application.
  • the copy link button 726 can be used to copy the video link to the clipboard.
  • the more button 727 can be used to trigger opening more sharing-related functions.
  • the cancel button 728 can be used to cancel this sharing.
  • the device A may receive an input operation (for example, a click) of the smooth link button 725 in FIG. 7B by the user, and in response to the input operation, the device A may display the smooth link sharing interface 730 as shown in FIG. 7C.
  • an input operation for example, a click
  • the Changlian sharing interface 730 includes a search button 731 and a contact list 732.
  • the search button 331 can be used to quickly find contacts in the Changlian application.
  • the contact list 732 includes the contacts in the Changlian application of the device A, and each contact includes the contact avatar and nickname, for example, the user B’s avatar button 733 and the user B’s nickname button 734.
  • the device A may receive an input operation (for example, a click) of the user on the avatar button 733 or the nickname button 734 of the user B in FIG. 7C, and in response to the input operation, the user B receives the commodity link shared by the user A.
  • User B opens the Changlian application on device B, selects user A, and the Changlian chat interface 740 as shown in FIG. 7D can be displayed.
  • the Changlian chat interface 740 includes a user B avatar button 741, a user A avatar button 742, a product link card 743, a call button 744, a smooth connection button 745, a more button 746, and a voice input button 747.
  • the user B avatar button 741 and the user A avatar button 742 can be used to trigger the opening of user information.
  • the commodity link card 743 can be used to trigger the opening of the shared commodity link.
  • the call button 744 can be used to trigger the opening of the call interface with user A.
  • the Changlian button 745 can be used to trigger the activation of the voice chat or video chat function provided by the Changlian application.
  • the more button 746 can be used to trigger opening more functions related to the Changlian application.
  • the voice input button 747 can be used to trigger a voice message input.
  • the message established by the channel is sent to the second application of device B through the message basic component.
  • the second application of device B receives the message of establishing the channel, and the MessageUI module refreshes the message card to display the collaborative sharing entry. Refer to the product link card 753 in FIG. 7E.
  • the product link card 753 may display an identification 751.
  • the identifier 751 is used to prompt the user to click on the current product link card to enter "collaborative shopping". It is understandable that the logo 751 may also be displayed near the product link card 753 in the form of a control, and the present application does not limit the specific display position and structure of the collaborative sharing portal.
  • Device B can receive the user's input operation (for example, click) on the product link card 753 in FIG. 7E, and in response to the input operation, the Changlian application of device B automatically pulls up the shopping application to open the product browsing interface shown in FIG. 7F 760.
  • the user's input operation for example, click
  • the Changlian application of device B automatically pulls up the shopping application to open the product browsing interface shown in FIG. 7F 760.
  • the product browsing interface 760 includes a smooth connection button 761, a message input box control 762, and product information similar to that in FIG. 7A.
  • the Changlian button 761 is used to trigger the activation of the voice chat or video chat function provided by the Changlian application.
  • the message input box control 762 can be used to trigger the opening of the message input interface.
  • user B clicks or long presses the Changlian button and video call and voice call options appear. After the user selects the voice call option, device A will prompt user B to invite you to make a voice call, and provide "answer" and "hang up” options. After user A selects "answer", device A and device B establish a voice call connection.
  • the device B After the device B opens the product browsing interface 760 as shown in FIG. 7F, the device B sends a message to the device A indicating that the user B has entered the chat room, and the device A displays a message notification on the interface 710 after receiving the message.
  • the interface 710 of the device A displays a message notification 771, for example, the message content in the notification is "User B has entered collaborative shopping".
  • the interface 710 also includes a smooth connection button and a message input box control, the functions of which are the same as those of the buttons and controls shown in FIG. 7F, and will not be repeated here.
  • user A and user B use the message input box control to enter the message chat, or through the real-time voice chat triggered by the smooth link button, confirm that they have purchased the product, and user A and user B respectively add the product shown in Figure 7A
  • mobile phone A displays the shopping cart interface as shown in Figure 7H.
  • the shopping cart displayed by the shopping application in mobile phone A includes all shopping cart interfaces 380, my shopping cart interface 381, and B's shopping cart interface 382.
  • the all shopping cart interface 380 includes an "all” icon 383, a "my” icon 784, and a "B's shopping cart” icon 785.
  • the "all” icon 383 is marked with an underline to remind the user that the user A and the user are currently displayed. B All products in the shopping cart.
  • the my shopping cart interface 381 displays the products in the shopping cart of user A, for example, a bracelet, a mobile phone, and a gamepad.
  • the shopping cart interface 382 of B displays the products in the shopping cart of user B, for example, a bracelet.
  • the shopping cart displayed by the mobile phone B shopping application includes all the shopping cart interfaces, my shopping cart interface and A's shopping cart interface.
  • My shopping cart contains the products in the shopping cart of user B, and the shopping cart of A is the user
  • the items in the shopping cart of A, all the items in the shopping cart are the sum of the items in the shopping cart of user A and the items in the shopping cart of user B.
  • user A selects 2 Huawei bracelets in all shopping cart interface 780, and all shopping cart interface 780 refreshes the "total" amount at the bottom of the page accordingly.
  • the user interface of device B displays a message informing "User A has purchased the product XXX for you".
  • the shopping application on device B can empty the shopping cart just now.
  • the bracelet is added, and the prompt message "Your shopping cart is empty” is displayed.
  • Huawei Mall provides free shipping service for over 99 yuan.
  • User A can send free shipping if he purchases a bracelet for 99 yuan.
  • User B does not want to buy the bracelet shared by user A, but wants to buy a game controller for 39 yuan, so he cannot enjoy the free shipping. service.
  • user A and user B can use the message input box control to enter the message input chat, or through the real-time voice chat triggered by the Changlian button, user A selects the bracelet to join the shopping cart, user B selects the game handle to join the shopping cart, and mobile phone A displays as The shopping cart interface shown in Figure 7I.
  • the shopping cart displayed by the shopping application in mobile phone A includes all shopping cart interfaces 390, my shopping cart interface 391, and B's shopping cart interface 392.
  • the selected icon is underlined to identify the displayed shopping cart interface.
  • the shopping cart interfaces 390-392 respectively include an "all” icon, a "my” icon, and a "B's shopping cart” icon.
  • the all shopping cart interface 390 displays all the products in the shopping carts of user A and user B, for example, a bracelet and a gamepad.
  • the my shopping cart interface 391 what is currently displayed in the my shopping cart interface 391 is the product in the shopping cart of user A, for example, a bracelet.
  • the shopping cart interface 392 of B displays the products in the shopping cart of user B, for example, a gamepad.
  • user A selects the bracelet and gamepad in the shopping cart interface 790, and the shopping cart interface refreshes the "total" amount at the bottom of the page accordingly, and user A settles.
  • user B after user B clicks the product link card 753 to open the product browsing interface in the shopping application, user B can continue to browse the second product and share the second product link with user A.
  • device B receives the user's input operation (for example, clicking) on the product link card 753 in FIG. 7E, and in response to the input operation, the smooth connection application of device B automatically pulls up the shopping application to open the shopping application as shown in FIG. 7F
  • Product browsing interface 760 User B can continue to browse other commodities and open a commodity browsing interface 810 as shown in FIG. 8A.
  • the product browsing interface 810 includes a product image 811 that the user is viewing, a product name 812, a product price 813, a sharing button 814, and so on.
  • the product picture 811 may have one or more pictures, and may also include a product introduction video.
  • the product name 812 is used to display the product brand, category, function, etc., such as "gamepad (red) (DESIGN FOR HUAWEI certification)".
  • the commodity price 813 can be used to identify the selling price of the commodity, such as RMB 39.
  • the sharing button 814 can be used to trigger the opening of the commodity sharing interface 820 as shown in FIG. 8B.
  • the commodity sharing interface includes a share card 821, a Sina Weibo button, a WeChat button, a circle of friends button, a smooth link button, a copy link button 822, a more button, and a cancel button.
  • the sharing card 821 is used to display multiple buttons that can be shared and a cancel button.
  • the copy link button 822 can be used to copy the video link to the clipboard. The rest of the buttons have the same functions as the buttons shown in FIG. 7B, and will not be repeated here.
  • User B clicks the copy link button 822, and selects to paste the click into the message input box control 823, and sends the product link to user A.
  • the avatar or nickname of user B and the second product link 831 sent by it are displayed on the browsing interface 830 of the first product.
  • the interface presents the same product image 811, product name 812, and product price 813 as shown in FIG. 8A.
  • FIG. 9 shows a sequence diagram of an operation of commodity sharing.
  • the equipment involved in the flowchart of the method includes equipment A and equipment B interacting with equipment A.
  • the device A and the device B interact through the communication network shown in FIG. 1, and the device A and the device B can exemplarily refer to the software system architecture shown in FIGS. 2C-2D.
  • the method includes:
  • the commodity link is shared in a collaborative sharing mode.
  • the content to be shared is a commodity object in a shopping application.
  • Device A may receive an input operation (for example, clicking a share button) from the user to share the content, and in response to the input operation, device A displays a content sharing interface, where the content sharing interface can refer to the commodity sharing shown in FIG. 7B Interface 720.
  • the content sharing interface may display the icon and name of the second application. For example, as shown in FIG. 7B above, the second application icon is displayed as a smooth connection button 725, and the name of the second application may be smooth connection.
  • the copy link button 726 in the product sharing interface 720 shown in FIG. 7B can also be clicked to copy the product link to the clipboard. Then, open the Changlian application, select user B, paste the product link and send it to user A.
  • the shopping application calls the collaborative sharing API through the integrated open SDK.
  • the shopping application sends the filled target scene (targetScene), shared content information (HwCaasShareInfo), and collaborative sharing channel (HwParallelShareChannel) to the second application.
  • targetScene shared content information
  • HwCaasShareInfo shared content information
  • HwParallelShareChannel collaborative sharing channel
  • the MessageService component of the second application in the device A parses the message content and judges whether it is a collaborative sharing mode through the mParallelShare field.
  • other message content in the shared content information (HwCaasShareInfo) is encapsulated into a card, and the card is displayed in the chat window of the MessageUI module.
  • the second application sends the message to device B through the message base component.
  • device B can display a card in the second application, for example, the commodity link card 743 shown in FIG. 7D.
  • a cross-process message channel between the second application and the shopping application in the device A is created.
  • the second application After the establishment of the cross-process message channel between the second application in the device A and the shopping application is completed, the second application sends a channel establishment message to the second application of the device B through the message basic component.
  • S905 The product link information displays the collaborative shopping portal.
  • the second application of device B receives the channel establishment message, and the MessageUI module refreshes the message card to display the collaborative sharing portal.
  • the collaborative shopping control 751 shown in FIG. 7E For example, the collaborative shopping control 751 shown in FIG. 7E.
  • the user clicks on the collaborative shopping portal, and the MessageUI module of device B automatically opens the corresponding shopping application through the mAppUrl information.
  • S907 Acquire user B's user name, avatar, and other information in the second application.
  • mParallelShare and mExtraInfo are parsed.
  • the second application establishes the message channel of the second application and the shopping application through the HwParallelShareChannel object, and records the corresponding relationship with the chat window threadID .
  • mExtraInfo is parsed.
  • the information is filled by the shopping application of device A and analyzed by the shopping application of device B.
  • the format content of the information is defined by the shopping application.
  • S908 Send a message for entering the room through the message channel.
  • Device B sends the message of entering the room through the sendAppMessage method of the HwParallelShareChannel object.
  • the format of the message content mMessageInfo is customized by the shopping application, and the following format can be defined as a reference: JoinRoom:1.
  • the message is sent to the MessageService component of the second application, and the MessageService component determines that it is an application message (AppMessage), and forwards it to the device A through the message basic component.
  • AppMessage application message
  • the second application of device A judges that it is AppMessage, and forwards it to the corresponding shopping application through onAppMessageReceive of the collaborative sharing channel (HwParallelShareChannel);
  • the shopping application of device A After receiving the message, the shopping application of device A parses mMessageInfo as a room entry message, refreshes the product browsing interface, and reminds xx users to enter collaborative shopping. For example, the message notification 771 shown in FIG. 7G.
  • the second application of device A determines that it is AppMessage and forwards the message to device B through the message basic component.
  • the second application of device B determines that it is AppMessage and forwards it to the corresponding one through the onAppMessageReceive method of the HwParallelShareChannel object Shopping application.
  • the shopping application of device B After receiving it, the shopping application of device B parses the AppMessage and refreshes the shopping cart.
  • the foregoing shopping sharing embodiment provides an API interface through the second application, which supports the shopping application to use the message channel to build its own instant messaging capability.
  • the shopping application allows users to send chat messages to realize their own instant chat function.
  • Shopping applications can also send their own business information, such as shopping cart information, through the message channel.
  • the business information is encapsulated in a certain format and sent through a message channel, and is received and parsed into business information by the shopping application of the receiver. In this way, after the connection of shared shopping products is realized, the products that friends have added to the shopping cart can be sent and received through the background message channel, and the same shopping cart can be shared to realize the scene of shopping together and putting together orders.
  • the sharing of navigation information through the Changlian application in the map application is taken as an example to introduce the content sharing process in the related technology of this application.
  • User A, User B, and User C team up to travel to the destination "Badaling Great Wall".
  • User A shares the navigation information provided by the map application in the group of mobile phone A connected to the application.
  • FIG. 10A shows a group chat interface 1001 of the Changlian application displayed on mobile phone A.
  • Users can share text, pictures and stickers with friends through the Changlian app, and support group chat and voice, video intercom functions, broadcast (one-to-many) messages, photo/video sharing, location sharing, message exchange, games and other services .
  • the group chat interface 1001 of the Changlian application includes group name 1002, user A avatar button 1003, user B avatar button 1004, user C avatar button 1005, navigation information card 1006, call button, Changlian button, more buttons, Voice input button, map application link 1007, and collaborative navigation entry 1008.
  • the interface 1001 may also include a HiCar navigation portal 1009.
  • the group name 1002 can be used to identify the name of the group, for example, "love each other in a family" shown in FIG. 10A.
  • the user A avatar button 1003, the user B avatar button 1004, and the user C avatar button 1005 can be used to trigger the opening of user information and indicate the source of the chat information.
  • the navigation information card 1006 can be used to display the navigation information shared by the user in the group, and the navigation information includes a navigation destination, a navigation route map, and navigation software.
  • the map application link 1007 can be used to trigger the opening of the map application so that the user can view detailed navigation information.
  • the collaborative navigation entry 1008 can be used for users in the group to select a collaborative navigation mode, such as the "go together" icon shown in FIG. 10A.
  • HiCar Navigation is a map application developed by Huawei for in-vehicle navigation.
  • the HiCar navigation portal 1009 can be used to trigger the display of the navigation interface on the vehicle display.
  • user A clicks on the map application link 1007 of mobile phone A, and receives the user's input operation (for example, clicking) on the map application link 1007 in FIG. 10A.
  • mobile phone A can display Map navigation interface 1010.
  • the map navigation interface 1010 includes a starting speed 1011, a destination 1012, a navigation route map 1013, a scenic spot introduction button 1014, an exit button 1015, navigation mileage time information 1016, an exit overview button 1017, and more buttons 1018.
  • the starting vehicle speed 1011 can be used to indicate that the vehicle speed at the starting point is 0 km/h, and the user is ready to drive the vehicle to start.
  • the destination 1012 can be used to display the navigation destination, for example, as shown in FIG. 10A, it can be identified as "end”.
  • the navigation route map 1013 can be used to indicate a complete route from the starting point to the destination, and it can be displayed on the map according to a scale.
  • the scenic spot introduction button 1014 can be used to trigger watching a video introducing the scenic spot as the destination.
  • the exit button 1015 can be used to trigger the closing of this navigation.
  • the navigation mileage time information 1016 can be used to display the remaining mileage of the current navigation, estimated travel time, arrival time at the destination, and so on.
  • the exit full view button 1017 can be used to switch the map display mode, switching from the currently displayed navigation complete route map to another map display mode.
  • the more button 1018 can be used to trigger opening more navigation-related functions.
  • mobile phone B can display a map navigation interface 1030 as shown in FIG. 10C.
  • user A and user C click on the "go together" icon in their respective mobile phone apps, and mobile phone A/C can also display a map navigation interface similar to that shown in FIG. 10C.
  • the map navigation interface 1030 adds the location information 1031 of the mobile phone A, the location information 1032 of the mobile phone B, and the location information 1033 of the mobile phone C.
  • the location information of each device can display the user's avatar or nickname, as well as the current location.
  • the location information 1033 of the mobile phone C indicates the location of the user C on the route map for navigating to the Badaling Great Wall scenic spot, and displays the avatar of the user C.
  • the map navigation interface 1030 also displays a voice input message control 1035, a text input message control 1036, and a smooth connection button 1037. The user can input a voice message through the voice input message control 1035.
  • user B enters the voice message "There is a service area in front of you, take a break there.”
  • User A clicks the corresponding text input message control on the navigation interface displayed on mobile phone A, and enters the text message "OK”.
  • User C clicks on the corresponding voice input message control on the navigation interface displayed by mobile phone C, and enters the voice message "ok”.
  • user A, user B, and user C are all driving, and they can also click the Changlian button to start a voice call and make a real-time voice call.
  • the internal implementation of the device for sharing navigation information can be that the map application of mobile phone A shares navigation information with users in the group through the collaborative sharing API provided by the Changlian application, selects the collaborative sharing mode, and carries the current navigation destination in mExtraInfo, Route map and other information.
  • the Changlian application of mobile phone A After receiving the above navigation information, the Changlian application of mobile phone A establishes a message channel to the map application. If the user of mobile phone B chooses to go together, the map application of mobile phone B will be launched, and a message channel from the map application to the Changlian application will be established at the same time. After the map application of mobile phone B is started, it parses the navigation information in mExtraInfo and starts navigation.
  • mobile phone B sends location information (sendAppMessage) to mobile phone A in real time through the message channel.
  • Mobile phone A receives the location information of mobile phone B/C (onAppMessageReceive), draws the avatar and location of the mobile phone B/C user, and refreshes the map in real time.
  • mobile phone A sends location information to mobile phone B/C in real time through the message channel.
  • the user can be prompted through the UI interface whether to allow the Changlian application to obtain the location and synchronize the location to other users. After obtaining the user’s consent, the current location can be obtained by the Changlian application and sent to The other party, and provide the map UI to refresh the location in real time.
  • mobile phone B displays a group chat interface 1040 of the Changlian application.
  • the Changlian application of mobile phone B fails to find the map application, and a prompt card 1041 as shown in FIG. 10E will pop up .
  • the prompt card 1041 includes prompt information "Baidu map application is not installed, please select", an OK button 1042, a cancel button 1043, a control 1044, and a control 1045.
  • the control 1044 can be used to display the option of downloading Baidu map. After the user selects this option, clicking the OK button 1042 will enter the interface for downloading Baidu map.
  • the control 1045 can be used to display the Baidu map in the applet. After the user selects this option, click the OK button 1042 to open the Baidu map applet.
  • the reminder card 1051 includes a reminder message "Do you allow Changlian to obtain current location information and synchronize it to other users?", a button 1052, and a button 1053.
  • the button 1052 can be used to authorize the Changlian application to call the GPS location location interface of mobile phone B and send the obtained location information to other users, for example, "Yes" identified in FIG. 10E.
  • the button 1053 can be used to not allow the Changlian application to call the GPS geographic location location interface of mobile phone B and send geographic location information to other users, such as "No" identified in FIG. 10E.
  • the Changlian application of the mobile phone A/C provides the received information to the map application for the map navigation interface to refresh the real-time location of the user B, and display the location as the location information 1032 of the mobile phone B as shown in FIG. 10C.
  • mobile phone B since mobile phone B does not open the map application for navigation, mobile phone B still displays the smooth connection application interface.
  • the messages input by the voice input message control and the text input message control of the user A and the user C can be displayed in the smooth connection application interface of the mobile phone B.
  • FIG. 10G user A enters "rest in front service area", and user B can view the text message "rest in front service area” corresponding to user A's avatar 1061 in the Changlian application interface 1060 of mobile phone B.
  • the foregoing embodiment of collaborative navigation provides an API interface through the second application, and supports the map application to use the message channel to build its own instant communication capability.
  • the coordinated navigation function of multiple friends is realized by sharing at once. After sharing the navigation information, you can navigate together with other users, share the navigation information and synchronize the locations of multiple users in real time. At the same time, if you directly initiate a voice call when sharing navigation information, that is, when you call the collaborative sharing API and specify to start the voice call in ShareInfo, you can start the voice call and the floating user interface at the same time, and send the call logo to the other party, and the other party parses the logo After that, the floating call UI is displayed simultaneously.
  • the above design can realize voice while navigating.
  • the above operation sequence diagram for sharing navigation information is similar to the operation sequence diagram for commodity sharing, and the geographic location information of the device is encapsulated as a fixed format message and sent to the opposite device.
  • FIG. 11 shows a flow chart of an instant messaging method.
  • the method is applied to a first electronic device and a second electronic device with a display screen.
  • the first electronic device and the second electronic device may be electronic devices in the communication system 200 shown in FIG. 2A, and are interconnected through a communication network.
  • the hardware structure of the first electronic device and the second electronic device may be the electronic device 100 shown in FIG. 2B, and the software system architecture may be the software structure of the device A and the device B shown in FIG. 2C or FIG. 2D.
  • the method includes:
  • the first electronic device displays a first interface of a first application, where the first interface includes a first option;
  • the first electronic device is a mobile phone A.
  • the first application is a video application
  • the first interface is a user interface 310 of the video application displayed on mobile phone A
  • the first option is a share button 314.
  • the first application is a shopping application
  • the first interface is a user interface 710 of the mobile phone A displaying the shopping application
  • the first option is a share button 714.
  • the first electronic device In response to an operation on the first option, the first electronic device sends a link to the first content to the second electronic device through a second application, where the first content is the first application Provided content;
  • the second application is the Changlian application
  • the first content is the video content 311 provided by the video application
  • the mobile phone A sends the link of the video content 311 to the user B through the Changlian application.
  • the second application is the Changlian application
  • the first content is the product shown in the product image 711 provided by the shopping application.
  • Mobile phone A sends a link to the product to user B through the Changlian application. .
  • the first electronic device sending the link of the first content to the second electronic device through the second application includes: responding to the For the operation of the first option, the first electronic device opens a fourth interface of the second application, the fourth interface includes a second user identifier, and the second user identifier is used to identify the operation of the second electronic device In response to the operation of the second user identification, the first electronic device sends a link to the first content to the second electronic device.
  • the fourth interface is the interface 332 of the mobile phone A's Changlian application
  • the second user identification is the avatar button 333 of user B and the nickname button 334 of user B. Click the avatar button 333 of user B or the nickname button 334 of user B, and the mobile phone A sends a link to the video content 311 to mobile phone B.
  • the second electronic device displays a first dialog interface of a third application, where the first dialog interface includes a first user identifier and a second option, and the second option is associated with the link of the first content, so The first user identifier is used to identify a user who operates the first electronic device, and the third application corresponds to the second application;
  • the second electronic device is mobile phone B.
  • the third application is the Changlian application
  • the first dialogue interface is the Changlian chat interface 340 of the video application displayed on the mobile phone A.
  • the first user identification is the avatar button 342 of user A
  • user A is the user who operates mobile phone A.
  • the second option is the play button 348, which is used to play the video content 311 provided by the video link card 343.
  • the third application and the second application are the same application installed on two electronic devices.
  • the third application is the Changlian application installed on mobile phone B
  • the second application is the Changlian application installed on mobile phone A.
  • the Changlian application installed by B and the Changlian application installed on phone A may have different versions.
  • the first electronic device is a mobile phone
  • the second electronic device is a tablet
  • the third application and the second application are different versions of the same application that are open to the mobile phone or the tablet.
  • the link association between the second option and the first content includes: the second option is a card or a control that includes the first content link.
  • the second electronic device displays a second interface of a fourth application, where the second interface includes the first content and a third option, and the fourth application corresponds to In the first application;
  • the fourth application is a video application
  • the second interface is a video playback interface 360 of the mobile phone B displaying the video application
  • the first content is the video content 311 provided by the video application
  • the third option is Changlian Any one, two or three of the button 364, the voice input button 367, and the message input box control 365.
  • the second electronic device is mobile phone B or mobile phone C.
  • the fourth application is a map application
  • the second interface is a map navigation interface 1030 of the map application displayed on mobile phone B or mobile phone C
  • the first content is navigation information provided by the map application
  • the third option is a smooth connection button. 1037. Any one, two or three of the voice input message control 1035 and the text input message control 1036.
  • the fourth application and the first application are the same application installed on the two electronic devices.
  • the fourth application is the Huawei video application installed on mobile phone B
  • the first application is the Huawei video application installed on mobile phone A.
  • the Huawei video application installed on B may be a version difference between the Huawei video application installed on B and the Huawei video application installed on mobile phone A.
  • the first electronic device is a mobile phone
  • the second electronic device is a tablet
  • the fourth application and the first application are different versions of the same application that are open to the mobile phone or the tablet.
  • the first application is a video application or an audio application
  • the first content is a video or audio
  • the first electronic device in response to an operation on the first option, the first electronic device
  • the playing time of the video or audio is the first time
  • the second electronic device displays the second interface of the fourth application
  • the playing time of the video or audio is the second time
  • the first time is the same as the second time.
  • the video application is Huawei Video.
  • FIG. 3B when the mobile phone A sends the video content 311 to the mobile phone B through the Changlian application, the video content 311 is played to 20 minutes 00 seconds (that is, the first time).
  • FIG. 3F when the mobile phone B displays the video playback interface 360 of Huawei Video, the video content is also played to 20 minutes 00 seconds (that is, the second time, the second time is the same as the first time).
  • the first electronic device displays a fifth interface of the first application, the fifth interface includes the first content, and the play time of the first content is the third time , Wherein the third time is different from the first time; the second electronic device displays a sixth interface of the fourth application, and the sixth interface includes the first content, and the first content
  • the playing time of is the fourth time, where the fourth time is the same as the third time.
  • the video application is Huawei Video.
  • the mobile phone A displays the video playback interface 394 of the Huawei video application. At this time, the video has been rewinded by the user to 18 minutes and 30 seconds (that is, the third time, which is different from the first time).
  • FIG. 3M when the mobile phone B displays the video playback interface of Huawei Video, the video content has also retreated to 18 minutes and 30 seconds (that is, the fourth time, the fourth time is the same as the third time).
  • the first application is a shopping application
  • the first content is a commodity
  • the second interface further includes a fourth option; in response to an operation on the fourth option, the The second electronic device displays a first shopping cart and a second shopping cart in the fourth application, wherein the first shopping cart corresponds to the first user, and the second shopping cart corresponds to the second user, The first user is different from the second user.
  • the first application is a shopping application, such as Huawei Mall
  • the first content is a product, such as a Huawei bracelet.
  • mobile phone A displays the shopping cart interface shown in Figure 7H, as shown in Figure 7H, the shopping cart displayed by the shopping application in mobile phone A includes all shopping carts Interface 380, my shopping cart interface 381, and B's shopping cart interface 382.
  • My shopping cart ie, the first shopping cart
  • B's shopping cart ie, the second shopping cart
  • the second electronic device displaying a first shopping cart and a second shopping cart in the fourth application includes: the second electronic device The device also displays a third shopping cart in the fourth application, and the products in the third shopping cart are the sum of the products in the first shopping cart and the products in the second shopping cart.
  • the products in the third shopping cart are the sum of the products in the first shopping cart and the products in the second shopping cart.
  • all the products in the shopping cart are the products in the shopping cart (that is, the first shopping cart) of user A and the products in the shopping cart (that is, the second shopping cart) of user B. Sum.
  • the first application is a map application
  • the first content is navigation information
  • the second interface of the fourth application further includes the first user identifier and the second user Identification
  • the second user identification is used to identify a user operating the second electronic device
  • the first user identification is also used to indicate the geographic location of the first electronic device
  • the second user identification is also used to Indicates the geographic location of the second electronic device.
  • the map navigation interface 1030 as shown in FIG. 10C includes the avatar of the user A and the avatar of the user B, respectively indicating the location information 1031 of the mobile phone A and the location information 1032 of the mobile phone B.
  • the second electronic device sends a first message to the first electronic device through the third application.
  • the message is displayed on the video playback interface 393 of mobile phone A.
  • the first message is a text message, a voice message, a voice call request, or a video call request.
  • the first message received by mobile phone A is a voice call request.
  • the first electronic device displays a third interface of the first application, where the third interface includes prompt information, and the prompt information is used to prompt that the second user has entered;
  • mobile phone A displays a video playback interface 370 of a video application, as shown in FIG. 3G, and the interface includes a message prompt 371 that "user B has entered the theater".
  • the third interface further includes a second user identification and the first message, the second user identification is used to identify the second user, and the second user is the operator The user of the second electronic device.
  • mobile phone A displays a voice call interface 440 of a video application. As shown in FIG. 4E, the interface includes the avatar 441 of user B and the voice call request sent by mobile phone B.
  • This application provides an instant messaging method.
  • a first electronic device sends a first content link provided by a first application to a second electronic device through a second application, and the second electronic device can access the third application corresponding to the second application.
  • a second option associated with the first content link is displayed in, and then, in response to an operation on the second option, the second electronic device can display the first content and the third option in a fourth application corresponding to the first application. Then, in response to the operation of the third option, the second electronic device sends the first message to the first electronic device through the third application.
  • the user can perform instant communication with the user sharing the content on the interface displaying the first content without returning to the interface of the instant messaging application, which provides convenience to the user.
  • the electronic device includes hardware structures and/or software modules corresponding to each function.
  • the present invention can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed by hardware or computer software-driven hardware depends on the specific application and design constraint conditions of the technical solution. Professionals and technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered as going beyond the scope of the present invention.
  • the embodiment of the present invention may divide the electronic device into functional modules according to the foregoing method examples.
  • each functional module may be divided corresponding to 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 or software function modules. It should be noted that the division of modules in the embodiment of the present invention is illustrative, and is only a logical function division, and there may be other division methods in actual implementation.
  • the embodiment of the invention discloses an electronic device including a processor, and a memory, an input device and an output device connected to the processor.
  • the input device and the output device can be integrated into one device.
  • a touch sensor can be used as an input device
  • a display screen can be used as an output device
  • the touch sensor and display screen can be integrated into a touch screen.
  • the above electronic device may include: a touch screen 1201, which includes a touch sensor 1206 and a display screen 1207; one or more processors 1202; one or more cameras 1208; a memory 1203; one Or multiple application programs (not shown); and one or more computer programs 1204, each of the above-mentioned devices may be connected through one or more communication buses 1205.
  • the one or more computer programs 1204 are stored in the aforementioned memory 1203 and are configured to be executed by the one or more processors 1202, and the one or more computer programs 1204 include instructions, and the aforementioned instructions can be used to execute the aforementioned implementations.
  • the steps in the example Among them, all relevant content of the steps involved in the above method embodiment can be cited in the functional description of the corresponding physical device, and will not be repeated here.
  • the foregoing processor 1202 may specifically be the processor 110 shown in FIG. 1
  • the foregoing memory 1203 may specifically be the internal memory 116 and/or the external memory 120 shown in FIG. 1
  • the foregoing camera 1208 may specifically be the processor 110 shown in FIG. 2B.
  • the camera 193 shown, the display screen 1207 may specifically be the display screen 194 shown in FIG. 1, and the touch sensor 1206 may specifically be the touch sensor 180K in the sensor module 180 shown in FIG. Any restrictions.
  • the embodiment of the present invention also provides a computer storage medium, the computer storage medium stores a computer instruction, and when the computer instruction runs on an electronic device, the electronic device executes the above-mentioned related method steps to implement the method in the above-mentioned embodiment.
  • the embodiment of the present invention also provides a computer program product, which when the computer program product runs on a computer, causes the computer to execute the above-mentioned related method steps, so as to realize the method in the above-mentioned embodiment.
  • the embodiments of the present invention also provide a device.
  • the device may specifically be a chip, component, or module.
  • the device may include a processor and a memory connected to each other; wherein the memory is used to store computer execution instructions, and when the device is running, The processor can execute the computer-executable instructions stored in the memory, so that the chip executes the shooting methods in the foregoing method embodiments.
  • the electronic devices, computer storage media, computer program products, or chips provided in the embodiments of the present invention are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the corresponding methods provided above. The beneficial effects of the method are not repeated here.
  • the disclosed device and method can be implemented in other ways.
  • the device embodiments described above are merely illustrative.
  • the division of modules or units is only a logical function division.
  • there may be other division methods for example, multiple units or components can be combined or It can be integrated into another device, or some features can be ignored or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate parts may or may not be physically separate, and the parts displayed as a unit may be one physical unit or multiple physical units, that is, they may be located in one place or distributed to multiple different places. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • the functional units in the various embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
  • the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium.
  • the technical solutions of the embodiments of the present invention are essentially or the part that contributes to the prior art, or all or part of the technical solutions can be embodied in the form of a software product, and the software product is stored in a storage medium. It includes several instructions to make a device (may be a single-chip microcomputer, a chip, etc.) or a processor (processor) execute all or part of the steps of the methods of the various embodiments of the present invention.
  • the aforementioned storage media include: U disk, mobile hard disk, read only memory (read only memory, ROM), random access memory (random access memory, RAM), magnetic disk or optical disk and other media that can store program codes.

Abstract

一种通信系统,包括第一和第二电子设备,第一电子设备通过第二应用向第二电子设备发送第一内容的链接,第一内容为第一应用提供的内容;第二电子设备显示对应于第二应用的第三应用的第一对话界面,第一对话界面包括操作第一电子设备的用户标识和与第一内容的链接关联的第二选项;响应于对第二选项的操作,第二电子设备显示对应于第一应用的第四应用的第二界面,第二界面包括第一内容和第三选项;响应于对第三选项的操作,第二电子设备通过第三应用发送第一消息给第一电子设备。通过采用该技术方案,实现了在显示第一内容的第二界面上发送即时通信消息。

Description

一种即时通信方法及设备
本申请要求在2020年5月26日提交中国国家知识产权局、申请号为202010454939.0的中国专利申请的优先权,发明名称为“一种即时通信方法及设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信技术领域,尤其涉及一种即时通信方法及设备。
背景技术
目前,微信等即时通信应用(application,以下简称应用或app)可以通过构建应用内联系人列表/通讯录,在不同终端间实现即时通信和共享数据。然而,即时通信应用以外的其他多数应用,由于没有构建应用内的联系人列表/通讯录,只能借助即时通信应用完成即时消息的接收和发送。比如,浏览器应用分享网页,购物app分享商品链接,视频播放软件分享视频链接等场景,当用户需要与分享对象互发消息时,仍然需要在多个应用之间进行切换。
以视频分享为例,第一用户打开设备A上的第一应用,例如华为视频,将正在播放的《都市男女》第X集通过第二应用,例如微信,向第二用户进行内容分享。如图1A所示,第二用户的设备B通过微信收到来自设备A的华为视频链接,第二用户点击视频链接进入华为视频小程序或华为视频app观看视频,此时,第二用户如果想发消息给第一用户,只能退出视频播放界面,回到微信聊天界面。
以购物分享为例,第一用户在华为商城浏览商品,将其购物车内的商品,例如华为手环4Pro,通过微信分享给第二用户。参见图1B,第二用户的设备B通过微信收到该商品链接,第二用户点击链接进入华为商城小程序或华为商城app购物界面,此时第二用户和第一用户无法在华为商城app上直接沟通,当然也无法进行购物车的共享,不能实现协同购物。
发明内容
本发明实施例提供一种即时通信方法、通信系统及电子设备,实现了通过第二应用分享第一应用内的内容,从而使得用户能够在第一应用内的界面上收发即时消息。
第一方面,本发明实施例提供一种通信系统,包括第一电子设备和第二电子设备,所述第一电子设备显示第一应用的第一界面,所述第一界面包括第一选项;
响应于对所述第一选项的操作,所述第一电子设备通过第二应用向所述第二电子设备发送第一内容的链接,其中,所述第一内容为所述第一应用提供的内容;
所述第二电子设备显示第三应用的第一对话界面,所述第一对话界面包括第一用户标识和第二选项,所述第二选项与所述第一内容的链接关联,所述第一用户标识用于标识操作所述第一电子设备的用户,所述第三应用对应于所述第二应用;
响应于对所述第二选项的操作,所述第二电子设备显示第四应用的第二界面,所述第二界面包括所述第一内容和第三选项,所述第四应用对应于所述第一应用;
响应于对所述第三选项的操作,所述第二电子设备通过所述第三应用发送第一消息给所述第一电子设备。
通过采用该技术方案,实现了通过第二应用分享第一应用内的内容,从而使得操作第二电子设备的用户能够在第一应用内的界面上向第一电子设备发送即时消息。
在一种可能的实现方式中,所述第一电子设备显示所述第一应用的第三界面,所述第三界面包括提示信息,所述提示信息用于提示第二用户已进入。
通过采用该技术方案,实现了第二用户打开第一内容时及时提示第一用户,获得了实时通知用户的有益效果。
在一种可能的实现方式中,所述第三界面还包括第二用户标识和所述第一消息,所述第二用户标识用于标识所述第二用户,所述第二用户是操作所述第二电子设备的用户。
通过采用该技术方案,实现了第一用户在第一应用内实时接收第二用户发送的即时消息。这样,第一用户不必离开第一应用就能够与第二用户进行即时通信。
在一种可能的实现方式中,所述第一消息为文字消息、语音消息、语音通话请求或视频通话请求。
通过采用该技术方案,实现了第一用户与第二用户在第一应用内接收、发送即时消息,以及进行语音聊天或视频聊天。这样,第一用户、第二用户在分享第一内容的同时,还能够实时通信,提升了用户对设备的使用体验。
在一种可能的实现方式中,所述第二选项与所述第一内容的链接关联包括:所述第二选项是包括所述第一内容链接的卡片或控件。
通过采用该技术方案,以简洁的卡片或控件方式为用户提供第一内容的链接。
在一种可能的实现方式中,所述第一应用为视频应用或音频应用,所述第一内容为视频或音频;
在响应于对所述第一选项的操作,所述第一电子设备通过所述第二应用向所述第二电子设备发送所述第一内容的链接时,所述视频或音频的播放时间为第一时间;
在响应于对所述第二选项的操作,所述第二电子设备显示所述第四应用的所述第二界面时,所述视频或音频的播放时间为第二时间;
所述第一时间与所述第二时间相同。
通过采用该技术方案,对于视频或音频内容,由第一用户控制视频或音频的播放时间,从而实现第一用户与第二用户同步观看视频或聆听音频。
在一种可能的实现方式中,所述第一电子设备显示所述第一应用的第五界面,所述第五界面包括所述第一内容,所述第一内容的播放时间为第三时间,其中,所述第三时间与所述第一时间不同;
所述第二电子设备显示所述第四应用的第六界面,所述第六界面包括所述第一内容,所述第一内容的播放时间为第四时间,其中,所述第四时间与所述第三时间相同。
通过采用该技术方案,对于视频或音频内容,由第一用户来控制视频或音频的快进或快退,从而实现第一用户与第二用户同步观看视频或聆听音频。
在一种可能的实现方式中,其中,所述第一应用为购物应用,所述第一内容为商品,所述第二界面还包括第四选项;
响应于对所述第四选项的操作,所述第二电子设备在所述第四应用中显示第一购物车和第二购物车,其中,所述第一购物车对应于所述第一用户,所述第二购物车对应于第二用户,所述第一用户与所述第二用户不同。
通过采用该技术方案,实现了在购物应用中同步显示第一用户和第二用户的购物车商品,使得第一用户能够看到第二用户的购物车商品,且第二用户能够看到第一用户的购物车商品。
在一种可能的实现方式中,响应于对所述第四选项的操作,所述第二电子设备在所述第四应用中显示第一购物车和第二购物车包括:
所述第二电子设备在所述第四应用中还显示第三购物车,所述第三购物车内的商品为所述第一购物车内商品和所述第二购物车内商品的总和。
通过采用该技术方案,实现了在购物应用中显示第一用户和第二用户购物车内的全部商品,以便于第一用户和第二用户一起购物。
在一种可能的实现方式中,所述第一应用为地图应用,所述第一内容为导航信息;所述第四应用的所述第二界面还包括所述第一用户标识和第二用户标识,所述第二用户标识用于标识操作所述第二电子设备的用户,所述第一用户标识还用于指示所述第一电子设备的地理位置,所述第二用户标识还用于指示所述第二电子设备的地理位置。
通过采用该技术方案,实现了在地图应用中实时显示导航信息、第一用户和第二用户的地理位置信息。这样,第一用户和第二用户能够在一起驾车的过程中能够及时查看对方的位置,并通过第二应用实时接收、发送消息,且用户仅需使用常规的手机就能够实时沟通,无需使用其他通信设备,为用户提供了组队驾车的良好体验。
第二方面,本发明实施例提供一种即时通信方法,应用于具有显示屏的第二电子设备,所述方法包括:
所述第二电子设备显示第三应用的第一对话界面,所述第一对话界面包括第一用户标识和第二选项,所述第二选项与第一内容的链接关联,所述第一用户标识用于标识操作第一电子设备的用户;
其中,所述第一内容是第一应用为所述第一电子设备提供的内容,所述第一 内容的链接由所述第一电子设备通过第二应用发送至所述第二电子设备,所述第三应用对应于所述第二应用;
响应于对所述第二选项的操作,所述第二电子设备显示第四应用的第二界面,所述第二界面包括所述第一内容和第三选项,所述第四应用对应于所述第一应用;
响应于对所述第三选项的操作,所述第二电子设备通过所述第三应用发送第一消息给所述第一电子设备。
通过采用该技术方案,实现了通过第二应用分享第一应用内的内容,从而使得操作第二电子设备的用户能够在第一应用内的界面上向第一电子设备发送即时消息。
在一种可能的实现方式中,所述第一消息为文字消息、语音消息、语音通话请求或视频通话请求。
通过采用该技术方案,实现了第一用户与第二用户在第一应用内接收、发送即时消息,以及进行语音聊天或视频聊天。这样,第二用户在打开第一内容的同时,还能够与第一用户实时通信,提升了用户对设备的使用体验。
在一种可能的实现方式中,所述第二选项与所述第一内容的链接关联包括:所述第二选项是包括所述第一内容链接的卡片或控件。
通过采用该技术方案,以简洁的卡片或控件方式为第二用户提供第一内容的链接。
在一种可能的实现方式中,所述第一应用为视频应用或音频应用,所述第一内容为视频或音频;
在响应于对所述第一选项的操作,所述第一电子设备通过所述第二应用向所述第二电子设备发送所述第一内容的链接时,所述视频或音频的播放时间为第一时间;
在响应于对所述第二选项的操作,所述第二电子设备显示所述第四应用的所述第二界面时,所述视频或音频的播放时间为第二时间;
所述第一时间与所述第二时间相同。
通过采用该技术方案,对于视频或音频内容,由第一用户控制视频或音频的播放时间,从而实现第一用户与第二用户同步观看视频或聆听音频。
在一种可能的实现方式中,所述第二电子设备显示所述第四应用的第六界面,所述第六界面包括所述第一内容,所述第一内容的播放时间为第四时间,所述第四时间与第三时间相同;
其中,所述第三时间为所述第一电子设备显示所述第一应用的第五界面时所述第一内容的播放时间,所述第三时间与所述第一时间不同。
通过采用该技术方案,对于视频或音频内容,由第一用户来控制视频或音频的快进或快退,从而实现第一用户与第二用户同步观看视频或聆听音频。
在一种可能的实现方式中,所述第一应用为购物应用,所述第一内容为商品,所述第二界面还包括第四选项;
响应于对所述第四选项的操作,所述第二电子设备在所述第四应用中显示第 一购物车和第二购物车,其中,所述第一购物车对应于所述第一用户,所述第二购物车对应于第二用户,所述第一用户与所述第二用户不同。
通过采用该技术方案,实现了在购物应用中同步显示第一用户和第二用户的购物车商品,使得第二用户既能够看到自己购物车商品,也能够看到第一用户的购物车商品。
在一种可能的实现方式中,响应于对所述第四选项的操作,所述第二电子设备在所述第四应用中显示第一购物车和第二购物车包括:
所述第二电子设备在所述第四应用中还显示第三购物车,所述第三购物车内的商品为所述第一购物车内商品和所述第二购物车内商品的总和。
通过采用该技术方案,实现了在购物应用中显示第一用户和第二用户购物车内的全部商品,以便于第二用户和第一用户一起购物。
在一种可能的实现方式中,所述第一应用为地图应用,所述第一内容为导航信息;所述第四应用的所述第二界面还包括所述第一用户标识和第二用户标识,所述第二用户标识用于标识操作所述第二电子设备的用户,所述第一用户标识还用于指示所述第一电子设备的地理位置,所述第二用户标识还用于指示所述第二电子设备的地理位置。
通过采用该技术方案,实现了在地图应用中实时显示导航信息、第一用户和第二用户的地理位置信息。这样,第二用户能够在和第一用户一起驾车的过程中能够及时查看第一用户的位置,并通过第二应用实时接收、发送消息,且用户仅需使用常规的手机就能够实时沟通,无需使用其他通信设备,为用户提供了组队驾车的良好体验。
另一方面,本申请实施例提供了一种电子设备,包括:一个或多个处理器;以及存储器,存储器中存储有代码。当代码被电子设备执行时,使得电子设备执行第二方面任一项可能的实现方式中电子设备执行的即时通信方法。
另一方面,本发明实施例提供了一种计算机存储介质,包括计算机指令,当计算机指令在电子设备上运行时,使得电子设备执行第二方面任一项可能的实现方式中的即时通信方法。
另一方面,本发明实施例提供了一种计算机程序产品,当计算机程序产品在计算机上运行时,使得计算机执行第二方面任一项可能的实现方式中的即时通信方法。
附图说明
图1A-1B为现有技术中的一种分享场景;
图2A为本发明实施例提供的一种通信系统的架构示意图;
图2B为本发明实施例提供的一种电子设备的硬件结构示意图;
图2C为本发明实施例的一种软件系统架构图;
图2D为本发明实施例的另一种软件系统架构图;
图3A-3M为本发明实施例提供的一组界面示意图;
图4A-4H为本发明实施例提供的另一组界面示意图;
图5为本发明实施例提供的一种视频分享的操作时序图;
图6为本发明实施例提供的另一种视频分享的操作时序图;
图7A-7K为本发明实施例提供的另一组界面示意图;
图8A-8D为本发明实施例提供的另一组界面示意图;
图9为本发明实施例提供的一种商品分享的操作时序图;
图10A-10G为本发明实施例提供的另一组界面示意图;
图11为本发明实施例提供的一种即时通信方法流程图;
图12为本发明实施例提供的另一种电子设备的结构示意图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行描述。其中,在本发明实施例的描述中,除非另有说明,“/”表示或的意思,例如,A/B可以表示A或B;本文中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,在本发明实施例的描述中,“多个”是指两个或多于两个。
以下,术语“第一”、“第二”仅用于描述目的,而不能理解为暗示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征,在本申请实施例的描述中,除非另有说明,“多个”的含义是两个或两个以上。
本发明实施例提供一种即时通信方法,可应用于图2A所示的通信系统(也可称为内容分享系统)100中。如图2A所示,该通信系统200中可包括N(N为大于1的整数)个电子设备。这N个电子设备之间可通过通信网络互联。
示例性的,上述通信网络可以是有线网络,也可以是无线网络。例如,上述通信网络可以是局域网(local area networks,LAN),也可以是广域网(wide area networks,WAN),例如互联网。上述通信网络可使用任何已知的网络通信协议来实现,上述网络通信协议可以是各种有线或无线通信协议,诸如以太网、通用串行总线(universal serial bus,USB)、火线(FIREWIRE)、全球移动通讯系统(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,TDSCDMA),长期演进(long term evolution,LTE)、蓝牙、无线保真(wireless fidelity,WiFi)、NFC、基于互联网协议的语音通话(voice over Internet protocol,VoIP)、支持网络切片架构的通信协议或任何其他合适的通信协议。
示例性地,在一些实施例中,通信系统200中的各个电子设备登陆各自的账号(例如华为账号)后可通过一个或多个服务器互联,以上服务器也可以通过云 端实现。在另一些实施例中,通信系统200中的各个电子设备之间可通过Wi-Fi协议建立Wi-Fi连接。
本发明实施例适用于第一电子设备向第二电子设备分享第一应用中内容,例如图1A和图1B所示的分享场景。内容分享通过第一电子设备和第二电子设备中均已安装的第二应用完成,所述第二应用是即时通信应用。所述第二应用既可以是设备出厂前预先安装的应用,例如华为的畅连应用,也可以是用户购买设备后下载或安装的第三方应用,例如微信。第二应用可为每次分享创建一个后台的消息通道,所述第一应用可以利用该通道在所述第一电子设备和第二电子设备之间发送、接收消息、进行语音通话或视频通话。在原有的内容分享的基础上,第二应用为分享双方建立了通信连接,用户不需要离开第一应用即可基于该通信连接进行通信。
本发明实施例提供的即时通信方法可以应用于手机、平板电脑、可穿戴设备、车载设备、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本、个人数字助理(personal digital assistant,PDA)等电子设备上,本发明实施例对此不作任何限制。
示例性的,图2B出了电子设备100的结构示意图。
电子设备100可以包括处理器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等。
可以理解的是,本发明实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器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)接口等。
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过电子设备100的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备供电。
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。
天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。
移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少 部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(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转为电磁波辐射出去。
在一些实施例中,电子设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备100可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(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)。
本发明实施例的电子设备可以通过移动通信模块150经天线1,向如图2所示的通信系统200中其他电子设备发送各种消息、语音信号,或者接收通信系统200中发送的各种消息、语音信号。本发明实施例的电子设备也可以通过无线通信模块160经由天线2收发来自通信系统200中其他电子设备的各种消息、语音信号。
电子设备100通过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)等。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。
电子设备100可以通过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等格式的图像信号。在一些实施例中,电子设备100可以包括1个或N个摄像头193,N为大于1的正整数。
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。
视频编解码器用于对数字视频压缩或解压缩。电子设备100可以支持一种或多种视频编解码器。这样,电子设备100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备100的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码 包括指令。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器110通过运行存储在内部存储器121的指令,和/或存储在设置于处理器中的存储器的指令,执行电子设备100的各种功能应用以及数据处理。
电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。电子设备100可以通过扬声器170A收听音乐,或收听免提通话。
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当电子设备100接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。电子设备100可以设置至少一个麦克风170C。在另一些实施例中,电子设备100可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,电子设备100还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。
耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动电子设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备100可以接收按键输入,产生与电子设备100的用户设置以及功能控制有关的键信号输入。
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持 自定义。
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。
SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和电子设备100的接触和分离。电子设备100通过SIM卡和网络交互,实现通话以及数据通信等功能。在一些实施例中,电子设备100采用eSIM,即:嵌入式SIM卡。eSIM卡可以嵌在电子设备100中,不能和电子设备100分离。
下面介绍本申请实施例提供的一种软件系统架构。
请参照图2C,图2C示出了本申请实施例提供的一种通信系统的软件架构图。其中,该通信系统可以包括两个或多个电子设备,图2C示例性地示出了电子设备A(以下简称设备A)和电子设备B(以下简称设备B)。
如图2C所示,设备A和设备B可以分别包括第一应用和第二应用。
第一应用可以为设备出厂前预先安装的应用,例如华为的视频应用,也可以是设备下载的第三方应用。第一应用包括开放的软件开发工具包(software development kit,SDK)、应用的根目录(AppBase)、和应用界面(AppUi)。其中,开放SDK包括分享模块,分享模块提供两种分享模式:普通分享模式和协同分享模式,分别对应两种应用程序接口(application programming interface,API)。第一应用调用普通分享模式API,只能实现普通的分享;调用协同分享模式的API,分享内容后,第二应用会建立后台消息通道用于两台设备上的第一应用进行即时通信。
第二应用是即时通信应用,同样的,第二应用既可以是设备出厂前预先安装的应用,例如华为的畅连应用,也可以是设备下载的第三方应用,例如微信。畅连应用是智能手机、平板电脑等移动设备上支持移动操作系统的一款社交应用程序,属于华为设备出厂自带的一种即时通信软件。第二应用可以包括消息服务(Message Service)组件、通讯录(Contact)模块、通话界面(CallUI)模块、消息聊天界面(MessageUI)模块、悬浮的消息聊天界面(Float MessageUI)模块、消息基础组件和音视频通话基础组件。第二应用还可以包括活动(activity)模块、多媒体效果(mediaeffect)模块等,本申请实施例对第二应用内模块或组件不作任何限制。设备A的第二应用与设备B的第二应用通过云端进行通信。
第一应用的开放SDK与第二应用的Message Service组件通过Binder传输消息,例如,第一应用通过分享API可以往第二应用的Message Service组件分享内容。消息传输的方式并不限于Binder机制,任何系统进程间通信方式均能够传输第一应用与第二应用之间的消息,例如管道(Pipe)、信号(Signal)和跟踪(Trace)、插口(Socket)、报文队列(Message)、共享内存(Share Memory)和信号量(Semaphore)等,本申请实施例对跨进程通信的消息传输手段不作任何限制。
下面结合内容分享的场景,示例性的说明该软件系统的工作流程。
当设备A的第一应用接收到用户通过第二应用分享内容的操作时,第一应用 通过开放SDK调用协同分享模式的API,将内容发送至第二应用。第二应用的Message Service组件解析收到的消息内容,通过后续的mParallelShare字段判断为协同分享模式。第二应用基于协同分享模式创建与第一应用的跨进程消息通道,例如,可以采用Binder机制进行消息传输。同时,Message Service组件进一步将mParallelShare字段以外的消息内容封装成卡片,在MessageUI模块中的聊天窗中展示卡片,并通过消息基础组件完成消息的发送。
设备B的第二应用收到消息后在MessageUI模块的聊天窗中展示卡片,例如图3D中的视频链接卡片343,即设备A的内容已分享至设备B。设备A的第二应用将通道建立的消息通过消息基础组件发送至设备B的第二应用。设备B的第二应用收到该通道建立的消息,由MessageUI模块刷新消息卡片,显示协同分享的入口,如图3E中的控件351。用户点击设备B显示的协同分享的入口,设备B的第二应用拉起设备B中对应的第一应用。设备B的第一应用进一步判断出是协同分享模式,通过开放SDK调用协同分享模式API设置HwParallelShareChannel对象,第二应用根据该对象创建设备B的第二应用与第一应用的跨进程消息通道。
设备A在内部建立了第二应用与第一应用之间的跨进程消息通道,表明第二应用为第一应用分配了一个后台消息通道,通过开放SDK的message api(图中未示出)可以接收和发送第二应用的后台消息。对于设备B而言也是一样,设备B的第二应用与第一应用之间的跨进程消息通道,使得设备B的第二应用内消息可以与第一应用互通。
设备A的第二应用和设备B的第二应用通过云端完成消息的转发,包括分享的内容、后台消息。在设备A和设备B均建立后台消息通道后,第二应用提供Float MessageUI,即悬浮的消息聊天界面,用户通过该UI不用离开第一应用即可通过第二应用进行消息聊天。同时,第一应用通过后台消息通道可以发送特定的应用数据,比如当前播放的视频信息、进度信息、购物车信息等,用以实现特定的用户场景。
下面介绍本申请实施例提供的另一种软件系统架构。
请参照图2D,图2D示出了本申请实施例提供的另一种软件系统架构图。其中,该软件系统可以包括两个或多个电子设备,图2D示例性地示出了电子设备A(以下简称设备A)和电子设备B(以下简称设备B)。设备A和设备B可以包括第一应用和第二应用。
第一应用包括开放的SDK、应用的根目录(AppBase)、和应用界面(AppUi)。其中,开放SDK、AppBase与图2C所示的第一应用的开放SDK、AppBase相同。与图2C所示的第一应用不同的是,图2D所示的第一应用的应用界面(AppUi)包括messageUI,用于在第一应用的界面上提供消息输入窗口,由用户输入文字或语音消息。
第二应用包括消息服务(Message Service)组件、通讯录(Contact)模块、通话界面(CallUI)模块、消息聊天界面(MessageUI)模块、消息基础组件和音视频通话基础组件。与图2C所示的第二应用不同的是,图2D所示的第二应用 不再包括Float MessageUI模块。
第一应用的开放SDK与第二应用的Message Service组件之间的跨进程通信的消息传输手段以及内容分享过程的大部分均与图2C所示相同,此处不再赘述,下面仅描述二者不同之处。
在设备A和设备B均建立后台消息通道后,由第一应用提供MessageUI,即消息输入窗口。设备A的用户输入文字或语音消息后,第一应用将输入的消息通过消息通道发送给第二应用的Message Service组件,再经由第二应用的消息基础组件转发至设备B的第二应用的消息基础组件。设备B再将该消息经第二应用的Message Service组件,通过消息通道发送给设备B的第一应用,由第一应用提供的MessageUI显示该消息。
下面结合应用场景,以电子设备为手机为例,介绍本申请的相关技术中内容分享的过程。
以第一应用为视频应用,第二应用为畅连应用,在视频应用中通过畅连应用分享视频链接为例:
首先,用户A需要打开手机A上的视频应用的用户界面(也称UI界面)。
图3A示例性示出了智能手机等电子设备显示的视频应用的用户界面310。视频应用是智能手机、平板电脑等移动设备上的一款或多款为用户提供视频内容的应用程序,又可以被称为“视频软件”。用户通过视频应用能够观看、下载或者上传视频内容。视频应用既可以是设备出厂自带的视频应用,例如图3A所示的华为视频,也可以是第三方发布、需要用户下载安装的视频应用,例如爱奇艺视频、优酷视频等。
在一种可能的实现方式中,本发明实施例也可以适用于为用户提供音频内容的应用程序,简称为音频应用。音频应用既可以是设备出厂自带的音频应用,例如华为音乐,也可以是第三方发布、需要用户下载安装的音频应用,例如网易云音乐、酷狗音乐、QQ音乐等。
如图3A所示,该视频应用的用户界面310中包括有手机A正在播放的视频内容311、评论按钮312、收藏按钮313、分享按钮314。该视频内容311可以有标题,例如,“世界杯足球赛直播2018比利时VS英格兰小组赛”。评论按钮312用于触发打开用户评论区。收藏按钮313可用于触发收藏该视频到视频收藏文件夹。其中,分享按钮314可用于触发打开视频分享界面。
用户A点选用户界面的分享按钮,打开视频分享界面。手机A可以接收用户针对图3A中分享按钮314的输入操作(例如单击),响应于该输入操作,手机A可以显示如图3B所示的视频分享界面320。
如图3B所示,该视频分享界面320中包括有分享卡片321和正在播放的视频内容等,分享卡片321包括新浪微博按钮322、微信按钮323、畅连一起看按钮324、畅连按钮325、复制链接按钮326、更多按钮327和取消按钮328。新浪微博按钮322可用于触发打开新浪微博分享界面。微信按钮323可用于触发打开微信分享界面。畅连一起看按钮324可用于触发打开畅连应用的一起看分享界面。畅连按钮325 可用于触发打开畅连应用的分享界面。复制链接按钮326可用于将视频链接复制到剪贴板。更多按钮327可用于触发打开更多与分享相关的功能。取消按钮328可用于取消本次分享。
畅连一起看按钮324能够提供第一分享模式,畅连按钮325能够提供第二分享模式。第一分享模式为协同分享,用于将视频链接分享给畅连应用联系人,被分享的畅连应用联系人打开视频链接卡片,与分享方同步观看视频。第二分享模式为普通分享,用于将视频链接分享给畅连应用联系人,与图1A所示相似的,被分享的畅连应用联系人打开视频链接卡片从头开始观看视频。
用户A点选视频分享界面中的畅连按钮,打开畅连分享界面。手机A可以接收用户针对图3B中畅连一起看按钮324或畅连按钮325的输入操作(例如单击),响应于该输入操作,手机A可以显示如图3C所示的界面330。
如图3C所示,界面330包括搜索按钮331和最近聊天的联系人列表332。搜索按钮331可用于快速查找畅连应用中的联系人。最近聊天的联系人列表332包括手机A最近通过畅连应用聊天的联系人,每个联系人包括联系人头像和昵称,例如,用户B头像按钮333,用户B的昵称按钮334。
用户A点选用户B的头像或昵称按钮,将视频链接分享至用户B。手机A可以接收用户针对图3C中用户B的头像按钮333或昵称按钮334的输入操作(例如单击),响应于该输入操作,手机A将“世界杯足球赛直播2018比利时VS英格兰小组赛”视频链接分享给手机B。分享完后,如果用户A选择留在视频应用继续观看播放的视频内容,手机A将显示视频播放界面。
示例性地,用户A选择畅连一起看按钮324将视频分享给用户B之后,用户B在手机B上打开畅连应用,选择用户A,进入与用户A的聊天界面后,可以显示如图3D所示的畅连聊天界面340或者如图3E-1所示的畅连聊天界面350。
如图3D所示,该畅连聊天界面340包括用户B头像按钮341、用户A头像按钮342、视频链接卡片343、通话按钮344、更多按钮346、输入框345、播放按钮348和语音输入按钮347。用户B头像按钮341和用户A头像按钮342可用于触发打开显示用户信息的界面。视频链接卡片343可用于触发打开分享的视频链接,可选地,卡片上显示“一起看”图标以提示用户点击该卡片将与用户A同步观看视频。通话按钮344可用于触发开启与用户A的通话界面。更多按钮346可用于触发打开更多与畅连应用相关的功能。输入框345可用于触发开启输入文字消息。语音输入按钮347可用于触发开启输入语音消息。用户点击视频链接卡片343的播放按钮348,用户B打开视频链接卡片与用户A同步观看视频。
如图3E-1所示,该畅连聊天界面350包括用户B头像按钮、用户A头像按钮、视频链接卡片353、通话按钮、更多按钮、输入框、播放按钮354和语音输入按钮。视频链接卡片353可用于触发打开分享的视频链接。视频链接卡片353下方显示控件351,控件351用于显示协同分享入口,例如“一起看”。可选地,视频链接卡片353下方还可以包括控件352。控件352用于显示投屏入口,例如“智慧屏播放”,用户点选后将视频播放内容投射至智慧屏进行播放。如果用户点击视频链接卡片 353的播放按钮354,将打开视频链接从头开始观看视频。如果用户点击控件351,将打开视频链接与用户A同步观看视频。
示例性地,用户A选择畅连按钮325将视频分享给用户B之后,用户B在手机B上打开畅连应用,选择用户A,进入与用户A的聊天界面后,可以显示如图3E-1所示的畅连聊天界面350或者如图3E-2所示的畅连聊天界面355。
如图3E-2所示,该畅连聊天界面355包括用户B头像按钮、用户A头像按钮、视频链接卡片356、通话按钮、更多按钮、输入框、播放按钮357和语音输入按钮。视频链接卡片356可用于触发打开分享的视频链接。如果用户点击视频链接卡片356的播放按钮357,将打开视频链接从头开始观看视频。
手机B可以接收用户针对图3D中播放按钮或图3E中控件351的输入操作(例如单击),响应于该输入操作,手机B的畅连应用自动拉起视频应用,打开如图3F所示的视频播放界面360。
如图3F所示,该视频播放界面360包括有视频进度控件361、暂停按钮362、下一集按钮363、畅连按钮364、消息输入框控件365、音量控件366和语音输入按钮367。视频进度控件361可用于指示当前视频播放进度,用户拖动控件361能够改变视频播放进度。如图3F所示,当前播放的标题为“世界杯足球赛直播2018比利时VS英格兰小组赛”的视频时长为41分50秒,当前播放进度为20分00秒,控件361指示在进度条中间对应20分钟的位置。暂停按钮362可用于触发暂时停止当前视频播放。下一集按钮363可用于触发打开下一个视频。畅连按钮364可用于触发开启畅连应用提供的语音聊天或视频聊天功能。消息输入框控件365可用于触发打开消息输入界面。音量控件366可用于指示当前音量,用户拖动控件366能够调节音量变大或变小。语音输入按钮367可用于触发开启输入语音消息。
手机B打开如图3F所示的视频播放界面360时,视频播放进度为图3B所示的视频分享界面320的视频播放进度。即,当用户B选择同步观看用户A分享的视频时,手机B启动视频应用后,自动将视频播放进度调整为与手机A的视频播放进度保持一致。在本实施例中,用户A在分享该视频时,播放进度为20分00秒,因此,手机B的视频播放进度自动跳转到20分00秒。可选地,手机B视频播放的音量也与手机A的播放音量保持一致。
手机B打开如图3F所示的视频播放界面360之后,手机B向手机A发送消息,指示用户B已选择同步观看用户A分享的视频,并已经启动视频播放界面,可选的,手机B向手机A发送的消息可以是“用户B已进入放映厅”,手机A接收到该消息后在视频播放界面370显示该消息。
如图3G所示,手机A显示用户B已进入放映厅的消息通知。手机A的视频播放界面370显示消息提示371,例如,消息提示的内容为“用户B已进入放映厅”。手机A的视频播放界面370也包括有视频进度控件372、暂停按钮、下一集按钮、畅连按钮、消息输入框控件373和音量控件。以上按钮或控件与手机B的视频播放界面360内的按钮或控件功能相同,此处不再赘述。
用户A点击消息输入框控件,进入消息输入界面。
手机A可以接收用户针对图3G中控件373的输入操作(例如单击),响应于该输入操作,手机A打开如图3H所示的消息输入界面380。
如图3H所示,该消息输入界面380包括调色板按钮382、消息输入框383、消息发送控件384和键盘控件385。调色板按钮382可用于控制输入消息的颜色、输入消息在播放界面中的显示位置等。消息输入框383可用于显示用户通过键盘控件385所选择输入的文字,例如,“刚才凯恩进了个球”。用户输入完成后点击消息发送控件384后,消息输入界面380可显示聊天消息内容,例如,用户A头像或昵称,以及用户选择发送的文字消息。
上述聊天消息通过手机A发送至手机B后,手机B的视频播放界面上也同步显示上述消息内容,包括用户A头像或昵称,以及用户A选择发送的文字消息,参见图3I的视频播放界面375。用户B需要对手机A发送的文字消息进行回复或评论时,手机B可接收针对图3I中控件365的输入操作(例如单击),响应于该输入操作,手机B打开如图3J所示的消息输入界面390。
如图3J所示,该消息输入界面390包括调色板按钮、消息输入框、消息发送控件、和键盘控件。以上按钮或控件与手机A的消息输入界面380内的按钮或控件功能相同,此处不再赘述。用户B通过键盘控件输入文字,例如,“回放看看进球”。用户输入完成后点击消息发送控件,消息输入界面390显示聊天消息内容,包括用户B的头像或昵称,以及用户B选择发送的文字消息,显示在手机A的视频播放界面393内,参见图3K。
用户A继续输入“OK”,文字信息显示在手机A的视频播放界面393中。
随后,用户A沿着如图3K所示的箭头方向移动视频进度控件372,能够控制视频播放进度。手机A可以接收用户A对视频进度控件372的输入操作(例如拖动、释放),响应于该输入操作,进入如图3L所示的视频播放界面394。
如图3L所示,视频播放界面394包括有新的视频播放内容395和视频进度控件372。视频播放内容395可以是不同于视频内容311在20分钟时所播放的内容,例如,凯恩进球的画面。视频进度控件372显示在视频进度条第18分30秒的位置。
手机A的视频应用将用户后退视频的信息,发送至手机B的畅连应用,手机B的畅连应用再将该消息发送至手机B的视频应用,手机B解析消息并控制视频快退至视频第18分30秒的位置,如图3M所示。手机B的视频播放界面同样显示视频播放内容395,其视频进度控件361也显示在视频进度条第18分30秒的位置。
在一种可能的实现方式中,用户A和用户B在视频播放过程中的聊天,是在视频应用提供的AppUi模块中进行。示例性的,采用如图2D所示的软件系统架构图,视频应用的应用界面(AppUi)包括messageUI,用于在视频应用的界面上提供消息输入窗口,由用户输入文字或语音消息。如图3F-3M所示的手机A的消息输入框控件373、语音输入按钮、消息输入界面380、调色板按钮382、消息输入框383、消息发送控件384和键盘控件385,以及手机B的消息输入框控件365、 语音输入按钮367、消息输入界面390、调色板按钮、消息输入框、消息发送控件和键盘控件,以及用户A和用户B输入的语音或文字消息显示等,均由视频应用例如华为视频提供。
在一种可能的实现方式中,用户A和用户B在视频播放过程中的聊天,也可以由畅连应用提供聊天用户界面,并且可以进行实时语音聊天。示例性的,采用如图2C所示的软件系统架构图,畅连应用包括悬浮的消息聊天界面(Float MessageUI)模块,用于在视频应用的界面上提供消息输入窗口,由用户输入文字或语音消息。如图3F-3M所示的手机A的畅连按钮、消息输入框控件373、语音输入按钮、消息输入界面380、调色板按钮382、消息输入框383、消息发送控件384和键盘控件385,以及手机B的畅连按钮364、消息输入框控件365、语音输入按钮367、消息输入界面390、调色板按钮、消息输入框、消息发送控件和键盘控件,以及用户A和用户B输入的语音或文字消息显示等,均由畅连应用提供。
在一些实施例中,当用户A在视频应用中打开畅连分享界面时,手机A可以在接收到用户选择一个群组后,将播放的视频链接分享到用户选择的群组。
示例性的,如图4A所示,用户A在视频应用中打开畅连分享界面410,选择群名为“XXXXXX群”的群组412。手机A可以接收用户针对群组412的输入操作(例如单击),响应于该输入操作,群组内的成员收到用户A分享的视频链接。
示例性的,如图4B所示,手机B可以显示畅连聊天界面420。畅连聊天界面420包括用户A头像按钮、用户B头像按钮、用户C头像按钮421、视频链接卡片、通话按钮、畅连按钮、更多按钮、语音输入按钮、协同分享入口、智慧屏播放等。用户C头像按钮421可用于触发打开用户信息。手机C也可以显示相应的畅连聊天界面。用户B和用户C可以分别点击协同分享入口与用户A一起看视频,也可以选择不点击进入。
示例性的,如图4C所示,群组412内的用户B点击协同分享入口与用户A一起看视频,手机B呈现视频播放界面430,视频播放进度、当前音量等均与手机A相同并由手机A控制。用户A和用户B能够在视频播放界面430上互动聊天。
另外,如图4C所示,在视频播放界面430上提供畅连按钮431,用于触发开启畅连应用提供的语音聊天或视频聊天功能。用户B点击或长按畅连按钮431,出现如图4D所示的视频通话、语音通话选项。用户选择语音通话选项之后,如图4E所示,手机A将显示语音通话界面440。如果用户点击“视频通话”,可以开启视频聊天窗口,悬浮在当前视频播放界面上,呈现画中画的效果,用户可以改变视频聊天窗口的大小,或者隐藏视频聊天窗口。
如图4E所示,语音通话界面440包括用户B的头像441、接听按钮442和挂断按钮443。用户B的头像441可用于提示用户B邀请你语音通话。接听按钮442可用于触发建立语音通话连接。挂断按钮443可用于关闭语音通话。可选地,语音通话界面440还可以包括静音按钮。上述包括用户B的头像441、接听按钮442和挂断按钮443的语音窗口是可以改变位置和大小的,以及能够自动隐藏。
如果用户A选择“接听”后,手机A和手机B建立语音通话连接。此时,用 户A和用户B可以一边语音通话一边看视频。例如用户B语音请求用户A回放刚才凯恩的进球,用户A拖动视频进度条,如图4F和4G所示,用户A和用户B均可以观看凯恩的射门瞬间。
如图4F所示,语音通话界面450包括语音聊天窗口451,语音聊天窗口451内包括用户B的头像452、免提按钮453和挂断按钮454。用户B的头像452可用于提示与用户A语音通话的对象以及通话时间,例如4F所示的00:06秒。免提按钮453可用于触发开启语音通话的免提功能,如果用户开启免提,则暂时将球赛的解说声音降低。或者,用户已将手机A投屏至智慧屏播放,在建立语音连接后,手机A暂时弱化球赛的解说声音,以便用户进行语音聊天。挂断按钮454可用于关闭语音通话。可选地,语音通话界面450还可以包括静音按钮。语音聊天窗口451是可以改变位置和大小的,以及能够自动隐藏。
如图4G所示,语音通话界面460包括语音聊天窗口461,语音聊天窗口461内包括用户A的头像462、免提按钮463和挂断按钮464。用户A的头像462可用于提示与用户B语音通话的对象以及通话时间,例如4G所示的00:06秒。免提按钮463和挂断按钮464与图4F所示的免提按钮453和挂断按钮454功能类似,此处不再赘述。
示例性的,如图4H所示,群组412内的用户C没有点击协同分享入口,手机C呈现的仍然是畅连聊天界面,用户C在该聊天界面内接收、发送消息。
下面结合分享视频的应用场景,介绍具体的操作时序图。
请参见图5,图5示出了一种视频分享的操作时序图。其中,该方法流程图中涉及的设备包括有设备A和与设备A交互的设备。其中,交互设备可以为上述图4中所示的设备B、设备C,设备A-C之间通过图1所示的通信网络进行交互。其中,设备A-C可以示例性的参考上述图2C所示系统架构。图5所示的第一应用可以为视频应用,第二应用可以为畅连应用等即时通信应用。
如图5所示,该方法包括:
S501、第一分享模式分享视频。
示例性的,设备A可以接收用户分享第一内容的输入操作(例如单击分享按钮),响应于所述输入操作,设备A显示内容分享界面,其中,该内容分享界面可以参考上述图3B所示的视频分享界面320。以第一分享模式分享视频可以为用户A点击如图3B所示的畅连一起看按钮324,将视频分享给操作设备B的用户。
所述第一应用程序通过集成的开放SDK(参见图2C,设备A的第一应用软件结构),调用协同分享API。所述第一应用程序通过调用API而使设备操作系统去执行应用程序的命令。所述协同分享API包括一个接口,所述接口包括目标场景(targetScene)、分享内容信息(HwCaasShareInfo)函数和协同分享通道(HwParallelShareChannel)函数。目标场景(targetScene)用于指示所发送的消息等场景对象。
S502、发送HwCaasShareInfo视频信息。
所述视频信息为协同分享API携带的分享内容信息(HwCaasShareInfo)。
分享内容信息(HwCaasShareInfo)包括:
分享模式(mParallelShare:0:普通分享;1:协同分享);
语音通话功能(mMakeCall:是否启动语音通话功能;0:否;1:是);
分享类型(mShareType:购物,新闻/网页,短视频,长视频,音乐,文字);
分享信息(mShareInfo:消息内容,标题、内容等);
缩略图(mThumbBitmap:缩略图);
封装信息(mPackageInfo:应用名和应用图标);
网页链接(mWebUrl:h5页面地址);
应用链接(mAppUrl:app页面地址);
流媒体链接(mStreamUrl:流媒体在线播放地址);
其他信息(mExtraInfo:其他消息内容;视频播放的当前进度、当前位置信息、当前音乐进度信息、当前购物车信息等)。
设备A内第二应用的MessageService组件收到第一应用的分享调用后,解析消息内容,通过mParallelShare字段判断是否为协同分享模式。同时,将所述第一消息中的其他消息内容封装成卡片,在MessageUI模块的聊天窗中展示卡片。第二应用通过消息基础组件将所述第一消息发送给设备B。设备B收到上述消息后,可以在第二应用中显示卡片,例如,图3D所示的视频链接卡片343。
S503、创建HwParallelShareChannel消息通道。
设备A的第二应用判断如果是协同分享模式,则创建设备A内的第二应用与第一应用的跨进程消息通道。跨进程消息通道通过协同分享通道(HwParallelShareChannel)实现。协同分享通道(HwParallelShareChannel)用于在第一应用与第二应用之间收发数据,在调用协同分享API时进行设置,从而建立第一应用与第二应用之间的跨进程消息通道。该通道函数定义为包括收发应用信息(AppMessage)、收发聊天消息(ChatMessage)。其中,应用信息包括头像(mIdIcon)、昵称(mIdDescription)和消息内容(消息内容),聊天消息包括头像、昵称、纯文本、语音、视频、图片、小文件、预置标签、地理位置。
S504、消息通道创建成功。
设备A内的第二应用与第一应用的跨进程消息通道建立完成之后,第二应用通过消息基础组件向设备B的第二应用发送通道建立消息。
S505、显示一起看入口。
设备B的第二应用收到通道建立消息,MessageUI模块刷新消息卡片,显示一起看入口,如图3E中的控件351或如3D的视频链接卡片343上的一起看。
S506、用户选择一起看。
示例性的,用户点击一起看入口,如图3E中的控件351或如3D的视频链接卡片343的播放按钮,设备B的MessageUI模块通过mAppUrl信息自动打开对应的第一应用。
S507、设置消息回调接口。
示例性的,视频应用启动后,解析出第一消息中的分享模式mParallelShare和其他信息mExtraInfo。
首先判断是否为第一分享模式,如果是协同分享,则通过开放SDK的API设置对象HwParallelShareChannel到第二应用,第二应用通过HwParallelShareChannel对象建立第二应用和视频应用的消息通道,并记录与聊天窗threadID对应关系。
其次,解析mExtraInfo中的信息,该信息由设备A的视频应用填充、设备B的视频应用解析,该信息的格式内容由视频应用定义,可以定义如下格式作为参考:
currentTime:20.0;
currentVolume:65;
即当前播放时间是20min;当前播放的音量是65%。
最后,在视频应用中播放第一内容,播放参数为解析出的参数。示例性地,如图3F所示的视频播放界面360。
S508、通过消息通道发送进入房间的消息。
设备B通过协同分享通道(HwParallelShareChannel)对象的sendAppMessage方法发送进入房间的消息。消息内容mMessageInfo格式由视频应用自定义,可以定义如下格式作为参考:JoinRoom:1。所述消息发送到第二应用的MessageService组件,MessageService组件判断是应用消息(AppMessage),通过消息基础组件转发给设备A。设备A的第二应用收到消息后判断是AppMessage,通过协同分享通道(HwParallelShareChannel)的onAppMessageReceive转发给对应的第一应用。
S509、提示用户B进入。
设备A的第一应用收到消息后,解析mMessageInfo为进入房间消息,刷新视频播放界面,提醒用户进入放映厅,例如图3G中的消息提示371。
S510、用户A输入聊天消息,封装成聊天消息格式。
用户A通过HwParallelShareChannel对象的sendChatMessage方法发送聊天消息,按照既定聊天消息格式填充内容。
S511、通过消息通道发送聊天消息。
第二应用收到消息后,判断是chatMessage,解析消息内容,刷新聊天界面MessageUI,同时将消息通过消息基础组件转发给设备B,设备B收到消息后判断是chatMessage,刷新聊天界面MessageUI,同时通过HwParallelShareChannel对象的onChatMessageReceive方法转发给对应的视频应用。
S512、解析聊天消息,并显示。
视频应用收到后解析chatMessage,并刷新UI显示聊天消息。
S513、用户快进/快退控制视频播放进度。
S514、封装成控制消息格式。
视频应用封装快进视频消息,通过AppChannelMessage封装,消息内容 mMessageInfo格式由视频应用自定义,可以定义如下格式作为参考:
forward:30s;//快进30s。
S515、通过消息通道发送控制消息。
S516、解析消息,并同步控制视频进度。
在一些实施例中,分享双方在视频播放过程中聊天,由畅连应用提供聊天用户界面,并且可以进行实时语音聊天。示例性的,图6示出了语音聊天的具体操作时序图,设备A与设备B可以示例性的参考上述图2D所示系统架构。图6所示的第一应用可以为视频应用,第二应用可以为畅连应用等即时通信应用。其中,设备A通过畅连应用向设备B分享视频的步骤S601-S605与图5中的步骤S501-505相同,步骤S607-S610与图5中的步骤S506-509相同因此,图6中与图5相同的步骤在此处不再赘述。
S606、设备A的视频应用调用畅连应用提供的API接口,设置显示悬浮聊天窗口。设置显示的过程例如为:
public void showChatUI(true){}。
S611、设备B收到分享的视频,用户点击一起看入口启动视频应用之后,视频应用调用第二应用提供的API接口,设置显示悬浮聊天窗口。具体设置显示的过程同步骤606。
S612、第二应用的FloatMessageUI模块提供悬浮的聊天界面,用户从该界面输入聊天消息,并发送。
S613、经设备A输入的聊天消息经过第二应用的消息基础组件发送到设备B上。
S614、设备B的悬浮聊天界面显示新消息通知,用户可在FloatMessageUI提供的悬浮聊天界面中查看、回复消息等。
S615、用户在设备A的FloatMessageUI模块中打开语音呼叫,发起语音通话请求。请求发起后可显示CallUI,即通话UI,也可以直接刷新FloatMessageUI模块显示通话状态。
S616、语音通话请求通过设备A的音视频通话基础组件发送给设备B。
S617、设备B显示呼叫/来电通知。
S618、用户在设备B端应答请求后,音视频通话组件建立语音频道,双方进入同一个语音频道,从而建立语音通话连接,进行实时通话。用户可通过CallUI进行挂断。
在一种可能的实施方式中,一起看视频时进行语音通话功能,可以在悬浮聊天界面发起,也可以在分享视频时直接发起,即在调用协同分享API时,在ShareInfo中指定是否启动语音通话;如果是,则同时启动语音呼叫和悬浮UI,并将标志发送到对方,对方解析该标志后,同步显示悬浮来电UI。
上述视频分享的实施例通过第二应用提供API接口,支持所有第一应用使用该消息通道构建自己的即时通信能力。通过该即时消息通道,第一应用允许用户发送聊天信息,实现自身的即时聊天功能。第一应用也可以通过该消息通道发 送自己的业务信息,比如视频进度信息实现同步一起看视频,将业务信息按照一定的格式封装后通过消息通道发送,并由接收方的第一应用接收并解析成业务信息。而且,该消息通道支持发送文字、图片、音乐、视频、网页、应用等多种格式。本申请实施例解决了现有的移动设备端侧只能通过消息分享视频连接,分享后不能获得即时通信的能力,不能邀请好友一起看视频,不能全屏看视频过程中聊天等问题。
以第一应用为购物应用,第二应用为畅连应用,在购物应用中通过畅连应用分享商品链接为例,介绍本申请相关技术中内容分享的过程。
图7A示例性示出了智能手机等电子设备显示的购物应用的用户界面710。购物应用是智能手机、平板电脑等移动设备上的一款或多款为用户提供网上购买商品的应用程序,又可以被称为“购物软件”、“网购类应用”、“商城类应用”。用户通过购物应用能够查找、浏览或者购买应用内提供的商品。购物应用既可以是设备出厂自带的购物应用,例如图7A所示的华为商城,也可以是第三方发布、需要用户下载安装的购物应用,例如京东、淘宝、天猫、1号店等。
如图7A所示,该视频应用的用户界面710中包括有设备A正在浏览的商品图片711、商品名称712、商品价格713、分享按钮714、收藏按钮715、加入购物车按钮716、立即购买按钮717、商品优惠718和购物车按钮719。该商品图片711可以有一张或多张,也可以包括商品介绍视频。商品名称712用于显示商品品牌、类别、功能等,例如“华为手环4Pro炫彩表盘NFC智能刷卡...”。商品价格713可用于标识商品的售卖价格。其中,分享按钮714可用于触发打开商品分享界面。收藏按钮715用于触发将该商品加入个人收藏的功能。加入购物车按钮716可用于触发将该商品加入当前用户的购物车中。立即购买按钮717可用于触发立即购买该商品的操作。商品优惠718可用于显示该商品当前或以后的优惠活动,例如“第二件半价”。购物车按钮719可用于触发进入用户的购物车界面。
设备A可以接收用户针对图7A中分享按钮714的输入操作(例如单击),响应于该输入操作,设备A可以显示如图7B所示的商品分享界面720。
如图7B所示,该商品分享界面720中包括有分享卡片721、新浪微博按钮722、微信按钮723、朋友圈按钮724、畅连按钮725、复制链接按钮726、更多按钮727和取消按钮728。该分享卡片721用于显示可分享的多个按钮和取消按钮。新浪微博按钮722可用于触发打开新浪微博分享界面。微信按钮723可用于触发打开微信分享界面。朋友圈按钮724可用于触发微信朋友圈发布界面。畅连按钮725可用于触发打开畅连应用的分享界面,畅连应用即前述第二应用。复制链接按钮726可用于将视频链接复制到剪贴板。更多按钮727可用于触发打开更多与分享相关的功能。取消按钮728可用于取消本次分享。
设备A可以接收用户针对图7B中畅连按钮725的输入操作(例如单击),响应于该输入操作,设备A可以显示如图7C所示的畅连分享界面730。
如图7C所示,该畅连分享界面730包括搜索按钮731和联系人列表732。搜索按钮331可用于快速查找畅连应用中的联系人。联系人列表732包括设备A的畅连 应用中的联系人,每个联系人包括联系人头像和昵称,例如,用户B头像按钮733,用户B的昵称按钮734。
设备A可以接收用户针对图7C中用户B的头像按钮733或昵称按钮734的输入操作(例如单击),响应于该输入操作,用户B收到用户A分享的商品链接。用户B在设备B上打开畅连应用,选择用户A,可以显示如图7D所示的畅连聊天界面740。
如图7D所示,该畅连聊天界面740包括用户B头像按钮741、用户A头像按钮742、商品链接卡片743、通话按钮744、畅连按钮745、更多按钮746、和语音输入按钮747。用户B头像按钮741和用户A头像按钮742可用于触发打开用户信息。商品链接卡片743可用于触发打开分享的商品链接。通话按钮744可用于触发开启与用户A的通话界面。畅连按钮745可用于触发开启畅连应用提供的语音聊天或视频聊天功能。更多按钮746可用于触发打开更多与畅连应用相关的功能。语音输入按钮747可用于触发开启输入语音消息。
可选地,设备A创建购物应用与第二应用的后台消息通道之后,将通道建立的消息通过消息基础组件发送至设备B的第二应用。设备B的第二应用收到该通道建立的消息,由MessageUI模块刷新消息卡片,显示协同分享的入口,参见图7E的商品链接卡片753。
如图7E所示,商品链接卡片753可以显示标识751。标识751用于提示用户点击当前的商品链接卡片将进入“协同购物”。可以理解的是,标识751也可以以控件的形式显示在商品链接卡片753附近,本申请对协同分享入口的具体显示位置和结构不做限制。
设备B可以接收用户针对图7E中商品链接卡片753的输入操作(例如单击),响应于该输入操作,设备B的畅连应用自动拉起购物应用,打开如图7F所示的商品浏览界面760。
如图7F所示,该商品浏览界面760包括有畅连按钮761、消息输入框控件762,以及与图7A类似的商品信息。畅连按钮761用于触发开启畅连应用提供的语音聊天或视频聊天功能。消息输入框控件762可用于触发打开消息输入界面。示例性的,用户B点击或长按畅连按钮,出现视频通话、语音通话选项。用户选择语音通话选项之后,设备A将提示用户B邀请你进行语音通话,并提供“接听”和“挂断”选项。用户A选择“接听”后,设备A和设备B建立语音通话连接。
设备B打开如图7F所示的商品浏览界面760之后,设备B向设备A发送指示用户B已进入聊天室的消息,设备A接收到该消息后在界面710显示消息通知。
如图7G所示,设备A的界面710显示消息通知771,例如,通知内的消息内容为“用户B已进入协同购物”。并且,界面710上也包括有畅连按钮和消息输入框控件,其功能与图7F所示的按钮、控件功能相同,此处不再赘述。
可选地,用户A和用户B通过消息输入框控件进行消息输入聊天,或者通过畅连按钮触发的实时语音聊天,确认都购买该商品,用户A和用户B分别将图7A所示的商品加入购物车后,手机A显示如图7H所示的购物车界面。
如图7H所示,手机A中购物应用显示的购物车包括全部购物车界面380、我的购物车界面381和B的购物车界面382。用户点击界面中的图标“全部”、“我的”或“B的购物车”,从而切换所显示的购物车界面,在被选中的图标下划线以标识所显示的购物车界面。例如,全部购物车界面380包括“全部”图标383、“我的”图标784和“B的购物车”图标785,“全部”图标383标识有下划线,以提示用户当前显示的是用户A和用户B购物车内全部商品。相应地,我的购物车界面381内当前显示的是用户A购物车内的商品,例如,1件手环、1件手机和1件游戏手柄。B的购物车界面382内显示的是用户B购物车内的商品,例如,1件手环。
相应地,手机B购物应用显示的购物车包括全部购物车界面、我的购物车界面和A的购物车界面,我的购物车内是用户B购物车内的商品,A的购物车内是用户A购物车内的商品,全部购物车内是用户A购物车内的商品与用户B购物车内的商品的总和。
示例性地,用户A选择全部购物车界面780内的2件华为手环,全部购物车界面780相应刷新页面下方的“合计”金额。用户点击“去结算”按钮,支付成功后将显示如图7J所示的订单支付成功页面。如图7K所示,设备B的用户界面显示消息通知“用户A已帮您购买了商品XXX”,可选的,当收到该消息通知后,设备B中的购物应用可以清空购物车中刚才加入的手环,并且显示提示信息“你的购物车是空的”。
可选地,华为商城提供满99元包邮服务,用户A购买手环已满99元可以包邮,用户B不想买用户A分享的手环,希望购买39元的游戏手柄,无法享受包邮服务。于是,用户A和用户B通过消息输入框控件进行消息输入聊天,或者通过畅连按钮触发的实时语音聊天,用户A选择手环加入购物车,用户B选择游戏手柄加入购物车,手机A显示如图7I所示的购物车界面。
如图7I所示,手机A中购物应用显示的购物车包括全部购物车界面390、我的购物车界面391和B的购物车界面392。用户点击界面中的图标“全部”、“我的”或“B的购物车”,从而切换所显示的购物车界面,在被选中的图标有下划线以标识所显示的购物车界面。购物车界面390-392分别包括“全部”图标、“我的”图标和“B的购物车”图标。全部购物车界面390显示的是用户A和用户B购物车内全部商品,例如,1件手环和1件游戏手柄。相应地,我的购物车界面391内当前显示的是用户A购物车内的商品,例如,1件手环。B的购物车界面392内显示的是用户B购物车内的商品,例如,1件游戏手柄。按照用户A和用户B协商的结果,用户A选择购物车界面790内的手环和游戏手柄,购物车界面相应刷新页面下方的“合计”金额,由用户A进行结算。
在一些实施例中,当用户B点击商品链接卡片753打开购物应用中的商品浏览界面之后,用户B可以继续浏览第二商品,并将第二商品链接分享给用户A。
示例性的,设备B接收用户针对图7E中商品链接卡片753的输入操作(例如单击),响应于该输入操作,设备B的畅连应用自动拉起购物应用,打开如图7F 所示的商品浏览界面760。用户B可以继续浏览其他商品,打开如图8A所示的商品浏览界面810。商品浏览界面810中包括有用户正在浏览的商品图片811、商品名称812、商品价格813和分享按钮814等。该商品图片811可以有一张或多张,也可以包括商品介绍视频。商品名称812用于显示商品品牌、类别、功能等,例如“游戏手柄(红色)(DESIGN FOR HUAWEI认证)”。商品价格813可用于标识商品的售卖价格,例如人民币39元。其中,分享按钮814可用于触发打开如图8B所示的商品分享界面820。
如图8B所示,该商品分享界面中包括有分享卡片821、新浪微博按钮、微信按钮、朋友圈按钮、畅连按钮、复制链接按钮822、更多按钮和取消按钮。该分享卡片821用于显示可分享的多个按钮和取消按钮。复制链接按钮822可用于将视频链接复制到剪贴板。其余按钮与图7B所示的按钮功能相同,此处不再赘述。用户B点击复制链接按钮822,并选择将点击粘贴至消息输入框控件823中,将商品链接发送给用户A。
如图8C所示,用户A收到第二商品链接后,在第一商品的浏览界面830上显示用户B的头像或昵称,及其发来的第二商品链接831。用户点击第二商品链接831,进入图8D所示的第二商品浏览界面840,界面呈现与图8A所示相同的商品图片811、商品名称812和商品价格813等。
下面结合分享商品的应用场景,介绍具体的操作时序图。
请参见图9,图9示出了一种商品分享的操作时序图。其中,该方法流程图中涉及的设备包括有设备A和与设备A交互的设备B。其中,设备A与设备B之间通过图1所示的通信网络进行交互,设备A与设备B可以示例性的参考上述图2C-2D所示的软件系统架构。
如图9所示,该方法包括:
S901、协同分享模式分享商品链接。
示例性的,所述待分享的内容为购物应用内的商品对象。设备A可以接收用户分享所述内容的输入操作(例如单击分享按钮),响应于所述输入操作,设备A显示内容分享界面,其中,该内容分享界面可以参考上述图7B所示的商品分享界面720。该内容分享界面可以显示第二应用的图标和名称。例如,如上述图7B所示,第二应用图标显示为畅连按钮725,第二应用的名称可以为畅连。
在一种可能的实现方式中,也可以点击图7B所示的商品分享界面720内的复制链接按钮726,将商品链接复制到剪贴板。然后,打开畅连应用,选择用户B,将商品链接粘贴发送给用户A。
所述购物应用程序通过集成的开放SDK,调用协同分享API。通过调用协同分享API,购物应用将填充好的目标场景(targetScene)、分享内容信息(HwCaasShareInfo)、协同分享通道(HwParallelShareChannel)发送给第二应用。
S902、发送商品链接信息。
设备A内第二应用的MessageService组件收到购物应用的分享调用后,解析消息内容,通过mParallelShare字段判断是否为协同分享模式。同时,将分享 内容信息(HwCaasShareInfo)中的其他消息内容封装成卡片,在MessageUI模块的聊天窗中展示卡片。第二应用通过消息基础组件将消息发送给设备B。设备B收到上述消息后,可以在第二应用中显示卡片,例如,图7D所示的商品链接卡片743。
S903、创建消息通道。
如果设备A的第二应用判断为协同分享模式,则创建设备A内的第二应用与购物应用的跨进程消息通道。
S904、消息通道创建成功。
设备A内的第二应用与购物应用的跨进程消息通道建立完成之后,第二应用通过消息基础组件向设备B的第二应用发送通道建立消息。
S905、商品链接信息显示协同购物入口。
设备B的第二应用收到通道建立消息,MessageUI模块刷新消息卡片,显示协同分享入口。例如,图7E所示的协同购物控件751。
S906、用户选择协同购物。
示例性的,用户点击协同购物入口,设备B的MessageUI模块通过mAppUrl信息自动打开对应的购物应用。
S907、获取用户B在第二应用内的用户名、头像等信息。
示例性的,购物应用启动后,解析出mParallelShare和mExtraInfo。
首先判断是否为协同分享模式,如果是,则通过开放SDK的API设置对象HwParallelShareChannel到第二应用,第二应用通过HwParallelShareChannel对象建立第二应用和购物应用的消息通道,并记录与聊天窗threadID对应关系。
其次,解析mExtraInfo中的信息,该信息由设备A的购物应用填充、设备B的购物应用解析,该信息的格式内容由购物应用定义。
S908、通过消息通道发送进入房间的消息。
设备B通过协同分享通道(HwParallelShareChannel)对象的sendAppMessage方法发送进入房间的消息。消息内容mMessageInfo格式由购物应用自定义,可以定义如下格式作为参考:JoinRoom:1。所述消息发送到第二应用的MessageService组件,MessageService组件判断是应用消息(AppMessage),通过消息基础组件转发给设备A。设备A的第二应用收到消息后判断是AppMessage,通过协同分享通道(HwParallelShareChannel)的onAppMessageReceive转发给对应的购物应用;
S909、提示用户B进入。
设备A的购物应用收到消息后,解析mMessageInfo为进入房间消息,刷新商品浏览界面,提醒xx用户进入协同购物。例如,图7G中所示的消息通知771。
S910、用户将商品加入购物车。
S911、封装购物车信息成固定格式消息。
S912、通过消息通道发送该消息
设备A的第二应用收到消息后,判断是AppMessage,将消息通过消息基础 组件转发给设备B,设备B的第二应用收到消息后判断是AppMessage,通过HwParallelShareChannel对象的onAppMessageReceive方法转发给对应的购物应用。
S913、解析消息成购物车信息,并刷新购物车。
设备B的购物应用收到后解析AppMessage,并刷新购物车。
上述购物分享的实施例通过第二应用提供API接口,支持购物应用使用该消息通道构建自己的即时通信能力。通过该即时消息通道,购物应用允许用户发送聊天信息,实现自身的即时聊天功能。购物应用也可以通过该消息通道发送自己的业务信息,比如购物车信息。将业务信息按照一定的格式封装后通过消息通道发送,并由接收方的购物应用接收并解析成业务信息。从而实现了分享购物商品连接后,可以通过后台消息通道发送接收好友已经加入购物车的商品,共享同一个购物车,实现一起购物、拼单的场景。
以第一应用为地图应用,第二应用为畅连应用,在地图应用中通过畅连应用分享导航信息为例,介绍本申请相关技术中内容分享的过程。
用户A、用户B、和用户C组队出行,前往目的地“八达岭长城”。用户A在手机A畅连应用的群内分享地图应用提供的导航信息。
示例性地,图10A示出了手机A显示的畅连应用的群聊界面1001。用户通过畅连应用可以与好友分享文字、图片以及贴图,并支持分组聊天和语音、视讯对讲功能、广播(一对多)消息、照片/视讯共享、位置共享、消息交流联系、游戏等服务。
该畅连应用的群聊界面1001中包括群组名称1002、用户A头像按钮1003、用户B头像按钮1004、用户C头像按钮1005、导航信息卡片1006、通话按钮、畅连按钮、更多按钮、语音输入按钮、地图应用链接1007、和协同导航入口1008。可选地,界面1001还可以包括HiCar导航入口1009。群组名称1002可用于标识群组的名称,例如图10A所示的“相亲相爱一家人”。用户A头像按钮1003、用户B头像按钮1004、用户C头像按钮1005可用于触发打开用户信息、标示聊天信息的来源。导航信息卡片1006可用于显示用户在群组内分享的导航信息,该导航信息包括导航目的地、导航路线图以及导航软件等。地图应用链接1007可用于触发开启地图应用以便用户查看详细的导航信息。协同导航入口1008可用于群组内用户选择协同导航模式,例如图10A所示的“一起走”图标。HiCar导航为华为开发的用于车载导航的地图类应用。HiCar导航入口1009可用于触发在车载显示屏上显示导航界面。
可选地,用户A点击手机A的地图应用链接1007,接收用户针对图10A中地图应用链接1007的输入操作(例如单击),响应于该输入操作,手机A可以显示如图10B所示的地图导航界面1010。
地图导航界面1010中包括起始车速1011、终点1012、导航路线图1013、景区介绍按钮1014、退出按钮1015、导航里程时间信息1016、退出全览按钮1017以及更多按钮1018。该起始车速1011可用于表示在起始地点时的车速为0km/h,用户 准备驾驶车辆出发。终点1012可用于显示导航目的地,例如图10A所示可以以“终”标识。导航路线图1013可用于指示从起始地点至目的地的完整路线,并在地图上按照比例尺等比显示。景区介绍按钮1014可用于触发观看介绍目的地为景区的视频。退出按钮1015可用于触发关闭本次导航。导航里程时间信息1016可用于显示本次导航剩余里程、预计行驶时间、抵达目的地时间等。退出全览按钮1017可用于切换地图显示模式,由当前显示导航完整路线图切换为其他地图显示模式。更多按钮1018可用于触发打开更多与导航相关的功能。
如果用户B点击手机B畅连应用内的“一起走”图标,手机B可以显示如图10C所示的地图导航界面1030。相应地,用户A、用户C点击各自手机畅连应用内的“一起走”图标,手机A/C也可以显示类似图10C所示的地图导航界面。
地图导航界面1030相对于图10B的导航界面,增加了手机A的位置信息1031、手机B的位置信息1032、手机C的位置信息1033。每个设备的位置信息可显示用户的头像或昵称,以及当前所处的位置。例如图10C所示,手机C的位置信息1033指示出用户C在导航至八达岭长城景区的路线图上所处的位置,并显示用户C的头像标识。地图导航界面1030还显示语音输入消息控件1035、文字输入消息控件1036和畅连按钮1037。用户可以通过语音输入消息控件1035输入语音消息,如用户B输入语音消息“前方有个服务区,到那儿休息一下。”。用户A在手机A显示的导航界面上,点击对应的文字输入消息控件,输入文字消息“好哒”。用户C在手机C显示的导航界面上,点击对应的语音输入消息控件,输入语音消息“ok”。可选地,用户A、用户B和用户C均在开车中,也可以点击畅连按钮开启语音通话,进行实时语音通话。
分享导航信息的设备内部实现可以是,手机A的地图应用通过畅连应用提供的协同分享API,给群组内用户分享导航信息,选择协同分享模式,并在mExtraInfo中携带当前导航的目的地、路线图等信息。手机A的畅连应用收到上述导航信息后建立到地图应用的消息通道。手机B的用户选择一起去,会启动手机B的地图应用,同时建立地图应用到畅连应用的消息通道。手机B的地图应用启动后,解析mExtraInfo中的导航信息,开始导航。同时,手机B通过消息通道给手机A实时发送位置信息(sendAppMessage)。手机A收到手机B/C的位置信息(onAppMessageReceive),绘制手机B/C用户的头像和位置,实时刷新地图。同时,手机A通过消息通道实时发送位置信息给手机B/C。
在一些实施例中,如果手机B没有安装地图应用,可通过UI界面提示用户,是否允许畅连应用获取位置并同步位置给其他用户,获取用户同意后,可由畅连应用获取当前位置,发送给对方,并提供地图UI实时刷新位置。
示例性的,如图10D所示,手机B显示畅连应用的群聊界面1040。接收用户针对图10D中协同导航入口1008的输入操作(例如单击),响应于该输入操作,手机B的畅连应用未能找到所述地图应用,将弹出如图10E所示的提示卡片1041。提示卡片1041包括提示信息“未安装百度地图应用,请选择”、确定按钮1042、取消按钮1043、控件1044和控件1045。控件1044可用于显示下载百度地图的选项, 用户选择该选项后点击确定按钮1042将进入下载百度地图的界面。控件1045可用于显示在小程序中打开百度地图,用户选择该选项后点击确定按钮1042将开启百度地图小程序。
用户点击取消按钮1043,则界面上显示提示卡片1051。提示卡片1051包括有提醒信息“是否允许畅连应用获取当前位置信息并同步给其他用户?”、按钮1052和按钮1053。按钮1052可用于授权畅连应用调用手机B的GPS地理位置定位接口,并且将获取的地理位置信息发送给其他用户,例如图10E中标识的“是”。反之,按钮1053可用于不允许畅连应用调用手机B的GPS地理位置定位接口以及给其他用户发送地理位置信息,例如图10E中标识的“否”。用户点击按钮1052,如图10E的“是”,则手机B的畅连应用调用GPS地理位置定位接口,获取手机当前地理位置信息,并自动将给信息发送给手机A/C的畅连应用,手机A/C的畅连应用将收到的该信息提供给地图应用,以供地图导航界面刷新用户B的实时位置,将位置显示为如图10C所示的手机B的位置信息1032。
在一种可能的实现方式中,由于手机B并未开启地图应用进行导航,因此手机B仍然显示畅连应用界面。在手机A和手机C使用地图应用进行导航时,用户A和用户C语音输入消息控件、文字输入消息控件输入的消息可以显示在手机B的畅连应用界面内。如图10G所示,用户A输入“前方服务区休息”,用户B能够在手机B的畅连应用界面1060内查看对应于用户A头像1061的文字消息“前方服务区休息”。
上述协同导航的实施例通过第二应用提供API接口,支持地图应用使用该消息通道构建自身的即时通信能力。通过一次分享实现多个好友的协同导航功能,分享导航信息后,可以与其他用户一起导航,共享导航信息并实时同步多个用户的位置。同时,如果在分享导航信息时直接发起语音呼叫,即调用协同分享API时在ShareInfo中指定启动语音通话,则可以同时启动语音呼叫和悬浮用户界面,并将通话标志发送到对方,对方解析该标志后,同步显示悬浮来电UI。以上设计可实现边导航边语音。
以上分享导航信息的操作时序图与商品分享的操作时序图类似,将设备的地理位置信息封装为固定格式消息发送给对端设备即可。
下面介绍本发明实施例提供的一种即时通信方法的流程。
参见图11,图11示出了一种即时通信方法流程图。其中,该方法应用于具有显示屏的第一电子设备和第二电子设备。第一电子设备和第二电子设备可以为图2A所示的通信系统200中的电子设备,通过通信网络进行互联。第一电子设备和第二电子设备的硬件结构可以为图2B所示的电子设备100,软件系统架构可以为图2C或图2D所示的设备A和设备B的软件结构。
如图11所示,该方法包括:
1101、所述第一电子设备显示第一应用的第一界面,所述第一界面包括第一选项;
示例性的,第一电子设备为手机A。如图3A所示,第一应用为视频应用, 第一界面为手机A显示的视频应用的用户界面310,第一选项为分享按钮314。
示例性的,如图7A所示,第一应用为购物应用,第一界面为手机A显示购物应用的用户界面710,第一选项为分享按钮714。
1102、响应于对所述第一选项的操作,所述第一电子设备通过第二应用向所述第二电子设备发送第一内容的链接,其中,所述第一内容为所述第一应用提供的内容;
示例性的,如图3B-3C所示,第二应用为畅连应用,第一内容为视频应用提供的视频内容311,手机A通过畅连应用向用户B发送视频内容311的链接。
示例性的,如图7B-7C所示,第二应用为畅连应用,第一内容为购物应用提供的商品图片711所示的商品,手机A通过畅连应用向用户B发送该商品的链接。
在一种可能的实现方式中,响应于对所述第一选项的操作,所述第一电子设备通过第二应用向所述第二电子设备发送第一内容的链接包括:响应于对所述第一选项的操作,所述第一电子设备打开所述第二应用的第四界面,所述第四界面包括第二用户标识,所述第二用户标识用于标识操作所述第二电子设备的用户;响应于对所述第二用户标识的操作,所述第一电子设备向所述第二电子设备发送第一内容的链接。示例性的,第四界面为手机A畅连应用的界面332,第二用户标识为用户B头像按钮333和用户B的昵称按钮334,点击用户B头像按钮333或用户B的昵称按钮334,手机A向手机B发送视频内容311的链接。
1103、所述第二电子设备显示第三应用的第一对话界面,所述第一对话界面包括第一用户标识和第二选项,所述第二选项与所述第一内容的链接关联,所述第一用户标识用于标识操作所述第一电子设备的用户,所述第三应用对应于所述第二应用;
示例性的,第二电子设备为手机B。如图3D所示,第三应用为畅连应用,第一对话界面为手机A显示的视频应用的畅连聊天界面340。第一用户标识为用户A的头像按钮342,用户A即操作手机A的用户。第二选项为播放按钮348,该播放按钮用于播放视频链接卡片343提供的视频内容311。
其中,第三应用和第二应用是两个电子设备上安装的同一个应用,例如,第三应用是手机B上安装的畅连应用,第二应用为手机A上安装的畅连应用,手机B安装的畅连应用和手机A上安装的畅连应用可能存在版本上的不同。或者,第一电子设备为手机,第二电子设备为平板,第三应用和第二应用是同一应用针对手机或平板开放的不同版本应用。
在一种可能的实现方式中,所述第二选项与所述第一内容的链接关联包括:所述第二选项是包括所述第一内容链接的卡片或控件。示例性的,如图3D所示的视频链接卡片343或播放按钮348,或者如图3E-1所示的控件351。又如,图7E所示的商品链接卡片753,或者图10A所示的导航信息卡片1006或协同导航入口1008。
1104、响应于对所述第二选项的操作,所述第二电子设备显示第四应用的第 二界面,所述第二界面包括所述第一内容和第三选项,所述第四应用对应于所述第一应用;
示例性的,如图3F所示,第四应用为视频应用,第二界面为手机B显示视频应用的视频播放界面360,第一内容为视频应用提供的视频内容311,第三选项为畅连按钮364、语音输入按钮367、消息输入框控件365中任何一项、两项或三项。
示例性的,第二电子设备为手机B或手机C。如图10C所示,第四应用为地图应用,第二界面为手机B或手机C显示的地图应用的地图导航界面1030,第一内容为地图应用提供的导航信息,第三选项为畅连按钮1037、语音输入消息控件1035、文字输入消息控件1036中任何一项、两项或三项。
其中,第四应用和第一应用是两个电子设备上安装的同一个应用,例如,第四应用是手机B上安装的华为视频应用,第一应用为手机A上安装的华为视频应用,手机B安装的华为视频应用和手机A上安装的华为视频应用可能存在版本上的不同。或者,第一电子设备为手机,第二电子设备为平板,第四应用和第一应用是同一应用针对手机或平板开放的不同版本应用。
在一种可能的实现方式中,所述第一应用为视频应用或音频应用,所述第一内容为视频或音频;在响应于对所述第一选项的操作,所述第一电子设备通过所述第二应用向所述第二电子设备发送所述第一内容的链接时,所述视频或音频的播放时间为第一时间;在响应于对所述第二选项的操作,所述第二电子设备显示所述第四应用的所述第二界面时,所述视频或音频的播放时间为第二时间;所述第一时间与所述第二时间相同。示例性的,视频应用为华为视频。如图3B所示,手机A通过畅连应用向手机B发送视频内容311时视频内容311播放至20分00秒(即第一时间)。参见图3F,手机B显示华为视频的视频播放界面360时,视频内容也播放至20分00秒(即第二时间,第二时间与第一时间相同)。
在一种可能的实现方式中,所述第一电子设备显示所述第一应用的第五界面,所述第五界面包括所述第一内容,所述第一内容的播放时间为第三时间,其中,所述第三时间与所述第一时间不同;所述第二电子设备显示所述第四应用的第六界面,所述第六界面包括所述第一内容,所述第一内容的播放时间为第四时间,其中,所述第四时间与所述第三时间相同。示例性的,视频应用为华为视频。如图3L所示,手机A显示华为视频应用的视频播放界面394,此时视频已由用户快退至18分30秒(即第三时间,第三时间与第一时间不同)。参见图3M,手机B显示华为视频的视频播放界面时,视频内容也已退至18分30秒(即第四时间,第四时间与第三时间相同)。
在一种可能的实现方式中,所述第一应用为购物应用,所述第一内容为商品,所述第二界面还包括第四选项;响应于对所述第四选项的操作,所述第二电子设备在所述第四应用中显示第一购物车和第二购物车,其中,所述第一购物车对应于所述第一用户,所述第二购物车对应于第二用户,所述第一用户与所述第二用户不同。示例性地,第一应用为购物应用,例如华为商城,第一内容为商品,例 如华为手环。用户A和用户B分别将图7A所示的商品加入购物车后,手机A显示如图7H所示的购物车界面,如图7H所示,手机A中购物应用显示的购物车包括全部购物车界面380、我的购物车界面381和B的购物车界面382。我的购物车(即第一购物车)对应于用户A,B的购物车(即第二购物车)对应于用户B。
在一种可能的实现方式中,响应于对所述第四选项的操作,所述第二电子设备在所述第四应用中显示第一购物车和第二购物车包括:所述第二电子设备在所述第四应用中还显示第三购物车,所述第三购物车内的商品为所述第一购物车内商品和所述第二购物车内商品的总和。示例性地,如图7I所示,全部购物车(即第三购物车)内商品为用户A的购物车(即第一购物车)商品和用户B的购物车(即第二购物车)商品的总和。
在一种可能的实现方式中,所述第一应用为地图应用,所述第一内容为导航信息;所述第四应用的所述第二界面还包括所述第一用户标识和第二用户标识,所述第二用户标识用于标识操作所述第二电子设备的用户,所述第一用户标识还用于指示所述第一电子设备的地理位置,所述第二用户标识还用于指示所述第二电子设备的地理位置。示例性的,如图10C所示的地图导航界面1030,包括用户A的头像和用户B的头像,分别指示手机A的位置信息1031、手机B的位置信息1032。
1105、响应于对所述第三选项的操作,所述第二电子设备通过所述第三应用发送第一消息给所述第一电子设备;
示例性的,如图3I所示,用户对消息输入框控件365的点击操作,在图3J所示的消息输入界面390输入消息“回放看看进球”,点击发送,手机B通过畅连应用将该消息(即第一消息)发送给手机A。参见图3K,手机A的视频播放界面393上显示该消息。
在一种可能的实现方式中,所述第一消息为文字消息、语音消息、语音通话请求或视频通话请求。示例性的,如图4E所示,手机A收到的第一消息为语音通话请求。
1106、所述第一电子设备显示所述第一应用的第三界面,所述第三界面包括提示信息,所述提示信息用于提示第二用户已进入;
示例性的,手机A显示视频应用的视频播放界面370,如图3G所示,界面上包括“用户B已进入放映厅”的消息提示371。
在一种可能的实现方式中,所述第三界面还包括第二用户标识和所述第一消息,所述第二用户标识用于标识所述第二用户,所述第二用户是操作所述第二电子设备的用户。示例性的,手机A显示视频应用的语音通话界面440,如图4E所示,界面上包括用户B的头像441,以及手机B发送的语音通话请求。
通过本申请提供一种即时通信方法,第一电子设备通过第二应用将第一应用提供的第一内容链接发送给第二电子设备,第二电子设备能够在与第二应用对应的第三应用中显示与第一内容链接关联的第二选项,然后,响应于对第二选项的操作,第二电子设备能够在与第一应用对应的第四应用内显示第一内容和第三选 项。接着,响应于对第三选项的操作,第二电子设备通过第三应用发送第一消息给第一电子设备。这样,用户可以在接收到分享内容之后,能够在显示第一内容的界面与分享内容的用户进行即时通信,而无需再返回即时通信应用的界面,给用户提供了方便。
可以理解的是,为了实现上述功能,电子设备包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的算法步骤,本发明能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。
本发明实施例可以根据上述方法示例对电子设备进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。需要说明的是,本发明实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
本发明实施例公开了一种电子设备,包括处理器,以及与处理器相连的存储器、输入设备和输出设备。其中,输入设备和输出设备可集成为一个设备,例如,可将触摸传感器作为输入设备,将显示屏作为输出设备,并将触摸传感器和显示屏集成为触摸屏。
此时,如图12所示,上述电子设备可以包括:触摸屏1201,所述触摸屏1201包括触摸传感器1206和显示屏1207;一个或多个处理器1202;一个或多个摄像头1208;存储器1203;一个或多个应用程序(未示出);以及一个或多个计算机程序1204,上述各器件可以通过一个或多个通信总线1205连接。其中该一个或多个计算机程序1204被存储在上述存储器1203中并被配置为被该一个或多个处理器1202执行,该一个或多个计算机程序1204包括指令,上述指令可以用于执行上述实施例中的各个步骤。其中,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应实体器件的功能描述,在此不再赘述。
示例性的,上述处理器1202具体可以为图1所示的处理器110,上述存储器1203具体可以为图1所示的内部存储器116和/或外部存储器120,上述摄像头1208具体可以为图2B所示的摄像头193,上述显示屏1207具体可以为图1所示的显示屏194,上述触摸传感器1206具体可以为图1所示的传感器模块180中的触摸传感器180K,本发明实施例对此不做任何限制。
本发明实施例还提供一种计算机存储介质,该计算机存储介质中存储有计算机指令,当该计算机指令在电子设备上运行时,该电子设备执行上述相关方法步骤实现上述实施例中的方法。
本发明实施例还提供了一种计算机程序产品,当该计算机程序产品在计算机上运行时,使得计算机执行上述相关方法步骤,以实现上述实施例中的方法。
另外,本发明的实施例还提供一种装置,这个装置具体可以是芯片,组件或 模块,该装置可包括相连的处理器和存储器;其中,存储器用于存储计算机执行指令,当装置运行时,处理器可执行存储器存储的计算机执行指令,以使芯片执行上述各方法实施例中的拍摄方法。
其中,本发明实施例提供的电子设备、计算机存储介质、计算机程序产品或芯片均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。
通过以上实施方式的描述,所属领域的技术人员可以了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。
在本发明所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是一个物理单元或多个物理单元,即可以位于一个地方,或者也可以分布到多个不同地方。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个可读取存储介质中。基于这样的理解,本发明实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该软件产品存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本发明各个实施例方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上内容,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以权利要求的保护范围为准。

Claims (22)

  1. 一种通信系统,包括第一电子设备和第二电子设备,其特征在于:
    所述第一电子设备显示第一应用的第一界面,所述第一界面包括第一选项;
    响应于对所述第一选项的操作,所述第一电子设备通过第二应用向所述第二电子设备发送第一内容的链接,其中,所述第一内容为所述第一应用提供的内容;
    所述第二电子设备显示第三应用的第一对话界面,所述第一对话界面包括第一用户标识和第二选项,所述第二选项与所述第一内容的链接关联,所述第一用户标识用于标识操作所述第一电子设备的用户,所述第三应用对应于所述第二应用;
    响应于对所述第二选项的操作,所述第二电子设备显示第四应用的第二界面,所述第二界面包括所述第一内容和第三选项,所述第四应用对应于所述第一应用;
    响应于对所述第三选项的操作,所述第二电子设备通过所述第三应用发送第一消息给所述第一电子设备。
  2. 如权利要求1所述的通信系统,其特征在于,所述第一电子设备显示所述第一应用的第三界面,所述第三界面包括提示信息,所述提示信息用于提示第二用户已进入。
  3. 如权利要求2所述的通信系统,其特征在于,其中,所述第三界面还包括第二用户标识和所述第一消息,所述第二用户标识用于标识所述第二用户,所述第二用户是操作所述第二电子设备的用户。
  4. 如权利要求1所述的通信系统,其特征在于,其中,所述第一消息为文字消息、语音消息、语音通话请求或视频通话请求。
  5. 如权利要求1所述的通信系统,其特征在于,响应于对所述第一选项的操作,所述第一电子设备通过第二应用向所述第二电子设备发送第一内容的链接包括:
    响应于对所述第一选项的操作,所述第一电子设备打开所述第二应用的第四界面,所述第四界面包括第二用户标识,所述第二用户标识用于标识操作所述第二电子设备的用户;
    响应于对所述第二用户标识的操作,所述第一电子设备向所述第二电子设备发送第一内容的链接。
  6. 如权利要求1所述的通信系统,其特征在于,所述第二选项与所述第一内容的链接关联包括:所述第二选项是包括所述第一内容链接的卡片或控件。
  7. 如权利要求1所述的通信系统,其特征在于,其中,所述第一应用为视频应用或音频应用,所述第一内容为视频或音频;
    在响应于对所述第一选项的操作,所述第一电子设备通过所述第二应用向所述第二电子设备发送所述第一内容的链接时,所述视频或音频的播放时间为第一时间;
    在响应于对所述第二选项的操作,所述第二电子设备显示所述第四应用的所述第二界面时,所述视频或音频的播放时间为第二时间;
    所述第一时间与所述第二时间相同。
  8. 如权利要求7所述的通信系统,其特征在于,
    所述第一电子设备显示所述第一应用的第五界面,所述第五界面包括所述第一内容,所述第一内容的播放时间为第三时间,其中,所述第三时间与所述第一时间不同;
    所述第二电子设备显示所述第四应用的第六界面,所述第六界面包括所述第一内容,所述第一内容的播放时间为第四时间,其中,所述第四时间与所述第三时间相同。
  9. 如权利要求1所述的通信系统,其特征在于,其中,所述第一应用为购物应用,所述第一内容为商品,所述第二界面还包括第四选项;
    响应于对所述第四选项的操作,所述第二电子设备在所述第四应用中显示第一购物车和第二购物车,其中,所述第一购物车对应于所述第一用户,所述第二购物车对应于第二用户,所述第一用户与所述第二用户不同。
  10. 如权利要求9所述的通信系统,其特征在于,响应于对所述第四选项的操作,所述第二电子设备在所述第四应用中显示第一购物车和第二购物车包括:
    所述第二电子设备在所述第四应用中还显示第三购物车,所述第三购物车内的商品为所述第一购物车内商品和所述第二购物车内商品的总和。
  11. 如权利要求1所述的通信系统,其特征在于,其中,所述第一应用为地图应用,所述第一内容为导航信息;所述第四应用的所述第二界面还包括所述第一用户标识和第二用户标识,所述第二用户标识用于标识操作所述第二电子设备的用户,所述第一用户标识还用于指示所述第一电子设备的地理位置,所述第二用户标识还用于指示所述第二电子设备的地理位置。
  12. 一种即时通信方法,应用于具有显示屏的第二电子设备,其特征在于:所述方法包括:
    所述第二电子设备显示第三应用的第一对话界面,所述第一对话界面包括第一用户标识和第二选项,所述第二选项与第一内容的链接关联,所述第一用户标识用于标识操作第一电子设备的用户;
    其中,所述第一内容是第一应用为所述第一电子设备提供的内容,所述第一内容的链接由所述第一电子设备通过第二应用发送至所述第二电子设备,所述第三应用对应于所述第二应用;
    响应于对所述第二选项的操作,所述第二电子设备显示第四应用的第二界面,所述第二界面包括所述第一内容和第三选项,所述第四应用对应于所述第一应用;
    响应于对所述第三选项的操作,所述第二电子设备通过所述第三应用发送第一消息给所述第一电子设备。
  13. 如权利要求12所述的即时通信方法,其特征在于,其中,所述在一种可能的实现方式中,第一消息为文字消息、语音消息、语音通话请求或视频通话请求。
  14. 如权利要求12所述的即时通信方法,其特征在于,所述第二选项与所 述第一内容的链接关联包括:所述第二选项是包括所述第一内容链接的卡片或控件。
  15. 如权利要求12所述的即时通信方法,其特征在于,其中,所述第一应用为视频应用或音频应用,所述第一内容为视频或音频;
    在响应于对所述第一选项的操作,所述第一电子设备通过所述第二应用向所述第二电子设备发送所述第一内容的链接时,所述视频或音频的播放时间为第一时间;
    在响应于对所述第二选项的操作,所述第二电子设备显示所述第四应用的所述第二界面时,所述视频或音频的播放时间为第二时间;
    所述第一时间与所述第二时间相同。
  16. 如权利要求15所述的即时通信方法,其特征在于,
    所述第二电子设备显示所述第四应用的第六界面,所述第六界面包括所述第一内容,所述第一内容的播放时间为第四时间,所述第四时间与第三时间相同;
    其中,所述第三时间为所述第一电子设备显示所述第一应用的第五界面时所述第一内容的播放时间,所述第三时间与所述第一时间不同。
  17. 如权利要求12所述的即时通信方法,其特征在于,其中,所述第一应用为购物应用,所述第一内容为商品,所述第二界面还包括第四选项;
    响应于对所述第四选项的操作,所述第二电子设备在所述第四应用中显示第一购物车和第二购物车,其中,所述第一购物车对应于所述第一用户,所述第二购物车对应于第二用户,所述第一用户与所述第二用户不同。
  18. 如权利要求17所述的即时通信方法,其特征在于,响应于对所述第四选项的操作,所述第二电子设备在所述第四应用中显示第一购物车和第二购物车包括:
    所述第二电子设备在所述第四应用中还显示第三购物车,所述第三购物车内的商品为所述第一购物车内商品和所述第二购物车内商品的总和。
  19. 如权利要求12所述的即时通信方法,其特征在于,其中,所述第一应用为地图应用,所述第一内容为导航信息;所述第四应用的所述第二界面还包括所述第一用户标识和第二用户标识,所述第二用户标识用于标识操作所述第二电子设备的用户,所述第一用户标识还用于指示所述第一电子设备的地理位置,所述第二用户标识还用于指示所述第二电子设备的地理位置。
  20. 一种电子设备,其特征在于,包括:一个或多个处理器;以及存储器,所述存储器中存储有代码;当所述代码被电子设备执行时,使得所述电子设备执行如权利要求12-19任一项所述的即时通信方法。
  21. 一种计算机存储介质,其特征在于,包括计算机指令,当所述计算机指令在电子设备上运行时,使得所述电子设备执行如权利要求12-19任一项所述的即时通信方法。
  22. 一种计算机程序产品,其特征在于,当所述计算机程序产品在计算机上运行时,使得所述计算机执行如权利要求12-19任一项所述的即时通信方法。
PCT/CN2021/095625 2020-05-26 2021-05-25 一种即时通信方法及设备 WO2021238884A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP21814135.6A EP4145776A4 (en) 2020-05-26 2021-05-25 METHOD AND DEVICE FOR INSTANT COMMUNICATION
US17/927,643 US20230308403A1 (en) 2020-05-26 2021-05-25 Instant messaging method and device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010454939.0 2020-05-26
CN202010454939.0A CN113726640A (zh) 2020-05-26 2020-05-26 一种即时通信方法及设备

Publications (1)

Publication Number Publication Date
WO2021238884A1 true WO2021238884A1 (zh) 2021-12-02

Family

ID=74067412

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/095625 WO2021238884A1 (zh) 2020-05-26 2021-05-25 一种即时通信方法及设备

Country Status (4)

Country Link
US (1) US20230308403A1 (zh)
EP (1) EP4145776A4 (zh)
CN (2) CN113726640A (zh)
WO (1) WO2021238884A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114217707A (zh) * 2021-12-14 2022-03-22 北京字跳网络技术有限公司 分享方法、装置、电子设备、存储介质和计算机程序产品
CN114422965A (zh) * 2022-01-14 2022-04-29 Tcl通讯科技(成都)有限公司 信息交互方法、装置、存储介质及电子设备
WO2023142940A1 (zh) * 2022-01-28 2023-08-03 华为技术有限公司 应用组件分享方法及相关设备

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113726640A (zh) * 2020-05-26 2021-11-30 华为技术有限公司 一种即时通信方法及设备
CN112911368A (zh) * 2021-01-15 2021-06-04 北京字跳网络技术有限公司 互动方法、装置、电子设备和存储介质
CN115131547A (zh) * 2021-03-25 2022-09-30 华为技术有限公司 Vr/ar设备截取图像的方法、装置及系统
CN115486088A (zh) * 2021-03-30 2022-12-16 京东方科技集团股份有限公司 信息交互方法、计算机可读存储介质、通信终端
CN115309312A (zh) * 2021-04-21 2022-11-08 花瓣云科技有限公司 一种内容显示方法与电子设备
CN115250261A (zh) * 2021-04-25 2022-10-28 华为技术有限公司 一种信息的显示方法及电子设备
CN115334023A (zh) * 2021-05-10 2022-11-11 腾讯科技(深圳)有限公司 一种通讯方法、相关装置、设备以及存储介质
CN113256374A (zh) * 2021-05-18 2021-08-13 华世界数字科技(深圳)有限公司 一种线上多人共同选购的方法、装置及可读存储介质
CN115529487A (zh) * 2021-06-24 2022-12-27 华为技术有限公司 视频共享方法、电子设备及存储介质
CN113691439B (zh) * 2021-07-12 2023-07-25 维沃移动通信(杭州)有限公司 一种内容分享方法和装置
CN113542902B (zh) * 2021-07-13 2023-02-24 北京字跳网络技术有限公司 一种视频处理方法、装置、电子设备和存储介质
CN113852538A (zh) * 2021-09-02 2021-12-28 南京驿欧软件有限公司 一种基于即时聊天工具的服务推广处理方法和系统
CN114048048A (zh) * 2021-11-15 2022-02-15 Oppo广东移动通信有限公司 信息分享方法、装置、电子设备及存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080034038A1 (en) * 2006-08-04 2008-02-07 Jean-Pierre Ciudad Sharing Application Output In Chat Environment
CN106028172A (zh) * 2016-06-13 2016-10-12 百度在线网络技术(北京)有限公司 音/视频处理方法及装置
CN106303590A (zh) * 2016-08-08 2017-01-04 腾讯科技(深圳)有限公司 邀请观看视频影片的实现方法和装置
CN107544825A (zh) * 2017-08-11 2018-01-05 北京安云世纪科技有限公司 朋友圈中商品信息的处理方法、装置及终端
CN108829528A (zh) * 2018-06-11 2018-11-16 腾讯科技(深圳)有限公司 内容分享方法和装置、消息处理方法和装置
CN112187619A (zh) * 2020-05-26 2021-01-05 华为技术有限公司 一种即时通信方法及设备

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009149466A1 (en) * 2008-06-06 2009-12-10 Meebo, Inc. System and method for sharing content in an instant messaging application

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080034038A1 (en) * 2006-08-04 2008-02-07 Jean-Pierre Ciudad Sharing Application Output In Chat Environment
CN106028172A (zh) * 2016-06-13 2016-10-12 百度在线网络技术(北京)有限公司 音/视频处理方法及装置
CN106303590A (zh) * 2016-08-08 2017-01-04 腾讯科技(深圳)有限公司 邀请观看视频影片的实现方法和装置
CN107544825A (zh) * 2017-08-11 2018-01-05 北京安云世纪科技有限公司 朋友圈中商品信息的处理方法、装置及终端
CN108829528A (zh) * 2018-06-11 2018-11-16 腾讯科技(深圳)有限公司 内容分享方法和装置、消息处理方法和装置
CN112187619A (zh) * 2020-05-26 2021-01-05 华为技术有限公司 一种即时通信方法及设备

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114217707A (zh) * 2021-12-14 2022-03-22 北京字跳网络技术有限公司 分享方法、装置、电子设备、存储介质和计算机程序产品
CN114217707B (zh) * 2021-12-14 2024-01-19 北京字跳网络技术有限公司 分享方法、装置、电子设备和存储介质
CN114422965A (zh) * 2022-01-14 2022-04-29 Tcl通讯科技(成都)有限公司 信息交互方法、装置、存储介质及电子设备
WO2023142940A1 (zh) * 2022-01-28 2023-08-03 华为技术有限公司 应用组件分享方法及相关设备

Also Published As

Publication number Publication date
EP4145776A1 (en) 2023-03-08
CN113726640A (zh) 2021-11-30
CN112187619B (zh) 2021-08-03
CN112187619A (zh) 2021-01-05
US20230308403A1 (en) 2023-09-28
EP4145776A4 (en) 2023-10-25

Similar Documents

Publication Publication Date Title
WO2021238884A1 (zh) 一种即时通信方法及设备
WO2021023220A1 (zh) 一种内容接续方法、系统及电子设备
WO2021203902A1 (zh) 虚拟影像实现方法、装置、存储介质与终端设备
CN106303590B (zh) 邀请观看视频影片的实现方法和装置
US20220291934A1 (en) Method for Displaying Splash Screen Information of Application and Electronic Device
KR20160022286A (ko) 동영상 정보를 공유하는 방법, 장치, 프로그램 및 기록매체
WO2021249318A1 (zh) 一种投屏方法和终端
CN104967889A (zh) 控制智能电视进行视频信息处理的方法及装置
US20230119300A1 (en) Method for Resuming Playing Multimedia Content Between Devices
WO2020088059A1 (zh) 视频播放方法、视频播放装置、电子设备及存储介质
US20240119969A1 (en) Video processing method and apparatus, electronic device and storage medium
US20230403458A1 (en) Camera Invocation Method and System, and Electronic Device
CN111092898A (zh) 报文传输方法及相关设备
CN113918110A (zh) 投屏交互方法、设备、系统、存储介质和产品
WO2022127670A1 (zh) 一种通话方法、相关设备和系统
CN113301544B (zh) 一种音频设备间语音互通的方法及设备
WO2023005711A1 (zh) 一种服务的推荐方法及电子设备
WO2022267640A1 (zh) 视频共享方法、电子设备及存储介质
US20220311700A1 (en) Method for multiplexing http channels and terminal
EP4246921A1 (en) Chat interaction method, electronic device, and server
WO2020216144A1 (zh) 一种添加邮件联系人的方法和电子设备
CN115729404A (zh) 一种通知消息的处理方法及设备
CN110213531B (zh) 监控录像处理方法及装置
CN116016418B (zh) 一种信息交互方法及电子设备
US20240103695A1 (en) Message Reply Method and Apparatus

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: 21814135

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2021814135

Country of ref document: EP

Effective date: 20221202

NENP Non-entry into the national phase

Ref country code: DE