WO2023001044A1 - 数据处理方法及电子设备 - Google Patents
数据处理方法及电子设备 Download PDFInfo
- Publication number
- WO2023001044A1 WO2023001044A1 PCT/CN2022/105491 CN2022105491W WO2023001044A1 WO 2023001044 A1 WO2023001044 A1 WO 2023001044A1 CN 2022105491 W CN2022105491 W CN 2022105491W WO 2023001044 A1 WO2023001044 A1 WO 2023001044A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- electronic device
- state
- wireless connection
- module
- mobile phone
- Prior art date
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 11
- 230000033001 locomotion Effects 0.000 claims abstract description 98
- 238000000034 method Methods 0.000 claims abstract description 74
- 230000003993 interaction Effects 0.000 claims abstract description 29
- 230000003068 static effect Effects 0.000 claims description 77
- 230000004044 response Effects 0.000 claims description 39
- 238000003860 storage Methods 0.000 claims description 18
- 238000004590 computer program Methods 0.000 claims description 11
- 230000008569 process Effects 0.000 abstract description 33
- 238000004891 communication Methods 0.000 description 54
- 230000006854 communication Effects 0.000 description 54
- 238000010586 diagram Methods 0.000 description 54
- 238000012545 processing Methods 0.000 description 40
- 230000006870 function Effects 0.000 description 37
- 230000005540 biological transmission Effects 0.000 description 35
- 238000007726 management method Methods 0.000 description 21
- 230000005236 sound signal Effects 0.000 description 13
- 238000010295 mobile communication Methods 0.000 description 11
- 230000000694 effects Effects 0.000 description 10
- 239000000523 sample Substances 0.000 description 8
- 230000001133 acceleration Effects 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 6
- 238000005266 casting Methods 0.000 description 5
- 230000008859 change Effects 0.000 description 5
- 229920001621 AMOLED Polymers 0.000 description 4
- 238000013528 artificial neural network Methods 0.000 description 4
- 238000009877 rendering Methods 0.000 description 4
- 238000004422 calculation algorithm Methods 0.000 description 3
- 238000012790 confirmation Methods 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000013461 design Methods 0.000 description 3
- 238000005538 encapsulation Methods 0.000 description 3
- 238000013475 authorization Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 2
- 125000004122 cyclic group Chemical group 0.000 description 2
- 230000001351 cycling effect Effects 0.000 description 2
- 238000001514 detection method Methods 0.000 description 2
- 230000008713 feedback mechanism Effects 0.000 description 2
- 230000007774 longterm Effects 0.000 description 2
- 238000005259 measurement Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 239000002096 quantum dot Substances 0.000 description 2
- 230000005855 radiation Effects 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 208000003028 Stuttering Diseases 0.000 description 1
- 230000003044 adaptive effect Effects 0.000 description 1
- 230000002776 aggregation Effects 0.000 description 1
- 238000004220 aggregation Methods 0.000 description 1
- 230000003416 augmentation Effects 0.000 description 1
- 230000007175 bidirectional communication Effects 0.000 description 1
- 230000002457 bidirectional effect Effects 0.000 description 1
- 238000013529 biological neural network Methods 0.000 description 1
- 230000015572 biosynthetic process Effects 0.000 description 1
- 210000000988 bone and bone Anatomy 0.000 description 1
- 210000004556 brain Anatomy 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 230000019771 cognition Effects 0.000 description 1
- 230000000295 complement effect Effects 0.000 description 1
- 230000006835 compression Effects 0.000 description 1
- 238000007906 compression Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000005562 fading Methods 0.000 description 1
- 230000008014 freezing Effects 0.000 description 1
- 238000007710 freezing Methods 0.000 description 1
- 230000004927 fusion Effects 0.000 description 1
- 230000005484 gravity Effects 0.000 description 1
- 230000003862 health status Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 210000002569 neuron Anatomy 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 238000005070 sampling Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
- 230000007704 transition Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/80—Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
- H04L1/0001—Systems modifying transmission characteristics according to link quality, e.g. power backoff
- H04L1/0002—Systems modifying transmission characteristics according to link quality, e.g. power backoff by adapting the transmission rate
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/25—Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
- H04N21/258—Client or end-user data management, e.g. managing client capabilities, user preferences or demographics, processing of multiple end-users preferences to derive collaborative data
- H04N21/25808—Management of client data
- H04N21/25825—Management of client data involving client display capabilities, e.g. screen resolution of a mobile phone
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/41—Structure of client; Structure of client peripherals
- H04N21/414—Specialised client platforms, e.g. receiver in car or embedded in a mobile appliance
- H04N21/41407—Specialised client platforms, e.g. receiver in car or embedded in a mobile appliance embedded in a portable device, e.g. video client on a mobile phone, PDA, laptop
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/436—Interfacing a local distribution network, e.g. communicating with another STB or one or more peripheral devices inside the home
- H04N21/4363—Adapting the video stream to a specific local network, e.g. a Bluetooth® network
- H04N21/43637—Adapting the video stream to a specific local network, e.g. a Bluetooth® network involving a wireless protocol, e.g. Bluetooth, RF or wireless LAN [IEEE 802.11]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/60—Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client
- H04N21/63—Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
- H04N21/637—Control signals issued by the client directed to the server or network components
- H04N21/6375—Control signals issued by the client directed to the server or network components for requesting retransmission, e.g. of data packets lost or corrupted during transmission from server
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/60—Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client
- H04N21/63—Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
- H04N21/647—Control signaling between network components and server or clients; Network processes for video distribution between server and clients, e.g. controlling the quality of the video stream, by dropping packets, protecting content from unauthorised alteration within the network, monitoring of network load, bridging between two different networks, e.g. between IP and wireless
- H04N21/64723—Monitoring of network processes or resources, e.g. monitoring of network load
- H04N21/64738—Monitoring network characteristics, e.g. bandwidth, congestion level
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W64/00—Locating users or terminals or network equipment for network management purposes, e.g. mobility management
- H04W64/006—Locating users or terminals or network equipment for network management purposes, e.g. mobility management with additional information processing, e.g. for direction or speed determination
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W76/00—Connection management
- H04W76/10—Connection setup
- H04W76/14—Direct-mode setup
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W76/00—Connection management
- H04W76/20—Manipulation of established connections
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04B—TRANSMISSION
- H04B7/00—Radio transmission systems, i.e. using radiation field
- H04B7/02—Diversity systems; Multi-antenna system, i.e. transmission or reception using multiple antennas
- H04B7/04—Diversity systems; Multi-antenna system, i.e. transmission or reception using multiple antennas using two or more spaced independent antennas
- H04B7/0413—MIMO systems
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/134—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
- H04N19/164—Feedback from the receiver or from the transmission channel
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W28/00—Network traffic management; Network resource management
- H04W28/16—Central resource management; Negotiation of resources or communication parameters, e.g. negotiating bandwidth or QoS [Quality of Service]
- H04W28/18—Negotiating wireless communication parameters
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/02—Services making use of location information
- H04W4/025—Services making use of location information using location based information parameters
- H04W4/027—Services making use of location information using location based information parameters using movement velocity, acceleration information
Definitions
- the embodiments of the present application relate to the field of terminal equipment, and in particular, to a data processing method and electronic equipment.
- screen projection technology there are more and more application scenarios for screen projection technology.
- a user can use a mobile phone to cast a screen to a tablet or a car screen while walking. Therefore, in a screen projection scenario, the screen projection sender (such as a mobile phone) and receiver (such as a tablet) may be in motion. Due to the movement of the screen projection device, the wireless channel conditions between the screen projection devices will change rapidly, which will cause delay and jitter in the screen projection data transmission, which will cause frame loss and freeze on the screen projection screen.
- the present application provides a data processing method and electronic equipment.
- the electronic device can adjust the configuration parameters during data interaction based on its motion state, so as to adjust the configuration parameters according to different motion states. Adaptive adjustment.
- the embodiment of the present application provides a data processing method.
- the method includes: the first electronic device establishes a wireless connection with the second electronic device, and performs data interaction with the second electronic device through the wireless connection.
- the first electronic device detects the state of the first electronic device, and the state of the first electronic device is a moving state or a static state.
- the first electronic device determines target configuration parameters based on the state of the first electronic device, wherein the target configuration parameters include wireless connection configuration parameters between the first electronic device and the second electronic device, and/or the programming of the first electronic device decoding strategy.
- the first electronic device performs data interaction with the second electronic device based on the target configuration parameters.
- the first electronic device can be adaptively adjusted to the corresponding target configuration parameters based on its motion state, and the corresponding configuration parameters can be configured according to different motion states, for example, the motion state corresponds to the configuration parameters of the motion state, and the static state is configured with Configuration parameters for the quiescent state.
- the motion state corresponds to the configuration parameters of the motion state
- the static state is configured with Configuration parameters for the quiescent state.
- the first electronic device may determine the motion state of the first electronic device based on the parameters detected by the IMU module.
- the first electronic device may determine the motion state of the first electronic device based on the communication state of the IMU module and the wireless connection.
- the wireless connection between the first electronic device and the second electronic device may be a Wi-Fi connection.
- the first electronic device establishes a wireless connection with the second electronic device, and performs data interaction with the second electronic device through the wireless connection.
- the electronic device sends a connection request message.
- the first electronic device establishes a wireless connection with the second electronic device in response to the received response message sent by the second electronic device.
- the first electronic device sends a data packet including the image frame to the second electronic device through the wireless connection.
- the wireless connection configuration parameters include at least one of the following: the number of retransmissions of data packets is N, the number of multi-input multi- The output MIMO mode is a diversity mode; N is an integer greater than 0.
- the wireless connection configuration parameters include at least one of the following: the number of retransmissions of data packets is M, and the MIMO mode is complex mode; where, M is an integer greater than 0 and less than N.
- M is an integer greater than 0 and less than N.
- the codec strategy of the first electronic device includes at least one of the following: the code rate of the image frame is A1; The resolution of the image frame is B1; the encoding dependency of the image frame is adjusted.
- the first electronic device can reduce the bit rate and resolution of the image frame to reduce the amount of data during data transmission, so as to reduce the wireless bandwidth usage.
- the first electronic device can also adjust the encoding dependencies of the image frames through a feedback mechanism, so as to provide a better low-latency projection effect.
- the codec strategy of the first electronic device includes at least one of the following: the code rate of the image frame is A2; The resolution of the image frame is B2; the encoding dependency of the image frame is adjusted; wherein, A2 is greater than A1, and B2 is greater than B1.
- the first electronic device can improve the display quality of the receiving end by increasing the bit rate and resolution of the image frame.
- the first electronic device can also use a feedback mechanism to adjust the encoding dependency of the image frame in the case of image frame loss, so as to reduce the impact of image frame loss on the decoding of the receiving end, thereby providing better low-latency projection Effect.
- the first electronic device establishes a wireless connection with the second electronic device, and performs data interaction with the second electronic device through the wireless connection, including: the first electronic device responds Sending a response message to the second electronic device based on the received connection request message sent by the second electronic device; the first electronic device establishes a wireless connection with the second electronic device; the first electronic device receives the connection request message sent by the second electronic device through the wireless connection Packets containing image frames.
- the first electronic device as the receiving end, can adjust the configuration parameters of the sending end based on the motion state of the first electronic device in the process of receiving the data packet containing the image frame sent by the second electronic device to improve the image frame rate. Shown stability.
- the wireless connection configuration parameters include: the MIMO mode is a diversity mode. In this way, during the screen projection process of the first electronic device and the first electronic device is in a moving state, the first electronic device can adjust the MIMO mode to a diversity mode to improve the success rate of image frame reception.
- the wireless connection configuration parameters include: the MIMO mode is a multiplexing mode.
- the first electronic device can adjust the MIMO mode to the multiplexing mode to improve the efficiency of receiving image frames.
- the codec policy of the first electronic device includes: setting the image cache size to C1. In this way, during the screen projection process of the first electronic device, and the first electronic device is in a moving state, the first electronic device can increase the size of the image buffer to reduce the frame loss caused by the unstable arrival time of frame transmission .
- the codec strategy of the first electronic device includes: setting the image cache size to C2; where C2 is smaller than C1 . In this way, during the screen projection process of the first electronic device, and the first electronic device is in a static state, the first electronic device can send the image frame for display in time by reducing the size of the image buffer, so as to reduce the screen display time. delay.
- the method further includes: the first electronic device sends the status of the first electronic device to the second electronic device.
- the first electronic device and the second electronic device can notify their own statuses to the opposite end, so that the opposite end can adjust configuration parameters accordingly.
- the method further includes: the first electronic device receives the state of the second electronic device sent by the second electronic device; wherein, the state of the second electronic device is a motion state or a static state; if the state of the second electronic device is a moving state, the first electronic device adjusts the configuration parameters of the first electronic device to target configuration parameters corresponding to the moving state. In this way, when any one of the first electronic device and the second electronic device is in a motion state, the other end also adjusts the configuration parameters to the configuration parameters corresponding to the motion state.
- the embodiment of the present application provides a first electronic device.
- the electronic device includes a memory and a processor, the memory is coupled to the processor; the memory stores program instructions, and when the program instructions are executed by the processor, the first electronic device performs the following steps: establish a wireless connection with the second electronic device, and pass Perform data interaction with the second electronic device through wireless connection; detect the state of the first electronic device, whether the state of the first electronic device is a moving state or a static state; determine the target configuration parameters based on the state of the first electronic device; the target configuration parameters include the first The configuration parameters of the wireless connection between an electronic device and the second electronic device, and/or the codec strategy of the first electronic device; based on the target configuration parameters, data interaction with the second electronic device is performed.
- the first electronic device executes the following steps: in response to the received first user operation, sending a connection request message to the second electronic device; in response to the received second The response message sent by the electronic device establishes a wireless connection with the second electronic device; and sends a data packet including the image frame to the second electronic device through the wireless connection.
- the wireless connection configuration parameters include at least one of the following: the number of retransmissions of data packets is N, the number of multiple inputs and multiple The output MIMO mode is diversity mode; N is an integer greater than 0;
- the wireless connection configuration parameters include at least one of the following: the number of retransmissions of data packets is M, and the MIMO mode is complex mode; where, M is an integer greater than 0 and less than N.
- the codec strategy of the first electronic device includes at least one of the following: the code rate of the image frame is A1; The resolution of the image frame is B1; the encoding dependency of the image frame is adjusted.
- the codec strategy of the first electronic device includes at least one of the following: the code rate of the image frame is A2; The resolution of the image frame is B2; the encoding dependency of the image frame is adjusted; wherein, A2 is greater than A1, and B2 is greater than B1.
- the first electronic device when the program instructions are executed by the processor, the first electronic device is made to perform the following steps: in response to receiving the connection request message sent by the second electronic device, Sending a response message to the second electronic device; establishing a wireless connection with the second electronic device; receiving the data packet containing the image frame sent by the second electronic device through the wireless connection.
- the wireless connection configuration parameters include: the MIMO mode is a diversity mode.
- the wireless connection configuration parameters include: the MIMO mode is a multiplexing mode.
- the codec strategy of the first electronic device includes: setting the image cache size to C1.
- the codec strategy of the first electronic device includes: setting the image cache size to C2; wherein, C2 is smaller than C1 .
- the first electronic device when the program instructions are executed by the processor, the first electronic device is made to perform the following steps: sending the status of the first electronic device to the second electronic device.
- the first electronic device when the program instructions are executed by the processor, the first electronic device is made to perform the following steps: receiving the status of the second electronic device sent by the second electronic device; wherein , the state of the second electronic device is a moving state or a static state; if the state of the second electronic device is a moving state, adjust the configuration parameters of the first electronic device to target configuration parameters corresponding to the moving state.
- the second aspect and any implementation manner of the second aspect correspond to the first aspect and any implementation manner of the first aspect respectively.
- technical effects corresponding to the second aspect and any implementation manner of the second aspect reference may be made to the technical effects corresponding to the above-mentioned first aspect and any implementation manner of the first aspect, and details are not repeated here.
- an embodiment of the present application provides a computer-readable medium for storing a computer program, where the computer program includes instructions for executing the method in the second aspect or any possible implementation manner of the second aspect.
- the third aspect and any implementation manner of the third aspect correspond to the first aspect and any implementation manner of the first aspect respectively.
- technical effects corresponding to the third aspect and any implementation manner of the third aspect reference may be made to the technical effects corresponding to the above-mentioned first aspect and any implementation manner of the first aspect, and details are not repeated here.
- an embodiment of the present application provides a computer program, where the computer program includes instructions for executing the method in the second aspect or any possible implementation manner of the second aspect.
- the fourth aspect and any implementation manner of the fourth aspect correspond to the first aspect and any implementation manner of the first aspect respectively.
- the technical effects corresponding to the fourth aspect and any one of the implementation manners of the fourth aspect refer to the above-mentioned first aspect and the technical effects corresponding to any one of the implementation manners of the first aspect, and details are not repeated here.
- the embodiment of the present application provides a chip, and the chip includes a processing circuit and sending and receiving pins.
- the transceiver pin and the processing circuit communicate with each other through an internal connection path, and the processing circuit executes the method in the first aspect or any possible implementation of the first aspect to control the receiving pin to receive signals, so as to Control the send pin to send signal.
- the embodiment of the present application provides a communication system, including the first aspect and the first electronic device and the second electronic device in any implementation manner of the first aspect.
- Figure 1a is a schematic diagram of an exemplary application scenario
- Fig. 1b is a schematic diagram of an exemplary multi-screen collaboration scenario
- FIG. 2 is a schematic diagram of a hardware structure of an exemplary electronic device
- FIG. 3 is a schematic diagram of a connection between a mobile phone and a tablet
- FIG. 4 is a schematic diagram of a connection between a mobile phone and a tablet
- FIG. 5 is a schematic diagram of an exemplary user interface
- FIG. 6 is a schematic flow diagram of data interaction between a mobile phone and a tablet
- FIG. 7 is a schematic diagram of an exemplary GOP
- FIG. 8 is a schematic diagram of the format of the data packet shown exemplarily.
- Figure 9 shows a schematic diagram of data transmission between a mobile phone and a tablet
- FIG. 10 is a schematic diagram of a software structure of an exemplary electronic device
- Fig. 11 is an exemplary schematic diagram of module interaction
- FIG. 12 is a schematic diagram of a configuration flow diagram of an exemplary sending end
- FIG. 13 is a schematic diagram of communication in a diversity mode exemplarily shown
- Fig. 14a is a schematic diagram of exemplarily showing feedback frame loss statistics
- Fig. 14b is a schematic diagram of an exemplary adjusted coding strategy
- Fig. 15a is a schematic diagram illustrating another kind of feedback frame loss statistics
- Fig. 15b is a schematic diagram of data packet transmission exemplarily shown
- FIG. 16 is a schematic diagram of a configuration flow diagram of an exemplary sending end
- Fig. 17 is a communication schematic diagram of an exemplary multiplexing mode
- FIG. 18 is a schematic diagram of a configuration flow diagram of an exemplary receiving end
- Fig. 19 is a schematic diagram of an exemplary module interaction flow
- FIG. 20 is a schematic diagram of a configuration flow diagram of an exemplary receiving end
- Figures 21a to 21b are illustrative schematic diagrams showing the interaction between a mobile phone and a tablet
- Fig. 22 is a schematic structural diagram of the device shown exemplarily.
- first and second in the description and claims of the embodiments of the present application are used to distinguish different objects, rather than to describe a specific order of objects.
- first target object, the second target object, etc. are used to distinguish different target objects, rather than describing a specific order of the target objects.
- words such as “exemplary” or “for example” are used as examples, illustrations or illustrations. Any embodiment or design scheme described as “exemplary” or “for example” in the embodiments of the present application shall not be interpreted as being more preferred or more advantageous than other embodiments or design schemes. Rather, the use of words such as “exemplary” or “such as” is intended to present related concepts in a concrete manner.
- multiple processing units refer to two or more processing units; multiple systems refer to two or more systems.
- FIG. 1a is a schematic diagram of an exemplary application scenario.
- This application scenario includes mobile phones and tablets. It should be noted that the number of electronic devices (mobile phone and tablet) in FIG. 1a is only a schematic example, which is not limited in the present application.
- the screen projection scene between the mobile phone and the tablet is taken as an example for illustration.
- the communication connection between the mobile phone and the tablet may be a P2P (peer-to-peer, peer-to-peer) connection.
- P2P peer-to-peer
- the technical solutions in the embodiments of the present application can also be applied to other application scenarios between mobile phones and tablets, such as Huawei sharing, multi-screen collaboration scenarios, etc., which are not limited in this application.
- the protocols based on the connection between the mobile phone and the tablet may also be different.
- the communication connection between the mobile phone and the tablet is maintained through the P2P protocol.
- the communication connection between the mobile phone and the tablet may also be maintained based on other wireless communication protocols, which is not limited in this application.
- a mobile phone and a tablet may also be referred to as a sender and a receiver in the screen projection scenario, and may also be referred to as P2P devices.
- Fig. 1b is a schematic diagram of an exemplary multi-screen collaboration scenario.
- the mobile phone and the notebook perform multi-screen collaboration, and the communication connection between the mobile phone and the notebook may be maintained based on a wireless communication protocol, such as a P2P protocol.
- the mobile phone can be used as the sending end to send the image frame to the notebook, and the image in the image frame corresponds to the interface currently displayed on the mobile phone. In this way, the image corresponding to the current interface of the mobile phone can be displayed in the multi-screen collaborative interface on the notebook.
- FIG. 1a and FIG. 1b are only schematic examples.
- the technical solutions in the embodiments of the present application can also be applied to screen projection scenarios, sharing scenarios, multi-screen collaboration scenarios, etc.
- FIG. 2 shows a schematic structural diagram of the electronic device 100 .
- the electronic device 100 shown in FIG. 2 is only an example of an electronic device, and the electronic device 100 may have more or fewer components than those shown in the figure, and two or more components may be combined , or can have different component configurations.
- the various components shown in Figure 2 may be implemented in hardware, software, or a combination of hardware and software including one or more signal processing and/or application specific integrated circuits.
- the electronic device in Figure 2 can be the mobile phone or tablet in Figure 1a, or the mobile phone or notebook in Figure 1b, and of course it can also be the electronic device involved in other application scenarios, which is not covered by this application. limited.
- the electronic device 100 may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (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, IMU (Inertial measurement unit, inertial measurement unit) module 180, button 190, motor 191, indicator 192, a camera 193, a display screen 194, and a subscriber identification module (subscriber identification module, SIM) card interface 195, etc.
- a processor 110 an external memory interface 120, an internal memory 121, a universal serial bus (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,
- 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, an ambient light sensor 180L, bone conduction sensor 180M, etc.
- the processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit, NPU) Wait. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
- application processor application processor, AP
- modem processor graphics processing unit
- GPU graphics processing unit
- image signal processor image signal processor
- ISP image signal processor
- controller memory
- video codec digital signal processor
- DSP digital signal processor
- baseband processor baseband processor
- neural network processor neural-network processing unit
- the controller may be the nerve center and command center of the electronic device 100 .
- the controller can generate an operation control signal according to the instruction opcode and timing signal, and complete the control of fetching and executing the instruction.
- a memory may also be provided in the processor 110 for storing instructions and data.
- the memory in processor 110 is a cache memory.
- the memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Repeated access is avoided, and the waiting time of the processor 110 is reduced, thus improving the efficiency of the system.
- processor 110 may include one or more interfaces.
- the interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transmitter (universal asynchronous receiver/transmitter, UART) interface, mobile industry processor interface (mobile industry processor interface, MIPI), general-purpose input and output (general-purpose input/output, GPIO) interface, subscriber identity module (subscriber identity module, SIM) interface, and /or universal serial bus (universal serial bus, USB) interface, etc.
- I2C integrated circuit
- I2S integrated circuit built-in audio
- PCM pulse code modulation
- PCM pulse code modulation
- UART universal asynchronous transmitter
- MIPI mobile industry processor interface
- GPIO general-purpose input and output
- subscriber identity module subscriber identity module
- SIM subscriber identity module
- USB universal serial bus
- the I2C interface is a bidirectional synchronous serial bus, including a serial data line (serial data line, SDA) and a serial clock line (derail clock line, SCL).
- processor 110 may include multiple sets of I2C buses.
- the processor 110 can be respectively coupled to the touch sensor 180K, the charger, the flashlight, the camera 193 and the like through different I2C bus interfaces.
- the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 and the touch sensor 180K communicate through the I2C bus interface to realize the touch function of the electronic device 100 .
- the I2S interface can be used for audio communication.
- processor 110 may include multiple sets of I2S buses.
- the processor 110 may be coupled to the audio module 170 through an I2S bus to implement communication between the processor 110 and the audio module 170 .
- the audio module 170 can transmit audio signals to the wireless communication module 160 through the I2S interface, so as to realize the function of answering calls through the Bluetooth headset.
- the PCM interface can also be used for audio communication, sampling, quantizing and encoding the analog signal.
- the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface.
- the audio module 170 can also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to realize the function of answering calls through the Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
- the UART interface is a universal serial data bus used for asynchronous communication.
- the bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication.
- a UART interface is generally used to connect the processor 110 and the wireless communication module 160 .
- the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to realize the Bluetooth function.
- the audio module 170 can transmit audio signals to the wireless communication module 160 through the UART interface, so as to realize the function of playing music through the Bluetooth headset.
- the MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193 .
- MIPI interface includes camera serial interface (camera serial interface, CSI), display serial interface (display serial interface, DSI), etc.
- the processor 110 communicates with the camera 193 through the CSI interface to realize the shooting function of the electronic device 100 .
- the processor 110 communicates with the display screen 194 through the DSI interface to realize the display function of the electronic device 100 .
- the GPIO interface can be configured by software.
- the GPIO interface can be configured as a control signal or as a data signal.
- the GPIO interface can be used to connect the processor 110 with the camera 193 , the display screen 194 , the wireless communication module 160 , the audio module 170 , the sensor module 180 and so on.
- the GPIO interface can also be configured as an I2C interface, I2S interface, UART interface, MIPI interface, etc.
- the USB interface 130 is an interface conforming to the USB standard specification, specifically, it can be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like.
- the USB interface 130 can be used to connect a charger to charge the electronic device 100 , and can also be used to transmit data between the electronic device 100 and peripheral devices. It can also be used to connect headphones and play audio through them. This interface can also be used to connect other electronic devices, such as AR devices.
- the interface connection relationship between the modules shown in the embodiment of the present application is only a schematic illustration, and does not constitute a structural limitation of the electronic device 100 .
- the electronic device 100 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
- the charging management module 140 is configured to receive a charging input from a charger.
- the charger may be a wireless charger or a wired charger.
- the charging management module 140 can receive charging input from the wired charger through the USB interface 130 .
- the charging management module 140 may receive a wireless charging input through a wireless charging coil of the electronic device 100 . While the charging management module 140 is charging the battery 142 , it can also provide power for electronic devices through the power management module 141 .
- the power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 .
- the power management module 141 receives the input from the battery 142 and/or the charging management module 140 to provide power for the processor 110 , the internal memory 121 , the external memory, 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 disposed in the processor 110 .
- the power management module 141 and the charging management module 140 may also be set in the same device.
- the wireless communication function of the electronic device 100 can be realized by the antenna 1 , the antenna 2 , the mobile communication module 150 , the wireless communication module 160 , a modem processor, a baseband processor, and the like.
- Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
- Each antenna in electronic device 100 may be used to cover single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization of the antennas.
- Antenna 1 can be multiplexed as a diversity antenna of a wireless local area network.
- the antenna may be used in conjunction with a tuning switch.
- the mobile communication module 150 can provide wireless communication solutions including 2G/3G/4G/5G applied on the electronic device 100.
- the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA) and the like.
- the mobile communication module 150 can receive electromagnetic waves through the antenna 1, filter and amplify the received electromagnetic waves, and send them to the modem processor for demodulation.
- the mobile communication module 150 can also amplify the signals modulated by the modem processor, and convert them into electromagnetic waves through the antenna 1 for radiation.
- at least part of the functional modules of the mobile communication module 150 may be set 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 set in the same device.
- a modem processor may include a modulator and a demodulator.
- the modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal.
- the demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator sends the demodulated low-frequency baseband signal to the baseband processor for processing.
- the low-frequency baseband signal is passed to the application processor after being processed by the baseband processor.
- the application processor outputs sound signals through audio equipment (not limited to speaker 170A, receiver 170B, etc.), or displays images or videos through display screen 194 .
- the modem processor may be a stand-alone device.
- the modem processor may be independent from the processor 110, and be set in the same device as the mobile communication module 150 or other functional modules.
- the wireless communication module 160 can provide wireless local area networks (wireless local area networks, WLAN) (such as wireless fidelity (Wireless Fidelity, Wi-Fi) network), bluetooth (bluetooth, BT), global navigation satellite, etc. applied on the electronic device 100.
- System global navigation satellite system, GNSS
- frequency modulation frequency modulation, FM
- near field communication technology near field communication, NFC
- infrared technology infrared, IR
- the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
- the wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency-modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 .
- the wireless communication module 160 can also receive the signal to be sent from the processor 110 , frequency-modulate it, amplify it, and convert it into electromagnetic waves through the antenna 2 for radiation.
- the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to 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 (general packet radio service, GPRS), code division multiple access (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 (long term evolution, LTE), BT, GNSS, WLAN, NFC , FM, and/or IR techniques, etc.
- GSM global system for mobile communications
- GPRS general packet radio service
- code division multiple access code division multiple access
- CDMA broadband Code division multiple access
- WCDMA wideband code division multiple access
- time division code division multiple access time-division code division multiple access
- TD-SCDMA time-division code division multiple access
- the GNSS may include a global positioning system (global positioning system, GPS), a global navigation satellite system (global navigation satellite system, GLONASS), a Beidou navigation satellite system (beidou navigation satellite system, BDS), a quasi-zenith satellite system (quasi -zenith satellite system (QZSS) and/or satellite based augmentation systems (SBAS).
- GPS global positioning system
- GLONASS global navigation satellite system
- Beidou navigation satellite system beidou navigation satellite system
- BDS Beidou navigation satellite system
- QZSS quasi-zenith satellite system
- SBAS satellite based augmentation systems
- the electronic device 100 realizes the display function through the GPU, the display screen 194 , and the application processor.
- the GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering.
- Processor 110 may include one or more GPUs that execute program instructions to generate or 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 be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active matrix organic light emitting diode or an active matrix organic light emitting diode (active-matrix organic light emitting diode, AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light emitting diodes (quantum dot light emitting diodes, QLED), etc.
- the electronic device 100 may include 1 or N display screens 194 , where N is a positive integer greater than 1.
- the electronic device 100 can realize the shooting function through the ISP, the camera 193 , the video codec, the GPU, the display screen 194 and the application processor.
- the ISP is used for processing the data fed back by the camera 193 .
- the light is transmitted to the photosensitive element of the camera through the lens, and the light signal is converted into an electrical signal, and the photosensitive element of the camera transmits the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye.
- ISP can also perform algorithm optimization on image noise, brightness, and skin color.
- ISP can also optimize the exposure, color temperature and other parameters of the shooting scene.
- the ISP may be located in the camera 193 .
- Camera 193 is used to capture still images or video.
- the object generates an optical image through the lens and projects it 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 light signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal.
- the ISP outputs the digital image signal to the DSP for processing.
- DSP converts digital image signals into standard RGB, YUV and other image signals.
- the electronic device 100 may include 1 or N cameras 193 , where N is a positive integer greater than 1.
- 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.
- the electronic device 100 can play or record videos in various encoding formats, for example: moving picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4 and so on.
- MPEG moving picture experts group
- the NPU is a neural-network (NN) computing processor.
- NN neural-network
- Applications such as intelligent cognition of the electronic device 100 can be realized through the NPU, such as image recognition, face recognition, speech recognition, text understanding, and the like.
- the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, so as to expand the storage capacity of the electronic device 100.
- the external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. Such as saving music, video and other files in the external memory card.
- the internal memory 121 may be used to store computer-executable program codes including instructions.
- the processor 110 executes various functional applications and data processing of the electronic device 100 by executing instructions stored in the internal memory 121 .
- the internal memory 121 may include an area for storing programs and an area for storing data.
- the stored program area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, etc.) and the like.
- the storage data area can store data created during the use of the electronic device 100 (such as audio data, phonebook, etc.) and the like.
- 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, flash memory device, universal flash storage (universal flash storage, UFS) and the like.
- 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. Such as music playback, recording, etc.
- the audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signal.
- the audio module 170 may also be used to encode and decode audio signals.
- the audio module 170 may be set in the processor 110 , or some functional modules of the audio module 170 may be set in the processor 110 .
- Speaker 170A also referred to as a "horn" is used to convert audio electrical signals into sound signals.
- Electronic device 100 can listen to music through speaker 170A, or listen to hands-free calls.
- Receiver 170B also called “earpiece” is used to convert audio electrical signals into sound signals.
- the receiver 170B can be placed close to the human ear to receive the voice.
- the microphone 170C also called “microphone” or “microphone” is used to convert sound signals into electrical signals. When making a phone call or sending a voice message, the user can put his mouth close to the microphone 170C to make a sound, and input the sound signal to the microphone 170C.
- the electronic device 100 may be provided with at least one microphone 170C. In some other embodiments, the electronic device 100 may be provided with two microphones 170C, which may also implement a noise reduction function in addition to collecting sound signals. In some other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and realize directional recording functions, etc.
- the earphone interface 170D is used for connecting wired earphones.
- the earphone interface 170D can be a USB interface 130, or a 3.5mm open mobile terminal platform (OMTP) standard interface, or a cellular telecommunications industry association of the USA (CTIA) standard interface.
- OMTP open mobile terminal platform
- CTIA cellular telecommunications industry association of the USA
- the IMU module 180 is used to acquire IMU pose information of the electronic device.
- the IMU module 180 may include an acceleration sensor and a gyro sensor.
- the gyro sensor can be used to determine the motion posture of the electronic device 100 .
- the angular velocity of the electronic device 100 around three axes ie, x, y and z axes
- the acceleration sensor can detect the magnitude of the acceleration of the electronic device 100 in three axes (ie, x, y and z axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected.
- the IMU module integrated in the electronic device may be a 6-axis IMU module.
- the electronic device can also integrate a 9-axis IMU module.
- the 9-axis IMU module includes: a gyroscope sensor (which can obtain the angular velocity on the x, y, and z axes), an acceleration sensor (which can obtain the x, y, Acceleration on the z axis) and a magnetometer (which can obtain the directions on the x, y, and z axes). This application is not limited.
- FIG. 3 is a schematic diagram of a connection between a mobile phone and a tablet exemplarily shown.
- a Wi-Fi connection is established between the mobile phone and the tablet, so as to perform data interaction through the Wi-Fi connection.
- the Wi-Fi connection between the mobile phone and the tablet is maintained based on the P2P protocol as an example for illustration.
- the process of establishing a P2P connection between a mobile phone and a tablet can be divided into three parts:
- the first part device discovery.
- the mobile phone and the tablet can discover other surrounding devices that support P2P through searching. For example, a mobile phone can find out that there are P2P-enabled tablets around it by searching. Similarly, the tablet can also find that there are P2P-supporting mobile phones around by searching.
- the second part is to establish a group between the mobile phone and the tablet. Specifically, taking a mobile phone as an example, after the mobile phone finds that there is a P2P-supporting tablet around, it can establish a P2P Group with the tablet, and negotiate who will play the role of GO (Group Owner, group owner) and who will play the role of Client (member, also called for team members).
- GO Group Owner, group owner
- Client member, also called for team members
- the role of GO is similar to the access point AP (Access Point) in the basic service set BSS (Basic Service Set), which can also be called a base station, and the role of the Client is similar to the station (Station, STA) in the BSS.
- the so-called station refers to a terminal device (electronic device) that has a Wi-Fi communication function and is connected to a wireless network, such as a mobile phone, a tablet computer, a notebook computer, and the like.
- the station can support multiple wireless local area networks (WLAN) standards of the 802.11 family such as 802.11be, 802.11ax, 802.11ac, 802.11n, 802.11g, 802.11b, and 802.11a.
- WLAN wireless local area networks
- the access point can be a terminal device (such as a mobile phone) or a network device (such as a router) with a Wi-Fi chip.
- the access point may be a device supporting the 802.11be standard.
- the access point may also be a device supporting multiple WLAN standards of the 802.11 family such as 802.11be, 802.11ax, 802.11ac, 802.11n, 802.11g, 802.11b, and 802.11a.
- the electronic equipment in the embodiment of this application is usually a terminal product that supports 802.11 series standards.
- the available frequency band includes 2.4 GHz ( GHz) and 5GHz.
- the maximum channel bandwidth supported by 802.11 extends from 20 megahertz (MHz) to 40 MHz and then to 160 MHz.
- the US Federal Communications Commission (FCC) opened a new free frequency band 6GHz (5925-7125MHz), and 802.11ax standard workers included 802.11ax in the 802.11ax project authorization application (project authorization requests, PAR).
- the working range of ax devices extends from 2.4GHz, 5GHz to 2.4GHz, 5GHz and 6GHz.
- the electronic devices operating at 2.4 GHz and 5 GHz are used as an example for illustration.
- the embodiment of the present application is also applicable to screen projection scenarios between devices supporting next-generation communication protocols (such as 802.11be, etc.).
- the mobile phone and the tablet establish a P2P connection path.
- the GO (such as the tablet) can initiate a P2P connection path establishment process to the Client (such as the mobile phone).
- the Client such as the mobile phone
- the GO can be the sending end (such as a mobile phone) in the screen projection scenario, or the receiving end (such as a tablet) in the screen projection scenario, which is not limited in this application.
- FIG. 5 is a schematic diagram of an exemplary user interface.
- the display interface of the mobile phone may include one or more controls. Network controls, etc.
- the user can click the setting icon control to enter the setting interface.
- the mobile phone displays a setting interface in response to the received user operation.
- the setting interface includes one or more options, and the options include but are not limited to: WLAN setting options, Bluetooth setting options, mobile network setting options, and more connection setting options.
- the user may click on more connection setting options.
- the mobile phone displays more connection setting interfaces in response to user operations.
- the more connection setting interface includes one or more options, and the options include but are not limited to: NFC setting options, HUAWEI Beam setting options, Huawei sharing setting options, and mobile phone screen projection options.
- the user can click on the screen projection setting option of the mobile phone. Please refer to (4) of FIG. 5 .
- the mobile phone displays a screen projection setting interface of the mobile phone in response to the received user operation.
- the mobile screen casting setting interface includes one or more controls, including but not limited to: unlimited screen casting setting options and a list of available devices.
- the user can manually click to enable it, and after it is enabled, the mobile phone can automatically search for available P2P devices around, and display the device name of the found P2P device in the available device list , such as "XX's flat plate” shown in (4) of FIG. 5 .
- the user can click on the P2P device displayed in the list of available devices to instruct the mobile phone to cast the screen to the selected tablet.
- the mobile phone sends a probe request (detection request) message to the tablet.
- the mobile phone sends a probe request message to the tablet to request communication with the tablet.
- the mobile phone can respectively send probe request messages on channels 1, 6, and 11 of the 2.4GHz frequency band.
- the process of establishing a P2P connection in the 2.4 GHz frequency band is taken as an example for illustration. In other embodiments, the P2P connection may also work in other frequency bands, which is not limited in this application.
- the tablet sends a probe response (detection response) message to the mobile phone.
- the tablet receives a probe request message on any one of channels 1, 6, and 11, and can select one of the channels that receive the probe request message, and send a probe to the mobile phone on this channel (for example, channel 6). response message.
- the mobile phone sends a GO negotiation request (GO negotiation request) message to the tablet.
- the mobile phone sends a GO negotiation request message to the tablet on channel 6 in response to receiving the probe response message from the tablet.
- the tablet sends a GO negotiation response (GO negotiation response) message to the mobile phone.
- the tablet sends a GO negotiation response message to the mobile phone on channel 6 in response to receiving the GO negotiation request message from the mobile phone.
- the mobile phone sends a GO confirm (GO confirmation) message to the tablet.
- the three frame exchanges from S404 to S406 are used for exchanging information to determine the GO and Client, and the information exchanged in the three frame exchanges includes but not limited to: GO's MAC address, Group ID and other information.
- the tablet is used as the GO
- the mobile phone is used as the Client as an example for illustration.
- the tablet sends a Beacon (beacon) message to the mobile phone.
- the tablet as the GO terminal can send a Beacon message (broadcast message) (also called a Beacon frame) to establish a projection path with other devices on the 2.4GHz frequency band.
- a Beacon message also called a Beacon frame
- the tablet sends a Beacon message on channel 3 of 2.4 GHz as an example for illustration.
- the mobile phone listens to the Beacon message sent by the tablet on channel 3, it performs a link authentication association process with the tablet, wherein multiple frame exchanges are required in the link authentication association process to exchange MAC address information, encryption mode And information such as the set of supported channels.
- a 2.4GHz channel (ie, a P2P connection) is successfully established on channel 3.
- S402-409 in FIG. 5 is only a schematic example.
- the process of establishing a 2.4GHz channel between the mobile phone and the tablet may include fewer or more frame interaction processes than in FIG. 5, and the information carried in each frame,
- the format and functions can refer to the descriptions in the existing standards, which will not be repeated in this application.
- the mobile phone after the mobile phone establishes a P2P connection with the tablet, the mobile phone can project a screen to the tablet, that is, send an image frame to the tablet, so as to display a corresponding image on the tablet.
- FIG. 6 is a schematic flow diagram of data interaction between a mobile phone and a tablet, exemplarily shown.
- the screen casting application of the mobile phone can generate an image to be screened on the tablet, and output the image to the image processing module in the application framework layer for processing.
- the image processing module can perform processing such as rendering and cropping on the image, and output the processed image to a codec (also called a codec module).
- a codec encodes an image to produce an image frame.
- the kernel can perform data processing on the image frame.
- the processing process includes but is not limited to: packet encapsulation, encryption, TCP (Transmission Control Protocol, Transmission Control Protocol)/UDP (User Datagram Protocol, User Datagram Protocol) protocol layer encapsulation, IP (Internet Protocol, Internet Interconnection Protocol) protocol layer encapsulation to obtain encapsulated data packets.
- TCP Transmission Control Protocol
- UDP User Datagram Protocol
- IP Internet Protocol, Internet Interconnection Protocol
- the Wi-Fi driver can send data packets to the tablet based on the P2P connection with the tablet.
- the Wi-Fi driver of the tablet hands over the received data packets to the kernel for processing, and the kernel performs data processing on the data packets, including but not limited to: IP protocol layer decapsulation, TCP/UDP protocol Layer decapsulation, decryption, data packet decapsulation and other processing.
- the codec decodes the data obtained after decapsulation (that is, the image frame mentioned above) to obtain the corresponding image.
- the codec outputs the image to the image processing module, and the image processing module performs image processing on the image, such as performing operations such as rendering, and outputs the processed image to the screen projection application.
- the screen casting application can display corresponding images on the display interface of the tablet. It should be noted that FIG. 6 is only a schematic illustration of each processing link in the screen projection process. The specific details of each step in FIG. 6 can refer to the relevant description in the prior art embodiment, and will not be repeated here.
- the mobile phone transmits image frames to the tablet, so that the tablet displays corresponding images.
- the codec After the codec acquires the image, it can encode the image to improve the compression ratio.
- the encoding method may include but not limited to: H.264 or HEVC (High Efficiency Video Coding, high efficiency video coding), etc.
- a GOP may include one or more I frames, and one or more B frames and P frames.
- FIG. 7 is a schematic diagram of an exemplary GOP.
- the GOP includes I1 frames, B1 frames, B2 frames, P1 frames, B3 frames, B4 frames, P2 frames, B5 frames, B6 frames, I2 frame, B7 frame, B8 frame, P3 frame.
- the type, quantity and order of the image frames in the GOP in FIG. 7 are only illustrative examples, and are not limited in this application.
- an I frame may be called a complete frame, or an independently decoded frame, that is, an I frame may be independently decoded without relying on other frames.
- the first frame of a GOP is an I frame.
- B frames and P frames can be called inter-frame prediction frames.
- the decoding of B frames depends on the nearest I frame or P frame before and after it. Taking B1 frame as an example, its decoding needs to depend on I1 frame and P1 frame.
- the decoding of a P frame depends on the nearest I frame or P frame before it. Take the P1 frame as an example, its decoding needs to depend on the I1 frame, and take the P2 frame as an example, its decoding needs to depend on the P1 frame.
- the inter-frame prediction frames need to rely on the previous, or the previous and subsequent frames to complete the decoding, if the I frame or P frame in the GOP is lost during transmission, it will result in a problem that depends on the decoding of the I frame and the P frame. Frame and subsequent frames cannot be decoded correctly, resulting in artifacts or reduced picture quality on the TV. If the B frame in the GOP is lost, the image corresponding to the B frame will be lost, causing the screen to freeze.
- the codec encodes the image
- the kernel may encapsulate the image frame to obtain a data packet.
- multiple image frames may be encapsulated into one data packet.
- the mobile phone may pack one image frame into one data packet, or may pack one image frame into multiple data packets, which is not limited in this application.
- Fig. 8 is a schematic diagram of a format of a data packet exemplarily shown.
- the data packet includes fields such as a frame control field, a frame body field, and CRC (Cyclic Redundancy Check, cyclic redundancy check).
- the control field may include indication information, such as address information, data packet type information, and the like.
- the frame body field may include data such as image frames. It should be noted that the names and positions of the fields in FIG. 8 are only illustrative examples, and are not limited in this application.
- Figure 9 is a schematic diagram of data transmission between a mobile phone and a tablet.
- the image frame sent by the mobile phone to the tablet includes: I frame , P frame, P frame, P frame and I frame, and each frame is encapsulated into a data packet.
- a mobile phone and a tablet or a mobile phone if the user walks holding the mobile phone and the tablet, the mobile phone and the tablet are in a motion state.
- the wireless channel conditions between the mobile phone and the tablet will change rapidly, which will cause delay and jitter in the screen projection data transmission, resulting in frame loss.
- the image frames received by the tablet are: I frame, P frame, P frame , I frame.
- the lost P frame is lost, because the tablet does not receive the P frame, it will cause the following P frame to fail to decode (for the concept, refer to the related description of image frame decoding in Figure 7), and the tablet will freeze or Problems such as reduced picture quality (such as blurred screen).
- Fig. 10 is a schematic diagram of a software structure of an electronic device exemplarily shown.
- the software system of the electronic device may adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture.
- the Android system with layered architecture is taken as an example to illustrate the software structure of the electronic device.
- the layered architecture of electronic equipment divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate through software interfaces.
- the Android system is divided into four layers, which are respectively the application program layer, the application program framework layer, the Android runtime (Android runtime) and the system library, and the kernel layer from top to bottom.
- the application layer can consist of a series of application packages.
- the application package may include application programs such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, screen projection, recognition, and arbitration.
- the screen projection application can support electronic devices to perform screen projection.
- the identification application also referred to as an identification module
- the arbitration application can be used for the electronic device to adjust configuration parameters based on the identification result of the identification module.
- the application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer.
- the application framework layer includes some predefined functions.
- the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, a codec module (also called a codec), etc.
- a window manager is used to manage window programs.
- the window manager can get the size of the display screen, determine whether there is a status bar, lock the screen, capture the screen, etc.
- Content providers are used to store and retrieve data and make it accessible to applications.
- Said data may include video, images, audio, calls made and received, browsing history and bookmarks, phonebook, etc.
- the view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and so on.
- the view system can be used to build applications.
- a display interface can consist of one or more views.
- a display interface including a text message notification icon may include a view for displaying text and a view for displaying pictures.
- the phone manager is used to provide communication functions of electronic devices. For example, the management of call status (including connected, hung up, etc.).
- the resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and so on.
- the notification manager enables the application to display notification information in the status bar, which can be used to convey notification-type messages, and can automatically disappear after a short stay without user interaction.
- the notification manager is used to notify the download completion, message reminder, etc.
- the notification manager can also be a notification that appears on the top status bar of the system in the form of a chart or scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window.
- prompting text information in the status bar issuing a prompt sound, vibrating the electronic device, and flashing the indicator light, etc.
- a codec can support one or more video codecs that can encode or decode images. In this way, electronic equipment can play or record videos in various encoding formats.
- the Android Runtime includes core library and virtual machine. The Android runtime is responsible for the scheduling and management of the Android system.
- the core library consists of two parts: one part is the function function that the java language needs to call, and the other part is the core library of Android.
- the application layer and the application framework layer run in virtual machines.
- the virtual machine executes the java files of the application program layer and the application program framework layer as binary files.
- the virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
- a system library can include multiple function modules. For example: surface manager (surface manager), media library (Media Libraries), 3D graphics processing library (eg: OpenGL ES), 2D graphics engine (eg: SGL), etc.
- the surface manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications.
- the media library supports playback and recording of various commonly used audio and video formats, as well as still image files, etc.
- the media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
- the 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing, etc.
- 2D graphics engine is a drawing engine for 2D drawing.
- the kernel layer is the layer between hardware and software.
- the kernel layer includes at least display driver, camera driver, audio driver, Wi-Fi driver, Bluetooth driver, IMU driver, etc.
- the components included in the system framework layer, system library, and runtime layer shown in FIG. 10 do not constitute a specific limitation on the electronic device.
- the electronic device may include more or fewer components than shown in the illustrations, or combine certain components, or separate certain components, or arrange different components.
- Fig. 11 is a schematic diagram of module interaction exemplarily shown. Please refer to FIG. 11 .
- the mobile phone acts as a sender to send image data to the tablet (ie, the receiver), that is, sends a data packet including image frames.
- the tablet ie, the receiver
- the arbitration module and the identification module may be started (that is, invoked).
- the parameters (or information) detected by the IMU module (such as the IMU module 180 in FIG. 2 ) are obtained from the IMU driver.
- the identification module can detect the state of the electronic device based on the acquired parameters. States include: motion state or static state.
- the identification module can set a corresponding exercise state threshold, for example, if the parameter acquired by the identification module is greater than or equal to the exercise state threshold, it can be determined that the electronic device is in an exercise state. If the parameter acquired by the identification module is less than the motion state threshold, it can be determined that the electronic device is in a static state.
- the IMU driver can obtain the parameters detected by the IMU module in real time.
- the IMU driver can periodically send the acquired parameters to the identification module.
- the identification module may periodically request the IMU driver for parameters obtained by the IMU driver.
- the identification module may also obtain the MIMO condition number from the Wi-Fi driver.
- the identification module can further determine the state of the electronic device based on the parameters detected by the IMU module and the MIMO condition number, so as to prevent misjudgment.
- the jitter amplitude of the MIMO condition number can be used to indicate the motion state of the electronic device.
- the jitter range of the MIMO condition number can be set according to actual needs, and this application does not limit it), then the identification module can determine that the electronic device is in a motion state . If the jitter range of the MIMO condition number is small, it can be determined that the electronic device is in a static state.
- the identification module may combine the judgment result based on the parameters input by the IMU module and the judgment result based on the MIMO condition number to determine whether the electronic device is in a motion state.
- the identification module may determine that the electronic device is in a moving state based on any parameter. For example, if the identification module determines that the electronic device is in a static state based on the parameters input by the IMU module, and determines that the electronic device is in a moving state based on the MIMO condition number, then the identification module determines that the electronic device is in a moving state.
- the recognition module outputs the recognition result (including the motion state or the static state) to the arbitration module.
- the arbitration module can determine whether the current electronic device is in a motion state or a static state based on the recognition result input by the recognition module.
- the arbitration module detects a state change of the electronic device, for example, the recognition result obtained from the recognition module in the previous cycle indicates that the electronic device is in a moving state, and the recognition result obtained from the recognition module in the current cycle indicates that the electronic device is in a static state . Then, the arbitration module can continue to monitor the identification results input by the identification module in one or more subsequent periods, so as to determine the state of the electronic device. For example, after the arbitration module acquires the identification result of the current period indicating that the electronic device is in a static state, the arbitration module may further acquire the identification result input by the identification module of the next period.
- the arbitration module may determine that the electronic device is in a static state. If the recognition result input by the recognition module indicates that the electronic device is in a moving state in the next period, the arbitration module may determine that the electronic device is still in a moving state.
- the configuration information of the codec module may be adjusted based on the current state of the electronic device, and/or the Wi-Fi Driver configuration information.
- FIG. 12 is a schematic diagram of a configuration flow diagram of a sending end (ie, a mobile phone) exemplarily shown.
- a sending end ie, a mobile phone
- the recognition module recognizes that the mobile phone is currently in motion.
- the recognition module outputs the recognition result (that is, the motion state) to the arbitration module.
- the arbitration module determines that the mobile phone is in a motion state in response to the received recognition result input by the recognition module.
- the arbitration module pre-stores the configuration information corresponding to the motion state and the configuration information corresponding to the static state.
- the arbitration module can obtain the configuration information corresponding to the pre-stored motion state, and adjust the configuration information corresponding to the codec module and/or Wi-Fi driver configuration.
- the configuration information corresponding to the motion state includes but is not limited to:
- the mobile phone may select at least one of the above configuration modes for configuration.
- the mobile phone can set the retransmission times of the MAC layer.
- the MAC layer retransmission times corresponding to the motion state may be 100 times. That is, the arbitration module can configure the Wi-Fi driver, for example, send an indication signal to the Wi-Fi driver to instruct the Wi-Fi driver to set the number of MAC layer retransmissions to 100.
- the arbitration module can also preset a plurality of retransmission times, and set the corresponding relationship between the intensity of different motion states and the retransmission times.
- the arbitration module can determine the corresponding number of retransmissions based on the intensity of the motion state.
- the recognition result may include not only information indicating that the electronic device is in motion, but also information indicating the intensity of the motion of the electronic device.
- the identification module can set the corresponding relationship between different parameters and the intensity of the exercise state, and the identification module can determine the corresponding intensity of the exercise state based on the parameters obtained from the IMU drive.
- the recognition module can indicate the intensity and the detected motion state to the arbitration module.
- the arbitration module can determine the corresponding number of retransmissions based on the acquired intensity of the motion state.
- the Wi-Fi driver responds to the received number of retransmissions (for example, 100 times) indicated by the arbitration module, and may send the data packet according to the obtained number of retransmissions when sending the data packet. For example, the Wi-Fi driver sends a data packet. If the Wi-Fi driver receives an acknowledgment message (such as an ACK (Acknowledge character) message) fed back by the peer, the Wi-Fi driver continues to send the next data packet. If the Wi-Fi driver does not receive the ACK message fed back from the peer within a predetermined period of time, the Wi-Fi driver will resend the data packet, that is, the Wi-Fi driver can repeat at most before receiving the ACK message fed back from the peer. Send this packet 100 times.
- an acknowledgment message such as an ACK (Acknowledge character) message
- the Wi-Fi driver when the Wi-Fi driver sends data packets, it may also send them in a manner of data packet aggregation. For example, when the Wi-Fi driver sends data packets, it can send 64 data packets at the same time (it can be set based on actual needs, which is not limited in this application). After sending 64 data packets, the Wi-Fi driver will receive an ACK message for each data packet fed back by the peer. After the Wi-Fi driver detects that the ACK message corresponding to the at least one data packet has not been received, the Wi-Fi driver resends the at least one data packet.
- both the mobile phone and the tablet adopt MIMO communication.
- the arbitration module may send an indication signal to the Wi-Fi driver to instruct the Wi-Fi driver to adjust the MIMO mode to the diversity mode.
- Fig. 13 is a schematic diagram of communication in a diversity mode exemplarily shown.
- the mobile phone includes antenna 1 , antenna 2 , antenna 3 and antenna 4 , and each antenna corresponds to physical channel 1 , physical channel 2 , physical channel 3 and physical channel 4 respectively.
- Mobile phones can transmit the same data packets on each physical channel.
- the image frames sent by the mobile phone include I1 frame, B2 frame, B2 frame, P1 frame, B3 frame, B4 frame and P2 frame.
- Each image frame can be contained in one or more data packets.
- each image frame shown in FIG. 13 is used to indicate the data size of the image frame, and may also be used to identify the transmission duration. That is to say, an image frame with a larger amount of data has a longer corresponding transmission time.
- the arbitration module may send an indication signal to the Wi-Fi driver to instruct the Wi-Fi driver to start feeding back frame loss statistics.
- FIG. 14a is a schematic diagram of exemplarily showing feedback frame loss statistics. Please refer to FIG. 14a.
- the Wi-Fi driver can confirm that the data packet transmission failed. That is, the transmission of the image frame carried in the data packet fails.
- the Wi-Fi driver can feed back image frame loss to the arbitration module.
- the arbitration module sends indication information to the codec module to instruct the codec module to adjust the coding strategy.
- Fig. 14b is a schematic diagram of an exemplary adjustment coding strategy.
- the Wi-Fi driver feeds back the P1 frame loss to the arbitration module.
- the arbitration module instructs the codec module to adjust the coding strategy of the image frame dependent on the P1 frame.
- the decoding of P2 frames depends on P1 frames. Therefore, in the case of P1 frame loss, the codec can adjust the coding strategy of P2 frames based on the instructions of the arbitration module during encoding, so that P2 frames are based on I1
- the frame is encoded, as shown in (2) of Figure 14b.
- each image frame includes image frame description information
- the image frame description information may include information for indicating coding dependencies (also referred to as inter-frame prediction relationships).
- the codec at the receiving end can determine that the P2 frame can be decoded based on the I1 frame based on the image frame description information in the image frame, so as to avoid the problem of P2 frame decoding failure caused by the loss of the P1 frame.
- FIG. 15a is a schematic diagram exemplarily showing another kind of feedback frame loss statistics.
- the Wi-Fi driver feeds back the loss of image frames to the arbitration module (for details, refer to the above, and details will not be repeated here).
- the arbitration module adjusts the retransmission times of the Wi-Fi driver in response to the received feedback from the Wi-Fi driver.
- the mobile phone sends data packet 1 to the tablet, and after sending n times repeatedly, an ACK message fed back by the tablet is received.
- n is an integer greater than 0 and less than the maximum number of transmission times corresponding to the current state (which may be a motion state or a static state).
- the Wi-Fi driver sends data packet 2.
- the Wi-Fi driver repeatedly sends the data packet 2 m times, where m is the maximum number of transmissions corresponding to the current state, for example, it may be the maximum number of transmissions corresponding to the motion state (for example, 100 times).
- the Wi-Fi driver confirms that the sending of data packet 2 fails, and the Wi-Fi driver feeds back the loss of the image frame to the arbitration module.
- the data packet 2 carries the image frame P2, and the Wi-Fi driver feeds back the loss of the image frame P2 to the arbitration module.
- the arbitration module instructs the Wi-Fi driver to adjust the number of retransmissions, that is, the arbitration module instructs the Wi-Fi driver to retransmit the data packet 2 again, for example, the arbitration module may instruct the Wi-Fi driver to adjust the number of retransmissions this time is 200 times, that is to say, the Wi-Fi driver adjusts the original number of retransmissions (for example, 100 times) to 200 times. That is, the Wi-Fi driver can resend data packet 2, and the number of retransmissions can reach up to 100 times. Exemplarily, if the Wi-Fi driver retransmits the data packet 2 again, the ACK message is still not received.
- the Wi-Fi driver can feed back to the arbitration module again, and the arbitration module can instruct the Wi-Fi driver to retransmit again.
- the Wi-Fi driver confirms that packet 2 is lost and can continue to transmit the next packet.
- the Wi-Fi driver can feed back the loss of image frames to the arbitration module, and the arbitration module can adjust the encoding strategy of the encoder (the description can refer to the above, and will not be repeated here).
- the arbitration module may send an indication signal to the codec module to instruct the codec module to reduce the resolution and/or code rate of the image frame when encoding.
- the code rate can be any of 5Mbps, 10Mbps, and 30Mbps
- the resolution can be any of 1080p, 2K, and 4K. That is to say, in the case of time-varying communication channels that may be encountered in a moving state, the resolution and/or code rate of the image frame can be reduced to reduce the amount of data transmitted by the sending end to reduce the use of wireless bandwidth.
- FIG. 16 is a schematic diagram of a configuration flow diagram of a sending end (ie, a mobile phone) exemplarily shown.
- the mobile phone and the tablet are in a stationary state on the desktop as an example.
- a single scene is taken as an example.
- the technical solutions of the embodiments of the present application can be applied to different state transitions. It can be recognized that the mobile phone is currently in a motion state (same as the tablet), and when the user holds the mobile phone and the tablet from running to stationary, the mobile phone can recognize that the mobile phone is currently in a stationary state.
- the identification module can identify that the mobile phone is currently in a static state.
- the identification module recognizes that the mobile phone is in a static state, and the identification module outputs the identification result (that is, the static state) to the arbitration module.
- the arbitration module determines that the mobile phone is in a static state in response to the received identification result input by the identification module.
- the arbitration module pre-stores configuration information corresponding to the static state.
- the arbitration module can obtain the pre-stored configuration information corresponding to the static state, and adjust the configuration information corresponding to the codec module and/or Wi-Fi driver configuration.
- the configuration information corresponding to the static state includes but is not limited to:
- the mobile phone may select at least one of the above configuration modes for configuration.
- the above configuration information is described below:
- the mobile phone can set the retransmission times of the MAC layer.
- the number of MAC layer retransmissions corresponding to the static state can be 20 times, that is, the maximum number of transmissions is less than the maximum number of transmissions in the moving state, thereby reducing the data transmission delay by reducing the number of MAC layer retransmissions corresponding to the static state.
- the arbitration module can configure the Wi-Fi driver, such as sending an indication signal to the Wi-Fi driver to instruct the Wi-Fi driver to set the number of MAC layer retransmissions to 20 times.
- the Wi-Fi driver responds to the received number of retransmissions (for example, 20 times) indicated by the arbitration module, and may send the data packet according to the obtained number of retransmissions when sending the data packet. For example, the Wi-Fi driver sends a data packet. If the Wi-Fi driver receives an acknowledgment message (such as an ACK (Acknowledge character) message) fed back by the peer, the Wi-Fi driver continues to send the next data packet. If the Wi-Fi driver does not receive the ACK message fed back from the peer within a predetermined period of time, the Wi-Fi driver will resend the data packet, that is, the Wi-Fi driver can repeat at most before receiving the ACK message fed back from the peer. Send this packet 20 times.
- an acknowledgment message such as an ACK (Acknowledge character) message
- the arbitration module may send an indication signal to the Wi-Fi driver to instruct the Wi-Fi driver to adjust the MIMO mode to the multiplexing mode.
- Fig. 17 is a schematic diagram of communication in a multiplexing mode exemplarily shown.
- the mobile phone includes antenna 1, antenna 2, antenna 3 and antenna 4, and each antenna corresponds to physical channel 1, physical channel 2, physical channel 3 and physical channel 4 respectively.
- Mobile phones can transmit different data packets on each physical channel.
- the data packets sent by the mobile phone include: data packet 1 carrying I1 frame, data packet 2 carrying B2 frame and B2 frame, data packet 3 carrying P1 frame, data packet 4 carrying B3 frame and B4 frame, and carrying P2 frame Packet 5 of the frame.
- data packet 1 is sent on physical channel 1
- data packets 2 and 3 are sent on physical channel 2
- data packets are sent on physical channel 3.
- Send packet 4 send packet 5 on physical channel 4.
- the method of feeding back frame loss statistics can refer to the motion state, that is, the relevant descriptions in FIG. 14a to FIG. 15b , and will not be repeated here.
- the arbitration module may send an indication signal to the codec module to instruct the codec module to increase the resolution and/or code rate of the image frame during encoding, so as to improve the picture quality at the receiving end.
- the arbitration module and the identification module of the tablet may be started (that is, invoked).
- the parameters (or information) detected by the IMU module (such as the IMU module 180 in FIG. 2 ) are obtained from the IMU driver.
- the identification module can detect the state of the electronic device based on the acquired parameters. States include: motion state or static state.
- the recognition module can output the recognition result to the arbitration module. For the parts not described, refer to the relevant content of the sending end (ie, the mobile phone), and details will not be repeated here.
- the recognition module outputs the recognition result (including the motion state or the static state) to the arbitration module.
- the arbitration module can determine whether the current electronic device is in a motion state or a static state based on the recognition result input by the recognition module.
- the configuration parameters of the codec module may be adjusted based on the current state of the electronic device, and/or, the Wi-Fi Driver configuration information.
- the parts not described please refer to the relevant content of the sender, and will not repeat them here.
- FIG. 18 is a schematic diagram of a configuration process of a receiving end (ie, a tablet) exemplarily shown. Please refer to FIG. 18 .
- the identification module recognizes that the tablet is currently in a motion state.
- the recognition module recognizes that the tablet is in a motion state, and the recognition module outputs the recognition result (that is, the motion state) to the arbitration module.
- the arbitration module determines that the tablet is in a motion state in response to the received recognition result input by the recognition module.
- the arbitration module pre-stores the configuration information corresponding to the motion state and the configuration information corresponding to the static state.
- the arbitration module can obtain the configuration information corresponding to the pre-stored motion state, and adjust the configuration information corresponding to the codec module and/or Wi-Fi driver configuration.
- the configuration information corresponding to the motion state includes but is not limited to:
- the tablet can be configured by selecting at least one of the above several configuration modes.
- the above configuration information is described below:
- the arbitration module may instruct the Wi-Fi driver to switch the MIMO mode to the diversity mode.
- the Wi-Fi driver performs diversity reception on the data packets sent by the sender (that is, the mobile phone).
- the sender that is, the mobile phone.
- the arbitration module may send an indication signal to the codec module to instruct the codec module to increase the image buffer.
- the current image cache of the codec module can cache images corresponding to 3 image frames.
- the arbitration module can instruct the codec module to increase the image cache to the corresponding images of 30 image frames (can be set according to actual needs, this application does not limit), thereby reducing frame loss caused by unstable arrival time of image frame transmission.
- Fig. 19 is a schematic diagram of an exemplary module interaction process. Please refer to FIG. 19 .
- the Wi-Fi driver of the tablet receives data packet 1, data packet 2 and data packet 3.
- the image frames carried in data packets 1 to 3 is output to the codec module.
- the image frames of the data packet 1 are 10 image frames
- the image frames of the data packet 2 include 10 image frames
- the image frames of the data packet 3 include 10 image frames. That is, the codec module receives 30 image frames in total.
- the codec module can decode the received image frames of data packets 1 to 3 (that is, 30 image frames) to obtain images corresponding to the 30 image frames.
- the codec module has increased the image cache to 30 images, and the codec module can place 30 images corresponding to 30 image frames in the image cache.
- the image processing module (refer to the description in FIG. 6 ) can sequentially extract images from the image cache of the codec module, process the images, and output the processed images to the screen projection application. Screencasting applications can display images.
- FIG. 20 is a schematic diagram of a configuration flow of a receiving end (ie, a tablet) exemplarily shown.
- the mobile phone and the tablet are in a stationary state on the desktop as an example.
- the recognition module can recognize that the tablet is currently in a static state.
- the recognition module recognizes that the tablet is in a static state, and the recognition module outputs the recognition result (that is, the static state) to the arbitration module.
- the arbitration module determines that the tablet is in a static state in response to the received recognition result input by the recognition module.
- the arbitration module pre-stores configuration information corresponding to the static state.
- the arbitration module can obtain the pre-stored configuration information corresponding to the static state, and adjust the configuration information corresponding to the codec module and/or Wi-Fi driver configuration.
- the configuration information corresponding to the static state includes but is not limited to:
- the tablet can be configured by selecting at least one of the above several configuration modes.
- the above configuration information is described below:
- the arbitration module may instruct the Wi-Fi driver to switch the MIMO mode to the multiplexing mode.
- the Wi-Fi driver multiplexes and receives the data packets sent by the sender (ie, the mobile phone).
- the sender ie, the mobile phone.
- the arbitration module may send an indication signal to the codec module to instruct the codec module to reduce the image buffer.
- the size of the current image cache of the codec module corresponds to the motion state, for example, images corresponding to 30 image frames can be cached.
- the arbitration module can instruct the codec module to reduce the image cache to images corresponding to 3 image frames (which can be set according to actual needs, and this application does not limit it), so that the screen projection application can display images in time and reduce the time spent on screen projection. delay.
- the parts that are not described please refer to the relevant content above, and details will not be repeated here.
- the “increase” or “decrease” mentioned in the embodiment of the present application is a relative transformation with respect to the configuration information. It can be understood that the configuration information in the static state is reduced relative to the configuration information in the moving state, or in other words, the configuration information in the moving state is increased relative to the configuration information in the static state.
- the arbitration module of the mobile phone does not configure the number of MAC layer retransmissions when configuring information in the current cycle, that is, the number of retransmissions at the MAC layer is still transmitted according to the number of retransmissions in the static state (for example, 20 times), then in the following In one cycle, if the arbitration module determines that the mobile phone is in a static state, since the number of retransmissions is already the number of retransmissions corresponding to the static state, there is no need to configure the number of retransmissions.
- the arbitration module of the mobile phone determines the current state of the device (including the motion state and the static state), it can send the recognition result to the tablet through the P2P connection with the tablet (that is, including the motion state or the static state). Stationary state).
- the tablet side is the same, and will not be repeated here.
- the other end if one end of the electronic device in the screen projection scene is in a moving state, the other end will be correspondingly configured to be in a moving state.
- the mobile phone and the tablet will be configured based on the configuration information in the stationary state.
- the arbitration module of the mobile phone determines that the mobile phone is in a motion state, and the arbitration module configures based on the configuration parameters corresponding to the motion state, and the arbitration module sends indication information to the tablet.
- the indication information includes the recognition result, to indicate that the phone is currently in motion.
- the tablet determines that the mobile phone is in a motion state in response to the received instruction information, and the arbitration module in the tablet performs configuration based on configuration parameters corresponding to the motion state.
- the arbitration module of the tablet determines that the tablet is currently in a static state and is configured to the configuration corresponding to the static state, if the tablet receives the indication information from the mobile phone indicating that the mobile phone is in a motion state, the arbitration module of the tablet will change the configuration to The configuration corresponding to the motion state.
- the tablet side is the same, and will not be repeated here.
- the arbitration module of the mobile phone may send the changed state to the tablet when the state of the mobile phone changes. For example, after the arbitration module of the mobile phone determines that the mobile phone has changed from a stationary state to a moving state, the mobile phone sends indication information to the tablet, and the indication information includes the recognition result to indicate that the mobile phone is currently in a moving state.
- the tablet determines that the mobile phone is in a motion state in response to the received instruction information, and the arbitration module in the tablet performs configuration based on configuration parameters corresponding to the motion state.
- the mobile phone may not send indication information, so as to reduce the resource occupation of the wireless channel.
- the tablet confirms that the mobile phone is in a motion state before receiving the indication information indicating that the mobile phone becomes a static state. The tablet side is the same, and will not be repeated here.
- the mobile phone can switch the MIMO mode during configuration. It should be noted that if the mobile phone side chooses to switch the MIMO mode during the configuration process, the opposite end (that is, the tablet) also needs to Only by switching to the corresponding mode can the peer end be able to receive correctly. The tablet side is the same, and will not be repeated here. Correspondingly, in order to ensure that the peer end can switch to the same mode to correctly receive the data packets sent by the mobile phone. Please refer to FIG. 21b. For example, when the mobile phone sends the identification result to the tablet, it also needs to send the arbitration result.
- the arbitration result is used to instruct the mobile phone to determine the MIMO mode (including diversity mode or multiplexing mode) to be switched based on the identification result.
- the tablet After receiving the identification result and arbitration result sent by the mobile phone, the tablet switches the MIMO mode correspondingly. For example, if the mobile phone determines that the MIMO mode needs to be switched to the diversity mode based on the motion state, the tablet also needs to be configured to the diversity mode.
- the tablet sends a confirmation message to the mobile phone to indicate that the tablet has switched to a corresponding MIMO mode (eg diversity mode). After receiving the confirmation message sent by the tablet, the mobile phone switches the MIMO mode to the diversity mode.
- the arbitration module may select at least one configuration mode corresponding to the static state for configuration.
- the arbitration module of the mobile phone can indicate that the MIMO mode driven by Wi-Fi is the multiplexing mode, and the number of retransmissions at the MAC layer is 20 times.
- the arbitration module in the tablet indicates that the MIMO mode driven by Wi-Fi is the multiplexing mode, and the image cache can cache 3 image sizes.
- the Wi-Fi driver of the mobile phone and the Wi-Fi driver of the tablet can perform data interaction based on the current configuration.
- the user goes upstairs with a mobile phone and a tablet.
- Both the identification module in the mobile phone and the identification module in the tablet detect that the current device is in a motion state.
- the identification module in the mobile phone outputs the identification result to the arbitration module, which is used to indicate that the mobile phone is in a motion state.
- the arbitration module of the mobile phone can be configured based on at least one piece of configuration information corresponding to the motion state.
- the arbitration module may instruct the Wi-Fi driver to switch the MIMO mode to the diversity mode after determining that the mobile phone is in motion.
- the arbitration module may not instruct the Wi-Fi driver to switch the MIMO mode, but may choose to increase the number of MAC layer retransmissions. That is to say, in the motion state, the mobile phone can still use the multiplexing mode to communicate.
- the arbitration module confirms that the mobile phone is in motion, it selects "increase the number of retransmissions at the MAC layer" and "feedback frame loss statistics" as an example.
- the arbitration module instructs the Wi-Fi driver to configure accordingly. For details, refer to the above, and details will not be repeated here.
- the Wi-Fi driver can perform data transmission based on the changed configuration.
- the mobile phone sends the identification result to the tablet, which is used to instruct the mobile phone to switch to a motion state.
- the processing on the tablet side is similar to that on the mobile phone side, and will not be repeated here.
- the data processing method in the embodiment of the present application may also be applied to other data transmission scenarios.
- the technical solutions in the embodiments of the present application can be applied to the Internet access scenario of mobile phones (or other devices). That is, when the mobile phone sends data to the server, the data sending mode can also be switched based on the movement state of the mobile phone. It should be noted that, if the data sent by the mobile phone is an image frame, the processes executed on the mobile phone side in the embodiment of the present application can be applied. If the data sent by the mobile phone is a non-image frame, the configuration mode of codec parameter adjustment is removed.
- the electronic device includes hardware and/or software modules corresponding to each function.
- the present application 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 drives hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions in combination with the embodiments for each specific application, but such implementation should not be regarded as exceeding the scope of the present application.
- FIG. 22 shows a schematic block diagram of an apparatus 2200 according to an embodiment of the present application.
- the apparatus 2200 may include: a processor 2201 and a transceiver/transceiving pin 2202 , and optionally, a memory 2203 .
- bus 2204 includes not only a data bus, but also a power bus, a control bus, and a status signal bus.
- bus 2204 includes not only a data bus, but also a power bus, a control bus, and a status signal bus.
- the various buses are referred to as bus 2204 in the figure.
- the memory 2203 may be used for the instructions in the foregoing method embodiments.
- the processor 2201 can be used to execute instructions in the memory 2203, and control the receiving pin to receive signals, and control the sending pin to send signals.
- the apparatus 2200 may be the electronic device or the chip of the electronic device in the foregoing method embodiments.
- This embodiment also provides a computer storage medium, in which computer instructions are stored, and when the computer instructions are run on the electronic device, the electronic device is made to execute the above related method steps to implement the data processing method in the above embodiment.
- This embodiment also provides a computer program product, which, when running on a computer, causes the computer to execute the above related steps, so as to implement the data processing method in the above embodiment.
- an embodiment of the present application also provides a device, which may specifically be a chip, a component or a module, and the device may include a connected processor and a memory; wherein the memory is used to store computer-executable 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 data processing methods in the foregoing method embodiments.
- the electronic device, computer storage medium, computer program product or chip provided in this embodiment is all used to execute the corresponding method provided above, therefore, the beneficial effects it can achieve can refer to the corresponding method provided above The beneficial effects in the method will not be repeated here.
- the disclosed devices and methods may be implemented in other ways.
- the device embodiments described above are only illustrative.
- the division of modules or units is only a logical function division. In actual implementation, there may be other division methods.
- multiple units or components can be combined or It may be integrated into another device, or some features may be omitted, or not implemented.
- the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
- a unit described as a separate component may or may not be physically separated, and a component shown as a unit may be one physical unit or multiple physical units, which may be located in one place or distributed to multiple different places. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
- each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
- the above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
- an integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a readable storage medium.
- the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the software product is stored in a storage medium Among them, several instructions are included to make a device (which may be a single-chip microcomputer, a chip, etc.) or a processor (processor) execute all or part of the steps of the methods in various embodiments of the present application.
- the aforementioned storage medium includes: various media that can store program codes such as U disk, mobile hard disk, read only memory (ROM), random access memory (random access memory, RAM), magnetic disk or optical disk.
- the steps of the methods or algorithms described in connection with the disclosure of the embodiments of the present application may be implemented in the form of hardware, or may be implemented in the form of a processor executing software instructions.
- the software instructions can be composed of corresponding software modules, and the software modules can be stored in random access memory (Random Access Memory, RAM), flash memory, read-only memory (Read Only Memory, ROM), erasable programmable read-only memory ( Erasable Programmable ROM, EPROM), Electrically Erasable Programmable Read-Only Memory (Electrically EPROM, EEPROM), registers, hard disk, removable hard disk, CD-ROM, or any other form of storage medium known in the art.
- An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium.
- the storage medium may also be a component of the processor.
- the functions described in the embodiments of the present application may be implemented by hardware, software, firmware or any combination thereof.
- the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium.
- Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another.
- a storage media may be any available media that can be accessed by a general purpose or special purpose computer.
Landscapes
- Engineering & Computer Science (AREA)
- Signal Processing (AREA)
- Computer Networks & Wireless Communication (AREA)
- Multimedia (AREA)
- Computer Security & Cryptography (AREA)
- Databases & Information Systems (AREA)
- Computer Graphics (AREA)
- General Engineering & Computer Science (AREA)
- Quality & Reliability (AREA)
- Mobile Radio Communication Systems (AREA)
- Telephone Function (AREA)
Abstract
本申请实施例提供了一种数据处理方法及电子设备。该方法包括:第一电子设备与第二电子设备通过无线连接进行数据交互的过程中,第一电子设备可检测自身的状态,其中,第一电子设备的状态包括运动状态或静止状态。第一电子设备可基于自身的状态,调整与第二电子设备进行交互时的无线连接配置参数和/或编解码策略。从而提供一种可基于电子设备的运动状态,适应性调整数据交互的配置参数的方法,满足不同的交互场景的需求。
Description
本申请要求于2021年07月20日提交中国国家知识产权局、申请号为202110819701.8、申请名称为“数据处理方法及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请实施例涉及终端设备领域,尤其涉及一种数据处理方法及电子设备。
随着投屏技术的发展,投屏技术的应用场景越来越多。例如,用户可以在行走中使用手机对平板,或者车载屏幕进行投屏。因此,在投屏场景中,投屏的发送端(例如手机)和接收端(例如平板)可能处于运动状态。由于投屏设备的运动,将会导致投屏设备间的无线信道条件快速时变,使得投屏数据传输出现时延和抖动,进而导致投屏画面出现丢帧和卡顿。
发明内容
为了解决上述技术问题,本申请提供一种数据处理方法及电子设备。在该方法中,电子设备在与其他电子设备通过无线连接进行数据交互的过程中,电子设备可基于其运动状态,调整数据交互时的配置参数,从而以针对不同的运动状态,对配置参数进行适应性调整。
第一方面,本申请实施例提供一种数据处理方法。该方法包括:第一电子设备与第二电子设备建立无线连接,并通过无线连接与第二电子设备进行数据交互。第一电子设备检测第一电子设备的状态,第一电子设备的状态为运动状态或静止状态。第一电子设备基于第一电子设备的状态,确定目标配置参数,其中,目标配置参数包括第一电子设备与第二电子设备之间的无线连接配置参数,和/或,第一电子设备的编解码策略。第一电子设备基于目标配置参数,与第二电子设备进行数据交互。这样,第一电子设备可基于其运动状态,适应性调整为对应的目标配置参数,可根据不同的运动状态,配置对应的配置参数,例如,运动状态对应运动状态的配置参数,静止状态配置有静止状态的配置参数。从而基于不同的运动状态,实现不同的投屏效果。
示例性的,第一电子设备可基于IMU模块检测到的参数,确定第一电子设备的运动状态。
示例性的,第一电子设备可基于IMU模块和无线连接的通信状态,确定第一电子设备的运动状态。
示例性的,第一电子设备与第二电子设备之间的无线连接可以是Wi-Fi连接。
根据第一方面,第一电子设备与第二电子设备建立无线连接,并通过无线连接与第 二电子设备进行数据交互,包括:第一电子设备响应于接收到的第一用户操作,向第二电子设备发送连接请求消息。第一电子设备响应于接收到的第二电子设备发送的响应消息,与第二电子设备建立无线连接。第一电子设备通过无线连接向第二电子设备发送包含图像帧的数据包。这样,第一电子设备作为发送端,向第二电子设备发送包含图像帧的数据包的过程中,其可基于第一电子设备的运动状态,通过调整发送端的配置参数,以提高图像帧传输的稳定性。
根据第一方面,或者以上第一方面的任意一种实现方式,若第一电子设备的状态为运动状态,无线连接配置参数包括以下至少之一:数据包的重传次数为N、多输入多输出MIMO模式为分集模式;N为大于0的整数。这样,第一电子设备在投屏的过程中,若第一电子设备处于运动状态,则其可通过增加数据包的重传次数、将MIMO模式调整为分集模式,以提升无线传输通路的鲁棒性,减少图像帧丢失,卡顿等问题的发生。
根据第一方面,或者以上第一方面的任意一种实现方式,若第一电子设备的状态静止状态,无线连接配置参数包括以下至少之一:数据包的重传次数为M、MIMO模式为复用模式;其中,M为大于0,且小于N的整数。这样,第一电子设备在投屏的过程中,若其处于静止状态,则第一电子设备可通过减少数据包的重传次数,将MIMO模式调整为复用模式,从而提高数据传输性能,提供更优的低时延投屏效果。
根据第一方面,或者以上第一方面的任意一种实现方式,若第一电子设备的状态为运动状态,第一电子设备的编解码策略包括以下至少之一:图像帧的码率为A1;图像帧的分辨率为B1;调整图像帧的编码依赖关系。这样,第一电子设备在投屏过程中,且第一电子设备为运动状态时,第一电子设备可通过降低图像帧的码率、分辨率,以减少数据传输时的数据量,以降低无线带宽使用。以及第一电子设备还可以通过反馈机制,调整图像帧的编码依赖关系,提供更优的低时延投屏效果。
根据第一方面,或者以上第一方面的任意一种实现方式,若第一电子设备的状态为静止状态,第一电子设备的编解码策略包括以下至少之一:图像帧的码率为A2;图像帧的分辨率为B2;调整图像帧的编码依赖关系;其中,A2大于A1,B2大于B1。这样,第一电子设备在投屏过程中,且第一电子设备为静止状态时,第一电子设备可通过增加图像帧的码率、分辨率,以提升接收端的显示画质。以及第一电子设备还可以通过反馈机制,以在图像帧丢失的情况下,调整图像帧的编码依赖关系,以降低图像帧丢失对接收端的解码的影响,从而提供更优的低时延投屏效果。
根据第一方面,或者以上第一方面的任意一种实现方式,第一电子设备与第二电子设备建立无线连接,并通过无线连接与第二电子设备进行数据交互,包括:第一电子设备响应于接收到的第二电子设备发送的连接请求消息,向第二电子设备发送响应消息;第一电子设备与第二电子设备建立无线连接;第一电子设备通过无线连接接收第二电子 设备发送的包含图像帧的数据包。这样,第一电子设备作为接收端,在接收第二电子设备发送的包含图像帧的数据包的过程中,其可基于第一电子设备的运动状态,通过调整发送端的配置参数,以提高图像帧显示的稳定性。
根据第一方面,或者以上第一方面的任意一种实现方式,若第一电子设备的状态为运动状态,无线连接配置参数包括:MIMO模式为分集模式。这样,在第一电子设备的投屏过程中,且第一电子设备处于运动状态的情况下,第一电子设备可通过将MIMO模式调整为分集模式,以提高图像帧接收的成功率。
根据第一方面,或者以上第一方面的任意一种实现方式,若第一电子设备的状态为静止状态,无线连接配置参数包括:MIMO模式为复用模式。这样,在第一电子设备的投屏过程中,且第一电子设备处于静止状态的情况下,第一电子设备可通过将MIMO模式调整为复用模式,以提高图像帧接收的效率。
根据第一方面,或者以上第一方面的任意一种实现方式,若第一电子设备的状态为运动状态,第一电子设备的编解码策略包括:图像缓存大小设置为C1。这样,在第一电子设备的投屏过程中,且第一电子设备处于运动状态的情况下,第一电子设备可通过增加图像缓存大小,以减少帧传输到达时间不稳定,而导致的丢帧。
根据第一方面,或者以上第一方面的任意一种实现方式,若第一电子设备的状态为静态状态,第一电子设备的编解码策略包括:图像缓存大小设置为C2;其中,C2小于C1。这样,在第一电子设备的投屏过程中,且第一电子设备处于静止状态的情况下,第一电子设备可通过减小图像缓存大小,以将图像帧及时送显,以降低投屏显示时延。
根据第一方面,或者以上第一方面的任意一种实现方式,方法还包括:第一电子设备向第二电子设备发送第一电子设备的状态。这样,第一电子设备与第二电子设备可将自身的状态通知给对端,以使得对端能够相应的调整配置参数。
根据第一方面,或者以上第一方面的任意一种实现方式,方法还包括:第一电子设备接收第二电子设备发送的第二电子设备的状态;其中,第二电子设备的状态为运动状态或静止状态;若第二电子设备的状态为运动状态,第一电子设备将第一电子设备的配置参数调整为与运动状态对应的目标配置参数。这样,在第一电子设备与第二电子设备中的任意一端处于运动状态的情况下,则另一端同样将配置参数调整为运动状态对应的配置参数。
第二方面,本申请实施例提供一种第一电子设备。该电子设备包括存储器和处理器,存储器与处理器耦合;存储器存储有程序指令,当程序指令由处理器执行时,使得第一电子设备执行如下步骤:与第二电子设备建立无线连接,并通过无线连接与第二电子设 备进行数据交互;检测第一电子设备的状态,第一电子设备的状态为运动状态或静止状态;基于第一电子设备的状态,确定目标配置参数;目标配置参数包括第一电子设备与第二电子设备之间的无线连接配置参数,和/或,第一电子设备的编解码策略;基于目标配置参数,与第二电子设备进行数据交互。
根据第二方面,当程序指令由处理器执行时,使得第一电子设备执行如下步骤:响应于接收到的第一用户操作,向第二电子设备发送连接请求消息;响应于接收到的第二电子设备发送的响应消息,与第二电子设备建立无线连接;通过无线连接向第二电子设备发送包含图像帧的数据包。
根据第二方面,或者以上第二方面的任意一种实现方式,若第一电子设备的状态为运动状态,无线连接配置参数包括以下至少之一:数据包的重传次数为N、多输入多输出MIMO模式为分集模式;N为大于0的整数;
根据第二方面,或者以上第二方面的任意一种实现方式,若第一电子设备的状态静止状态,无线连接配置参数包括以下至少之一:数据包的重传次数为M、MIMO模式为复用模式;其中,M为大于0,且小于N的整数。
根据第二方面,或者以上第二方面的任意一种实现方式,若第一电子设备的状态为运动状态,第一电子设备的编解码策略包括以下至少之一:图像帧的码率为A1;图像帧的分辨率为B1;调整图像帧的编码依赖关系。
根据第二方面,或者以上第二方面的任意一种实现方式,若第一电子设备的状态为静止状态,第一电子设备的编解码策略包括以下至少之一:图像帧的码率为A2;图像帧的分辨率为B2;调整图像帧的编码依赖关系;其中,A2大于A1,B2大于B1。
根据第二方面,或者以上第二方面的任意一种实现方式,当程序指令由处理器执行时,使得第一电子设备执行如下步骤:响应于接收到的第二电子设备发送的连接请求消息,向第二电子设备发送响应消息;与第二电子设备建立无线连接;通过无线连接接收第二电子设备发送的包含图像帧的数据包。
根据第二方面,或者以上第二方面的任意一种实现方式,若第一电子设备的状态为运动状态,无线连接配置参数包括:MIMO模式为分集模式。
根据第二方面,或者以上第二方面的任意一种实现方式,若第一电子设备的状态为静止状态,无线连接配置参数包括:MIMO模式为复用模式。
根据第二方面,或者以上第二方面的任意一种实现方式,若第一电子设备的状态为 运动状态,第一电子设备的编解码策略包括:图像缓存大小设置为C1。
根据第二方面,或者以上第二方面的任意一种实现方式,若第一电子设备的状态为静态状态,第一电子设备的编解码策略包括:图像缓存大小设置为C2;其中,C2小于C1。
根据第二方面,或者以上第二方面的任意一种实现方式,当程序指令由处理器执行时,使得第一电子设备执行如下步骤:向第二电子设备发送第一电子设备的状态。
根据第二方面,或者以上第二方面的任意一种实现方式,当程序指令由处理器执行时,使得第一电子设备执行如下步骤:接收第二电子设备发送的第二电子设备的状态;其中,第二电子设备的状态为运动状态或静止状态;若第二电子设备的状态为运动状态,将第一电子设备的配置参数调整为与运动状态对应的目标配置参数。
第二方面以及第二方面的任意一种实现方式分别与第一方面以及第一方面的任意一种实现方式相对应。第二方面以及第二方面的任意一种实现方式所对应的技术效果可参见上述第一方面以及第一方面的任意一种实现方式所对应的技术效果,此处不再赘述。
第三方面,本申请实施例提供了一种计算机可读介质,用于存储计算机程序,该计算机程序包括用于执行第二方面或第二方面的任意可能的实现方式中的方法的指令。
第三方面以及第三方面的任意一种实现方式分别与第一方面以及第一方面的任意一种实现方式相对应。第三方面以及第三方面的任意一种实现方式所对应的技术效果可参见上述第一方面以及第一方面的任意一种实现方式所对应的技术效果,此处不再赘述。
第四方面,本申请实施例提供了一种计算机程序,该计算机程序包括用于执行第二方面或第二方面的任意可能的实现方式中的方法的指令。
第四方面以及第四方面的任意一种实现方式分别与第一方面以及第一方面的任意一种实现方式相对应。第四方面以及第四方面的任意一种实现方式所对应的技术效果可参见上述第一方面以及第一方面的任意一种实现方式所对应的技术效果,此处不再赘述。
第五方面,本申请实施例提供一种芯片,该芯片包括处理电路、收发管脚。其中,该收发管脚、和该处理电路通过内部连接通路互相通信,该处理电路执行第一方面或第一方面的任一种可能的实现方式中的方法,以控制接收管脚接收信号,以控制发送管脚发送信号。
第六方面,本申请实施例提供一种通信系统,包括第一方面以及第一方面的任意一种实现方式中的第一电子设备和第二电子设备。
图1a为示例性示出的一种应用场景示意图;
图1b为示例性示出的多屏协同场景的示意图;
图2为示例性示出的电子设备的硬件结构示意图;
图3为示例性示出的手机与平板的连接示意图;
图4为示例性示出的手机与平板的连接示意图;
图5为示例性示出的用户界面示意图;
图6为示例性示出的手机与平板之间进行数据交互的流程示意图;
图7为示例性示出的GOP的示意图;
图8为示例性示出的数据包的格式示意图;
图9所示为手机与平板的数据传输示意图;
图10为示例性示出的电子设备的软件结构示意图;
图11为示例性示出的模块交互示意图;
图12为示例性示出的发送端的配置流程示意图;
图13为示例性示出的分集模式的通信示意图;
图14a为示例性示出的反馈丢帧统计的示意图;
图14b为示例性示出的调整编码策略的示意图;
图15a为示例性示出的另一种反馈丢帧统计的示意图;
图15b为示例性示出的数据包传输的示意图;
图16为示例性示出的发送端的配置流程示意图;
图17为示例性示出的复用模式的通信示意图;
图18为示例性示出的接收端的配置流程示意图;
图19为示例性示出的模块交互流程示意图;
图20为示例性示出的接收端的配置流程示意图;
图21a~图21b为示例性示出的手机与平板的交互示意图;
图22为示例性示出的装置的结构示意图。
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。
本申请实施例的说明书和权利要求书中的术语“第一”和“第二”等是用于区别不同的对象,而不是用于描述对象的特定顺序。例如,第一目标对象和第二目标对象等是用于区别不同的目标对象,而不是用于描述目标对象的特定顺序。
在本申请实施例中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。 本申请实施例中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。
在本申请实施例的描述中,除非另有说明,“多个”的含义是指两个或两个以上。例如,多个处理单元是指两个或两个以上的处理单元;多个系统是指两个或两个以上的系统。
在对本申请实施例的技术方案说明之前,首先结合附图对本申请实施例的应用场景进行说明。图1a为示例性示出的一种应用场景示意图。该应用场景中包括手机和平板。需要说明的是,图1a中的电子设备(手机和平板)的数量仅为示意性举例,本申请对此不做限定。
在本申请实施例的描述中,以手机与平板之间的投屏场景为例进行说明。示例性的,在投屏场景中,手机与平板之间的通信连接可以是P2P(peer-to-peer,对等)连接。在其他实施例中,本申请实施例中的技术方案还可以应用于手机与平板之间的其它应用场景,例如可以是华为分享,多屏协同场景等,本申请不做限定。相应的,对于不同的场景,手机与平板之间的连接所基于的协议也可以不同。如上文所述,本申请实施例中,手机与平板之间的通信连接是通过P2P协议维护的。在其他实施例中,手机与平板之间的通信连接也可以是基于其他无线通信协议维护的,本申请不做限定。示例性的,在基于P2P连接的投屏场景中,手机和平板也可以称为投屏场景中的发送端和接收端,也可以称为P2P设备。
示例性的,图1b为示例性示出的多屏协同场景的示意图。请参照图1b,示例性的,手机与笔记本进行多屏协同,手机与笔记本之间的通信连接可以是基于无线通信协议维护的,例如可以是P2P协议。手机可作为发送端,向笔记本发送图像帧,图像帧中的图像与手机当前显示的界面对应。以使得笔记本上的多屏协同界面中,可以显示手机当前的界面所对应的图像。
需要说明的是,图1a和图1b所示的场景仅为示意性举例。在其他实施例中,本申请实施例中的技术方案还可以应用于手机、平板、笔记本、可穿戴设备等电子设备与电视、车载设备等电子设备之间的投屏场景、分享场景、多屏协同场景等。
图2示出了电子设备100的结构示意图。应该理解的是,图2所示电子设备100仅是电子设备的一个范例,并且电子设备100可以具有比图中所示的更多的或者更少的部件,可以组合两个或多个的部件,或者可以具有不同的部件配置。图2中所示出的各种部件可以在包括一个或多个信号处理和/或专用集成电路在内的硬件、软件、或硬件和软件的组合中实现。需要说明的是,图2中的电子设备可以是图1a中的手机、平板,也可以是图1b中的手机或笔记本,当然也可以是其他应用场景中所涉及的电子设备,本申请不做限定。
电子设备100可以包括:处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,IMU(Inertial measurement unit,惯 性测量单元)模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
其中,控制器可以是电子设备100的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
处理器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)接口等。
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器110可以包含多组I2C总线。处理器110可以通过不同的I2C总线接口分别耦合触摸传感器180K,充电器,闪光灯,摄像头193等。例如:处理器110可以通过I2C接口耦合触摸传感器180K,使处理器110与触摸传感器180K通过I2C总线接口通信,实现电子设备100的触摸功能。
I2S接口可以用于音频通信。在一些实施例中,处理器110可以包含多组I2S总线。处理器110可以通过I2S总线与音频模块170耦合,实现处理器110与音频模块170之间的通信。在一些实施例中,音频模块170可以通过I2S接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。
PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块170与无线通信模块160可以通过PCM总线接口耦合。在一些实施例中,音频模块170也可以通过PCM接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。所述I2S接口和所述PCM接口都可以用于音频通信。
UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。 它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器110与无线通信模块160。例如:处理器110通过UART接口与无线通信模块160中的蓝牙模块通信,实现蓝牙功能。在一些实施例中,音频模块170可以通过UART接口向无线通信模块160传递音频信号,实现通过蓝牙耳机播放音乐的功能。
MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(display serial interface,DSI)等。在一些实施例中,处理器110和摄像头193通过CSI接口通信,实现电子设备100的拍摄功能。处理器110和显示屏194通过DSI接口通信,实现电子设备100的显示功能。
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器110与摄像头193,显示屏194,无线通信模块160,音频模块170,传感器模块180等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为电子设备100充电,也可以用于电子设备100与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。
可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在本申请另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。
充电管理模块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)。
电子设备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可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。处理器110通过运行存储在内部存储器121的指令,从而执行电子设备100的各种功能应用以及数据处理。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage, UFS)等。
电子设备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)标准接口。
IMU模块180用于获取电子设备的IMU位姿信息。示例性的,IMU模块180可包括加速度传感器和陀螺仪传感器。示例性的,陀螺仪传感器可以用于确定电子设备100的运动姿态。在一些实施例中,可以通过陀螺仪传感器确定电子设备100围绕三个轴(即,x,y和z轴)的角速度。加速度传感器可检测电子设备100在三个轴(即,x,y和z轴)的加速度的大小。当电子设备100静止时可检测出重力的大小及方向。需要说明的是,本申请实施例,电子设备中集成的IMU模块可以是6轴IMU模块。在其他实施例中,电子设备还可以集成9轴IMU模块,9轴IMU模块中包括:陀螺仪传感器(可获取x、y、z三轴上的角速度)、加速度传感器(可获取x、y、z三轴上的加速度)以及磁力计(可获取x、y、z三轴上的方向)。本申请不做限定。
结合图1a所示的应用场景,图3为示例性示出的手机与平板的连接示意图。请参照图3,示例性的,手机与平板之间建立Wi-Fi连接,以通过Wi-Fi连接进行数据交互。如上文所述,本申请实施例中以手机与平板之间的Wi-Fi连接为基于P2P协议维护的为例进行说明。示例性的,手机与平板之间建立P2P连接的过程可分为三个部分:
第一部分,设备发现。具体的,在设备发现阶段,手机与平板可通过搜索,发现周围其它支持P2P的设备。例如,手机可通过搜索,发现周围存在支持P2P的平板。同理,平板也可以通过搜索,发现周围存在支持P2P的手机。
第二部分,手机与平板建立组。具体的,以手机为例,手机发现周围存在支持P2P的平板后,可与平板建立P2P Group,并协商谁来扮演GO(Group Owner,组拥有者),谁来扮演Client(成员,也可以称为组员)。
示例性的,GO的作用类似于基本服务集BSS(Basic Service Set)中的接入点AP(Access Point),也可称为基站,Client的作用类似于BSS中的站点(Station,STA),所谓的站点,是指具有Wi-Fi通信功能的,并且连接到无线网络中的终端设备(电子设备),如手机、平板电脑、笔记本电脑等。站点可以支持802.11be、802.11ax、802.11ac、802.11n、802.11g、802.11b及802.11a等802.11家族的多种无线局域网(wireless local area networks,WLAN)制式。
接入点可以是带有Wi-Fi芯片的终端设备(如手机)或者网络设备(如路由器)。例如,接入点可以为支持802.11be制式的设备。接入点也可以为支持802.11be、802.11ax、802.11ac、802.11n、802.11g、802.11b及802.11a等802.11家族的多种WLAN制式的设备。
需要说明的是,本申请实施例中的电子设备通常为支持802.11系列标准的终端产品,从802.11a经802.11g、802.11n、802.11ac到802.11ax的演进过程中,可用频段包括2.4吉赫(GHz)和5GHz。随着开放的频段越来越多,802.11所支持的最大信道带宽从20兆赫(MHz)扩展到40MHz再扩展到160MHz。2017年,美国联邦通信委员会(federal communications commission,FCC)开放了一段新的免费频段6GHz(5925-7125MHz),802.11ax标准工作者在802.11ax项目授权申请书(project authorization requests,PAR)中把802.11ax设备工作范围从2.4GHz,5GHz拓展到2.4GHz,5GHz和6GHz。本申请实施例中仅以各电子设备工作在2.4GHz与5GHz为例进行说明,本申请实施例同样可适用于支持下一代通信协议(例如802.11be等)的设备间的投屏场景中。
第三部分,手机与平板建立P2P连接通路。具体的,手机与平板确定GO与Client之后,GO(例如平板)可向Client(例如手机)发起P2P连接通路建立过程,平板与手机成功建立P2P连接通路后,可在该通路上进行数据交互。需要说明的是,GO可以为投屏场景中的发送端(例如手机),也可以是投屏场景中的接收端(例如平板),本申请不做限定。
下面结合图4所示的流程示意图,对手机与平板之间的P2P连接建立过程进行简单说明。请参照图4,具体包括:
S401,手机启动投屏应用。
示例性的,图5为示例性示出的用户界面示意图,参照图5的(1),手机的显示界面中可包括一个或多个控件,控件包括但不限于:应用图标控件、电量控件、网络控件等。用户可点击设置图标控件,以进入设置界面。请参照图5的(2),手机响应于接收到的用户操作,显示设置界面。示例性的,设置界面包括一个或多个选项,选项包括但不限于:WLAN设置选项、蓝牙设置选项、移动网络设置选项和更多连接设置选项等。示例性的,用户可点击更多连接设置选项。请参照图5的(3),示例性的,手机响应于用户操作,显示更多连接设置界面。示例性的,更多连接设置界面上包括一个或多个选项,选项包括但不限于:NFC设置选项、HUAWEI Beam设置选项、华为分享设置选项 和手机投屏选项等。示例性的,用户可点击手机投屏设置选项。请参照图5的(4),示例性的,手机响应于接收到的用户操作,显示手机投屏设置界面。手机投屏设置界面包括一个或多个控件,控件包括但不限于:无限投屏设置选项和可用设备列表。示例性的,在无限投屏设置选项未开启的情况下,用户可手动点击开启,开启后,手机可自动搜索周围可用的P2P设备,并在可用设备列表中显示搜索到的P2P设备的设备名称,例如图5的(4)中所示的“XX的平板”。用户可点击可用设备列表中显示的P2P设备,以指示手机向选中的平板进行投屏。
S402,手机向平板发送probe request(探测请求)消息。
示例性的,手机向平板发送probe request消息,以请求与平板通信。示例性的,手机可在2.4GHz频段的1、6、11信道上分别发送probe request消息。需要说明的是,本申请实施例中以2.4GHz频段的P2P连接建立过程为例进行说明。在其他实施例中,P2P连接也可以是工作于其他频段,本申请不做限定。
S403,平板向手机发送probe response(探测响应)消息。
示例性的,平板接收到1、6、11信道中的任一信道上的probe request消息,可选择接收到probe request消息的其中一条信道,并在该信道(例如信道6)上向手机发送probe response消息。
S404,手机向平板发送GO negotiation request(GO协商请求)消息。
示例性的,手机响应于接收到的来自平板的probe response消息,在信道6上向平板发送GO negotiation request消息。
S405,平板向手机发送GO negotiation response(GO协商响应)消息。
示例性的,平板响应于接收到来自手机的GO negotiation request消息,在信道6上向手机发送GO negotiation response消息。
S406,手机向平板发送GO confirm(GO确认)消息。
需要说明的是,S404~S406的三次帧交换用于交互信息,以确定GO与Client,三次帧交换交互的信息包括但不限于:GO的MAC地址、Group ID等信息。在本申请实施例的描述中,均以平板为GO,手机为Client为例进行说明。
S407,平板向手机发送Beacon(信标)消息。
示例性的,平板与手机完成组建立后,平板作为GO端可发送Beacon消息(广播消息)(也可称为Beacon帧),以与其它设备在2.4GHz频段上建立投屏通路。
示例性的,以平板在2.4GHz的信道3上发送Beacon消息为例进行说明。
S408,手机与平板进行链路认证关联。
示例性的,手机在信道3上监听到平板发送的Beacon消息后,与平板进行链路认证关联流程,其中,链路认证关联流程中需要进行多次帧交换,以交换MAC地址信息、加密方式以及支持的信道集合等信息。
S409,手机与平板进行四次握手(4-way handshake)。
示例性的,手机与平板经过4次握手后,即成功在信道3上建立2.4GHz通路(即P2P连接)。需要说明的是,图5中的S402~409仅为示意性举例,手机与平板建立2.4GHz通路的过程可以包括比图5中更少或更多的帧交互过程,各帧所携带的信息、格式和作 用可参照已有标准中的描述,本申请不再赘述。
S410,手机与平板进行数据传输。
示例性的,如上文所述,手机与平板建立P2P连接之后,手机可向平板投屏,即向平板发送图像帧,以在平板上显示对应的图像。
图6为示例性示出的手机与平板之间进行数据交互的流程示意图。请参照图6,示例性的,手机的投屏应用可生成需要投屏到平板上的图像,并将图像输出至应用程序框架层中的图像处理模块进行处理。图像处理模块可对图像进行渲染、裁剪等处理,并将处理后的图像输出至编解码器(也可以称为编解码模块)。编解码器对图像进行编码,以生成图像帧。内核可对图像帧进行数据处理,例如,处理过程包括但不限于:数据包封装、加密、TCP(Transmission Control Protocol,传输控制协议)/UDP(User Datagram Protocol,用户数据报协议)协议层封装、IP(Internet Protocol,网际互连协议)协议层封装,以得到封装后的数据包。示例性的,Wi-Fi驱动可基于与平板之间的P2P连接,将数据包发送至平板。
请继续参照图6,示例性的,平板的Wi-Fi驱动将接收到的数据包交由内核处理,内核对数据包进行数据处理,包括但不限于:IP协议层解封装、TCP/UDP协议层解封装、解密、数据包解封装等处理。编解码器对解封装后得到的数据(即上文所述的图像帧)进行解码,得到对应的图像。编解码器将图像输出至图像处理模块,图像处理模块对图像进行图像处理,例如可以进行渲染等操作,并将处理后的图像输出至投屏应用。投屏应用可在平板的显示界面中显示对应的图像。需要说明的是,图6中仅为示意性说明投屏过程中的各处理环节,图6中的各步骤的具体细节可参照已有技术实施例中的相关描述,此处不再赘述。
如上文所述,在投屏过程中,手机向平板传输图像帧,以使得平板显示对应的图像。为使本领域人员更好地理解本申请实施例中的图像帧传输方式,在说明具体传输方式之前,首先对图像帧的相关概念进行简单介绍。如上文所述,编解码器获取到图像之后,可对图像进行编码,以提升压缩比。编码方式可以包括但不限于:H.264或HEVC(High Efficiency Video Coding,高效率视频编码)等。
编码后的多个图像帧可构成GOP(Group of Pictures,图像组)。可选地,GOP中可以包括一个或多个I帧,以及一个或多个B帧和P帧。图7为示例性示出的GOP的示意图,参照图7,示例性的,GOP中包括I1帧、B1帧、B2帧、P1帧、B3帧、B4帧、P2帧、B5帧、B6帧、I2帧、B7帧、B8帧、P3帧。需要说明的是,图7中的GOP中的图像帧的类型、数量和顺序仅为示意性举例,本申请不做限定。
继续参照图7,示例性的,I帧可以称为完整帧,或者独立解码帧,即I帧无需依赖其它帧,可独立进行解码。通常情况下,GOP的第一个帧为I帧。B帧和P帧可以称为帧间预测帧,B帧的解码依赖于其前面和后面最近的一个I帧或P帧,以B1帧为例,其解码需要依赖于I1帧和P1帧。P帧的解码依赖于其前面最近的一个I帧或P帧,以P1帧为例,其解码需要依赖于I1帧,以P2帧为例,其解码需要依赖于P1帧。由于帧间预测帧均需要依赖于前面,或者前面和后面的帧才能完成解码,因此,若GOP中的I帧或P帧在传输过程中丢失,则会导致依赖于I帧和P帧解码的帧以及后续的帧均无法正确解 码,导致电视播放画面花屏或画面质量降低。若GOP中的B帧丢失,将会导致B帧对应的图像缺失,造成画面冻屏。
示例性的,如上文所述,编解码器对图像进行编码,得到图像帧之后,内核可对图像帧进行封装,以得到数据包。示例性的,内核对图像帧进行封装的过程中,可以将多个图像帧封装到一个数据包中。需要说明的是,在其他实施例中,手机可以将一个图像帧分装到一个数据包中,还可以是将一个图像帧分装到多个数据包中,本申请不做限定。
图8为示例性示出的数据包的格式示意图。请参照图8,示例性的,数据包包括帧控制字段、帧体字段和CRC(Cyclic Redundancy Check,循环冗余校验)等字段。控制字段可包括指示信息,例如地址信息、数据包类型信息等。帧体字段可包括图像帧等数据。需要说明的是,图8中的各字段的名称及位置仅为示意性举例,本申请不做限定。
图9所示为手机与平板的数据传输示意图,参照图9,示例性的,手机通过P2P连接向平板发送包含图像帧的数据包的过程中,假设手机向平板发送的图像帧包括:I帧、P帧、P帧、P帧和I帧,并且,每个帧封装为一个数据包。示例性的,在本申请实施例的应用场景中,例如手机与平板或者手机,若用户手持手机和平板行走,使得手机与平板处于运动状态。由于设备运动,将会导致手机与平板之间的无线信道条件快速时变,使得投屏数据传输出现时延和抖动,导致丢帧。例如,如图9所示,手机向平板发送多个数据包的过程中,其中的一个携带P帧的数据包丢失,相应的,平板接收到的图像帧为:I帧、P帧、P帧、I帧。示例性的,如果丢失的P帧丢失,由于平板未接收到该P帧,将会造成后面的P帧解码失败(概念可参照图7关于图像帧解码的相关描述),平板将出现卡顿或画面质量降低(例如花屏)等问题。
本申请实施例提供一种通信方法,可有效增强数据传输时的稳定性。能够提升正在进行数据交互的设备在运动状态下的数据传输的鲁棒性,降低投屏丢帧、卡顿等问题发生的概率,提升接收端的画面显示质量,以进一步提高用户使用体验。图10为示例性示出的电子设备的软件结构示意图。请参照图10,示例性的,电子设备的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本申请实施例以分层架构的Android系统为例,示例性说明电子设备的软件结构。
电子设备的分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,以及内核层。
应用程序层可以包括一系列应用程序包。如图10所示,应用程序包可以包括相机,图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,短信息、投屏、识别、仲裁等应用程序。示例性的,本申请实施例中,投屏应用可支持电子设备进行投屏。识别应用(也可以称为识别模块)可用于电子设备调用IMU模块检测到的参数,以识别电子设备处于运动状态或静止状态。仲裁应用(也可以称为仲裁模块)可用于电子设备基于识别模块的识别结果,对配置参数进行调整。
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。
如图10所示,应用程序框架层可以包括窗口管理器,内容提供器,视图系统,电话 管理器,资源管理器,通知管理器、编解码模块(也可以称为编解码器)等。
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。
电话管理器用于提供电子设备的通信功能。例如通话状态的管理(包括接通,挂断等)。
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,电子设备振动,指示灯闪烁等。
编解码器可以支持一种或多种视频编解码器,可以对图像进行编码或解码。这样,电子设备可以播放或录制多种编码格式的视频。
Android Runtime包括核心库和虚拟机。Android runtime负责安卓系统的调度和管理。
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。
系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。
三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。
2D图形引擎是2D绘图的绘图引擎。
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,Wi-Fi驱动、蓝牙驱动、IMU驱动等。
可以理解的是,图10示出的系统框架层、系统库与运行时层包含的部件,并不构成对电子设备的具体限定。在本申请另一些实施例中,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。
结合图1a所示的应用场景,下面以手机与平板的投屏场景为例对本申请实施例中的技术方案进行详细说明。图11为示例性示出的模块交互示意图。请参照图11,示例性的,手机响应于用户操作与平板建立P2P连接后,手机作为发送端向平板(即接收端)发送图像数据,即,发送包含图像帧的数据包。具体描述可参照上文,此处不再赘述。
下面结合图11,对手机端(即发送端)的处理流程进行说明。请参照图11,示例性的,投屏应用启动后,可启动(即调用)仲裁模块与识别模块。识别模块启动后,从IMU驱动获取IMU模块(例如图2中的IMU模块180)检测到的参数(或信息)。识别模块可基于获取到的参数,检测电子设备的状态。状态包括:运动状态或静止状态。示例性的,识别模块可设置对应的运动状态阈值,例如,若识别模块获取到的参数大于或等于运动状态阈值,则可确定电子设备处于运动状态。若识别模块获取到的参数小于运动状态阈值,则可确定电子设备处于静止状态。
示例性的,IMU驱动可实时获取到IMU模块检测到的参数。可选地,IMU驱动可以周期性地向识别模块发送获取到的参数。可选地,识别模块可周期性地向IMU驱动请求IMU驱动获取到的参数。
可选地,识别模块还可以从Wi-Fi驱动获取MIMO条件数。识别模块可基于IMU模块检测到的参数和MIMO条件数,进一步确定电子设备的状态,以防止误判。举例说明,MIMO条件数的抖动幅度可用于指示电子设备的运动状态,例如,MIMO条件数的抖动范围(可根据实际需求设置,本申请不做限定),则识别模块可确定电子设备处于运动状态。若MIMO条件数抖动范围较小,即可确定电子设备处于静止状态。示例性的,识别模块可将基于IMU模块输入的参数的判断结果与基于MIMO条件数的判断结果联合判定,以确定电子设备是否处于运动状态。可选地,在本申请实施例中,若识别模块基于任一参数确定电子设备处于运动状态,则可确定电子设备处于运动状态。举例说明,若识别模块基于IMU模块输入的参数判定电子设备处于静止状态,而基于MIMO条件数判定电子设备处于运动状态,则识别模块判定电子设备处于运动状态。
请继续参照图11,示例性的,识别模块将识别结果(包括运动状态或静止状态)输出至仲裁模块。仲裁模块可基于识别模块输入的识别结果,确定当前电子设备处于运动状态或静止状态。
可选地,仲裁模块在检测到电子设备的状态变换,例如前一个周期从识别模块获取到的识别结果指示电子设备处于运动状态,当前周期从识别模块获取到的识别结果指示电子设备处于静止状态。则,仲裁模块可继续监测后面的一个或多个周期识别模块所输入的识别结果,以确定电子设备的状态。例如,仲裁模块获取到当前周期的识别结果指示电子设备处于静止状态后,仲裁模块可进一步获取下一个周期识别模块输入的识别结果。若在下一个周期,识别模块输入的识别结果指示电子设备处于静止状态,则仲裁模块可确定电子设备处于静止状态。若下一个周期,识别模块输入的识别结果指示电子设备处于运动状态,则仲裁模块可确定电子设备仍然为运动状态。
仍参照图11,示例性的,仲裁结果确定电子设备当前的状态(包括运动状态或静止状态)后,可基于电子设备的当前状态,调整编解码模块的配置信息,和/或,Wi-Fi驱 动的配置信息。
图12为示例性示出的发送端(即手机)的配置流程示意图。请参照图12,示例性的,以用户持手机与平板上楼(也可以是骑车、跑步、行驶(例如在行驶的车内,或者是在行驶的高铁上)等场景)为例进行说明,相应的,识别模块识别到手机当前处于运动状态。识别模块识别到手机为运动状态后,识别模块将识别结果(即运动状态)输出至仲裁模块。仲裁模块响应于接收到的识别模块输入的识别结果,确定手机处于运动状态。仲裁模块预先存储有运动状态对应的配置信息,以及静止状态对应的配置信息。仲裁模块可获取预先存储的运动状态对应的配置信息,调整编解码模块和/或Wi-Fi驱动配置对应的配置信息。
示例性的,在本申请实施例中,运动状态所对应的配置信息包括但不限于:
1.增加MAC层重传次数。
2.切换MIMO(multiple input multiple output,多入多出)模式为分集模式。
3.反馈丢帧统计。
4.减少投屏分辨率和/或码率。
示例性的,手机可从上述几种配置方式中选择至少一种进行配置。
下面分别对上述配置信息进行说明:
1.增加MAC层重传次数。
示例性的,基于MAC层协议规定,在数据传输过程中,手机可设置MAC层的重传次数。举例说明,运动状态所对应的MAC层重传次数可以是100次。即,仲裁模块可对Wi-Fi驱动进行配置,例如向Wi-Fi驱动发送指示信号,用于指示Wi-Fi驱动将MAC层重传次数设置为100次。
可选地,仲裁模块也可以预先设置多个重传次数,并设置不同的运动状态激烈程度与重传次数的对应关系。仲裁模块可基于运动状态的激烈程度,确定对应的重传次数。举例说明,识别模块在输出识别结果时,识别结果中除包括指示电子设备处于运动状态的信息外,还可以包括用于指示电子设备的运动状态的激烈程度的信息。示例性的,识别模块可以设置不同的参数与运动状态的激烈程度的对应关系,识别模块可基于从IMU驱动获取到的参数,确定对应的运动状态激烈程度。识别模块可将检测到的运动状态激烈程度与运动状态指示给仲裁模块。相应的,仲裁模块可基于获取到的运动状态激烈程度,确定对应的重传重传次数。
示例性的,Wi-Fi驱动响应于接收到的仲裁模块指示的重传次数(例如100次),在发送数据包时,可按照获取到的重传次数进行发送。举例说明,Wi-Fi驱动发送数据包,若Wi-Fi驱动接收到对端反馈的确认消息(例如ACK(Acknowledge characte,确认字符)消息)后,Wi-Fi驱动继续发送下一个数据包。若Wi-Fi驱动在预定时长内未接收到对端反馈的ACK消息,Wi-Fi驱动将重新发送该数据包,即,Wi-Fi驱动在接收到对端反馈的ACK消息之前,最多可重复发送100次该数据包。
可选地,在本申请实施例中,Wi-Fi驱动在发送数据包时,也可以以数据包聚合的方式发送。例如,Wi-Fi驱动在发送数据包时,可同时发送64个数据包(可基于实际需求设置,本申请不做限定)。在发送64个数据包之后,Wi-Fi驱动将会接收到对端反馈的 针对每个数据包的ACK消息。当Wi-Fi驱动检测到未接收到至少一个数据包对应的ACK消息后,Wi-Fi驱动重新发送所述至少一个数据包。
2.切换MIMO模式为分集模式。
本申请实施例中,手机与平板均采用MIMO通信。示例性的,仲裁模块可向Wi-Fi驱动发送指示信号,以指示Wi-Fi驱动将MIMO模式调整为分集模式。
图13为示例性示出的分集模式的通信示意图。请参照图13,示例性的,手机包括天线1、天线2、天线3和天线4,每个天线分别对应物理通道1、物理通道2、物理通道3和物理通道4。手机可在每个物理通道上,传输相同的数据包。举例说明,手机发送的图像帧包括I1帧、B2帧、B2帧、P1帧、B3帧、B4帧以及P2帧。每个图像帧可包含于一个或多个数据包。手机采用分集模式时,可在每个通道上传输相同的数据包,即,在每个通道上均会传输上述图像帧,从而抵抗信道衰落,降低误码率。相应的,平板将在天线5、天线6、天线7以及天线8接收到相同的数据包。需要说明的是,图13中所示的每个图像帧的长度,用于表示图像帧的数据量大小,也可以用于标识传输时长。也就是说,数据量越大的图像帧,其所对应的传输时长越长。
3.反馈丢帧统计。
示例性的,仲裁模块可向Wi-Fi驱动发送指示信号,以指示Wi-Fi驱动启动反馈丢帧统计。
一个示例中,图14a为示例性示出的反馈丢帧统计的示意图。请参照图14a,示例性的,Wi-Fi驱动在数据包发送达到设定的重传次数,且仍未接收到对端反馈的ACK消息后,Wi-Fi驱动可确认该数据包传输失败,即,该数据包所携带的图像帧传输失败。Wi-Fi驱动可向仲裁模块反馈图像帧丢失。示例性的,仲裁模块响应于Wi-Fi驱动反馈的丢失的图像帧,仲裁模块向编解码模块发送指示信息,用于指示编解码模块调整编码策略。
举例说明,图14b为示例性示出的调整编码策略的示意图。示例性的,以图7中的GOP为例,请参照图14b的(1),假设传输过程中,P1帧丢失。Wi-Fi驱动向仲裁模块反馈P1帧丢失。仲裁模块向编解码模块指示调整依赖于P1帧的图像帧的编码策略。如上文所述,P2帧的解码依赖于P1帧,因此,在P1帧丢失的情况下,编解码器可基于仲裁模块的指示,在编码时,调整P2帧的编码策略,使得P2帧基于I1帧进行编码,如图14b的(2)所示。示例性的,每个图像帧包括图像帧描述信息,图像帧描述信息中可包括用于指示编码依赖关系(也可以称为帧间预测关系)的信息。相应的,接收端的编解码器在解码时,可基于图像帧中的图像帧描述信息,确定P2帧可基于I1帧进行解码,从而避免P1帧丢失导致P2帧解码失败的问题。
另一个示例中,图15a为示例性示出的另一种反馈丢帧统计的示意图。请参照图15a,示例性的,Wi-Fi驱动向仲裁模块反馈图像帧丢失(细节可参照上文,此处不再赘述)。仲裁模块响应于接收到的Wi-Fi驱动的反馈,调整Wi-Fi驱动的重发次数。举例说明,请参照图15b,示例性的,手机向平板发送数据包1,在重复发送n次后,接收到平板反馈的ACK消息。其中,n为大于0,且小于当前状态(可以是运动状态,也可以是静止状态)对应的最大传输次数的整数。示例性的,Wi-Fi驱动发送数据包2。Wi-Fi驱动重复发送m次数据包2,m为当前状态对应的最大传输次数,例如可以是运动状态对应的 最大传输次数(例如100次)。Wi-Fi驱动确认数据包2发送失败,Wi-Fi驱动向仲裁模块反馈图像帧丢失,例如数据包2携带图像帧P2,Wi-Fi驱动向仲裁模块反馈图像帧P2丢失。示例性的,仲裁模块指示Wi-Fi驱动调整重发次数,即,仲裁模块指示Wi-Fi驱动再次对数据包2进行重发,例如仲裁模块可指示Wi-Fi驱动将本次重发次数调整为200次,也就是说,Wi-Fi驱动将原有的重传次数(例如100次)调整为200次。即,Wi-Fi驱动可再发送数据包2,且重传次数最多可达到100次。示例性的,若Wi-Fi驱动再次重传数据包2后,仍未接收到ACK消息。一个示例中,Wi-Fi驱动可再次向仲裁模块反馈,仲裁模块可再次指示Wi-Fi驱动进行重传。另一个示例中,Wi-Fi驱动确认数据包2丢失,可继续传下一个数据包。又一个示例中,Wi-Fi驱动可向仲裁模块反馈图像帧丢失,仲裁模块可调整编码器的编码策略(描述可参照上文,此处不再赘述)。
4.减少投屏分辨率和/或码率。
示例性的,仲裁模块可向编解码模块发送指示信号,以指示编解码模块在进行编码时,降低图像帧的分辨率和/或码率。例如,码率可以是5Mbps、10Mbps、30Mbps中的任一种,分辨率可以是1080p、2K、4K中的任一种。也就是说,在运动状态下可能遇到的通信信道时变的情况下,可通过降低图像帧的分辨率和/或码率,使得发送端传输的数据量降低,以减少无线带宽的使用。
图16为示例性示出的发送端(即手机)的配置流程示意图。示例性的,以手机与平板在桌面上处于静止状态为例。需要说明的是,本申请实施例中均以单一场景为例,在其他实施例中,本申请实施例的技术方案可以应用于不同状态转换,例如,用户持手机与平板在跑步过程中,手机可识别到手机当前处于运动状态(平板相同),当用户持手机与平板从跑步变为静止后,手机可识别到手机当前处于静止状态。
请参照图16,识别模块可识别到手机当前处于静止状态。识别模块识别到手机处于静止状态,识别模块将识别结果(即静止状态)输出至仲裁模块。仲裁模块响应于接收到的识别模块输入的识别结果,确定手机处于静止状态。如上文所述,仲裁模块预先存储有静止状态对应的配置信息。仲裁模块可获取预先存储的静止状态对应的配置信息,调整编解码模块和/或Wi-Fi驱动配置对应的配置信息。
示例性的,在本申请实施例中,静止状态所对应的配置信息包括但不限于:
1.减少MAC层重传次数。
2.切换MIMO模式为复用模式。
3.反馈丢帧统计。
4.增加投屏分辨率和/或码率。
示例性的,手机可从上述几种配置方式中选择至少一种进行配置。下面分别对上述配置信息进行说明:
1.减少MAC层重传次数。
示例性的,基于MAC层协议规定,在数据传输过程中,手机可设置MAC层的重传次数。举例说明,静止状态所对应的MAC层重传次数可以是20次,即相对于运动状态的最大传输次数较少,从而通过减少静止状态对应的MAC层重传次数,从而降低数据传输时延。仲裁模块可对Wi-Fi驱动进行配置,例如向Wi-Fi驱动发送指示信号,用于 指示Wi-Fi驱动将MAC层重传次数设置为20次。
示例性的,Wi-Fi驱动响应于接收到的仲裁模块指示的重传次数(例如20次),在发送数据包时,可按照获取到的重传次数进行发送。举例说明,Wi-Fi驱动发送数据包,若Wi-Fi驱动接收到对端反馈的确认消息(例如ACK(Acknowledge characte,确认字符)消息)后,Wi-Fi驱动继续发送下一个数据包。若Wi-Fi驱动在预定时长内未接收到对端反馈的ACK消息,Wi-Fi驱动将重新发送该数据包,即,Wi-Fi驱动在接收到对端反馈的ACK消息之前,最多可重复发送20次该数据包。
2.切换MIMO模式为复用模式。
示例性的,仲裁模块可向Wi-Fi驱动发送指示信号,以指示Wi-Fi驱动将MIMO模式调整为复用模式。
图17为示例性示出的复用模式的通信示意图。请参照图17,示例性的,手机包括天线1、天线2、天线3和天线4,每个天线分别对应物理通道1、物理通道2、物理通道3和物理通道4。手机可在每个物理通道上,传输不同的数据包。举例说明,手机发送的数据包包括:携带I1帧的数据包1、携带B2帧和B2帧的数据包2、携带P1帧的数据包3、携带B3帧和B4帧的数据包4以及携带P2帧的数据包5。手机采用复用模式时,可在每个通道上传输不同的数据包,例如,在物理通道1上发送数据包1,在物理通道2上发送数据包2和数据包3,在物理通道3上发送数据包4,在物理通道4上发送数据包5。从而提高系统容量。
3.反馈丢帧统计。
反馈丢帧统计的方式可参照运动状态,即图14a~图15b的相关描述,此处不再赘述。
4.增加投屏分辨率和/或码率。
示例性的,仲裁模块可向编解码模块发送指示信号,以指示编解码模块在进行编码时,增加图像帧的分辨率和/或码率,以提升接收端的画面质量。
请继续参照图11,下面对接收端(例如平板)的处理流程进行说明。示例性的,平板投屏应用启动后,可启动(即调用)平板的仲裁模块与识别模块。识别模块启动后,从IMU驱动获取IMU模块(例如图2中的IMU模块180)检测到的参数(或信息)。识别模块可基于获取到的参数,检测电子设备的状态。状态包括:运动状态或静止状态。识别模块可将识别结果输出至仲裁模块。未描述部分可参照发送端(即手机)的相关内容,此处不再赘述。
请继续参照图11,示例性的,识别模块将识别结果(包括运动状态或静止状态)输出至仲裁模块。仲裁模块可基于识别模块输入的识别结果,确定当前电子设备处于运动状态或静止状态。
仍参照图11,示例性的,仲裁结果确定电子设备当前的状态(包括运动状态或静止状态)后,可基于电子设备的当前状态,调整编解码模块的配置参数,和/或,Wi-Fi驱动的配置信息。未描述部分可参照发送端的相关内容,此处不再赘述。
图18为示例性示出的接收端(即平板)的配置流程示意图。请参照图18,示例性的,以用户持手机与平板上楼(也可以是骑车、跑步等)为例进行说明,相应的,识别模块识别到平板当前处于运动状态。识别模块识别到平板为运动状态,识别模块将识别结果 (即运动状态)输出至仲裁模块。仲裁模块响应于接收到的识别模块输入的识别结果,确定平板处于运动状态。仲裁模块预先存储有运动状态对应的配置信息,以及静止状态对应的配置信息。仲裁模块可获取预先存储的运动状态对应的配置信息,调整编解码模块和/或Wi-Fi驱动配置对应的配置信息。
示例性的,在本申请实施例中,运动状态所对应的配置信息包括但不限于:
1.切换MIMO模式为分集模式。
2.增加图像帧缓存。
示例性的,平板可从上述几种配置方式中选择至少一种进行配置。下面分别对上述配置信息进行说明:
1.切换MIMO模式为分集模式。
示例性的,仲裁模块可指示Wi-Fi驱动将MIMO模式切换为分集模式。Wi-Fi驱动对发送端(即手机)发送的数据包进行分集接收。分集接收的实现方式可参照已有技术,本申请不再赘述。
2.增加图像帧缓存。
示例性的,仲裁模块可向编解码模块发送指示信号,以指示编解码模块增加图像缓存。例如,编解码模块当前的图像缓存可缓存3个图像帧对应的图像。仲裁模块可指示编解码模块将图像缓存增加至可缓存30个图像帧(可根据实际需求设置,本申请不做限定)对应的图像,从而减少图像帧传输到达时间不稳定导致的丢帧。
举例说明,图19为示例性示出的模块交互流程示意图。请参照图19,示例性的,由于信道干扰等影响,可能造成发送端发送的数据包在传输时的时延加大,导致接收端(例如平板)可能在同一时刻接收到多个数据包。以图19为例,平板的Wi-Fi驱动接收到数据包1、数据包2和数据包3。Wi-Fi驱动对数据包1~数据包3进行相应处理后,将数据包1~数据包3中携带的图像帧(包括数据包1的图像帧、数据包2的图像帧以及数据包3的图像帧)输出至编解码模块。举例说明,数据包1的图像帧为10个图像帧,数据包2的图像帧包括10个图像帧,数据包3的图像帧包括10个图像帧。即,编解码模块共接收到30个图像帧。
请继续参照图19,示例性的,编解码模块可对接收到的数据包1~数据包3的图像帧(即30个图像帧)进行解码,得到30个图像帧对应的图像。如上文所述,编解码模块已将图像缓存增加至可缓存30个图像,编解码模块可将30个图像帧对应的30个图像置于图像缓存中。图像处理模块(可参照图6中的描述)可从编解码模块的图像缓存中依次提取图像,并对图像进行处理,以及,将处理后的图像输出至投屏应用。投屏应用可对图像进行显示。
图20为示例性示出的接收端(即平板)的配置流程示意图。示例性的,以手机与平板在桌面上处于静止状态为例。请参照图20,识别模块可识别到平板当前处于静止状态。识别模块识别到平板处于静止状态,识别模块将识别结果(即静止状态)输出至仲裁模块。仲裁模块响应于接收到的识别模块输入的识别结果,确定平板处于静止状态。如上文所述,仲裁模块预先存储有静止状态对应的配置信息。仲裁模块可获取预先存储的静止状态对应的配置信息,调整编解码模块和/或Wi-Fi驱动配置对应的配置信息。
示例性的,在本申请实施例中,静止状态所对应的配置信息包括但不限于:
1.切换MIMO模式为复用模式。
2.减少图像帧缓存。
示例性的,平板可从上述几种配置方式中选择至少一种进行配置。下面分别对上述配置信息进行说明:
1.切换MIMO模式为复用模式。
示例性的,仲裁模块可指示Wi-Fi驱动将MIMO模式切换为复用模式。Wi-Fi驱动对发送端(即手机)发送的数据包进行复用接收。复用接收的实现方式可参照已有技术,本申请不再赘述。
2.减少图像帧缓存。
示例性的,仲裁模块可向编解码模块发送指示信号,以指示编解码模块减少图像缓存。例如,编解码模块当前的图像缓存的大小是与运动状态对应的,例如为可缓存30个图像帧对应的图像。仲裁模块可指示编解码模块将图像缓存减少至可缓存3个图像帧(可根据实际需求设置,本申请不做限定)对应的图像,从而使得投屏应用可及时显示图像,降低投屏显示时延。未描述部分可参照上文的相关内容,此处不再赘述。
需要说明的是,本申请实施例中所述的“增加”或“减少”是相对于配置信息的相对变换。可以理解为是静止状态的配置信息相对于运动状态的配置信息是减少的,或者说,运动状态的配置信息相对于静止状态的配置信息是增加的。举例说明,如果当前周期手机的仲裁模块在配置信息时,未对MAC层重传次数进行配置,即,MAC层重传次数仍然按照静止状态的重传次数(例如20次)进行传输,则在下一个周期,若仲裁模块确定手机为静止状态,则由于重传次数已经是静止状态所对应的重传次数,则无需再配置重传次数。
请继续参照图11,示例性的,手机的仲裁模块在确定设备当前的状态(包括运动状态与静止状态)后,可通过与平板之间的P2P连接向平板发送识别结果(即包括运动状态或静止状态)。平板侧相同,此处不再赘述。
示例性的,在本申请实施例中,投屏场景中的电子设备,如果有一端处于运动状态,则另一端将对应配置为运动状态。示例性的,只有两端都处于静止状态的情况下,手机与平板才会基于静止状态的配置信息进行配置。
举例说明,请参照图21a,示例性的,手机的仲裁模块确定手机处于运动状态,仲裁模块基于运动状态对应的配置参数进行配置,并且,仲裁模块向平板发送指示信息,指示信息包括识别结果,以指示手机当前处于运动状态。平板响应于接收到的指示信息,确定手机处于运动状态,平板中的仲裁模块基于运动状态对应的配置参数进行配置。也就是说,即使平板的仲裁模块确定平板当前为静止状态,并配置为静止状态对应的配置的情况下,若平板接收到手机指示手机处于运动状态的指示信息,平板的仲裁模块将配置改为运动状态对应的配置。平板侧相同,此处不再赘述。
在一种可能的实现方式中,手机的仲裁模块可以在手机的状态变化的情况下,向平板发送变化后的状态。举例说明,手机的仲裁模块在确定手机从静止状态变为运动状态后,手机向平板发送指示信息,指示信息包括识别结果,以指示手机当前处于运动状态。 平板响应于接收到的指示信息,确定手机处于运动状态,平板中的仲裁模块基于运动状态对应的配置参数进行配置。示例性的,手机在下一个周期检测到手机仍然处于运动状态,则手机可不发送指示信息,以降低无线信道的资源占用。相应的,平板在未接收到指示手机变为静止状态的指示信息之前,确认手机处于运动状态。平板侧相同,此处不再赘述。
在一种可能的实现方式中,如上文所述,手机在配置时,可切换MIMO模式,需要说明的是,手机侧若在配置过程中选择切换MIMO模式,则对端(即平板)也需要切换为对应的模式,才能保证对端能够正确接收。平板侧相同,此处不再赘述。相应的,为确保对端能够切换为相同的模式,以正确接收手机发送的数据包。请参照图21b,示例性的,手机向平板发送识别结果的同时,还需要发送仲裁结果,仲裁结果用于指示手机基于识别结果,判定将要切换的MIMO模式(包括分集模式或复用模式)。平板接收到手机发送的识别结果与仲裁结果后,将MIMO模式对应切换。例如,若手机基于运动状态,确定需要将MIMO模式切换为分集模式,则平板也需要配置为分集模式。平板向手机发送确认消息,以指示平板已切换为相应的MIMO模式(例如分集模式)。手机接收到平板发送的确认消息后,将MIMO模式切换为分集模式。
下面结合图11,以具体示例对上面的实现方式进行举例说明。示例性的,以用户持手机与平板处于静止状态为例,并在手机上启动投屏应用为例。手机与平板建立P2P连接后,手机与平板的初始状态可默认为静止状态。如上文所述,仲裁模块可在确定静止状态后,可选择静止状态对应的至少一种配置方式进行配置。例如,手机的仲裁模块可指示Wi-Fi驱动的MIMO模式为复用模式,MAC层重传次数为20次。平板中的仲裁模块指示Wi-Fi驱动的MIMO模式为复用模式,图像缓存可缓存3个图像大小。
示例性的,手机的Wi-Fi驱动以及平板的Wi-Fi驱动可基于当前的配置进行数据交互。示例性的,用户持手机与平板上楼。手机中的识别模块与平板中的识别模块均检测到当前设备为运动状态。以手机为例,手机中的识别模块向仲裁模块输出识别结果,用于指示手机为运动状态。同样的,手机的仲裁模块可基于运动状态对应的至少一个配置信息进行配置。举例说明,若Wi-Fi驱动当前的MIMO模式为复用模式,则仲裁模块在确定手机处于运动状态后,可以指示Wi-Fi驱动将MIMO模式切换为分集模式。可选地,仲裁模块也可以不指示Wi-Fi驱动进行MIMO模式切换,而选择增加MAC层重传次数。也就是说,在运动状态下,手机可以仍然使用复用模式进行通信。
示例性的,以仲裁模块在确认手机处于运动状态后,选择“增加MAC层重传次数”以及“反馈丢帧统计”为例。仲裁模块指示Wi-Fi驱动进行相应配置,具体可参照上文,此处不再赘述。Wi-Fi驱动可基于更改后的配置进行数据传输。以及,手机向平板发送识别结果,用于指示手机切换为运动状态。平板侧与手机侧处理类似,此处不再赘述。
示例性的,在本申请实施例中,仅以投屏场景为例进行说明。本申请实施例中的数据处理方式还可以应用于其它数据传输场景。例如,本申请实施例中的技术方案可以应用于手机(也可以是其他设备)的上网场景中。即,手机向服务器发送数据时,同样可以基于手机的运动状态,切换发送数据的模式。需要说明的是,若手机发送的数据为图像帧,则可应用本申请实施例中手机侧执行的各流程。若手机发送的数据为非图像帧, 则去掉编解码参数调整的配置方式。
可以理解的是,电子设备为了实现上述功能,其包含了执行各个功能相应的硬件和/或软件模块。结合本文中所公开的实施例描述的各示例的算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。本领域技术人员可以结合实施例对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
一个示例中,图22示出了本申请实施例的一种装置2200的示意性框图装置2200可包括:处理器2201和收发器/收发管脚2202,可选地,还包括存储器2203。
装置2200的各个组件通过总线2204耦合在一起,其中总线2204除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图中将各种总线都称为总线2204。
可选地,存储器2203可以用于前述方法实施例中的指令。该处理器2201可用于执行存储器2203中的指令,并控制接收管脚接收信号,以及控制发送管脚发送信号。
装置2200可以是上述方法实施例中的电子设备或电子设备的芯片。
其中,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。
本实施例还提供一种计算机存储介质,该计算机存储介质中存储有计算机指令,当该计算机指令在电子设备上运行时,使得电子设备执行上述相关方法步骤实现上述实施例中的数据处理方法。
本实施例还提供了一种计算机程序产品,当该计算机程序产品在计算机上运行时,使得计算机执行上述相关步骤,以实现上述实施例中的数据处理方法。
另外,本申请的实施例还提供一种装置,这个装置具体可以是芯片,组件或模块,该装置可包括相连的处理器和存储器;其中,存储器用于存储计算机执行指令,当装置运行时,处理器可执行存储器存储的计算机执行指令,以使芯片执行上述各方法实施例中的数据处理方法。
其中,本实施例提供的电子设备、计算机存储介质、计算机程序产品或芯片均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。
通过以上实施方式的描述,所属领域的技术人员可以了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或 组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是一个物理单元或多个物理单元,即可以位于一个地方,或者也可以分布到多个不同地方。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
本申请各个实施例的任意内容,以及同一实施例的任意内容,均可以自由组合。对上述内容的任意组合均在本申请的范围之内。
集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该软件产品存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。
结合本申请实施例公开内容所描述的方法或者算法的步骤可以硬件的方式来实现,也可以是由处理器执行软件指令的方式来实现。软件指令可以由相应的软件模块组成,软件模块可以被存放于随机存取存储器(Random Access Memory,RAM)、闪存、只读存储器(Read Only Memory,ROM)、可擦除可编程只读存储器(Erasable Programmable ROM,EPROM)、电可擦可编程只读存储器(Electrically EPROM,EEPROM)、寄存器、硬盘、移动硬盘、只读光盘(CD-ROM)或者本领域熟知的任何其它形式的存储介质中。一种示例性的存储介质耦合至处理器,从而使处理器能够从该存储介质读取信息,且可向该存储介质写入信息。当然,存储介质也可以是处理器的组成部分。
本领域技术人员应该可以意识到,在上述一个或多个示例中,本申请实施例所描述的功能可以用硬件、软件、固件或它们的任意组合来实现。当使用软件实现时,可以将这些功能存储在计算机可读介质中或者作为计算机可读介质上的一个或多个指令或代码进行传输。计算机可读介质包括计算机存储介质和通信介质,其中通信介质包括便于从一个地方向另一个地方传送计算机程序的任何介质。存储介质可以是通用或专用计算机能够存取的任何可用介质。
上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。
Claims (28)
- 一种数据处理方法,其特征在于,包括:第一电子设备与第二电子设备建立无线连接,并通过所述无线连接与所述第二电子设备进行数据交互;所述第一电子设备检测所述第一电子设备的状态,所述第一电子设备的状态为运动状态或静止状态;所述第一电子设备基于所述第一电子设备的状态,确定目标配置参数;所述目标配置参数包括所述第一电子设备与所述第二电子设备之间的无线连接配置参数,和/或,所述第一电子设备的编解码策略;所述第一电子设备基于所述目标配置参数,与所述第二电子设备进行数据交互。
- 根据权利要求1所述的方法,其特征在于,所述第一电子设备与第二电子设备建立无线连接,并通过所述无线连接与所述第二电子设备进行数据交互,包括:所述第一电子设备响应于接收到的第一用户操作,向所述第二电子设备发送连接请求消息;所述第一电子设备响应于接收到的所述第二电子设备发送的响应消息,与所述第二电子设备建立所述无线连接;所述第一电子设备通过所述无线连接向所述第二电子设备发送包含图像帧的数据包。
- 根据权利要求2所述的方法,其特征在于,若所述第一电子设备的状态为运动状态,所述无线连接配置参数包括以下至少之一:所述数据包的重传次数为N、多输入多输出MIMO模式为分集模式;N为大于0的整数。
- 根据权利要求3所述的方法,其特征在于,若所述第一电子设备的状态静止状态,所述无线连接配置参数包括以下至少之一:所述数据包的重传次数为M、MIMO模式为复用模式;其中,M为大于0,且小于N的整数。
- 根据权利要求2所述的方法,其特征在于,若所述第一电子设备的状态为运动状态,所述第一电子设备的编解码策略包括以下至少之一:所述图像帧的码率为A1;所述图像帧的分辨率为B1;调整所述图像帧的编码依赖关系。
- 根据权利要求5所述的方法,其特征在于,若所述第一电子设备的状态为静止状 态,所述第一电子设备的编解码策略包括以下至少之一:所述图像帧的码率为A2;所述图像帧的分辨率为B2;调整所述图像帧的编码依赖关系;其中,A2大于A1,B2大于B1。
- 根据权利要求1所述的方法,其特征在于,所述第一电子设备与第二电子设备建立无线连接,并通过所述无线连接与所述第二电子设备进行数据交互,包括:所述第一电子设备响应于接收到的所述第二电子设备发送的连接请求消息,向所述第二电子设备发送响应消息;所述第一电子设备与所述第二电子设备建立所述无线连接;所述第一电子设备通过所述无线连接接收所述第二电子设备发送的包含图像帧的数据包。
- 根据权利要求7所述的方法,其特征在于,若所述第一电子设备的状态为运动状态,所述无线连接配置参数包括:MIMO模式为分集模式。
- 根据权利要求7所述的方法,其特征在于,若所述第一电子设备的状态为静止状态,所述无线连接配置参数包括:MIMO模式为复用模式。
- 根据权利要求7所述的方法,其特征在于,若所述第一电子设备的状态为运动状态,所述第一电子设备的编解码策略包括:图像缓存大小设置为C1。
- 根据权利要求10所述的方法,其特征在于,若所述第一电子设备的状态为静态状态,所述第一电子设备的编解码策略包括:图像缓存大小设置为C2;其中,C2小于C1。
- 根据权利要求1所述的方法,其特征在于,所述方法还包括:所述第一电子设备向所述第二电子设备发送所述第一电子设备的状态。
- 根据权利要求1所述的方法,其特征在于,所述方法还包括:所述第一电子设备接收所述第二电子设备发送的所述第二电子设备的状态;其中,所述第二电子设备的状态为运动状态或静止状态;若所述第二电子设备的状态为运动状态,所述第一电子设备将所述第一电子设备的配置参数调整为与运动状态对应的目标配置参数。
- 一种第一电子设备,其特征在于,包括:存储器和处理器,所述存储器与所述处理器耦合;所述存储器存储有程序指令,当所述程序指令由所述处理器执行时,使得所述第一电子设备执行如下步骤:与第二电子设备建立无线连接,并通过所述无线连接与所述第二电子设备进行数据交互;检测所述第一电子设备的状态,所述第一电子设备的状态为运动状态或静止状态;基于所述第一电子设备的状态,确定目标配置参数;所述目标配置参数包括所述第一电子设备与所述第二电子设备之间的无线连接配置参数,和/或,所述第一电子设备的编解码策略;基于所述目标配置参数,与所述第二电子设备进行数据交互。
- 根据权利要求14所述的电子设备,其特征在于,当所述程序指令由所述处理器执行时,使得所述第一电子设备执行如下步骤:响应于接收到的第一用户操作,向所述第二电子设备发送连接请求消息;响应于接收到的所述第二电子设备发送的响应消息,与所述第二电子设备建立所述无线连接;通过所述无线连接向所述第二电子设备发送包含图像帧的数据包。
- 根据权利要求15所述的电子设备,其特征在于,若所述第一电子设备的状态为运动状态,所述无线连接配置参数包括以下至少之一:所述数据包的重传次数为N、多输入多输出MIMO模式为分集模式;N为大于0的整数。
- 根据权利要求16所述的电子设备,其特征在于,若所述第一电子设备的状态静止状态,所述无线连接配置参数包括以下至少之一:所述数据包的重传次数为M、MIMO模式为复用模式;其中,M为大于0,且小于N的整数。
- 根据权利要求15所述的电子设备,其特征在于,若所述第一电子设备的状态为运动状态,所述第一电子设备的编解码策略包括以下至少之一:所述图像帧的码率为A1;所述图像帧的分辨率为B1;调整所述图像帧的编码依赖关系。
- 根据权利要求18所述的电子设备,其特征在于,若所述第一电子设备的状态为静止状态,所述第一电子设备的编解码策略包括以下至少之一:所述图像帧的码率为A2;所述图像帧的分辨率为B2;调整所述图像帧的编码依赖关系;其中,A2大于A1,B2大于B1。
- 根据权利要求14所述的电子设备,其特征在于,当所述程序指令由所述处理器执行时,使得所述第一电子设备执行如下步骤:响应于接收到的所述第二电子设备发送的连接请求消息,向所述第二电子设备发送响应消息;与所述第二电子设备建立所述无线连接;通过所述无线连接接收所述第二电子设备发送的包含图像帧的数据包。
- 根据权利要求20所述的电子设备,其特征在于,若所述第一电子设备的状态为运动状态,所述无线连接配置参数包括:MIMO模式为分集模式。
- 根据权利要求20所述的电子设备,其特征在于,若所述第一电子设备的状态为静止状态,所述无线连接配置参数包括:MIMO模式为复用模式。
- 根据权利要求20所述的电子设备,其特征在于,若所述第一电子设备的状态为运动状态,所述第一电子设备的编解码策略包括:图像缓存大小设置为C1。
- 根据权利要求23所述的电子设备,其特征在于,若所述第一电子设备的状态为静态状态,所述第一电子设备的编解码策略包括:图像缓存大小设置为C2;其中,C2小于C1。
- 根据权利要求14所述的电子设备,其特征在于,当所述程序指令由所述处理器执行时,使得所述第一电子设备执行如下步骤:向所述第二电子设备发送所述第一电子设备的状态。
- 根据权利要求14所述的电子设备,其特征在于,当所述程序指令由所述处理器执行时,使得所述第一电子设备执行如下步骤:接收所述第二电子设备发送的所述第二电子设备的状态;其中,所述第二电子设备的状态为运动状态或静止状态;若所述第二电子设备的状态为运动状态,将所述第一电子设备的配置参数调整为与运动状态对应的目标配置参数。
- 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机程序,所述计算机程序被电子设备执行时,用于执行权利要求1至权利要求13中任一项所述的方法。
- 一种计算机程序,当所述计算机程序被电子设备执行时,用于执行权利要求1至权利要求13中任一项所述的方法。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
EP22845209.0A EP4354917A4 (en) | 2021-07-20 | 2022-07-13 | DATA PROCESSING METHOD AND ELECTRONIC DEVICE |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110819701.8 | 2021-07-20 | ||
CN202110819701.8A CN115706958A (zh) | 2021-07-20 | 2021-07-20 | 数据处理方法及电子设备 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2023001044A1 true WO2023001044A1 (zh) | 2023-01-26 |
Family
ID=84978870
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2022/105491 WO2023001044A1 (zh) | 2021-07-20 | 2022-07-13 | 数据处理方法及电子设备 |
Country Status (3)
Country | Link |
---|---|
EP (1) | EP4354917A4 (zh) |
CN (1) | CN115706958A (zh) |
WO (1) | WO2023001044A1 (zh) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2024234808A1 (zh) * | 2023-05-18 | 2024-11-21 | 荣耀终端有限公司 | 设备搜索方法和电子设备 |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104866475A (zh) * | 2014-02-20 | 2015-08-26 | 联想(北京)有限公司 | 一种数据处理方法及电子设备 |
US20160212392A1 (en) * | 2015-01-19 | 2016-07-21 | Lenovo (Beijing) Co., Ltd. | Projection method and electronic device |
CN110007886A (zh) * | 2019-04-10 | 2019-07-12 | 广州视源电子科技股份有限公司 | 传屏超时时间动态设置方法、装置、无线传屏器及接收端 |
CN111417006A (zh) * | 2020-04-28 | 2020-07-14 | 广州酷狗计算机科技有限公司 | 视频投屏方法、装置、终端及存储介质 |
CN111628847A (zh) * | 2020-05-06 | 2020-09-04 | 上海幻电信息科技有限公司 | 数据传输方法及装置 |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8903196B2 (en) * | 2005-10-05 | 2014-12-02 | Texas Instruments Incorporated | Video presentation at fractional speed factor using time domain interpolation |
TW201513653A (zh) * | 2013-05-07 | 2015-04-01 | Vid Scale Inc | 視訊應用QOE-知覺WiFi增強 |
CN111132137A (zh) * | 2019-09-16 | 2020-05-08 | 华为技术有限公司 | 一种Wi-Fi连接方法及设备 |
CN112579030B (zh) * | 2020-12-11 | 2022-06-28 | 联想(北京)有限公司 | 投屏输出控制方法、装置及电子设备 |
-
2021
- 2021-07-20 CN CN202110819701.8A patent/CN115706958A/zh active Pending
-
2022
- 2022-07-13 WO PCT/CN2022/105491 patent/WO2023001044A1/zh active Application Filing
- 2022-07-13 EP EP22845209.0A patent/EP4354917A4/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104866475A (zh) * | 2014-02-20 | 2015-08-26 | 联想(北京)有限公司 | 一种数据处理方法及电子设备 |
US20160212392A1 (en) * | 2015-01-19 | 2016-07-21 | Lenovo (Beijing) Co., Ltd. | Projection method and electronic device |
CN110007886A (zh) * | 2019-04-10 | 2019-07-12 | 广州视源电子科技股份有限公司 | 传屏超时时间动态设置方法、装置、无线传屏器及接收端 |
CN111417006A (zh) * | 2020-04-28 | 2020-07-14 | 广州酷狗计算机科技有限公司 | 视频投屏方法、装置、终端及存储介质 |
CN111628847A (zh) * | 2020-05-06 | 2020-09-04 | 上海幻电信息科技有限公司 | 数据传输方法及装置 |
Non-Patent Citations (1)
Title |
---|
See also references of EP4354917A4 |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2024234808A1 (zh) * | 2023-05-18 | 2024-11-21 | 荣耀终端有限公司 | 设备搜索方法和电子设备 |
Also Published As
Publication number | Publication date |
---|---|
EP4354917A1 (en) | 2024-04-17 |
CN115706958A (zh) | 2023-02-17 |
EP4354917A4 (en) | 2024-10-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN114390337B (zh) | 投屏方法、系统及电子设备 | |
WO2021175300A1 (zh) | 数据传输方法、装置、电子设备和可读存储介质 | |
CN113169915B (zh) | 无线音频系统、音频通讯方法及设备 | |
EP4132098A1 (en) | Implementation method for wi-fi peer-to-peer service and related device | |
CN115334138B (zh) | Quic数据传输方法、装置、客户端及服务端 | |
EP4135405B1 (en) | Channel switching method, electronic device and storage medium | |
CN110730448A (zh) | 设备之间建立连接的方法及电子设备 | |
WO2020134868A1 (zh) | 一种连接建立方法及终端设备 | |
CN115086924B (zh) | 蓝牙通信方法、系统及电子设备 | |
CN113498108B (zh) | 基于业务类型调整数据传输策略的芯片、设备以及方法 | |
WO2021043250A1 (zh) | 一种蓝牙通信方法及相关装置 | |
WO2022048371A1 (zh) | 跨设备音频播放方法、移动终端、电子设备及存储介质 | |
JP2021532653A (ja) | データ伝送方法及び電子デバイス | |
CN112291833B (zh) | 一种设备控制方法、系统相关装置 | |
CN116567783A (zh) | 一种切片选择方法、系统及相关装置 | |
CN113676902B (zh) | 一种提供无线上网的系统、方法及电子设备 | |
WO2023001044A1 (zh) | 数据处理方法及电子设备 | |
CN117062252B (zh) | 一种数据传输方法及电子设备 | |
CN114584809A (zh) | 数据传输方法、系统及电子设备 | |
CN116345147B (zh) | 天线调谐方法及终端设备 | |
WO2023280160A1 (zh) | 一种通道切换方法及装置 | |
WO2023124186A1 (zh) | 通信方法和通信装置 | |
CN114980152A (zh) | 一种提高语音通话质量的方法 | |
WO2022267917A1 (zh) | 蓝牙通信方法及系统 | |
WO2021143921A1 (zh) | 一种多路径传输控制的方法及控制装置 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 22845209 Country of ref document: EP Kind code of ref document: A1 |
|
WWE | Wipo information: entry into national phase |
Ref document number: 2022845209 Country of ref document: EP |
|
ENP | Entry into the national phase |
Ref document number: 2022845209 Country of ref document: EP Effective date: 20240110 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |