Patent Description:
With the development of electronic technologies, electronic devices play an increasingly important role in the daily life of users. In various scenarios, a user applies a video call function of an electronic device, so that the user can make a video call with other users through the electronic device.

In the conventional technology, after enabling the video call function, and when sending a multimedia data packet of the video call to a back-end server, the electronic device detects whether the multimedia data packet has been transmitted to the back-end server within a predetermined time.

However, the electronic device will continue to send a large quantity of multimedia data packets to the back-end server during a video call process. Therefore, to ensure the normal transmission of subsequent data, if the electronic device detects that any multimedia data packet has not been transmitted within the predetermined time, the electronic device discards the multimedia data packet to avoid excessive delay and queuing of data of the electronic device.

In this way, it is very likely that a peer electronic device cannot parse the multimedia data packet, thereby causing the peer electronic device to continuously generate screen blurring.

<CIT> discloses a method, comprising identifying one or more packets to be discarded; determining whether a number of packets to be discarded will cause a number of consecutive discarded packets to become greater than a threshold number of packets; upon determining that the number of packets to be discarded will cause the number of consecutive discarded packets to become greater than the threshold number of packets, discarding the one or more packets and performing at least one packet processing operation on respective remaining identified packets; and upon determining that the number of packets to be discarded will not cause the number of consecutive discarded packets to become greater than the threshold number of packets, discarding the one or more packets without processing respective remaining identified packets.

Embodiments of the present invention provide a data processing method and an electronic device, to resolve the problem of continuous screen blurring in a video call process of the electronic device.

To resolve the foregoing technical problem, the embodiments of the present invention are implemented as follows.

According to a first aspect, an embodiment of the present invention provides a data processing method, which is defined in claim <NUM>.

According to a second aspect, an embodiment of the present invention further provides an electronic device, which is defined in claim <NUM>.

According to a third aspect, an embodiment of the present invention provides a computer-readable storage medium, which is defined in claim <NUM>.

According to a fourth aspect, an embodiment of the present invention provides a computer program product, which is defined in claim <NUM>.

It is to be understood that both the forgoing general description and the following detailed description are exemplary only, and are not restrictive of the present disclosure.

The following clearly and completely describes the technical solutions in exemplary implementations of the present invention with reference to the accompanying drawings in the exemplary implementations of the present invention. Apparently, the described exemplary implementations are some of the exemplary implementations rather than all of the exemplary implementations of the present disclosure. Other implementations obtained by a person of ordinary skill in the art based on the exemplary implementations of the present description without creative efforts are possible, provided they fall within the scope of the invention which is only defined by the appended claims.

It should be noted that, "/" in this specification means "or". For example, A/B may mean A or B. "And/or" in this specification describes only an association relationship for describing associated objects and represents that three relationships may exist. For example, A and/or B may represent the following three cases: only A exists, both A and B exist, and only B exists.

It should be noted that, "a plurality of" in this specification refers to two or more than two.

It should be noted that, in the embodiments of the present invention, the word "exemplary" or "for example" is used to represent giving an example, an illustration, or a description. Any embodiment or design scheme described as an "exemplary" or "for example" in the embodiments of the present invention should not be explained as being more preferred or having more advantages than another embodiment or design scheme. Exactly, use of the word "exemplary" or "for example" or the like is intended to present a related concept in a specific manner.

It should be noted that, for ease of describing the technical solutions in the embodiments of the present invention clearly, in the embodiments of the present invention, words such as "first" and "second" are used to distinguish same or similar items with a basically same function or role. A person of ordinary skill in the art can understand that the words such as "first" and "second" do not define the amount and the operating sequence. For example, a first electronic device and a second electronic device are used to distinguish different electronic devices, not to describe a specific order of electronic devices.

The I-frame is alternatively referred to as an intra-coded frame, which is an independent frame with all information and may be decoded without referring to other images. The I-frame may be simply understood as a static image. The first frame in a video sequence is always the I-frame, because it is a key frame.

The P-frame is alternatively referred to as an inter-frame predictive-coded frame, which may need to be encoded with reference to the previous I-frame. The P-frame indicates a difference between images of the current frame and the previous frame (the previous frame may be the I-frame or the P-frame). In a case of decoding, a difference defined by the current frame needs to be superimposed onto a previously buffered image to generate a final image. Compared with the I-frame, the P-frame usually occupies fewer data bits, but the disadvantage is that the P-frame is very sensitive to transmission errors because of the complex dependence on the previous P-frame and I-frame.

A data processing method according to the embodiments of the present invention may be performed by the foregoing electronic device (including a mobile electronic device and a non-mobile electronic device), or a functional module and/or functional entity in the electronic device capable of implementing the data processing method, which may be specifically determined according to actual use requirements, and is not limited in the embodiments of the present invention. An electronic device is used as an example below to illustrate the data processing method provided in the embodiments of the present invention.

The electronic device in the embodiments of the present invention may be a mobile electronic device or a non-mobile electronic device. The mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palmtop computer, an in-vehicle terminal device, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook, a personal digital assistant (personal digital assistant, PDA), or the like; and the non-mobile electronic device may be a personal computer (personal computer, PC), a television (television, TV), a teller machine, a self-service machine, or the like, which are not specifically limited in the embodiments of the present invention.

The electronic device in the embodiments of the present invention may be an electronic device with an operating system. The operating system may be an Android (Android) operating system, an ios operating system, or another possible operating system, which is not specifically limited in the embodiments of the present invention.

The Android operating system is used as an example below to describe a software environment to which the data processing method according to the embodiments of the present invention is applicable.

<FIG> is a schematic diagram of an architecture of a possible Android operating system according to an embodiment of the present invention. In <FIG>, the architecture of the Android operating system includes four layers, which are respectively an application layer, an application framework layer, a system runtime library layer, and a kernel layer (which may be specifically a Linux kernel layer).

The application layer includes various applications (includes system applications and third-party applications) in the Android operating system.

The application framework layer is a framework of applications, and developers may develop some applications based on the application framework layer in a case of following the development principles of the framework of applications.

The system runtime library layer includes a library (also referred to as a system library) and an Android operating system runtime environment. The library mainly provides various resources required by the Android operating system. The Android operating system runtime environment is used for providing a software environment for the Android operating system.

The kernel layer is an operating system layer of the Android operating system and belongs to a software-level bottom layer of the Android operating system. The kernel layer provides, based on a Linux kernel, core system services and hardware-related drivers for the Android operating system.

The Android operating system is used as an example. In the embodiments of the present invention, the developers may develop, based on the system architecture of the Android operating system shown in <FIG>, a software program implementing the data processing method according to the embodiments of the present invention, so that the data processing method can be performed based on the Android operating system shown in <FIG>. That is, a processor or an electronic device may implement the data processing method according to the embodiments of the present invention by running the software program in the Android operating system.

The data processing method according to the embodiments of the present invention is described below with reference to a flowchart of the data processing method shown in <FIG> is a schematic flowchart of a data processing method according to an embodiment of the present invention. The method is applicable to a first electronic device, and includes step <NUM> and step <NUM>.

Step <NUM>: the first electronic device obtains, in a case that a video call is being made on a first electronic device, a packet loss amount of multimedia data packets of the video call within a predetermined period of time.

In this embodiment of the present invention, a video call is made between the first electronic device and a second electronic device through different applications. For example, a video call is made between the foregoing first electronic device and the second electronic device through a "call" APP, or may be made between the foregoing first electronic device and the second electronic device through a "chat" APP, which may be specifically set according to actual needs, and is not limited in this embodiment of the present invention.

Exemplarily, the predetermined period of time (for example, <NUM> second) may be a period of time preset by a user, a system default period of time, or a period of time of a statistical duration of continuous packet loss, which is not limited in the embodiments of the present invention.

Exemplarily, the multimedia data packet may include at least one of the following: an audio data packet and a video data packet.

Exemplarily, the packet loss amount may be multimedia data packets of the video call discarded by the first electronic device in the packet data convergence protocol (packet data convergence protocol, PDCP) layer within a predetermined period of time.

Optionally, in this embodiment of the present invention, when the packet loss amount is excessive, the second electronic device may have continuous screen blurring. To avoid this problem, the first electronic device may count the packet loss amount to determine whether the packet loss amount is excessive.

Exemplarily, step <NUM> may include the following step 201a and step 201b.

Step 201a: within the predetermined period of time, if a timer corresponding to any multimedia data packet generated by the video call times out, the first electronic device discards the any multimedia data packet, and controls a counter to increase by <NUM>.

Step 201b: the first electronic device reads, after the predetermined period of time, a value of the counter.

Exemplarily, the counter is configured to count the packet loss amount of multimedia data packets of the video call within the predetermined period of time.

Exemplarily, a multimedia data packet corresponds to a timer (timer).

Exemplarily, the timer may be configured by the server for the first electronic device. Exemplarily, the server may send an RRC command carrying configuration information to the first electronic device. The configuration information is used for configuring the timer for the first electronic device.

Exemplarily, the counter may be an up counter, or may be an up-down counter, which is not limited in this embodiment of the present invention. The up-down counter is a counter that can count up or down.

Step <NUM>: the first electronic device clears a target multimedia data packet if the packet loss amount is greater than or equal to a predetermined threshold, and sends multimedia data packets currently generated by the video call to a server.

In this embodiment of the present invention, the target multimedia data packet is: all multimedia data packets corresponding to the video call cached in the first electronic device.

Optionally, in this embodiment of the present invention, the first electronic device obtains, in a case that a video call is being made on a first electronic device, packet loss parameters of the video call, and the packet loss parameters include: a duration of continuous packet loss and a packet loss amount of multimedia data packets of the video call within the duration of continuous packet loss (that is, within the period of time of the statistical duration of continuous packet loss).

Exemplarily, the predetermined period of time is the duration of continuous packet loss, and the duration of continuous packet loss is greater than or equal to a preset duration.

Optionally, in this embodiment of the present invention, if the first electronic device detects the packet loss of the video call, statistics may be performed on the duration of continuous packet loss of the video call. For example, the electronic device detects that the video call in the electronic device loses packets every <NUM> seconds, and a statistical cumulative duration of continuous packet loss is <NUM> seconds.

Optionally, in this embodiment of the present invention, in a case that the duration of continuous packet loss is greater than or equal to a predetermined duration, and the packet loss amount of multimedia data packets of the video call within the duration of continuous packet loss is greater than or equal to the predetermined threshold, the first electronic device clears the target multimedia data packet, and sends multimedia data packets currently generated by the video call to the server. That is, if the packet loss amount of multimedia data packets of the video call within the predetermined period of time is greater than or equal to the predetermined threshold, the first electronic device clears the target multimedia data packet, and sends multimedia data packets currently generated by the video call to the server.

Exemplarily, the predetermined threshold and the predetermined duration may be thresholds preset by a user, or may be system default thresholds, which are not limited in this embodiment of the present invention. For example, the predetermined threshold may be that the first electronic device discards <NUM> multimedia data packets within <NUM> second.

For example, a mobile phone A is used as the first electronic device and a mobile phone B is used as the second electronic device. When a user makes a video call with other users through a "chat" APP in the mobile phone A, the mobile phone A sends a large quantity of video data packets to a server, and then the server forwards the video data packets to the mobile phone B. In the process that the mobile phone A sends a large quantity of video data packets to the server, the mobile phone A can monitor the packet loss of the video data packets in real time. If the mobile phone A detects that the mobile phone A continuously loses packets within <NUM> second, and the packet loss amount within <NUM> second is <NUM>, which is greater than <NUM>, due to the excessive packet loss amount, the mobile phone B cannot parse the video data packets received subsequently, and the screen blurring has been caused. In this case, the mobile phone A can clear the cached video data packets of the video call. After the cached video data packets of the video call are cleared, the mobile phone A can send a new video data packet of the video call to the server. When receiving the new video data packet of the video call, the mobile phone B can refresh and display a new screen.

It should be noted that, after the mobile phone A discards a part of the video data, the mobile phone B subsequently receives only P-frames. Therefore, the mobile phone B cannot parse the P-frames. However, the new video data packet of the video call includes I-frames. Therefore, when receiving the new video data packet of the video call, the mobile phone B can parse the new video data packet, and then refresh and display a new screen.

In an example, the target multimedia data packet may be a multimedia data packet cached by the first electronic device in the PDCP layer.

According to the data processing method provided in the embodiments of the present invention, in a case that a video call is being made on a first electronic device, and when a packet loss amount of multimedia data packets of the video call is excessive within a predetermined period of time, to avoid continuous screen blurring of a second electronic device and which the video call is made between the first electronic device, the first electronic device can clear all multimedia data packets corresponding to the video call cached in the first electronic device, so that data in the first electronic device does not undergo excessive delay and queuing. In this way, the first electronic device can subsequently send multimedia data packets currently generated by the video call to a server, and the server can also forward multimedia data packets currently generated by the video call to the second electronic device. Therefore, the second electronic device refreshes and displays a new screen after receiving a new multimedia data packet, thereby avoiding the problem of continuous screen blurring of the second electronic device.

Optionally, in this embodiment of the present invention, to prevent the first electronic device from continuously sending multimedia data packets that cannot be parsed by the second electronic device to the server during the process of clearing the target multimedia data packet by the first electronic device, the first electronic device may stop sending multimedia data packets first.

Exemplarily, before step <NUM> in which the first electronic device clears the target multimedia data packet, the method may further include the following step <NUM>.

Step <NUM>: if the packet loss amount is greater than or equal to the predetermined threshold, the first electronic device stops sending multimedia data packets of the video call to the server.

For example, a mobile phone A is used as the first electronic device and a mobile phone B is used as the second electronic device. When a user makes a video call with other users through the mobile phone A, the mobile phone A sends a large quantity of video data packets to a server, and then the server forwards the video data packets to the mobile phone B. If the mobile phone A detects that the mobile phone A continuously loses packets within <NUM> second, and the packet loss amount within <NUM> second is <NUM>, which is greater than <NUM>, the mobile phone A may stop (pause) sending the video data packets of the video call to the server, while the screen of the mobile phone B stays on the last screen. When receiving a new video data packet of the video call, the mobile phone B can refresh and display a new screen.

In this way, when detecting that the packet loss amount is greater than or equal to the predetermined threshold, the first electronic device may first stop sending multimedia data packets of the video call to the server, thereby preventing the second electronic device from continuously receiving multimedia data packets of the video call that cannot be parsed, and further reducing the time of screen blurring of the second electronic device.

Further optionally, the first electronic device may notify an application layer of the electronic device to stop sending multimedia data packets of the video call, and then stop sending multimedia data packets of the video call to the server.

Exemplarily, step <NUM> may specifically further include the following step 203a and step 203b.

Step 203a: if the packet loss amount is greater than or equal to the predetermined threshold, the first electronic device sends a stop command to an application layer of the first electronic device.

Exemplarily, the stop command is used for instructing the application layer of the first electronic device to stop sending multimedia data packets of the video call.

Exemplarily, the application layer is configured to generate data packets and transmit the data packets to a lower layer of the application layer.

Step 203b: according to the stop command, the application layer of the first electronic device stops sending multimedia data packets of the video call.

For example, a mobile phone A is used as the first electronic device and a mobile phone B is used as the second electronic device. When a user makes a video call with other users through the mobile phone A, if the mobile phone A detects that the mobile phone A continuously loses packets within <NUM> second, and the packet loss amount within <NUM> second is <NUM>, which is greater than <NUM>, the mobile phone A may send a stop command to the application layer of the mobile phone A. When receiving the stop command, the application layer of the mobile phone A pauses sending the video data packets of the video call.

In this way, when detecting that the packet loss amount is greater than or equal to the predetermined threshold, the first electronic device may directly and accurately notify the application layer of the first electronic device to stop data transmission.

In this embodiment of the present invention, the PDCP layer is the most important layer of data transmission, and the data packets are discarded in the PDCP layer. To reduce the workload of the first electronic device, the first electronic device can clear multimedia data packets of the video call only in the PDCP layer, which can also avoid the continuous screen blurring of the second electronic device.

Step <NUM> in which if the packet loss amount is greater than or equal to the predetermined threshold, the first electronic device clears the target multimedia data packet may specifically include the following step 202a1 and step 202a2.

Step 202a1: if the target multimedia data packet is all multimedia data packets corresponding to the video call cached in the PDCP layer of the first electronic device, and if the packet loss amount is greater than or equal to the predetermined threshold, the first electronic device sends a clear command to the PDCP layer of the first electronic device.

Exemplarily, the clear command is used for instructing the first electronic device to clear multimedia data packets of the video call cached in the PDCP layer.

Step 202a2: according to the clear command, the first electronic device clears all multimedia data packets corresponding to the video call cached in the PDCP layer.

In this way, the first electronic device can clear all multimedia data packets corresponding to the video call in the PDCP layer, so that the data in the first electronic device does not undergo excessive delay and queuing, and the workload of the first electronic device is reduced.

Further optionally, in this embodiment of the present invention, after the first electronic device clears all multimedia data packets corresponding to the video call in the PDCP layer, the first electronic device may be triggered to resend multimedia data packets of the video call.

Exemplarily, step <NUM> of sending multimedia data packets currently generated by the video call to the server may specifically include the following step 202b1 and step 202b2.

Step 202b1: the first electronic device sends a resend command to an upper application layer of the PDCP layer.

Exemplarily, the resend command is used for instructing the first electronic device to send multimedia data packets currently generated by the video call to the server.

Exemplarily, if the multimedia data packets are video data packets, the resend command is further used for instructing the first electronic device to regenerate a video data packet including an I-frame for sending.

Step 202b2: according to the resend command, the first electronic device sends multimedia data packets currently generated by the video call to the server.

For example, a mobile phone A is used as the first electronic device and a mobile phone B is used as the second electronic device. When a user makes a video call with other users through the mobile phone A, if the mobile phone A detects that the PDCP layer of the mobile phone A continuously loses packets within <NUM> second, and the packet loss amount within <NUM> second is <NUM>, which is greater than <NUM>, the mobile phone A may send a clear command to the PDCP layer of the mobile phone A. When receiving the clear command, the PDCP layer of the mobile phone A clears the video data packets of the video call cached in the PDCP layer of the mobile phone A. Then, after the video data packets of the video call cached in the PDCP layer of the mobile phone A are cleared, the mobile phone A may send a resend command to the upper application layer of the PDCP layer. Next, when receiving the resend command, the application layer of the mobile phone A may send a new video data packet including an I-frame currently generated to the server. Finally, when receiving the new video data packet including the I-frame of the video call, the mobile phone B can refresh and display a new screen.

In this way, the first electronic device can clear all multimedia data packets corresponding to the video call in the PDCP layer, so that the data in the first electronic device does not undergo excessive delay and queuing. After multimedia data packets of the video call in the PDCP layer are cleared, the first electronic device can send a new multimedia data packet currently generated to the server. Therefore, after receiving the new multimedia data packet, the second electronic device refreshes and displays a new screen, thereby avoiding the problem of continuous screen blurring of the second electronic device.

<FIG> is a schematic diagram of a possible structure of an electronic device for implementing the embodiments of the present invention. As shown in <FIG>, the electronic device <NUM> includes: an obtaining module <NUM> and an execution module <NUM>. The obtaining module <NUM> is configured to obtain, in a case that a video call is being made on a first electronic device, a packet loss amount of multimedia data packets of the video call within a predetermined period of time. The execution module <NUM> is configured to clear a target multimedia data packet if the packet loss amount obtained by the obtaining module <NUM> is greater than or equal to a predetermined threshold, and send multimedia data packets currently generated by the video call to a server. The target multimedia data packet is: all multimedia data packets corresponding to the video call cached in the first electronic device.

Optionally, the execution module <NUM> is further configured to, if the packet loss amount obtained by the obtaining module is greater than or equal to the predetermined threshold, stop sending multimedia data packets of the video call to the server.

Optionally, the execution module <NUM> is further configured to, in a case that the target multimedia data packet is: all multimedia data packets corresponding to the video call cached in a PDCP layer of the first electronic device, and if the packet loss amount obtained by the obtaining module <NUM> is greater than or equal to the predetermined threshold, send a clear command to the PDCP layer of the first electronic device; and clear, according to the clear command, all multimedia data packets corresponding to the video call cached in the PDCP layer.

Optionally, the execution module <NUM> is further configured to send a resend command to an upper application layer of the PDCP layer, and send, according to the resend command, multimedia data packets currently generated by the video call to the server.

Optionally, the obtaining module <NUM> is further configured to, within the predetermined period of time, if a timer corresponding to any multimedia data packet generated by the video call times out, discard the any multimedia data packet, and control a counter to increase by <NUM>; and read, after the predetermined period of time, a value of the counter. The counter is configured to count the packet loss amount of multimedia data packets of the video call within the predetermined period of time.

According to the electronic device provided in this embodiment of the present invention, in a case that a video call is being made on a first electronic device, and when a packet loss amount of multimedia data packets of the video call is excessive within a predetermined period of time, to avoid continuous screen blurring of a second electronic device and which the video call is made between the first electronic device, the first electronic device can clear all multimedia data packets corresponding to the video call cached in the first electronic device, so that data in the first electronic device does not undergo excessive delay and queuing. In this way, the first electronic device can subsequently send multimedia data packets currently generated by the video call to a server, and the server can also forward multimedia data packets currently generated by the video call to the second electronic device. Therefore, the second electronic device refreshes and displays a new screen after receiving a new multimedia data packet, thereby avoiding the problem of continuous screen blurring of the second electronic device.

The electronic device provided in this embodiments of the present invention can implement various processes implemented by the electronic device in the foregoing method embodiments. To avoid repetition, details are not described herein again.

<FIG> is a schematic structural diagram of hardware of an electronic device for implementing various embodiments of the present invention. The electronic device <NUM> includes, but is not limited to, components such as a radio frequency unit <NUM>, a network module <NUM>, an audio output unit <NUM>, an input unit <NUM>, a sensor <NUM>, a display unit <NUM>, a user input unit <NUM>, an interface unit <NUM>, a memory <NUM>, a processor <NUM>, and a power supply <NUM>. A person skilled in the art may understand that the structure of the electronic device <NUM> shown in <FIG> does not constitute a limitation to the electronic device. The electronic device <NUM> may include more or fewer components than those shown in the figure, or some components may be combined, or a different component deployment may be used. In this embodiment of the present invention, the electronic device <NUM> includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palmtop computer, an in-vehicle terminal device, a wearable device, a pedometer, and the like.

The processor <NUM> is configured to obtain, in a case that a video call is being made on a first electronic device, a packet loss amount of multimedia data packets of the video call within a predetermined period of time; and is further configured to clear a target multimedia data packet if the packet loss amount is greater than or equal to a predetermined threshold, and send multimedia data packets currently generated by the video call to a server. The target multimedia data packet is: all multimedia data packets corresponding to the video call cached in the first electronic device.

It should be understood that, in this embodiment of the present invention, the radio frequency unit <NUM> may be configured to receive and send signals during an information receiving and sending process or a call process. Specifically, the radio frequency unit is configured to receive downlink data from a base station, and then send the downlink data to the processor <NUM> for processing; and in addition, send uplink data to the base station. Generally, the radio frequency unit <NUM> includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit <NUM> may further communicate with a network device or another device through a wireless communication system.

The electronic device <NUM> provides wireless broadband Internet access for a user by using the network module <NUM>. For example, the electronic device helps the user to receive and send an email, browse a web page, and access stream media, and the like.

The audio output unit <NUM> may convert audio data received by the radio frequency unit <NUM> or the network module <NUM>, or stored in the memory <NUM> into an audio signal and output the audio signal as a sound. In addition, the audio output unit <NUM> may further provide an audio output (for example, a call signal receiving sound or a message receiving sound) related to a specific function executed by the electronic device <NUM>. The audio output unit <NUM> includes a speaker, a buzzer, a receiver, and the like.

The input unit <NUM> is configured to receive an audio signal or a video signal. The input unit <NUM> may include a graphics processing unit (Graphics Processing Unit, GPU) <NUM> and a microphone <NUM>. The graphics processing unit <NUM> is configured to process image data of a static image or a video obtained by an image capture apparatus (for example, a camera) in a video capture mode or an image capture mode. An image frame that has been processed may be displayed on the display unit <NUM>. The image frame that has been processed by the graphics processing unit <NUM> may be stored in the memory <NUM> (or another storage medium) or sent by using the radio frequency unit <NUM> or the network module <NUM>. The microphone <NUM> may receive a sound, and can process the sound into audio data. The processed audio data may be converted, in a phone talk mode, into a format that may be sent to a mobile communication base station through the radio frequency unit <NUM> for output.

The electronic device <NUM> further includes at least one sensor <NUM>, such as an optical sensor, a motion sensor, and other sensors. Specifically, the optical sensor includes an ambient light sensor and a proximity sensor. The ambient light sensor may adjust luminance of a display panel <NUM> according to brightness of ambient light. The proximity sensor may switch off the display panel <NUM> and/or backlight when the electronic device <NUM> is moved to the ear. As one type of motion sensor, an accelerometer sensor can detect magnitudes of accelerations in various directions (generally, on three axes), may detect a magnitude and a direction of the gravity when static, and may be applied to recognizing the attitude of the electronic device (for example, switchover between horizontal and vertical screens, a related game, and magnetometer attitude calibration), a function related to vibration recognition (such as a pedometer and a knock), and the like. The sensor <NUM> may further include a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, and the like, which is not described herein in detail.

The display unit <NUM> may include a display panel <NUM>. The display panel <NUM> may be configured in the form of a liquid crystal display (Liquid Crystal Display, LCD), an organic light-emitting diode (Organic Light-Emitting Diode, OLED), or the like.

The user input unit <NUM> may be configured to receive input digit or character information, and generate a key signal input related to the user setting and function control of the electronic device <NUM>. Specifically, the user input unit <NUM> includes a touch panel <NUM> and another input device <NUM>. The touch panel <NUM>, also referred to as a touchscreen, may collect a touch operation of a user on or near the touch panel (for example, an operation of a user on the touch panel <NUM> or near the touch panel <NUM> by using any suitable object or accessory such as a finger or a stylus). The touch panel <NUM> may include a touch detection apparatus and a touch controller. The touch detection apparatus detects a touch orientation of the user, detects a signal brought by the touch operation, and transmits the signal to the touch controller. The touch controller receives touch information from the touch detection apparatus, converts the touch information into a contact coordinate, then sends the contact coordinate to the processor <NUM>, and receives and executes an instruction sent by the processor <NUM>. In addition, the touch panel <NUM> may be implemented by using various types, such as a resistive type, a capacitive type, an infrared type, and a surface acoustic wave type. In addition to the touch panel <NUM>, the user input unit <NUM> may further include the another input device <NUM>. Specifically, the another input device <NUM> may include, but not limited to, a physical keyboard, a functional key (such as a volume control key or a switch key), a track ball, a mouse, and a joystick, which are not described herein in detail.

Further, the touch panel <NUM> may cover the display panel <NUM>. After detecting a touch operation on or near the touch panel <NUM>, the touch panel <NUM> transmits the touch operation to the processor <NUM>, to determine a type of a touch event. Then, the processor <NUM> provides a corresponding visual output on the display panel <NUM> according to the type of the touch event. In <FIG>, the touch panel <NUM> and the display panel <NUM> implement, as two independent parts, input and output functions of the electronic device <NUM>. However, in some embodiments, the touch panel <NUM> and the display panel <NUM> may be integrated to implement the input and output functions of the electronic device <NUM>, which is not specifically limited herein.

The interface unit <NUM> is an interface for connecting an external apparatus to the electronic device <NUM>. For example, the external apparatus may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting an apparatus with a recognition module, an audio input/output (I/O) port, a video I/O port, a headphone port, and the like. The interface unit <NUM> may be configured to receive an input (such as data information or electric power) from an external apparatus and transmit the received input to one or more elements in the electronic device <NUM> or may be configured to transmit data between the electronic device <NUM> and the external apparatus.

The memory <NUM> may be configured to store a software program and various data. The memory <NUM> may mainly include a program storage area and a data storage area. The program storage area may store an operating system, an application required by at least one function (for example, a sound playback function and an image display function), and the like. The data storage area may store data (for example, audio data and a phone book) created according to use of the mobile phone. In addition, the memory <NUM> may include a high speed random access memory, and may further include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory or another volatile solid-state storage device.

The processor <NUM> is a control center of the electronic device <NUM>, and connects to various parts of the electronic device <NUM> by using various interfaces and lines. By running or executing the software program and/or the module stored in the memory <NUM>, and invoking data stored in the memory <NUM>, the processor performs various functions and data processing of the electronic device <NUM>, thereby performing overall monitoring on the electronic device <NUM>. The processor <NUM> may include one or more processing units. Optionally, the processor <NUM> may integrate an application processor and a modem processor. The application processor mainly processes an operating system, a user interface, an application, and the like. The modem processor mainly processes wireless communication. It may be understood that the foregoing modem processor may not be integrated into the processor <NUM>.

The electronic device <NUM> may further include the power supply <NUM> (such as a battery) for supplying power to the components. Optionally, the power supply <NUM> may be logically connected to the processor <NUM> by using a power management system, thereby implementing functions, such as charging, discharging, and power consumption management, by using the power management system.

In addition, the electronic device <NUM> includes some functional module that are not shown, which are not described herein in detail.

Optionally, an embodiment of the present invention further provides an electronic device, including a processor, a memory, and a computer program stored in the memory and executable on the processor <NUM>, the computer program, when executed by the processor, implementing the processes of the embodiments of the data processing method, and can achieve the same technical effects. To avoid repetition, details are not described herein again.

An embodiment of the present invention further provides a computer-readable storage medium, storing a computer program, the computer program, when executed by a processor, implementing the processes of the embodiments of the data processing method, and can achieve the same technical effects. To avoid repetition, details are not described herein again. The computer-readable storage medium is, for example, a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk, an optical disc, or the like.

It should be noted that, terms "include", "comprise", and any variants thereof in this specification are intended to cover a non-exclusive inclusion. Therefore, in the context of a process, method, object, or apparatus that includes a series of elements, the process, method, object, or apparatus not only includes such elements, but also includes other elements not specified expressly, or may include inherent elements of the process, method, object, or apparatus. Without more limitations, elements defined by the sentence "including one" does not exclude that there are still other same elements in the processes, methods, objects, or apparatuses.

Claim 1:
A data processing method, comprising:
obtaining (<NUM>), in a case that a video call is being made on a first electronic device, a packet loss amount of multimedia data packets of the video call within a predetermined period of time;
in a case that the packet loss amount is greater than or equal to a predetermined threshold, clearing (<NUM>) target multimedia data packets and sending (<NUM>) multimedia data packets currently generated by the video call to a server, wherein
the target multimedia data packets comprise all multimedia data packets corresponding to the video call cached in a packet data convergence protocol, PDCP, layer of the first electronic device; and wherein,
clearing (<NUM>) the target multimedia data packets comprises:
sending a clear command to the PDCP layer of the first electronic device; and
clearing, according to the clear command, all multimedia data packets corresponding to the video call cached in the PDCP layer.