WO2016202286A1 - Real-time video transmission method and electronic apparatus - Google Patents

Real-time video transmission method and electronic apparatus Download PDF

Info

Publication number
WO2016202286A1
WO2016202286A1 PCT/CN2016/086140 CN2016086140W WO2016202286A1 WO 2016202286 A1 WO2016202286 A1 WO 2016202286A1 CN 2016086140 W CN2016086140 W CN 2016086140W WO 2016202286 A1 WO2016202286 A1 WO 2016202286A1
Authority
WO
WIPO (PCT)
Prior art keywords
instant video
video frame
preset shape
user
area indicated
Prior art date
Application number
PCT/CN2016/086140
Other languages
French (fr)
Chinese (zh)
Inventor
武俊敏
Original Assignee
美国掌赢信息科技有限公司
武俊敏
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from CN201510346211.5A external-priority patent/CN105163198B/en
Priority claimed from CN201510346064.1A external-priority patent/CN105163194A/en
Priority claimed from CN201510346212.XA external-priority patent/CN105163199A/en
Priority claimed from CN201510346186.0A external-priority patent/CN104967867A/en
Priority claimed from CN201510346187.5A external-priority patent/CN105049947A/en
Application filed by 美国掌赢信息科技有限公司, 武俊敏 filed Critical 美国掌赢信息科技有限公司
Publication of WO2016202286A1 publication Critical patent/WO2016202286A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/14Systems for two-way working

Definitions

  • the present invention relates to the field of video, and in particular, to a method and a device for transmitting instant video.
  • embodiments of the present invention provide a method and an electronic device for transmitting an instant video.
  • the technical solution is as follows:
  • a method for transmitting an instant video comprising:
  • the selection instruction is used to indicate a preset shape selected by the user
  • the selection instruction includes a size parameter of the preset shape, a position parameter of the preset shape, a frame parameter of the preset shape, and the preset Setting at least one of the shape effect parameters, determining an area indicated by the preset shape in the current instant video frame by any one of the following operations:
  • the position parameter of the preset shape includes a coordinate parameter, and determining, according to the coordinate parameter, an area indicated by the preset shape in a current instant video frame; or
  • the position parameter of the preset shape includes a description parameter, and the details indicated by the description parameter are identified in the current instant video frame;
  • an area indicated by the preset shape is determined in the current instant video frame.
  • the transmitting, according to the first transmission policy, the current region including the area indicated by the preset shape Instant video frames include:
  • Processing the current instant video according to the importance matrix corresponding to the current instant video frame, and acquiring the processed instant video frame includes:
  • the transmitting, by the second transmission policy, the location including the area indicated by the preset shape includes:
  • the setting the quantization parameter corresponding to the at least one macro block includes:
  • And encoding, according to the quantization parameter, the at least one macroblock, and generating the encoded instant video frame includes:
  • the transmitting according to the third transmission policy, transmitting the area indicated by the preset shape
  • the current instant video frame includes:
  • the acquiring, by using the residual data between the current instant video frame and the reference frame of the area indicated by the preset shape include:
  • the transmitting, according to the fourth transmission policy, the current instant video frame that includes the area indicated by the preset shape includes:
  • the acquiring, by using the feature parameter that is used to describe the area indicated by the preset shape includes:
  • the method further includes:
  • the selection instruction is sent to other electronic devices.
  • a method for displaying an instant video comprising:
  • the selection instruction is used to indicate a preset shape selected by the user
  • the current instant video frame is displayed according to the selection instruction and a transmission policy supported by the electronic device.
  • an electronic device comprising:
  • a receiving module configured to receive a user-triggered selection instruction, where the selection instruction is used to indicate a preset shape selected by the user;
  • a first processing module configured to determine an area indicated by the preset shape in a current instant video frame
  • a determining module configured to determine whether the network bandwidth meets any one of a first preset condition, a second preset condition, a third preset condition, and a fourth preset condition
  • the first processing module is further configured to trigger any one of the following modules according to a preset condition that the network bandwidth meets and a transmission policy supported by the electronic device:
  • a second processing module configured to: when the network bandwidth meets the first preset condition, transmit the current instant video frame that includes the area indicated by the preset shape according to the first transmission policy; or
  • a third processing module configured to: when the network bandwidth meets the second preset condition, transmit the current instant video frame that includes the area indicated by the preset shape according to the second transmission policy; or
  • a fourth processing module configured to: when the network bandwidth meets the third preset condition, transmit the current instant video frame that includes the area indicated by the preset shape according to the third transmission policy; or
  • a fifth processing module configured to: when the network bandwidth meets the fourth preset condition, transmit the current instant video frame including the area indicated by the preset shape according to the fourth transmission policy.
  • the selection instruction includes a size parameter of the preset shape, a position parameter of the preset shape, a frame parameter of the preset shape, and the preset At least one of a shape effect parameter is provided, the first processing module being configured to perform any one of the following operations:
  • the position parameter of the preset shape includes a coordinate parameter, and determining, according to the coordinate parameter, an area indicated by the preset shape in a current instant video frame; or
  • the position parameter of the preset shape includes a description parameter, and the details indicated by the description parameter are identified in the current instant video frame;
  • an area indicated by the preset shape is determined in the current instant video frame.
  • the second processing module is specifically configured to:
  • the second processing module is specifically configured to:
  • the third processing module is specifically configured to:
  • the third processing module is specifically configured to:
  • a quantization parameter of a macroblock including all or part of the area indicated by the preset shape is a value
  • the third processing module is specifically configured to:
  • the fourth processing module is specifically configured to:
  • the fourth processing module is specifically configured to:
  • the fourth processing module is specifically configured to:
  • the fourth processing module is specifically configured to:
  • the electronic device further includes: a sending module, configured to:
  • the selection instruction is sent to other electronic devices.
  • an electronic device comprising a transmitting module, a memory, and a processor connected to the sending module and the memory, wherein the memory is configured to store a set of program codes,
  • the processor calls the program code stored by the memory to perform the following operations:
  • the selection instruction is used to indicate a preset shape selected by the user
  • the selection instruction includes a size parameter of the preset shape, a position parameter of the preset shape, a frame parameter of the preset shape, and the preset At least one of the shape effect parameters, the processor invoking the program code stored in the memory to perform any of the following operations:
  • the position parameter of the preset shape includes a coordinate parameter, and determining, according to the coordinate parameter, an area indicated by the preset shape in a current instant video frame; or
  • the position parameter of the preset shape includes a description parameter, and the details indicated by the description parameter are identified in the current instant video frame;
  • an area indicated by the preset shape is determined in the current instant video frame.
  • the processor invokes the program code stored by the memory, to perform the following operations:
  • the processor invokes the program code stored in the memory to perform the following operations:
  • the processor invokes the program code stored in the memory to perform the following operations:
  • the processor invokes the program code stored in the memory to perform the following operations:
  • the processor calls the program code stored by the memory to perform the following operations:
  • the processor invokes the program code stored by the memory to perform the following operations:
  • the processor invokes the program code stored in the memory to perform the following operations:
  • the processor invokes program code stored in the memory to perform the following operations:
  • the processor invokes the program code stored in the memory to perform the following operations:
  • the processor by using the program code stored by the processor, is configured to perform the following operations:
  • the selection instruction is sent to other electronic devices.
  • an electronic device comprising:
  • a first acquiring module configured to acquire a current instant video frame that is transmitted by the electronic device according to any one of the first transmission policy, the second transmission policy, the third transmission policy, and the fourth transmission policy;
  • a second acquiring module configured to acquire a user-triggered selection instruction, where the selection instruction is used to indicate a preset shape selected by the user;
  • a display module configured to display the current instant video frame according to the selection instruction and a transmission policy supported by the electronic device.
  • an electronic device including a display screen, a memory, and a processor coupled to the display screen and the memory, wherein the memory is configured to store a set of program codes,
  • the processor calls the program code stored by the memory to perform the following operations:
  • the selection instruction is used to indicate a preset shape selected by the user
  • the current instant video frame is displayed according to the selection instruction and a transmission policy supported by the electronic device.
  • the present invention discloses a method and a device for transmitting an instant video, comprising: receiving a selection instruction triggered by a user, the selection instruction is used to indicate a preset shape selected by the user; and determining a preset shape in the current instant video frame And determining whether the network bandwidth meets any one of the first preset condition, the second preset condition, the third preset condition, and the fourth preset condition; if the network bandwidth meets the first preset condition, according to the first transmission Transmitting, by the policy, the current instant video frame including the area indicated by the preset shape; if the network bandwidth meets the second preset condition, transmitting the current instant video frame including the area indicated by the preset shape according to the second transmission policy; The network bandwidth meets the third preset condition, according to the a third transmission policy, transmitting a current instant video frame including an area indicated by the preset shape; and if the network bandwidth satisfies the fourth preset condition, transmitting the current instant video frame including the area indicated by the preset shape according to the fourth transmission policy .
  • the area indicated by the preset shape may be selected according to different network bandwidths.
  • the current instant video frames adopt different transmission strategies, and the traditional instant video transmission method not only satisfies the user's attention to an area in the instant video is greater than other areas, the user's definition of a certain area, and The requirement for detail retention is greater than that of other areas and other participants who want the instant video interaction to migrate the attention to the diverse needs of the user-specified area, which improves the user experience, improves the utilization of network bandwidth, and saves network resources. Therefore, the transmission efficiency of the instant video is improved, and the user experience is improved.
  • the method of the embodiment of the present invention processes the current instant video frame after acquiring the area indicated by the preset shape from the current instant video frame.
  • the bandwidth resources are unchanged. More broadband resources are used for the transmission of the area indicated by the preset shape, thereby ensuring the transmission of the area indicated by the preset shape, further satisfying the user's attention to an area in the instant video is greater than other areas,
  • the user's requirement for the clarity and detail retention of an area is greater than that of other areas and other participants who want the instant video interaction to migrate the attention to the diverse needs of the user-specified area, improving the user experience.
  • FIG. 1 is a flowchart of a method for transmitting instant video according to an embodiment of the present invention
  • FIG. 2 is a flowchart of an instant video display method according to an embodiment of the present invention.
  • FIG. 3 is a flowchart of a method for transmitting instant video according to an embodiment of the present invention.
  • FIG. 4 is a schematic diagram of an interface according to an embodiment of the present invention.
  • FIG. 5 is a schematic diagram of an interface according to an embodiment of the present invention.
  • FIG. 6 is a schematic diagram of an interface according to an embodiment of the present invention.
  • FIG. 7 is a schematic diagram of an interface according to an embodiment of the present invention.
  • FIG. 8 is a flowchart of a method for displaying an instant video according to an embodiment of the present invention.
  • FIG. 9 is a schematic diagram of an interface according to an embodiment of the present invention.
  • FIG. 10 is a flowchart of a method for transmitting instant video according to an embodiment of the present invention.
  • FIG. 11 is a schematic diagram of an interface according to an embodiment of the present invention.
  • FIG. 12 is a flowchart of a method for displaying an instant video according to an embodiment of the present invention.
  • FIG. 13 is a schematic diagram of an interface according to an embodiment of the present invention.
  • FIG. 14 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
  • 15 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
  • 16 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
  • FIG. 17 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
  • An embodiment of the present invention provides a method for transmitting an instant video, where the method is used in an interactive system including at least two electronic devices, wherein in the interactive system, the at least two electronic devices are stored by running the same
  • the application implements real-time video interaction
  • the electronic device includes at least a transmitting/receiving module, a video input module, and a display module having a touch function
  • the video input module includes a camera
  • the display module may include a display screen
  • the electronic device passes the transmitting/receiving module Realize instant video transmission Sending and receiving, real-time video input through the video input module, real-time video display and receiving user-triggered instructions through the display module with touch function.
  • the transmission strategy supported by the electronic device is also different.
  • the electronic device supports the transmission policy, and the electronic device pre-configures a code corresponding to the transmission policy, where the transmission strategy includes instant video transmission and instant transmission.
  • the receiving of the video, the supported transmission strategy of the electronic device includes: the electronic device simultaneously supports the first transmission policy, the second transmission policy, the third transmission policy, and the fourth transmission policy; and the electronic device supports the first transmission policy and the second transmission policy And any one of a third transmission policy and a fourth transmission policy; the electronic device supports any two of the first transmission policy, the second transmission policy, the third transmission policy, and the fourth transmission policy; and the electronic device supports the first transmission policy Any three of the second transmission policy, the third transmission policy, and the fourth transmission policy.
  • the above-mentioned interactive system is merely exemplary, and is a description of the method provided by the embodiment of the present invention.
  • the specific embodiment of the present invention does not limit the specific interactive system.
  • Embodiment 1 is a method for transmitting an instant video according to an embodiment of the present invention. Referring to FIG. 1 , the method specifically includes:
  • the selection instruction includes at least one of a size parameter of the preset shape, a position parameter of the preset shape, a frame parameter of the preset shape, and a special effect parameter of the preset shape.
  • the area indicated by the preset shape is determined in the current instant video frame by any one of the following operations:
  • the position parameter of the preset shape includes a coordinate parameter, and the area indicated by the preset shape is determined in the current instant video frame according to the coordinate parameter; or
  • the position parameter of the preset shape includes a description parameter, and the details indicated by the description parameter are identified in the current instant video frame;
  • the area indicated by the preset shape is determined in the current instant video frame.
  • the current instant video frame including the area indicated by the preset shape is transmitted, and ends.
  • the current live video is processed according to an importance matrix corresponding to the current instant video frame, and the processed instant video frame is obtained;
  • the process ends, and after the end, the instant video frame is transmitted by using a conventional transmission mode.
  • the current instant video frame including the area indicated by the preset shape is transmitted, and ends.
  • the instant video frame including at least the area indicated by the preset shape is divided into at least one macro block, and the quantization parameter corresponding to the at least one macro block is set;
  • the process ends, and after the end, the instant video frame is transmitted by using a conventional transmission mode.
  • the current instant video frame including the area indicated by the preset shape is transmitted, and ends.
  • the process ends, and after the end, the instant video frame is transmitted by the conventional transmission mode.
  • the current instant video frame including the area indicated by the preset shape is transmitted, and ends.
  • the process ends, and after the end, the instant video frame is transmitted through the conventional transmission mode.
  • the method provided by the embodiment of the present invention may further include:
  • An embodiment of the present invention provides a method for transmitting an instant video, by determining whether the network bandwidth meets any one of a first preset condition, a second preset condition, a third preset condition, and a fourth preset condition, thereby According to different network bandwidths, different transmission strategies are adopted for the current instant video frames including the area indicated by the preset shape. Compared with the traditional instant video transmission method, the user not only satisfies the user's attention to a certain area in the instant video.
  • the degree is greater than other areas, the user's requirements for the definition of a certain area and the amount of detail retention are greater than other areas and other users who want the instant video interaction to migrate the attention to the diverse needs of the user-specified area, improve the user
  • the experience also improves the utilization of the network bandwidth and saves the network resources, thereby improving the transmission efficiency of the instant video and improving the user experience.
  • the method of the embodiment of the present invention acquires the preset shape from the current instant video frame.
  • the current instant video frame is processed so that compared to the traditional
  • the instant video coding method uses more broadband resources for the transmission of the area indicated by the preset shape when the bandwidth resource is unchanged, thereby ensuring the transmission of the area indicated by the preset shape, further satisfying the user's
  • the interest in one area of the instant video is greater than that of other areas, the user's definition of the clarity of the area and the amount of detail retention is greater than that of other areas, and other participants who want the instant video interaction to migrate the attention to the user-specified
  • the diverse needs of the region have improved the user experience.
  • Embodiment 2 is a method for displaying an instant video according to an embodiment of the present invention. Referring to FIG. 2, the method includes:
  • the shape indicated by the selection instruction is displayed.
  • An embodiment of the present invention provides a method for displaying an instant video, which is obtained by acquiring and displaying a current instant video frame transmitted according to any one of a first transmission policy, a second transmission policy, a third transmission policy, and a fourth transmission policy.
  • the user desires to have more clarity and detail retention of the selected area than other areas, further improving the user experience.
  • the manner in which the user selects the area is increased, and the interaction mode of the user in the instant video interaction process is increased, thereby further satisfying the diversified needs of the user and improving the user experience.
  • Embodiment 3 is a method for transmitting an instant video according to an embodiment of the present invention.
  • a position parameter of a preset shape includes a coordinate parameter, and the method specifically includes:
  • the selection instruction includes at least one of a size parameter of the preset shape, a position parameter of the preset shape, a frame parameter of the preset shape, and a special effect parameter of the preset shape;
  • the position parameter includes a coordinate parameter, and the coordinate parameter may be The coordinates of at least one point including the geometric center of the preset shape.
  • the process of receiving a user-triggered selection instruction may be:
  • a first selection interface including at least one preset shape on the instant video interface
  • select one of the at least one preset shape on the first selection interface and display the preset shape on the instant video interface to obtain the preset shape
  • a second selection interface including at least one border on the instant video interface
  • the border parameter includes an element included in the border And the color of the border, etc.
  • the third selection interface including at least one special effect on the instant video interface
  • the third selection interface selects one of the at least one special effects, and obtains the special effect parameter of the special effect
  • the special effect includes an animation effect corresponding to the plurality of special effect elements
  • the special effect parameter includes a plurality of special effect elements included in the special effect, and corresponding to all the special effect elements.
  • the step is: when the user triggers the first selection interface including the at least one preset shape on the instant video interface, after selecting one of the at least one preset shape in the first selection interface
  • the execution order of each step after the preset shape is obtained is merely exemplary.
  • the user can stretch the preset shape in the instant video interface after selecting one of the at least one preset shape, and then dragging on the instant video interface.
  • the specific order is not limited.
  • the instant video interface is as shown in a of FIG.
  • the interface of the video interface triggering the first selection interface including at least one preset shape may be referred to b in FIG. 4; after the user selects the preset shape, the interface for stretching the preset shape in the instant video interface may refer to The c is shown in FIG. 4; after the user selects the preset shape, the interface for dragging the preset shape on the instant video interface can be referred to d in FIG.
  • the interface of the video interface triggering the second selection interface including at least one border may be referred to e in FIG. 4; after the user selects the preset shape, after the instant video interface triggers the third selection interface including at least one special effect,
  • the interface can be referred to as f in FIG.
  • the operation sequence of the user is: triggering the first selection interface, stretching the preset shape, dragging the preset shape, triggering the second selection interface, and triggering the third selection interface, correspondingly, the display order of the interface is: a, b,
  • the operation sequence of the user is only exemplary. In an actual application, the sequence of operations of the user may be other sequences, such as triggering the first selection interface. Dragging the preset shape, extending the preset shape, triggering the second selection interface, triggering the third selection interface, etc., may also include other operation sequences, and the specific operation sequence is not limited in the embodiment of the present invention.
  • the selection instruction includes at least one of a size parameter of the preset shape, a position parameter of the preset shape, a frame parameter of the preset shape, and a special effect parameter of the preset shape
  • the display form of the instant video is increased, and the content is further satisfied.
  • the diverse needs of users have improved the user experience.
  • the area indicated by the preset shape is determined in the current instant video frame.
  • the process can be:
  • the at least one point is set to be at least one point describing a preset shape, and the at least one point describing the preset shape includes a center of the preset shape. .
  • step 303 Determine whether the network bandwidth is greater than or equal to the first preset value. If yes, and the electronic device supports the first transmission policy, perform step 304; if not, determine whether the network bandwidth is less than the first preset value, and greater than or equal to a second preset value; if yes, and the electronic device supports the second transmission policy, performing step 306; if not, determining that the network bandwidth is less than the second preset value and greater than or equal to the third preset value; if yes, and If the device supports the third transmission policy, step 309 is performed; if not, and the electronic device supports the fourth transmission policy, step 311 is performed.
  • the specific manner of determining the specific manner in the embodiment of the present invention is not limited.
  • the process of determining the numerical relationship between the network bandwidth and the first preset value, the second preset value, and the third preset value may be:
  • step 304 Determining whether the network bandwidth is greater than or equal to the first preset value, and if yes, determining that the network bandwidth meets the first preset condition, and performing step 304; if not, determining whether the network bandwidth is greater than or equal to the second preset value, and if so, Then, it is determined that the network bandwidth meets the second preset condition, and step 306 is performed; if not, it is determined whether the network bandwidth is greater than or equal to the third preset value, and if yes, it is determined that the network bandwidth meets the third preset condition, and step 309 is performed. If not, it is determined that the network bandwidth meets the fourth preset condition, and step 311 is performed.
  • the actual preset value may be 100 kb/s
  • the second preset value may be 50 kb/s
  • the third preset value may be 10 kb/s.
  • the network bandwidth is unstable during network transmission, it may be determined whether the average value of the network bandwidth in the preset time period before the current time meets the first preset condition, the second preset condition, and the third pre-predetermined Set any of the conditions and the fourth preset condition.
  • the preset time period may be 0.2 seconds.
  • the network bandwidth instability during network transmission is eliminated, the reliability of the instant video coding is ensured, and the user experience is improved.
  • the instant video frame is transmitted through the conventional transmission mode.
  • the instant video frame is transmitted by using a conventional transmission manner.
  • the instant video frame is transmitted through the conventional transmission mode.
  • the instant video frame is transmitted through the conventional transmission mode.
  • processing the instant video can not only improve the utilization of the network bandwidth, save network resources, improve the transmission efficiency of the instant video, but also can be used in the network bandwidth.
  • the user's attention to a certain area in the instant video is greater than other areas, the user's definition of a certain area and the amount of detail retention is greater than other areas and other participants who want the instant video interaction will pay attention.
  • the diversified needs of migrating to the area specified by the user further enhances the user experience.
  • an importance matrix of the area indicated by the preset shape is obtained.
  • the obtaining process may be: setting an importance metric value of all pixels in the current instant video frame; setting an importance metric value of all pixels in the area indicated by the preset shape to a first value; setting a current instant video in a non-pre
  • the importance measure value of all the pixels in the area indicated by the shape is a second value; wherein the first value is set to be greater than the second value, and the value of the importance measure is between 0 and 1.
  • the current filtering mode is low-pass filtered, and the specific filtering manner is not limited in the embodiment of the present invention.
  • the processed instant video frame is obtained according to the filtered current instant video frame, the current instant video frame, and the importance matrix.
  • the current instant video frame and the filtered current instant video frame may be merged on the basis of the importance matrix by using a preset generation algorithm to obtain the processed instant video frame.
  • the algorithm may be:
  • the high-frequency signal in the current instant video is eliminated, and the bandwidth resource occupied by the current instant video is reduced, thereby improving the transmission efficiency of the instant video, and further satisfying the user's
  • One area's attention is greater than other areas, users' requirements for a certain area's clarity and detail retention are greater than other areas and other users who want instant video interactions to divert attention to the diverse needs of the user's designated area.
  • the user experience is improved; in addition, since the importance matrix indicates the area indicated by the preset shape in the instant video frame and the area indicated by the non-preset shape, the importance matrix indicates the importance matrix
  • the area indicated by the preset shape is reserved, and the area indicated by the non-preset shape in the instant video frame is replaced by the area indicated by the non-preset shape in the low-pass filtered instant video frame, so that the processed output is processed.
  • the image of the area indicated by the preset shape in the instant video frame is an undistorted original image
  • the image of the area indicated by the non-preset shape is an image that does not include a high-frequency signal, so that when the processed instant video frame is transmitted, the bandwidth resource required for transmission is reduced, and the transmission efficiency of the instant video is improved.
  • the processed instant video frame is input to the encoder, and the processed instant video frame is encoded by the encoder to generate code stream data;
  • the specific transmission mode is not limited in the embodiment of the present invention.
  • step 304 to step 305 a process of transmitting a current instant video frame including an area indicated by a preset shape according to the first transmission policy may be implemented, and other manners may be used in addition to the manner described in the foregoing steps.
  • the specific manner of the embodiment of the present invention is not limited.
  • the embodiment of the present invention processes the current instant video frame according to the importance matrix, and the importance matrix indicates the importance metric value of each pixel in the current instant video, thereby processing each pixel point, thereby improving the processing.
  • the quality of the live video further satisfying the user's instant
  • the interest in one area of the video is greater than that of other areas, the user's definition of the clarity of the area and the amount of detail retention is greater than other areas and other participants who want the instant video interaction to migrate the attention to the area specified by the user.
  • the diverse needs have improved the user experience.
  • the processed current instant video frame may be divided into at least one macroblock according to a preset division rule, and the specific division rule is not limited in the embodiment of the present invention.
  • the quantization parameter of the macroblock including the area indicated by all or part of the preset shape is set to be the first value; since the value of the quantization parameter ranges from 0 to 51 in practical applications, the first value may be 0. Any value defined by any one of the user or system between 25.
  • the quantization parameter of the macroblock that does not include the area indicated by all or part of the preset shape is a second value; the second value may be any value defined by any one of the user or the system between 25 and 51.
  • both the interaction parties and the picture quality requirements for the area indicated by the preset shape such as the area where the face is located in the live video are larger than other areas, so that all or part of the The quantization parameter of the macroblock of the area indicated by the shape is a first value.
  • the quantization parameter of the macroblock of the area indicated by the shape is a first value.
  • the picture quality of the area satisfies the user's requirements for the picture details of the area indicated by the preset shape, further satisfies the user's attention to an area in the instant video is greater than other areas, the user's definition of a certain area, and The requirement for detail retention is greater than other regions and other participants who want instant video interactions to migrate attention to the diverse needs of the user-specified region, improving the user experience.
  • the interaction party and the picture quality requirement for the area indicated by the preset shape such as the area where the face is located in the instant video are larger than other areas, so it may be set not to include all or part of
  • the quantization parameter of the macroblock of the area indicated by the preset shape is a second value.
  • the details of the macroblock not including the area indicated by all or part of the preset shape are not reserved, and the reduction does not include all Or the bandwidth occupied by the macroblock of the area indicated by the partial preset shape during transmission, so that the method requires less bandwidth resources than the traditional instant video transmission method, thereby saving bandwidth resources and improving real-time video.
  • the efficiency of transmission further satisfies the user's attention to a certain area in the instant video is greater than other areas, the user's requirements for the definition of a certain area and the amount of detail retention are greater than other areas and other participants who want the instant video interaction.
  • the user experience is enhanced by migrating attention to the diverse needs of the area specified by the user.
  • the bandwidth resources are less, which can further save bandwidth resources and improve the efficiency of instant video transmission, further satisfying the user's attention to an area in the instant video is greater than other areas, the user's definition of a certain area and details retention
  • the amount of requirements is greater than other areas and other participants who want instant video interaction will pay attention Migrate to the diverse needs of the region specified by the user, improve the user experience.
  • the at least one macroblock is encoded according to the first value and the second value, to generate an encoded current instant video frame.
  • the processed instant video frame is encoded according to the first value and the second value.
  • the specific transmission mode is not limited in the embodiment of the present invention.
  • step 306 to step 308 a process of transmitting a current instant video frame including an area indicated by a preset shape according to the second transmission policy is implemented, and other methods may be used in addition to the manner described in the foregoing steps.
  • the specific manner of the embodiment of the present invention is not limited.
  • the details of the area indicated by the preset shape are retained, as indicated by the non-preset shape
  • the details of the area are not preserved, not only the use of more broadband resources for the transmission of the area indicated by the preset shape, but also the picture quality of the area indicated by the preset shape in the instant video, thereby ensuring the preset shape.
  • the transmission of the indicated area improves the transmission efficiency of the instant video, further satisfies the user's attention to an area in the instant video is greater than other areas, the user's definition of a certain area and the amount of detail retention is greater than other
  • the region and the other participants who want the instant video interaction to move the attention to the diverse needs of the user-specified area improve the user experience.
  • step 304 may also be performed.
  • the location parameter and the posture parameter of the area indicated by the preset shape are obtained from the current instant video frame.
  • the position parameter and the attitude parameter are normalized to generate a standard position parameter and a standard posture parameter.
  • the posture parameter of the area indicated by the preset shape in the reference frame is a standard posture parameter.
  • the posture parameter of the region indicated by the preset shape in the current instant video frame and the posture parameter of the region indicated by the preset shape in the reference frame are standard posture parameters, so that the preset shape is obtained according to the standard position parameter and the standard posture parameter.
  • the residual data between the current instant video frame and the reference frame of the indicated area, compared to the position parameter position parameter of the area indicated by the preset shape in the current instant video frame, and the position parameter and posture in the reference frame The parameters generate residual data, which reduces the amount of data transmission and processing during the instant video transmission, improves the transmission efficiency of the instant video, and further satisfies the user's attention to a certain area in the instant video is greater than other areas and users.
  • real-time video transmission is realized by acquiring residual data between the area indicated by the preset shape in the current instant video frame and the area indicated by the preset shape in the reference frame, compared to the conventional instant video transmission.
  • the method further reduces the data transmission amount and the processing amount in the instant video transmission process, thereby improving the transmission efficiency of the instant video, further satisfying the user's attention to an area in the instant video is greater than other areas, and the user is The resolution of a region and the requirement for detail retention are greater than those of other regions and other participants who want the instant video interaction to move the attention to the diverse needs of the user-specified region, improving the user experience.
  • the specific transmission mode is not limited in the embodiment of the present invention.
  • step 309 to step 310 a process of transmitting a current instant video frame including an area indicated by a preset shape according to the third transmission policy is implemented, and in addition to the manner described in the foregoing steps, other manners may be adopted.
  • the specific manner of the embodiment of the present invention is not limited.
  • the method saves network bandwidth resources and ensures instantness compared to conventional transmission of all real-time video frames.
  • the picture quality of the area indicated by the preset shape in the video ensures the transmission of the area indicated by the preset shape, thereby improving the transmission efficiency of the instant video, and further satisfying the user's attention to an area in the instant video is greater than Other areas, users' requirements for the definition of a certain area and the amount of detail retention are greater than other areas and other users who want the instant video interaction to migrate the attention to the diverse needs of the user-specified area, improving the user experience.
  • step 304 and step 306 may also be performed before step 309 is performed.
  • the area indicated by the preset shape is triangulated to obtain at least one triangular area.
  • the attitude parameter and the position parameter corresponding to any one of the triangular regions are generated.
  • the feature parameter is generated according to the attitude parameter and the position parameter corresponding to the at least one triangular region.
  • the driving of the triangular area can be realized by adjusting the characteristic parameter, and at least the area indicated by the preset shape is formed in the current instant video.
  • the attitude parameter and the position parameter of a triangular area, adjusting the attitude parameter and the position parameter of the same triangular area in the transmitted instant video frame can realize the migration of the area indicated by the preset shape in the current instant video frame to the already transmitted instant.
  • the video frame saves the network bandwidth and improves the transmission efficiency of the instant video, further satisfies the user's attention to an area in the instant video is greater than that of other areas, and the user belongs to a certain area.
  • the clarity and detail retention requirements are greater than other areas and other participants who wish to have instant video interactions migrate the attention to the diverse needs of the user-specified area, improving the user experience.
  • the specific transmission mode is not limited in the embodiment of the present invention.
  • step 311 to step 312 a process of transmitting a current instant video frame including an area indicated by a preset shape according to the fourth transmission policy is implemented, and other methods may be used in addition to the manner described in the foregoing steps.
  • the specific manner of the embodiment of the present invention is not limited.
  • bandwidth resources are saved compared to transmitting all the real-time video frame data, thereby further improving the transmission efficiency of the instant video, and further satisfying the user in the instant video.
  • the interest of a certain area is greater than that of other areas, the user's requirement for the clarity of a certain area and the amount of detail retention is greater than that of other areas and other participants who want the instant video interaction to move the attention to the area specified by the user. Demand has increased the user experience.
  • the method provided by the embodiment of the present invention may further include:
  • the other electronic devices can display the preset shape indicated by the selection instruction, increase the interactive form of the instant video, and satisfy the diversified needs of the user in the instant video process, and further improve The user experience.
  • the data of the preset shape is transmitted to other electronic devices, thereby reducing the amount of data during transmission, saving network resources, and improving the transmission efficiency of the instant video. Further improve the user experience.
  • the method provided by the embodiment of the present invention will be further described below with reference to the accompanying drawings, assuming that the preset shape selected by the user is the shape shown in FIG.
  • the generated interface may be referred to b in FIG. 7.
  • the resolution and the detail retention indicated by the second display effect are greater than or equal to the first
  • the sharpness indicated by the display effect and the amount of detail retention, the sharpness indicated by the third display effect and the amount of detail retention are smaller than the sharpness indicated by the first display effect and the amount of detail retention.
  • the method provided by the embodiment of the present invention satisfies the requirement that the user pays more attention to an area in the instant video than other areas, and the user's requirement for the clarity and detail retention of the area is greater than other
  • the region and other participants who want the instant video interaction migrate the attention to the diverse needs of the user-specified area, increasing the interactivity and fun of the instant video, further enhancing the user experience.
  • An embodiment of the present invention provides a method for transmitting an instant video, by determining whether the network bandwidth meets any one of a first preset condition, a second preset condition, a third preset condition, and a fourth preset condition, thereby According to different network bandwidths, different transmission strategies are adopted for the current instant video frames including the area indicated by the preset shape. Compared with the traditional instant video transmission method, the user not only satisfies the user's attention to a certain area in the instant video.
  • the degree is greater than other areas, the user's requirements for the definition of a certain area and the amount of detail retention are greater than other areas and other users who want the instant video interaction to migrate the attention to the diverse needs of the user-specified area, improve the user Experience, also improve the utilization of network bandwidth, save network resources, thereby improving the efficiency of real-time video transmission, and improve users
  • the method of the embodiment of the present invention processes the current instant video frame after obtaining the area indicated by the preset shape from the current instant video frame, so that the bandwidth is compared to the traditional instant video encoding method.
  • Embodiment 4 is a method for displaying an instant video according to an embodiment of the present invention.
  • a position parameter of a preset shape includes a coordinate parameter, and the method specifically includes:
  • the electronic device may receive the processed current instant video frame sent by the other electronic device, or may receive a selection instruction triggered by the user to indicate the preset shape selected by the user, and the network bandwidth meets the preset. After the condition, the current instant video frame including at least the area is processed according to the importance matrix of the area indicated by the preset shape, and the processed current instant video frame is obtained.
  • the selection instruction includes a position parameter of a preset shape, and the position parameter includes a coordinate parameter.
  • the electronic device may receive a selection instruction sent by another electronic device, or may receive a selection instruction triggered by the user to indicate a preset shape selected by the user, and the network bandwidth meets the preset condition, according to the preset shape.
  • the area indicated by the selection instruction is displayed;
  • the processed current instant video frame is displayed according to the coordinate parameter.
  • the specific display manner is not limited in the embodiment of the present invention.
  • the electronic device does not support the transmission strategy corresponding to the acquired current instant video frame, Sending a prompt message to the electronic device or the server that sends the instant video frame to prompt the electronic device does not support the obtained transmission policy corresponding to the current instant video frame, so that the server or the electronic device that sends the instant video frame receives the After prompting the information, a code corresponding to the transmission policy is sent to the electronic device, so that the electronic device configures the code.
  • the user attention of the electronic device is migrated to the area indicated by the preset shape in the instant video, thereby satisfying the user pair.
  • the interest in one area of the instant video is greater than that of other areas, the user's definition of the clarity of the area and the amount of detail retention is greater than that of other areas, and other participants who want the instant video interaction to migrate the attention to the user-specified
  • the diverse needs of the region have improved the user experience.
  • the user attention of the electronic device can be further migrated to the area indicated by the preset shape in the instant video, thereby satisfying the user's attention to a certain area in the instant video is greater than other areas.
  • the user's requirement for the clarity and detail retention of a certain area is greater than that of other areas and other participants who want the instant video interaction to migrate the attention to the diverse needs of the user-specified area, thereby improving the user experience.
  • the selection instruction includes at least one of a size parameter of the preset shape, a position parameter of the preset shape, a frame parameter of the preset shape, and a special effect parameter of the preset shape, the display form of the instant video is increased, and the content is further satisfied.
  • the diverse needs of users have improved the user experience.
  • the method provided by the embodiment of the present invention will be further described below with reference to the accompanying drawings, assuming that the preset shape selected by the user is the shape shown in FIG.
  • the interface for obtaining the current current video frame display after processing may be referred to b in FIG. 9.
  • a in FIG. 9 is an interface displayed after acquiring the current instant video frame, and in FIG. 9, the second display effect indicates clearness.
  • the degree and the detail retention amount are greater than or equal to the sharpness indicated by the first display effect and the detail retention amount, and the sharpness and the detail retention amount indicated by the third display effect are smaller than the sharpness indicated by the first display effect and the detail retention amount.
  • An embodiment of the present invention provides a method for displaying an instant video by acquiring and displaying any one of the first transmission policy, the second transmission policy, the third transmission policy, and the fourth transmission policy.
  • the current instant video frame satisfies the demand of the user in the process of real-time video, and the content retention of the selected area is larger than that of other areas, thereby further improving the user experience.
  • the manner in which the user selects the area is increased, and the interaction mode of the user in the instant video interaction process is increased, thereby further satisfying the diversified needs of the user and improving the user experience.
  • Embodiment 5 is a method for transmitting an instant video according to an embodiment of the present invention.
  • a position parameter of a preset shape includes a description parameter, and the description parameter is used to describe The details in the area indicated by the preset shape selected by the user in the instant video frame.
  • the area indicated by the preset shape selected by the user includes at least a human face, the detail may be the eyes of the user.
  • the nose, the mouth and the eyebrows, etc. the method specifically includes:
  • 1001 Receive a user-triggered selection instruction, and the selection instruction is used to indicate a preset shape selected by the user.
  • step 301 is the same as step 301, and details are not described herein again.
  • the selection instruction includes at least one of a size parameter of the preset shape, a position parameter of the preset shape, a frame parameter of the preset shape, and a special effect parameter of the preset shape
  • the display form of the instant video is increased, and the content is further satisfied.
  • the diverse needs of users have improved the user experience.
  • the user's attention to an area in the instant video is greater than that of other areas, the user's requirement for the clarity and detail retention of a certain area is greater than that of other areas, and other participants who want the instant video interaction to migrate the attention to the user.
  • the diversified needs of the designated area are that the attention to details in the area is greater than that of other areas, the clarity of details of the area and the amount of detail retention are greater than other areas and other participants who wish to have instant video interaction will pay attention
  • the degree of migration to the details of the area specified by the user by identifying the details indicated by the description parameters in the current instant video frame, satisfies the user's attention to the details in the area is greater than other areas, the clarity of the details of the area
  • the requirement for detail retention is greater than the diversified needs of other areas and other participants who wish to have instant video interactions to move attention to the details of the area specified by the user.
  • the coordinates of the description points constituting the detail are set as the coordinates of the points in the area indicated by the preset shape.
  • the area indicated by the preset shape is determined in the current instant video frame according to the details, and the specific manner is not limited in the embodiment of the present invention.
  • determining the area indicated by the preset shape in the current instant video frame according to the detail further satisfies the user's attention to a certain area in the instant video.
  • the degree is greater than other areas, the user's requirements for the clarity and detail retention of a certain area are greater than other areas and other participants who want the instant video interaction to migrate the attention to the diverse needs of the user-specified area, increasing the instant The interactivity and fun of the video further enhances the user experience.
  • steps 1002 to 1003 are processes for determining an area indicated by the preset shape in the current instant video frame, and the process may be implemented by other means in addition to the manner described in the foregoing steps.
  • the embodiment does not limit the specific manner.
  • the detail position in the area indicated by the preset shape in the instant video frame is greater than that of the other areas, the definition of the detail indicated by the preset shape, and the detail retention amount is greater than other areas and It is hoped that other participants of the instant video interaction will shift the attention to the details of the area indicated by the preset shape, thereby further satisfying the user's attention to an area in the instant video is greater than that of other areas, and the user is clear about an area.
  • the requirement for degree and detail retention is greater than that of other regions and other participants who want real-time video interaction to migrate attention to the diverse needs of the user-specified region, which increases the interactivity and interest of instant video, further enhancing the user. Experience.
  • step 1004 Determine whether the network bandwidth is greater than or equal to the first preset value. If yes, and the electronic device supports the first transmission policy, perform step 1005; if not, determine whether the network bandwidth is less than the first preset value, and greater than or equal to a second preset value; if yes, and the electronic device supports the second transmission policy, step 1007 is performed; if not, determining that the network bandwidth is less than the second preset value and greater than or equal to the third preset value; if yes, and If the device supports the third transmission policy, step 1010 is performed; if not, and the electronic device supports the fourth transmission policy, step 1012 is performed.
  • step 303 is the same as step 303, and details are not described herein again.
  • the network bandwidth is unstable during network transmission, it may be determined whether the average value of the network bandwidth in the preset time period before the current time meets the first preset condition, the second preset condition, and the third pre-predetermined Set any of the conditions and the fourth preset condition.
  • the preset time period may be 0.2 seconds.
  • the network bandwidth instability during network transmission is eliminated, the reliability of the instant video coding is ensured, and the user experience is improved.
  • the instant video frame is transmitted through the conventional transmission mode.
  • the instant video frame is transmitted by using a conventional transmission manner.
  • the instant video frame is transmitted through the conventional transmission mode.
  • the instant video frame is transmitted through the conventional transmission mode.
  • processing the instant video can not only improve the utilization of the network bandwidth, save network resources, improve the transmission efficiency of the instant video, but also can be used in the network bandwidth.
  • the user's attention to a certain area in the instant video is greater than other areas, the user's definition of a certain area and the amount of detail retention is greater than other areas and other participants who want the instant video interaction will pay attention.
  • the diversified needs of migrating to the area specified by the user further enhances the user experience.
  • step 304 is the same as step 304, and details are not described herein again.
  • the high-frequency signal in the current instant video is eliminated, and the bandwidth resource occupied by the current instant video is reduced, thereby improving the transmission efficiency of the instant video, and further satisfying the user's
  • One area's attention is greater than other areas, users' requirements for a certain area's clarity and detail retention are greater than other areas and other users who want instant video interactions to divert attention to the diverse needs of the user's designated area.
  • the user experience is improved; in addition, since the importance matrix indicates the area indicated by the preset shape in the instant video frame and the area indicated by the non-preset shape, the importance matrix indicates the importance matrix
  • the area indicated by the preset shape is reserved, and the area indicated by the non-preset shape in the instant video frame is replaced by the area indicated by the non-preset shape in the low-pass filtered instant video frame, so that the processed output is processed.
  • the image of the area indicated by the preset shape in the instant video frame is an undistorted original image
  • Non-indicated preset shape image region is an image that does not include a high frequency signal, so that after the transfer process
  • the bandwidth resources required for transmission are reduced, and the transmission efficiency of the instant video is improved, which further satisfies the user's attention to an area in the instant video is greater than that of other areas, and the user's definition of an area.
  • the user experience is enhanced by the requirement that the amount of detail retention is greater than that of other areas and other participants who want the instant video interaction to move the attention to the area specified by the user.
  • step 305 is the same as step 305, and details are not described herein again.
  • step 1005 to step 1006 a process of transmitting a current instant video frame including an area indicated by a preset shape according to the first transmission policy, in addition to the manner described in the foregoing steps, may be performed in other manners.
  • the specific manner of the embodiment of the present invention is not limited.
  • the embodiment of the present invention processes the current instant video frame according to the importance matrix, and the importance matrix indicates the importance metric value of each pixel in the current instant video, thereby processing each pixel point, thereby improving the processing.
  • the picture quality of the instant video further satisfies the user's attention to a certain area in the instant video is greater than other areas, the user's requirement for the clarity and detail retention of a certain area is greater than other areas and the user wants instant video interaction.
  • Other participants have increased the user experience by migrating their attention to the diverse needs of the area specified by the user.
  • step is the same as step 306, and details are not described herein again.
  • both the interaction parties and the picture quality requirements for the area indicated by the preset shape such as the area where the face is located in the live video are larger than other areas, so that all or part of the
  • the quantization parameter of the macroblock of the area indicated by the shape is a first value.
  • the picture quality of the area satisfies the user's requirements for the picture details of the area indicated by the preset shape, and further satisfies the user's certain area in the instant video.
  • the domain's attention is greater than other regions, the user's requirements for the clarity of a certain region and the amount of detail retention are greater than other regions and other users who want the instant video interaction to migrate the attention to the diverse needs of the user-specified region. Improve the user experience.
  • the interaction party and the picture quality requirement for the area indicated by the preset shape such as the area where the face is located in the instant video are larger than other areas, so it may be set not to include all or part of
  • the quantization parameter of the macroblock of the area indicated by the preset shape is a second value.
  • the details of the macroblock not including the area indicated by all or part of the preset shape are not reserved, and the reduction does not include all Or the bandwidth occupied by the macroblock of the area indicated by the partial preset shape during transmission, so that the method requires less bandwidth resources than the traditional instant video transmission method, thereby saving bandwidth resources and improving real-time video.
  • the efficiency of transmission further satisfies the user's attention to a certain area in the instant video is greater than other areas, the user's requirements for the definition of a certain area and the amount of detail retention are greater than other areas and other participants who want the instant video interaction. Increased focus on the diversified needs of the user-specified area Experience.
  • the bandwidth resources are less, which can further save bandwidth resources and improve the efficiency of instant video transmission, further satisfying the user's attention to an area in the instant video is greater than other areas, the user's definition of a certain area and details retention
  • the amount of requirements is greater than other areas and other participants who want instant video interaction will pay attention Migrate to the diverse needs of the region specified by the user, improve the user experience.
  • step is the same as step 307, and details are not described herein again.
  • step is the same as step 308, and details are not described herein again.
  • steps 1007 to 1009 are a process for transmitting a current instant video frame including an area indicated by a preset shape according to the second transmission policy, and may be performed by other means in addition to the manner described in the foregoing steps.
  • the specific manner of the embodiment of the present invention is not limited.
  • the details of the area indicated by the preset shape are retained, as indicated by the non-preset shape
  • the details of the area are not preserved, not only the use of more broadband resources for the transmission of the area indicated by the preset shape, but also the picture quality of the area indicated by the preset shape in the instant video, thereby ensuring the preset shape.
  • the transmission of the indicated area improves the transmission efficiency of the instant video, further satisfies the user's attention to an area in the instant video is greater than other areas, the user's definition of a certain area and the amount of detail retention is greater than other
  • the region and the other participants who want the instant video interaction to move the attention to the diverse needs of the user-specified area improve the user experience.
  • step 1005 may also be performed.
  • step is the same as step 309, and details are not described herein again.
  • the posture parameter of the region indicated by the preset shape in the current instant video frame and the posture parameter of the region indicated by the preset shape in the reference frame are standard posture parameters, so that the preset shape is obtained according to the standard position parameter and the standard posture parameter.
  • the residual data between the current instant video frame and the reference frame of the indicated area, compared to the position parameter position parameter of the area indicated by the preset shape in the current instant video frame, and the position parameter and posture in the reference frame The parameters generate residual data, which reduces the amount of data transmission and processing during the instant video transmission, improves the transmission efficiency of the instant video, and further satisfies the user's attention to a certain area in the instant video is greater than other areas and users.
  • real-time video transmission is realized by acquiring residual data between the area indicated by the preset shape in the current instant video frame and the area indicated by the preset shape in the reference frame, compared to the conventional instant video transmission.
  • the method further reduces the data transmission amount and the processing amount in the instant video transmission process, thereby improving the transmission efficiency of the instant video, further satisfying the user's attention to an area in the instant video is greater than other areas, and the user is The resolution of a region and the requirement for detail retention are greater than those of other regions and other participants who want the instant video interaction to move the attention to the diverse needs of the user-specified region, improving the user experience.
  • step 310 is the same as step 310, and details are not described herein again.
  • step 1010 to step 1011 a process of transmitting a current instant video frame including an area indicated by a preset shape according to a third transmission policy is implemented, and other methods than the foregoing steps may be used.
  • the specific manner of the embodiment of the present invention is not limited.
  • the method saves network bandwidth resources and ensures instantness compared to conventional transmission of all real-time video frames.
  • the picture quality of the area indicated by the preset shape in the video ensures the transmission of the area indicated by the preset shape, thereby improving the transmission efficiency of the instant video, and further satisfying the user's attention to an area in the instant video is greater than Other areas, users' requirements for the definition of a certain area and the amount of detail retention are greater than other areas and other users who want the instant video interaction to migrate the attention to the diverse needs of the user-specified area, improving the user experience.
  • step 1005 and step 1009 may also be performed before step 1010 is performed.
  • step is the same as step 311, and details are not described herein again.
  • the driving of the triangular area can be realized by adjusting the characteristic parameter, and at least the area indicated by the preset shape is formed in the current instant video.
  • the attitude parameter and the position parameter of a triangular area, adjusting the attitude parameter and the position parameter of the same triangular area in the transmitted instant video frame can realize the migration of the area indicated by the preset shape in the current instant video frame to the already transmitted instant.
  • the video frame saves the network bandwidth and improves the transmission efficiency of the instant video, further satisfies the user's attention to an area in the instant video is greater than that of other areas, and the user belongs to a certain area.
  • the clarity and detail retention requirements are greater than other areas and other participants who wish to have instant video interactions migrate the attention to the diverse needs of the user-specified area, improving the user experience.
  • step 312 is the same and will not be further described herein.
  • step 1012 to step 1013 a process of transmitting a current instant video frame including an area indicated by a preset shape according to the fourth transmission policy is implemented, and other manners may be used in addition to the manner described in the foregoing steps.
  • the specific manner of the embodiment of the present invention is not limited.
  • bandwidth resources are saved compared to transmitting all the real-time video frame data, thereby further improving the transmission efficiency of the instant video, and further satisfying the user in the instant video.
  • the interest of a certain area is greater than that of other areas, the user's requirement for the clarity of a certain area and the amount of detail retention is greater than that of other areas and other participants who want the instant video interaction to move the attention to the area specified by the user. Demand has increased the user experience.
  • the method provided by the embodiment of the present invention may further include:
  • the other electronic devices can display the preset shape indicated by the selection instruction, increase the interactive form of the instant video, and satisfy the diversified needs of the user in the instant video process, and further improve The user experience.
  • the data is sent to other electronic devices, and the data of the preset shape is transmitted to other electronic devices, thereby reducing the amount of data during transmission, saving network resources, improving the transmission efficiency of the instant video, and further improving the user experience.
  • the method provided by the embodiment of the present invention will be further described below with reference to the accompanying drawings, assuming that the preset shape selected by the user is the shape shown in FIG.
  • the generated interface may be referred to b in FIG. 11 . If the position of the user in the screen changes in the instant video interface, the interface may refer to FIG. 11 . As shown in c, in FIG.
  • the sharpness and detail retention indicated by the second display effect are greater than or equal to the sharpness indicated by the first display effect and the amount of detail retention, and the sharpness indicated by the third display effect and The amount of detail retention is less than the sharpness indicated by the first display effect and the amount of detail retention.
  • the method provided by the embodiment of the present invention satisfies the requirement that the user pays more attention to an area in the instant video than other areas, and the user's requirement for the clarity and detail retention of the area is greater than other
  • the region and other participants who want the instant video interaction migrate the attention to the diverse needs of the user-specified area, increasing the interactivity and fun of the instant video, further enhancing the user experience.
  • the area indicated by the preset shape is determined in the current instant video frame according to the detail, so that the area indicated by the shape is preset in the instant video frame.
  • the picture quality of the area in which the detail is located can still be ensured, thereby further satisfying the user's attention to an area in the instant video is greater than that of other areas, and the user is clear about an area.
  • the requirement for degree and detail retention is greater than that of other regions and other participants who want real-time video interaction to migrate attention to the diverse needs of the user-specified region, which increases the interactivity and interest of instant video, further enhancing the user.
  • the area indicated by the preset shape includes a human face.
  • the embodiment of the invention provides a method for transmitting instant video by determining whether the network bandwidth is full. Any one of a first preset condition, a second preset condition, a third preset condition, and a fourth preset condition, so that the current instant video frame including the area indicated by the preset shape may be according to different network bandwidths Adopting different transmission strategies, compared with the traditional instant video transmission method, not only satisfies the user's attention to an area in the instant video is greater than other areas, the user's definition of a certain area and the amount of detail retention.
  • the method of the embodiment of the present invention processes the current instant video frame after acquiring the area indicated by the preset shape from the current instant video frame, so that the current video frame is compared with the traditional Instant video coding method, using more broadband resources for the same bandwidth resources.
  • the transmission of the area indicated by the shape is ensured, thereby ensuring the transmission of the area indicated by the preset shape, further satisfying the user's attention to an area in the instant video is greater than other areas, the user's definition of an area, and
  • the requirement for detail retention is greater than other regions and other participants who want instant video interactions to migrate attention to the diverse needs of the user-specified region, improving the user experience.
  • the area of the detail can still be guaranteed.
  • the picture quality further satisfies the user's attention to a certain area in the instant video is greater than other areas, the user's requirements for the clarity and detail retention of a certain area are greater than other areas and the user wants instant video interaction.
  • Other participants have moved their attention to the diverse needs of the user-specified area, increasing the interactivity and fun of instant video, further enhancing the user experience.
  • Embodiment 6 is a method for displaying an instant video according to an embodiment of the present invention.
  • a position parameter of a preset shape includes a description parameter, and the description parameter is used to describe an instant video frame.
  • the details in the area indicated by the preset shape selected by the user Illustratively, if the area indicated by the preset shape selected by the user includes at least a face, the detail may be the eyes, nose, and mouth of the user. Department and eyebrows, etc., the method specifically includes:
  • step 801 is the same as step 801, and details are not described herein again.
  • step 802 is the same as step 802, and details are not described herein again.
  • step 1002 is the same as step 1002, and details are not described herein again.
  • the user's attention to an area in the instant video is greater than that of other areas, the user's requirement for the clarity and detail retention of a certain area is greater than that of other areas, and other participants who want the instant video interaction to migrate the attention to the user.
  • the diversified needs of the designated area are that the attention to details in the area is greater than that of other areas, the clarity of details of the area and the amount of detail retention are greater than other areas and other participants who wish to have instant video interaction will pay attention
  • the degree of migration to the details of the area specified by the user by identifying the details indicated by the description parameters in the current instant video frame, satisfies the user's attention to the details in the area is greater than other areas, the clarity of the details of the area
  • the requirement for detail retention is greater than the diversified needs of other areas and other participants who wish to have instant video interactions to move attention to the details of the area specified by the user.
  • the coordinates of the description points constituting the detail are set as the coordinates of the points in the area indicated by the preset shape.
  • the area indicated by the preset shape is displayed.
  • the area indicated by the preset shape is displayed in the current instant video frame according to the details, and the specific manner is not limited in the embodiment of the present invention.
  • the area indicated by the preset shape is determined in the current instant video frame according to the detail, further satisfying the user's instant view
  • a certain area of the frequency is more concerned than other areas, the user's requirements for the definition of a certain area and the amount of detail retention are greater than other areas and other participants who want the instant video interaction to migrate the attention to the area specified by the user.
  • the diverse needs increase the interactivity and fun of instant video, further enhancing the user experience.
  • step 1203 to the step 1204 the process of displaying the current instant video frame according to the selection instruction is implemented.
  • the process may be implemented in other manners. The method is not limited.
  • the user attention of the electronic device is migrated to the area indicated by the preset shape in the instant video, thereby satisfying the user pair.
  • the interest in one area of the instant video is greater than that of other areas, the user's definition of the clarity of the area and the amount of detail retention is greater than that of other areas, and other participants who want the instant video interaction to migrate the attention to the user-specified
  • the diverse needs of the region have improved the user experience.
  • the user attention of the electronic device can be further migrated to the area indicated by the preset shape in the instant video, thereby satisfying the user's attention to a certain area in the instant video is greater than other areas.
  • the user's requirement for the clarity and detail retention of a certain area is greater than that of other areas and other participants who want the instant video interaction to migrate the attention to the diverse needs of the user-specified area, thereby improving the user experience.
  • the selection instruction includes at least one of a size parameter of the preset shape, a position parameter of the preset shape, a frame parameter of the preset shape, and a special effect parameter of the preset shape, the display form of the instant video is increased, and the content is further satisfied.
  • the diverse needs of users have improved the user experience.
  • by displaying the processed current instant video frame according to the details in a case where the detail position in the area indicated by the preset shape changes in the instant video frame, the user is satisfied in the area indicated by the preset shape.
  • the attention of detail is greater than that of other areas, the clarity of the details of the area indicated by the preset shape, and the amount of detail retention is greater than that of other areas and other participants who wish to have instant video interactions shift the attention to the preset shape.
  • the details of the area further satisfy the user's attention to a certain area in the instant video is greater than other areas, the user's requirements for the definition of a certain area and the amount of detail retention are greater than other areas and users It is hoped that other participants of the instant video interaction will shift the attention to the diverse needs of the user-specified area, increasing the interactivity and interest of the instant video, further enhancing the user experience.
  • the area indicated by the preset shape is determined in the current instant video frame according to the detail, so that the area indicated by the shape is preset in the instant video frame.
  • the picture quality of the area in which the detail is located can still be ensured, thereby further satisfying the user's attention to an area in the instant video is greater than that of other areas, and the user is clear about an area.
  • the requirement for degree and detail retention is greater than that of other regions and other participants who want real-time video interaction to migrate attention to the diverse needs of the user-specified region, which increases the interactivity and interest of instant video, further enhancing the user. Experience.
  • the area indicated by the preset shape includes a human face.
  • the position of the area indicated by the preset shape also changes with the face. Ensure the picture quality of the area where the face is located.
  • the electronic device or the server that sends the instant video frame sends a prompt message to prompt the electronic device not to support the acquired current instant video frame.
  • the server or the electronic device that sends the instant video frame after receiving the prompt information, sends a code corresponding to the transmission policy to the electronic device, so that the electronic device configures the code.
  • the interface for obtaining the current instant video frame display after processing may be referred to b in FIG. 13, where a in FIG. 13 is an interface displayed after acquiring the current instant video frame, if the user in the instant video interface occurs in the position in the screen.
  • the interface may be referred to as c in FIG. 13.
  • the sharpness and the detail retention indicated by the second display effect are greater than or equal to the sharpness and detail retention indicated by the first display effect,
  • the sharpness indicated by the three display effects and the amount of detail retention are smaller than the sharpness indicated by the first display effect and the amount of detail retention.
  • An embodiment of the present invention provides a method for displaying an instant video by acquiring and displaying according to the first
  • the current instant video frame transmitted by any one of the transmission policy, the second transmission policy, the third transmission policy, and the fourth transmission policy satisfies the fact that the user desires to have greater clarity and detail retention for the selected region than other
  • the needs of the region further enhance the user experience.
  • the manner in which the user selects the area is increased, and the interaction mode of the user in the instant video interaction process is increased, thereby further satisfying the diversified needs of the user and improving the user experience.
  • the detail can still be guaranteed.
  • the picture quality of the area which further satisfies the user's attention to an area in the instant video is greater than other areas, the user's requirements for the clarity and detail retention of a certain area are greater than other areas and the user wants instant video.
  • Other participants in the interaction migrated the attention to the diverse needs of the user-specified area, increasing the interactivity and fun of the instant video, further enhancing the user experience.
  • Embodiment 7 is an electronic device 14 according to an embodiment of the present invention. Referring to FIG. 14, the electronic device 14 includes:
  • the receiving module 1401 is configured to receive a user-triggered selection instruction, where the selection instruction is used to indicate a preset shape selected by the user;
  • the first processing module 1403 is configured to determine, in the current instant video frame, an area indicated by the preset shape
  • the determining module 1402 is configured to determine whether the network bandwidth meets any one of the first preset condition, the second preset condition, the third preset condition, and the fourth preset condition;
  • the first processing module 1403 is further configured to trigger any one of the following modules according to a preset condition that the network bandwidth meets and a transmission policy supported by the electronic device:
  • the second processing module 1404 is configured to: when the network bandwidth meets the first preset condition, transmit, according to the first transmission policy, a current instant video frame that includes an area indicated by the preset shape; or
  • the third processing module 1405 is configured to: when the network bandwidth meets the second preset condition, transmit the current instant video frame including the area indicated by the preset shape according to the second transmission policy; or
  • the fourth processing module 1406 is configured to perform, according to the third transmission, when the network bandwidth meets the third preset condition a policy of transmitting a current instant video frame including an area indicated by a preset shape; or
  • the fifth processing module 1407 is configured to: when the network bandwidth meets the fourth preset condition, transmit the current instant video frame including the area indicated by the preset shape according to the fourth transmission policy.
  • the selection instruction includes at least one of a size parameter of the preset shape, a position parameter of the preset shape, a frame parameter of the preset shape, and a special effect parameter of the preset shape, where the first processing module is configured to perform the following operations. anyone:
  • the position parameter of the preset shape includes a coordinate parameter, and the area indicated by the preset shape is determined in the current instant video frame according to the coordinate parameter; or
  • the position parameter of the preset shape includes a description parameter, and the details indicated by the description parameter are identified in the current instant video frame;
  • the area indicated by the preset shape is determined in the current instant video frame.
  • the second processing module 1404 is specifically configured to:
  • the current instant video is processed according to an importance matrix corresponding to the current instant video frame, and the processed instant video frame is obtained;
  • the second processing module 1404 is specifically configured to:
  • the current instant video frame is merged with the filtered current instant video frame to generate a processed current instant video frame.
  • the third processing module 1405 is specifically configured to:
  • the third processing module 1405 is specifically configured to:
  • the third processing module 1405 is specifically configured to:
  • the fourth processing module 146 is specifically configured to:
  • the fourth processing module 146 is specifically configured to:
  • the fourth processing module 146 is specifically configured to:
  • the fourth processing module 146 is specifically configured to:
  • the feature parameter is generated according to the attitude parameter and the position parameter corresponding to the at least one triangular region.
  • the electronic device further includes a sending module, configured to:
  • An embodiment of the present invention provides an electronic device, where the electronic device determines whether the network bandwidth meets any one of a first preset condition, a second preset condition, a third preset condition, and a fourth preset condition, thereby According to different network bandwidths, different transmission strategies are adopted for the current instant video frames including the area indicated by the preset shape. Compared with the traditional instant video transmission method, the user not only satisfies the user's attention to a certain area in the instant video.
  • the degree is greater than other areas, the user's requirements for the definition of a certain area and the amount of detail retention are greater than other areas and other users who want the instant video interaction to migrate the attention to the diverse needs of the user-specified area, improve the user
  • the experience also improves the utilization of the network bandwidth and saves the network resources, thereby improving the transmission efficiency of the instant video and improving the user experience.
  • the method of the embodiment of the present invention acquires the preset shape from the current instant video frame.
  • the current instant video frame is processed so that compared to the traditional
  • the instant video coding method uses more broadband resources for the transmission of the area indicated by the preset shape when the bandwidth resource is unchanged, thereby ensuring the transmission of the area indicated by the preset shape, further satisfying the user's
  • the interest in one area of the instant video is greater than that of other areas, the user's definition of the clarity of the area and the amount of detail retention is greater than that of other areas, and other participants who want the instant video interaction to migrate the attention to the user-specified
  • the diverse needs of the region have improved the user experience.
  • Embodiment 8 is an electronic device 15 according to an embodiment of the present invention.
  • the electronic device 15 includes a sending module 1501 , a memory 1502 , and a processor 1503 connected to the sending module 1501 and the memory 1502 .
  • the memory 1502 For storing a set of program code, the processor 1503 calls the program code stored in the memory 1502 for performing the following operations:
  • the selection instruction is used to indicate a preset shape selected by the user
  • the transmission includes the preset shape according to the second transmission policy The current instant video frame of the indicated area; or,
  • the current instant video frame including the area indicated by the preset shape is transmitted according to the fourth transmission policy.
  • the selection instruction includes at least one of a size parameter of the preset shape, a position parameter of the preset shape, a frame parameter of the preset shape, and a special effect parameter of the preset shape
  • the processor 1503 calls the program code stored by the memory 1502. Used to do the following:
  • the position parameter of the preset shape includes a coordinate parameter, and the area indicated by the preset shape is determined in the current instant video frame according to the coordinate parameter; or
  • the position parameter of the preset shape includes a description parameter, and the details indicated by the description parameter are identified in the current instant video frame;
  • the area indicated by the preset shape is determined in the current instant video frame.
  • the processor 1503 calls the program code stored in the memory 1502 to perform the following operations:
  • the current instant video is processed according to an importance matrix corresponding to the current instant video frame, and the processed instant video frame is obtained;
  • the processor 1503 calls the program code stored in the memory 1502 to perform the following operations:
  • the current instant video frame is merged with the filtered current instant video frame to generate a processed current instant video frame.
  • the processor 1503 calls the program code stored in the memory 1502 to perform the following operations:
  • the processor 1503 calls the program code stored in the memory 1502 to perform the following operations:
  • the processor 1503 calls the program code stored in the memory 1502 for performing the following operations:
  • the processor 1503 calls the program code stored in the memory 1502 to perform the following operations:
  • the processor 1503 calls the program code stored in the memory 1502 to perform the following operations:
  • the processor 1503 calls the program code stored in the memory 1502 to perform the following operations. Make:
  • the processor 1503 calls the program code stored in the memory 1502 to perform the following operations:
  • the processor 1503 calls the program code stored in the memory 1502 to perform the following operations:
  • An embodiment of the present invention provides an electronic device, where the electronic device determines whether the network bandwidth meets any one of a first preset condition, a second preset condition, a third preset condition, and a fourth preset condition, thereby According to different network bandwidths, different transmission strategies are adopted for the current instant video frames including the area indicated by the preset shape. Compared with the traditional instant video transmission method, the user not only satisfies the user's attention to a certain area in the instant video.
  • the degree is greater than other areas, the user's requirements for the definition of a certain area and the amount of detail retention are greater than other areas and other users who want the instant video interaction to migrate the attention to the diverse needs of the user-specified area, improve the user
  • the experience also improves the utilization of the network bandwidth and saves the network resources, thereby improving the transmission efficiency of the instant video and improving the user experience.
  • the method of the embodiment of the present invention acquires the preset shape from the current instant video frame.
  • the current instant video frame is processed so that compared to the traditional
  • the instant video coding method uses more broadband resources for the transmission of the area indicated by the preset shape when the bandwidth resource is unchanged, thereby ensuring the transmission of the area indicated by the preset shape, further satisfying the user's
  • the interest in one area of the instant video is greater than that of other areas, the user's definition of the clarity of the area and the amount of detail retention is greater than that of other areas, and other participants who want the instant video interaction to migrate the attention to the user-specified
  • the diverse needs of the region have improved the user experience.
  • Embodiment 9 is an electronic device 16 according to an embodiment of the present invention. Referring to FIG. 16, the electronic device 16 includes:
  • the first obtaining module 1601 is configured to acquire, according to the first transmission policy, the second transmission policy, a current instant video frame transmitted by any one of the third transmission policy and the fourth transmission policy;
  • a second obtaining module 1602 configured to acquire a user-triggered selection instruction, where the selection instruction is used to indicate a preset shape selected by the user;
  • the display module 1603 is configured to display the current instant video frame according to the selection instruction and a transmission policy supported by the electronic device.
  • An embodiment of the present invention provides an electronic device that satisfies and displays a current instant video frame transmitted according to any one of a first transmission policy, a second transmission policy, a third transmission policy, and a fourth transmission policy.
  • the user desires to have more clarity and detail retention of the selected area than other areas, further improving the user experience.
  • the manner in which the user selects the area is increased, and the interaction mode of the user in the instant video interaction process is increased, thereby further satisfying the diversified needs of the user and improving the user experience.
  • Embodiment 10 is an electronic device 17 according to an embodiment of the present invention.
  • the electronic device 17 includes a display 1701, a memory 1702, and a processor 1703 connected to the display 1701 and the memory 1702.
  • the memory 1702 For storing a set of program code, the processor 1703 calls the program code stored in the memory 1702 for performing the following operations:
  • the current instant video frame is displayed according to the selection instruction and the transmission policy supported by the electronic device.
  • An embodiment of the present invention provides an electronic device that satisfies and displays a current instant video frame transmitted according to any one of a first transmission policy, a second transmission policy, a third transmission policy, and a fourth transmission policy.
  • the user desires to have more clarity and detail retention of the selected area than other areas, further improving the user experience.
  • the manner in which the user selects the area is increased, the interaction mode of the user in the instant video interaction process is increased, and the diversified needs of the user are further satisfied, and the use is improved. User experience.
  • the interface in the embodiment of the present invention is merely exemplary, and is a further description of the method provided by the embodiment of the present invention.
  • the specific embodiment of the present invention does not limit the specific interface. .
  • the electronic device provided by the foregoing embodiment performs the encoding of the instant video
  • only the division of the above functional modules is illustrated.
  • the function distribution may be completed by different functional modules as needed.
  • the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
  • the method for transmitting the instant video provided by the foregoing embodiment is the same as the embodiment of the electronic device, and the specific implementation process is described in detail in the method embodiment, and details are not described herein again.
  • the storage medium may be a read only memory, a magnetic disk or an optical disk or the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The invention relates to the field of video technology. Disclosed are a real-time video transmission method and electronic apparatus comprising: receiving a selection instruction triggered by a user; determining a region indicated by a preset shape in a current real-time video frame; performing, according to a preset condition met by a network bandwidth and a transmission strategy supported by an electronic apparatus, any of the following operations: if the network bandwidth meets a first preset condition, transmitting, according to a first transmission strategy, the current real-time video frame; if the network bandwidth meets a second preset condition, transmitting, according to a second transmission strategy, the current real-time video frame; if the network bandwidth meets a third preset condition, transmitting, according to a third transmission strategy, the current real-time video frame; and if the network bandwidth meets a fourth preset condition, transmitting, according to a fourth transmission strategy, the current real-time video frame. According to different network bandwidths, different transmission strategies are adopted for the current real-time video frame, thereby satisfying a variety of needs of the user in a real-time video process and improving user experience.

Description

一种即时视频的传输方法和电子设备Instant video transmission method and electronic device 技术领域Technical field
本发明涉及视频领域,特别涉及一种即时视频的传输方法和电子设备。The present invention relates to the field of video, and in particular, to a method and a device for transmitting instant video.
背景技术Background technique
随着移动设备和即时视频通讯技术的普及,越来越多的用户选择利用移动设备实现即时视频的交互,在即时视频交互的场景下,可能会出现用户对即时视频中的某一区域的关注度大于其他区域;或者,会出现用户对某一区域的清晰度以及细节保留量的要求大于其他区域;或者,会出现用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域等问题,使得需要提供一种即时视频的传输方法,满足用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求。With the popularization of mobile devices and instant video communication technologies, more and more users choose to use mobile devices to realize real-time video interaction. In the scene of instant video interaction, users may pay attention to a certain area in real-time video. The degree is greater than other areas; or, the user's requirement for the clarity and detail retention of a certain area is greater than other areas; or, other users who want the instant video interaction may migrate the attention to the area specified by the user. The problem is that it is necessary to provide a method for transmitting instant video, which satisfies the user's attention to an area in the instant video is greater than other areas, the user's definition of a certain area and the amount of detail retention is greater than other areas and users. It is hoped that other participants of the instant video interaction will migrate the attention to the diverse needs of the area specified by the user.
由于现有技术并未提供该即时视频的传输方法,从而使得用户在即时视频过程中,无法满足用户上述的多样化需求,降低了用户体验。Since the prior art does not provide the method for transmitting the instant video, the user cannot meet the diverse needs of the user in the instant video process, and the user experience is reduced.
发明内容Summary of the invention
为了满足即时视频过程中用户的多样化需求,提高用户体验,本发明实施例提供了一种即时视频的传输方法和电子设备。所述技术方案如下:In order to meet the diversified needs of users in the instant video process and improve the user experience, embodiments of the present invention provide a method and an electronic device for transmitting an instant video. The technical solution is as follows:
第一方面,提供了一种即时视频的传输方法,所述方法包括:In a first aspect, a method for transmitting an instant video is provided, the method comprising:
接收用户触发的选择指令,所述选择指令用于指示所述用户所选择的预设形状;Receiving a user-triggered selection instruction, the selection instruction is used to indicate a preset shape selected by the user;
在当前即时视频帧中确定所述预设形状所指示的区域; Determining an area indicated by the preset shape in a current instant video frame;
根据网络带宽所满足的预设条件以及电子设备所支持的传输策略,执行以下操作中的任意一个:Perform any of the following operations based on the preset conditions that the network bandwidth meets and the transmission policies supported by the electronic device:
若网络带宽满足第一预设条件,则根据第一传输策略,传输包括所述预设形状所指示的区域的所述当前即时视频帧;或者,If the network bandwidth meets the first preset condition, transmitting the current instant video frame including the area indicated by the preset shape according to the first transmission policy; or
若网络带宽满足第二预设条件,则根据第二传输策略,传输包括所述预设形状所指示的区域的所述当前即时视频帧;或者,If the network bandwidth meets the second preset condition, transmitting, according to the second transmission policy, the current instant video frame including the area indicated by the preset shape; or
若网络带宽满足第三预设条件,则根据第三传输策略,传输包括所述预设形状所指示的区域的所述当前即时视频帧;或者,If the network bandwidth meets the third preset condition, transmitting, according to the third transmission policy, the current instant video frame that includes the area indicated by the preset shape; or
若网络带宽满足第四预设条件,则根据第四传输策略,传输包括所述预设形状所指示的区域的所述当前即时视频帧。If the network bandwidth meets the fourth preset condition, transmitting the current instant video frame including the area indicated by the preset shape according to the fourth transmission policy.
结合第一方面,在第一种可能的实现方式中,所述选择指令包括所述预设形状的大小参数、所述预设形状的位置参数、所述预设形状的边框参数以及所述预设形状的特效参数中的至少一个,通过以下操作中的任意一个,在当前即时视频帧中确定所述预设形状所指示的区域:With reference to the first aspect, in a first possible implementation, the selection instruction includes a size parameter of the preset shape, a position parameter of the preset shape, a frame parameter of the preset shape, and the preset Setting at least one of the shape effect parameters, determining an area indicated by the preset shape in the current instant video frame by any one of the following operations:
所述预设形状的位置参数包括坐标参数,根据所述坐标参数,在当前即时视频帧中确定所述预设形状所指示的区域;或者,The position parameter of the preset shape includes a coordinate parameter, and determining, according to the coordinate parameter, an area indicated by the preset shape in a current instant video frame; or
所述预设形状的位置参数包括描述参数,在所述当前即时视频帧中识别所述描述参数所指示的细节;The position parameter of the preset shape includes a description parameter, and the details indicated by the description parameter are identified in the current instant video frame;
根据所述细节,在所述当前即时视频帧中确定所述预设形状所指示的区域。According to the details, an area indicated by the preset shape is determined in the current instant video frame.
结合第一方面或第一方面的第一种可能的实现方式,在第二种可能的实现方式中,所述根据第一传输策略,传输包括所述预设形状所指示的区域的所述当前即时视频帧包括:With reference to the first aspect or the first possible implementation manner of the first aspect, in a second possible implementation, the transmitting, according to the first transmission policy, the current region including the area indicated by the preset shape Instant video frames include:
根据与所述当前即时视频帧对应的重要性矩阵,对所述当前即时视频进行处理,获取处理后的即时视频帧;And processing the current instant video according to an importance matrix corresponding to the current instant video frame, and acquiring the processed instant video frame;
传输所述处理后的即时视频帧。Transmitting the processed instant video frame.
结合第一方面的第二种可能的实现方式,在第三种可能的实现方式中,所 述根据与所述当前即时视频帧对应的重要性矩阵,对所述当前即时视频进行处理,获取处理后的即时视频帧包括:In combination with the second possible implementation of the first aspect, in a third possible implementation manner, Processing the current instant video according to the importance matrix corresponding to the current instant video frame, and acquiring the processed instant video frame includes:
获取所述预设形状所指示的区域的重要性矩阵;Obtaining an importance matrix of the area indicated by the preset shape;
对所述当前即时视频帧进行低通滤波,获取滤波后的当前即时视频帧;Performing low-pass filtering on the current instant video frame to obtain the filtered current instant video frame;
根据所述重要性矩阵,对所述当前即时视频帧与所述滤波后的当前即时视频帧进行融合,生成所述处理后的当前即时视频帧。And merging the current instant video frame with the filtered current instant video frame according to the importance matrix to generate the processed current instant video frame.
结合第一方面至第一方面的第三种任一可能的实现方式,在第四种可能的实现方式中,所述根据第二传输策略,传输包括所述预设形状所指示的区域的所述当前即时视频帧策略包括:With reference to the first aspect to any one of the third possible implementation manners of the first aspect, in a fourth possible implementation, the transmitting, by the second transmission policy, the location including the area indicated by the preset shape The current instant video frame strategy includes:
将至少包括所述预设形状所指示的区域的即时视频帧划分为至少一个宏块,并设置组成所述至少一个宏块所对应的量化参数;Dividing an instant video frame including at least the area indicated by the preset shape into at least one macroblock, and setting a quantization parameter corresponding to the at least one macroblock;
根据所述量化参数,对所述至少一个宏块进行编码,生成编码后的即时视频帧;Encoding the at least one macroblock according to the quantization parameter to generate an encoded instant video frame;
传输所述编码后的即时视频帧。Transmitting the encoded instant video frame.
结合第一方面的第四种可能的实现方式,在第五种可能的实现方式中,In conjunction with the fourth possible implementation of the first aspect, in a fifth possible implementation manner,
所述设置所述至少一个宏块所对应的量化参数包括:The setting the quantization parameter corresponding to the at least one macro block includes:
设置包括全部或者部分所述预设形状所指示的区域的宏块的量化参数为第一数值;Setting a quantization parameter of a macroblock including all or part of the area indicated by the preset shape as a first value;
设置不包括所述全部或者部分所述预设形状所指示的区域的宏块的量化参数为第二数值;Setting a quantization parameter of a macroblock that does not include all or part of the area indicated by the preset shape as a second value;
所述根据所述量化参数,对所述至少一个宏块进行编码,生成编码后的即时视频帧包括:And encoding, according to the quantization parameter, the at least one macroblock, and generating the encoded instant video frame includes:
根据所述第一数值和所述第二数值,对所述至少一个宏块进行编码,生成编码后的当前即时视频帧。And encoding the at least one macroblock according to the first value and the second value to generate an encoded current instant video frame.
结合第一方面至第一方面的第五种任一可能的实现方式,在第六种可能的实现方式中,所述根据第三传输策略,传输包括所述预设形状所指示的区域的 所述当前即时视频帧包括:With reference to the first aspect to any one of the fifth possible implementation manners of the first aspect, in a sixth possible implementation, the transmitting, according to the third transmission policy, transmitting the area indicated by the preset shape The current instant video frame includes:
获取包括所述预设形状所指示的区域的当前即时视频帧与参考帧之间的残差数据;Acquiring residual data between the current instant video frame and the reference frame including the area indicated by the preset shape;
传输所述残差数据。Transmitting the residual data.
结合第一方面的第六种可能的实现方式,在第七种可能的实现方式中,所述获取包括所述预设形状所指示的区域的当前即时视频帧与参考帧之间的残差数据包括:With reference to the sixth possible implementation manner of the first aspect, in a seventh possible implementation, the acquiring, by using the residual data between the current instant video frame and the reference frame of the area indicated by the preset shape include:
获取所述预设形状所指示的区域的位置参数与姿态参数;Obtaining a position parameter and a posture parameter of the area indicated by the preset shape;
对所述位置参数与所述姿态参数进行归一化处理,生成标准位置参数与标准姿态参数;Normalizing the position parameter and the posture parameter to generate a standard position parameter and a standard posture parameter;
根据所述标准位置参数与所述标准姿态参数,获取包括所述预设形状所指示的区域的当前即时视频帧与参考帧之间的残差数据。Obtaining residual data between the current instant video frame and the reference frame including the region indicated by the preset shape according to the standard position parameter and the standard posture parameter.
结合第一方面,在第八种可能的实现方式中,所述根据第四传输策略,传输包括所述预设形状所指示的区域的所述当前即时视频帧包括:With reference to the first aspect, in an eighth possible implementation, the transmitting, according to the fourth transmission policy, the current instant video frame that includes the area indicated by the preset shape includes:
获取用于描述所述预设形状所指示的区域的特征参数;Obtaining a feature parameter for describing an area indicated by the preset shape;
传输所述特征参数。Transmitting the feature parameters.
结合第一方面的第八种可能的实现方式,在第九种可能的实现方式中,所述获取用于描述所述预设形状所指示的区域的特征参数包括:With reference to the eighth possible implementation manner of the first aspect, in the ninth possible implementation manner, the acquiring, by using the feature parameter that is used to describe the area indicated by the preset shape, includes:
对所述预设形状所指示的区域进行三角分割,获取至少一个三角区域;Triangulating the area indicated by the preset shape to obtain at least one triangular area;
获取所述至少一个三角区域对应的姿态参数和位置参数;Acquiring the attitude parameter and the position parameter corresponding to the at least one triangular area;
根据所述至少一个三角区域对应的姿态参数和位置参数,生成所述特征参数。And generating the feature parameter according to the posture parameter and the position parameter corresponding to the at least one triangular region.
结合第一方面至第一方面的第九种任一可能的实现方式,在第十种可能的实现方式中,所述方法还包括:With reference to the first aspect to any one of the possible implementations of the ninth aspect, in a tenth possible implementation, the method further includes:
将所述选择指令发送至其他电子设备。The selection instruction is sent to other electronic devices.
第二方面,提供了一种即时视频的显示方法,所述方法包括: In a second aspect, a method for displaying an instant video is provided, the method comprising:
获取电子设备根据第一传输策略、第二传输策略、第三传输策略以及第四传输策略中的任意一个传输的当前即时视频帧;Obtaining a current instant video frame that is transmitted by the electronic device according to any one of the first transmission policy, the second transmission policy, the third transmission policy, and the fourth transmission policy;
获取用户触发的选择指令,所述选择指令用于指示所述用户所选择的预设形状;Obtaining a user-triggered selection instruction, the selection instruction is used to indicate a preset shape selected by the user;
根据所述选择指令以及电子设备所支持的传输策略,显示所述当前即时视频帧。The current instant video frame is displayed according to the selection instruction and a transmission policy supported by the electronic device.
第三方面,提供了一种电子设备,所述电子设备包括:In a third aspect, an electronic device is provided, the electronic device comprising:
接收模块,用于接收用户触发的选择指令,所述选择指令用于指示所述用户所选择的预设形状;a receiving module, configured to receive a user-triggered selection instruction, where the selection instruction is used to indicate a preset shape selected by the user;
第一处理模块,用于在当前即时视频帧中确定所述预设形状所指示的区域;a first processing module, configured to determine an area indicated by the preset shape in a current instant video frame;
判决模块,用于判断网络带宽是否满足第一预设条件、第二预设条件、第三预设条件和第四预设条件中的任意一个;a determining module, configured to determine whether the network bandwidth meets any one of a first preset condition, a second preset condition, a third preset condition, and a fourth preset condition;
所述第一处理模块还用于根据网络带宽所满足的预设条件以及电子设备所支持的传输策略,触发以下模块中的任意一个:The first processing module is further configured to trigger any one of the following modules according to a preset condition that the network bandwidth meets and a transmission policy supported by the electronic device:
第二处理模块,用于在网络带宽满足第一预设条件时,根据第一传输策略,传输包括所述预设形状所指示的区域的所述当前即时视频帧;或者,a second processing module, configured to: when the network bandwidth meets the first preset condition, transmit the current instant video frame that includes the area indicated by the preset shape according to the first transmission policy; or
第三处理模块,用于在网络带宽满足第二预设条件时,根据第二传输策略,传输包括所述预设形状所指示的区域的所述当前即时视频帧;或者,a third processing module, configured to: when the network bandwidth meets the second preset condition, transmit the current instant video frame that includes the area indicated by the preset shape according to the second transmission policy; or
第四处理模块,用于在网络带宽满足第三预设条件时,根据第三传输策略,传输包括所述预设形状所指示的区域的所述当前即时视频帧;或者,a fourth processing module, configured to: when the network bandwidth meets the third preset condition, transmit the current instant video frame that includes the area indicated by the preset shape according to the third transmission policy; or
第五处理模块,用于在网络带宽满足第四预设条件时,根据第四传输策略,传输包括所述预设形状所指示的区域的所述当前即时视频帧。And a fifth processing module, configured to: when the network bandwidth meets the fourth preset condition, transmit the current instant video frame including the area indicated by the preset shape according to the fourth transmission policy.
结合第三方面,在第一种可能的实现方式中,所述选择指令包括所述预设形状的大小参数、所述预设形状的位置参数、所述预设形状的边框参数以及所述预设形状的特效参数中的至少一个,所述第一处理模块用于执行以下操作中的任意一个: With reference to the third aspect, in a first possible implementation manner, the selection instruction includes a size parameter of the preset shape, a position parameter of the preset shape, a frame parameter of the preset shape, and the preset At least one of a shape effect parameter is provided, the first processing module being configured to perform any one of the following operations:
所述预设形状的位置参数包括坐标参数,根据所述坐标参数,在当前即时视频帧中确定所述预设形状所指示的区域;或者,The position parameter of the preset shape includes a coordinate parameter, and determining, according to the coordinate parameter, an area indicated by the preset shape in a current instant video frame; or
所述预设形状的位置参数包括描述参数,在所述当前即时视频帧中识别所述描述参数所指示的细节;The position parameter of the preset shape includes a description parameter, and the details indicated by the description parameter are identified in the current instant video frame;
根据所述细节,在所述当前即时视频帧中确定所述预设形状所指示的区域。According to the details, an area indicated by the preset shape is determined in the current instant video frame.
结合第三方面或第三方面的第一种可能的实现方式,在第二种可能的实现方式中,所述第二处理模块具体用于:With reference to the third aspect or the first possible implementation manner of the third aspect, in a second possible implementation manner, the second processing module is specifically configured to:
根据与所述当前即时视频帧对应的重要性矩阵,对所述当前即时视频进行处理,获取处理后的即时视频帧;And processing the current instant video according to an importance matrix corresponding to the current instant video frame, and acquiring the processed instant video frame;
传输所述处理后的即时视频帧。Transmitting the processed instant video frame.
结合第三方面的第二种可能的实现方式,在第三种可能的实现方式中,所述第二处理模块具体用于:In conjunction with the second possible implementation of the third aspect, in a third possible implementation, the second processing module is specifically configured to:
获取所述预设形状所指示的区域的重要性矩阵;Obtaining an importance matrix of the area indicated by the preset shape;
对所述当前即时视频帧进行低通滤波,获取滤波后的当前即时视频帧;Performing low-pass filtering on the current instant video frame to obtain the filtered current instant video frame;
根据所述重要性矩阵,对所述当前即时视频帧与所述滤波后的当前即时视频帧进行融合,生成所述处理后的当前即时视频帧。And merging the current instant video frame with the filtered current instant video frame according to the importance matrix to generate the processed current instant video frame.
结合第三方面至第三方面的第三种任一可能的实现方式,在第四种可能的实现方式中,所述第三处理模块具体用于:With reference to the third aspect to any of the third possible implementation manners of the third aspect, in a fourth possible implementation, the third processing module is specifically configured to:
将至少包括所述预设形状所指示的区域的即时视频帧划分为至少一个宏块,并设置组成所述至少一个宏块所对应的量化参数;Dividing an instant video frame including at least the area indicated by the preset shape into at least one macroblock, and setting a quantization parameter corresponding to the at least one macroblock;
根据所述量化参数,对所述至少一个宏块进行编码,生成编码后的即时视频帧;Encoding the at least one macroblock according to the quantization parameter to generate an encoded instant video frame;
传输所述编码后的即时视频帧。Transmitting the encoded instant video frame.
结合第三方面的第四种可能的实现方式,在第五种可能的实现方式中,所述第三处理模块具体用于:In conjunction with the fourth possible implementation of the third aspect, in a fifth possible implementation, the third processing module is specifically configured to:
设置包括全部或者部分所述预设形状所指示的区域的宏块的量化参数为第 一数值;Setting a quantization parameter of a macroblock including all or part of the area indicated by the preset shape is a value
设置不包括所述全部或者部分所述预设形状所指示的区域的宏块的量化参数为第二数值;Setting a quantization parameter of a macroblock that does not include all or part of the area indicated by the preset shape as a second value;
所述第三处理模块具体用于:The third processing module is specifically configured to:
根据所述第一数值和所述第二数值,对所述至少一个宏块进行编码,生成编码后的当前即时视频帧。And encoding the at least one macroblock according to the first value and the second value to generate an encoded current instant video frame.
结合第三方面至第三方面的第五种任一可能的实现方式,在第六种可能的实现方式中,所述第四处理模块具体用于:With reference to any one of the third aspect to the fifth aspect of the third aspect, in a sixth possible implementation, the fourth processing module is specifically configured to:
获取包括所述预设形状所指示的区域的当前即时视频帧与参考帧之间的残差数据;Acquiring residual data between the current instant video frame and the reference frame including the area indicated by the preset shape;
传输所述残差数据。Transmitting the residual data.
结合第三方面的第六种可能的实现方式,在第七种可能的实现方式中,所述第四处理模块具体用于:In conjunction with the sixth possible implementation of the third aspect, in a seventh possible implementation, the fourth processing module is specifically configured to:
获取所述预设形状所指示的区域的位置参数与姿态参数;Obtaining a position parameter and a posture parameter of the area indicated by the preset shape;
对所述位置参数与所述姿态参数进行归一化处理,生成标准位置参数与标准姿态参数;Normalizing the position parameter and the posture parameter to generate a standard position parameter and a standard posture parameter;
根据所述标准位置参数与所述标准姿态参数,获取包括所述预设形状所指示的区域的当前即时视频帧与参考帧之间的残差数据。Obtaining residual data between the current instant video frame and the reference frame including the region indicated by the preset shape according to the standard position parameter and the standard posture parameter.
结合第三方面,在第八种可能的实现方式中,所述第四处理模块具体用于:With reference to the third aspect, in an eighth possible implementation, the fourth processing module is specifically configured to:
获取用于描述所述预设形状所指示的区域的特征参数;Obtaining a feature parameter for describing an area indicated by the preset shape;
传输所述特征参数。Transmitting the feature parameters.
结合第三方面的第八种可能的实现方式,在第九种可能的实现方式中,所述第四处理模块具体用于:In conjunction with the eighth possible implementation of the third aspect, in a ninth possible implementation, the fourth processing module is specifically configured to:
对所述预设形状所指示的区域进行三角分割,获取至少一个三角区域;Triangulating the area indicated by the preset shape to obtain at least one triangular area;
获取所述至少一个三角区域对应的姿态参数和位置参数;Acquiring the attitude parameter and the position parameter corresponding to the at least one triangular area;
根据所述至少一个三角区域对应的姿态参数和位置参数,生成所述特征参 数。Generating the feature parameter according to the attitude parameter and the position parameter corresponding to the at least one triangular region number.
结合第三方面至第三方面的第九种任一可能的实现方式,在第十种可能的实现方式中,所述电子设备还包括发送模块,用于:With reference to any of the third aspect to the ninth possible implementation manner of the third aspect, in the tenth possible implementation, the electronic device further includes: a sending module, configured to:
将所述选择指令发送至其他电子设备。The selection instruction is sent to other electronic devices.
第四方面,提供了一种电子设备,所述电子设备包括发送模块、存储器以及与所述发送模块、所述存储器连接的处理器,其中,所述存储器用于存储一组程序代码,所述处理器调用所述存储器所存储的程序代码用于执行以下操作:In a fourth aspect, an electronic device is provided, the electronic device comprising a transmitting module, a memory, and a processor connected to the sending module and the memory, wherein the memory is configured to store a set of program codes, The processor calls the program code stored by the memory to perform the following operations:
接收用户触发的选择指令,所述选择指令用于指示所述用户所选择的预设形状;Receiving a user-triggered selection instruction, the selection instruction is used to indicate a preset shape selected by the user;
在当前即时视频帧中确定所述预设形状所指示的区域;Determining an area indicated by the preset shape in a current instant video frame;
根据网络带宽所满足的预设条件以及电子设备所支持的传输策略,执行以下操作中的任意一个:Perform any of the following operations based on the preset conditions that the network bandwidth meets and the transmission policies supported by the electronic device:
若网络带宽满足第一预设条件,则根据第一传输策略,传输包括所述预设形状所指示的区域的所述当前即时视频帧;或者,If the network bandwidth meets the first preset condition, transmitting the current instant video frame including the area indicated by the preset shape according to the first transmission policy; or
若网络带宽满足第二预设条件,则根据第二传输策略,传输包括所述预设形状所指示的区域的所述当前即时视频帧;或者,If the network bandwidth meets the second preset condition, transmitting, according to the second transmission policy, the current instant video frame including the area indicated by the preset shape; or
若网络带宽满足第三预设条件,则根据第三传输策略,传输包括所述预设形状所指示的区域的所述当前即时视频帧;或者,If the network bandwidth meets the third preset condition, transmitting, according to the third transmission policy, the current instant video frame that includes the area indicated by the preset shape; or
若网络带宽满足第四预设条件,则根据第四传输策略,传输包括所述预设形状所指示的区域的所述当前即时视频帧。If the network bandwidth meets the fourth preset condition, transmitting the current instant video frame including the area indicated by the preset shape according to the fourth transmission policy.
结合第四方面,在第一种可能的实现方式中,所述选择指令包括所述预设形状的大小参数、所述预设形状的位置参数、所述预设形状的边框参数以及所述预设形状的特效参数中的至少一个,所述处理器调用所述存储器所存储的程序代码用于执行以下操作中的任意一个:With reference to the fourth aspect, in a first possible implementation manner, the selection instruction includes a size parameter of the preset shape, a position parameter of the preset shape, a frame parameter of the preset shape, and the preset At least one of the shape effect parameters, the processor invoking the program code stored in the memory to perform any of the following operations:
所述预设形状的位置参数包括坐标参数,根据所述坐标参数,在当前即时视频帧中确定所述预设形状所指示的区域;或者, The position parameter of the preset shape includes a coordinate parameter, and determining, according to the coordinate parameter, an area indicated by the preset shape in a current instant video frame; or
所述预设形状的位置参数包括描述参数,在所述当前即时视频帧中识别所述描述参数所指示的细节;The position parameter of the preset shape includes a description parameter, and the details indicated by the description parameter are identified in the current instant video frame;
根据所述细节,在所述当前即时视频帧中确定所述预设形状所指示的区域。According to the details, an area indicated by the preset shape is determined in the current instant video frame.
结合第四方面或第四方面的第一种可能的实现方式,在第二种可能的实现方式中,所述处理器调用所述存储器所存储的程序代码用于执行以下操作:With reference to the fourth aspect, or the first possible implementation manner of the fourth aspect, in a second possible implementation, the processor invokes the program code stored by the memory, to perform the following operations:
根据与所述当前即时视频帧对应的重要性矩阵,对所述当前即时视频进行处理,获取处理后的即时视频帧;And processing the current instant video according to an importance matrix corresponding to the current instant video frame, and acquiring the processed instant video frame;
传输所述处理后的即时视频帧。Transmitting the processed instant video frame.
结合第四方面的第二种可能的实现方式,在第三种可能的实现方式中,所述处理器调用所述存储器所存储的程序代码用于执行以下操作:In conjunction with the second possible implementation of the fourth aspect, in a third possible implementation, the processor invokes the program code stored in the memory to perform the following operations:
获取所述预设形状所指示的区域的重要性矩阵;Obtaining an importance matrix of the area indicated by the preset shape;
对所述当前即时视频帧进行低通滤波,获取滤波后的当前即时视频帧;Performing low-pass filtering on the current instant video frame to obtain the filtered current instant video frame;
根据所述重要性矩阵,对所述当前即时视频帧与所述滤波后的当前即时视频帧进行融合,生成所述处理后的当前即时视频帧。And merging the current instant video frame with the filtered current instant video frame according to the importance matrix to generate the processed current instant video frame.
结合第四方面至第四方面的第三种任一可能的实现方式,在第四种可能的实现方式中,所述处理器调用所述存储器所存储的程序代码用于执行以下操作:With reference to any of the third aspect to the third possible implementation of the fourth aspect, in a fourth possible implementation, the processor invokes the program code stored in the memory to perform the following operations:
将至少包括所述预设形状所指示的区域的即时视频帧划分为至少一个宏块,并设置组成所述至少一个宏块所对应的量化参数;Dividing an instant video frame including at least the area indicated by the preset shape into at least one macroblock, and setting a quantization parameter corresponding to the at least one macroblock;
根据所述量化参数,对所述至少一个宏块进行编码,生成编码后的即时视频帧;Encoding the at least one macroblock according to the quantization parameter to generate an encoded instant video frame;
传输所述编码后的即时视频帧。Transmitting the encoded instant video frame.
结合第四方面的第四种可能的实现方式,在第五种可能的实现方式中,所述处理器调用所述存储器所存储的程序代码用于执行以下操作:In conjunction with the fourth possible implementation of the fourth aspect, in a fifth possible implementation, the processor invokes the program code stored in the memory to perform the following operations:
设置包括全部或者部分所述预设形状所指示的区域的宏块的量化参数为第一数值;Setting a quantization parameter of a macroblock including all or part of the area indicated by the preset shape as a first value;
设置不包括所述全部或者部分所述预设形状所指示的区域的宏块的量化参 数为第二数值;Setting a quantization parameter of a macroblock that does not include all or part of the area indicated by the preset shape The number is the second value;
所述处理器调用所述存储器所存储的程序代码用于执行以下操作:The processor calls the program code stored by the memory to perform the following operations:
根据所述第一数值和所述第二数值,对所述至少一个宏块进行编码,生成编码后的当前即时视频帧。And encoding the at least one macroblock according to the first value and the second value to generate an encoded current instant video frame.
结合第四方面至第四方面的第五种任一可能的实现方式,在第六种可能的实现方式中,所述处理器调用所述存储器所存储的程序代码用于执行以下操作:With reference to any of the fifth aspect to the fifth possible implementation manner of the fourth aspect, in a sixth possible implementation, the processor invokes the program code stored by the memory to perform the following operations:
获取包括所述预设形状所指示的区域的当前即时视频帧与参考帧之间的残差数据;Acquiring residual data between the current instant video frame and the reference frame including the area indicated by the preset shape;
传输所述残差数据。Transmitting the residual data.
结合第四方面的第六种可能的实现方式,在第七种可能的实现方式中,所述处理器调用所述存储器所存储的程序代码用于执行以下操作:In conjunction with the sixth possible implementation of the fourth aspect, in a seventh possible implementation, the processor invokes the program code stored in the memory to perform the following operations:
获取所述预设形状所指示的区域的位置参数与姿态参数;Obtaining a position parameter and a posture parameter of the area indicated by the preset shape;
对所述位置参数与所述姿态参数进行归一化处理,生成标准位置参数与标准姿态参数;Normalizing the position parameter and the posture parameter to generate a standard position parameter and a standard posture parameter;
根据所述标准位置参数与所述标准姿态参数,获取包括所述预设形状所指示的区域的当前即时视频帧与参考帧之间的残差数据。Obtaining residual data between the current instant video frame and the reference frame including the region indicated by the preset shape according to the standard position parameter and the standard posture parameter.
结合第四方面,在第八种可能的实现方式中,所述处理器调用所述存储器所存储的程序代码用于执行以下操作:In conjunction with the fourth aspect, in an eighth possible implementation, the processor invokes program code stored in the memory to perform the following operations:
获取用于描述所述预设形状所指示的区域的特征参数;Obtaining a feature parameter for describing an area indicated by the preset shape;
传输所述特征参数。Transmitting the feature parameters.
结合第四方面的第八种可能的实现方式,在第九种可能的实现方式中,所述处理器调用所述存储器所存储的程序代码用于执行以下操作:In conjunction with the eighth possible implementation of the fourth aspect, in a ninth possible implementation, the processor invokes the program code stored in the memory to perform the following operations:
对所述预设形状所指示的区域进行三角分割,获取至少一个三角区域;Triangulating the area indicated by the preset shape to obtain at least one triangular area;
获取所述至少一个三角区域对应的姿态参数和位置参数;Acquiring the attitude parameter and the position parameter corresponding to the at least one triangular area;
根据所述至少一个三角区域对应的姿态参数和位置参数,生成所述特征参数。 And generating the feature parameter according to the posture parameter and the position parameter corresponding to the at least one triangular region.
结合第四方面至第一方面的第九种任一可能的实现方式,在第十种可能的实现方式中,所述处理器调用所述存储器所存储的程序代码用于执行以下操作:In conjunction with the fourth aspect, the ninth possible implementation of the ninth aspect, in a tenth possible implementation, the processor, by using the program code stored by the processor, is configured to perform the following operations:
将所述选择指令发送至其他电子设备。The selection instruction is sent to other electronic devices.
第五方面,提供了一种电子设备,所述电子设备包括:In a fifth aspect, an electronic device is provided, the electronic device comprising:
第一获取模块,用于获取电子设备根据第一传输策略、第二传输策略、第三传输策略以及第四传输策略中的任意一个传输的当前即时视频帧;a first acquiring module, configured to acquire a current instant video frame that is transmitted by the electronic device according to any one of the first transmission policy, the second transmission policy, the third transmission policy, and the fourth transmission policy;
第二获取模块,用于获取用户触发的选择指令,选择指令用于指示用户所选择的预设形状;a second acquiring module, configured to acquire a user-triggered selection instruction, where the selection instruction is used to indicate a preset shape selected by the user;
显示模块,用于根据选择指令以及电子设备所支持的传输策略,显示所述当前即时视频帧。And a display module, configured to display the current instant video frame according to the selection instruction and a transmission policy supported by the electronic device.
第六方面,提供了一种电子设备,所述电子设备包括显示屏、存储器以及与所述显示屏、所述存储器连接的处理器,其中,所述存储器用于存储一组程序代码,所述处理器调用所述存储器所存储的程序代码用于执行以下操作:In a sixth aspect, an electronic device is provided, the electronic device including a display screen, a memory, and a processor coupled to the display screen and the memory, wherein the memory is configured to store a set of program codes, The processor calls the program code stored by the memory to perform the following operations:
获取电子设备根据第一传输策略、第二传输策略、第三传输策略以及第四传输策略中的任意一个传输的当前即时视频帧;Obtaining a current instant video frame that is transmitted by the electronic device according to any one of the first transmission policy, the second transmission policy, the third transmission policy, and the fourth transmission policy;
获取用户触发的选择指令,所述选择指令用于指示所述用户所选择的预设形状;Obtaining a user-triggered selection instruction, the selection instruction is used to indicate a preset shape selected by the user;
根据所述选择指令以及电子设备所支持的传输策略,显示所述当前即时视频帧。The current instant video frame is displayed according to the selection instruction and a transmission policy supported by the electronic device.
本发明公开了一种即时视频的传输方法和电子设备,包括:接收用户触发的选择指令,选择指令用于指示用户所选择的预设形状;在当前即时视频帧中确定预设形状所指示的区域;判断网络带宽是否满足第一预设条件、第二预设条件、第三预设条件以及第四预设条件中的任意一个;若网络带宽满足第一预设条件,则根据第一传输策略,传输包括预设形状所指示的区域的当前即时视频帧;若网络带宽满足第二预设条件,则根据第二传输策略,传输包括预设形状所指示的区域的当前即时视频帧;若网络带宽满足第三预设条件,则根据第 三传输策略,传输包括预设形状所指示的区域的当前即时视频帧;若网络带宽满足第四预设条件,则根据第四传输策略,传输包括预设形状所指示的区域的当前即时视频帧。通过判断网络带宽是否满足第一预设条件、第二预设条件、第三预设条件和第四预设条件中的任意一个,从而可以根据不同的网络带宽对包括预设形状所指示的区域的当前即时视频帧采取不同的传输策略,相比于传统的即时视频的传输方法,不仅满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验,还提高了网络带宽的利用率,节省网络资源,从而提高了即时视频的传输效率,提高了用户体验;另外,由于本发明实施例的方法是在从当前即时视频帧中获取预设形状所指示的区域后,对当前即时视频帧进行处理,使得相比于传统的即时视频编码方法,在带宽资源不变的情况下,将更多的宽带资源用于预设形状所指示的区域的传输,从而保证了预设形状所指示的区域的传输,进一步满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验。The present invention discloses a method and a device for transmitting an instant video, comprising: receiving a selection instruction triggered by a user, the selection instruction is used to indicate a preset shape selected by the user; and determining a preset shape in the current instant video frame And determining whether the network bandwidth meets any one of the first preset condition, the second preset condition, the third preset condition, and the fourth preset condition; if the network bandwidth meets the first preset condition, according to the first transmission Transmitting, by the policy, the current instant video frame including the area indicated by the preset shape; if the network bandwidth meets the second preset condition, transmitting the current instant video frame including the area indicated by the preset shape according to the second transmission policy; The network bandwidth meets the third preset condition, according to the a third transmission policy, transmitting a current instant video frame including an area indicated by the preset shape; and if the network bandwidth satisfies the fourth preset condition, transmitting the current instant video frame including the area indicated by the preset shape according to the fourth transmission policy . By determining whether the network bandwidth meets any one of the first preset condition, the second preset condition, the third preset condition, and the fourth preset condition, the area indicated by the preset shape may be selected according to different network bandwidths. The current instant video frames adopt different transmission strategies, and the traditional instant video transmission method not only satisfies the user's attention to an area in the instant video is greater than other areas, the user's definition of a certain area, and The requirement for detail retention is greater than that of other areas and other participants who want the instant video interaction to migrate the attention to the diverse needs of the user-specified area, which improves the user experience, improves the utilization of network bandwidth, and saves network resources. Therefore, the transmission efficiency of the instant video is improved, and the user experience is improved. In addition, the method of the embodiment of the present invention processes the current instant video frame after acquiring the area indicated by the preset shape from the current instant video frame. Compared with the traditional instant video coding method, the bandwidth resources are unchanged. More broadband resources are used for the transmission of the area indicated by the preset shape, thereby ensuring the transmission of the area indicated by the preset shape, further satisfying the user's attention to an area in the instant video is greater than other areas, The user's requirement for the clarity and detail retention of an area is greater than that of other areas and other participants who want the instant video interaction to migrate the attention to the diverse needs of the user-specified area, improving the user experience.
附图说明DRAWINGS
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly described below. It is obvious that the drawings in the following description are only some embodiments of the present invention. Other drawings may also be obtained from those of ordinary skill in the art in light of the inventive work.
图1是本发明实施例提供的一种即时视频的传输方法流程图;FIG. 1 is a flowchart of a method for transmitting instant video according to an embodiment of the present invention;
图2是本发明实施例提供的一种即时视频显示方法流程图;2 is a flowchart of an instant video display method according to an embodiment of the present invention;
图3是本发明实施例提供的一种即时视频的传输方法流程图; 3 is a flowchart of a method for transmitting instant video according to an embodiment of the present invention;
图4是本发明实施例提供的一种界面示意图;4 is a schematic diagram of an interface according to an embodiment of the present invention;
图5是本发明实施例提供的一种界面示意图;FIG. 5 is a schematic diagram of an interface according to an embodiment of the present invention; FIG.
图6是本发明实施例提供的一种界面示意图;FIG. 6 is a schematic diagram of an interface according to an embodiment of the present invention;
图7是本发明实施例提供的一种界面示意图;FIG. 7 is a schematic diagram of an interface according to an embodiment of the present invention;
图8是本发明实施例提供的一种即时视频显示方法流程图;FIG. 8 is a flowchart of a method for displaying an instant video according to an embodiment of the present invention;
图9是本发明实施例提供的一种界面示意图;FIG. 9 is a schematic diagram of an interface according to an embodiment of the present invention;
图10是本发明实施例提供的一种即时视频的传输方法流程图;FIG. 10 is a flowchart of a method for transmitting instant video according to an embodiment of the present invention;
图11是本发明实施例提供的一种界面示意图;FIG. 11 is a schematic diagram of an interface according to an embodiment of the present invention;
图12是本发明实施例提供的一种即时视频显示方法流程图;FIG. 12 is a flowchart of a method for displaying an instant video according to an embodiment of the present invention;
图13是本发明实施例提供的一种界面示意图;FIG. 13 is a schematic diagram of an interface according to an embodiment of the present invention;
图14是本发明实施例提供的一种电子设备结构示意图;FIG. 14 is a schematic structural diagram of an electronic device according to an embodiment of the present invention;
图15是本发明实施例提供的一种电子设备结构示意图;15 is a schematic structural diagram of an electronic device according to an embodiment of the present invention;
图16是本发明实施例提供的一种电子设备结构示意图;16 is a schematic structural diagram of an electronic device according to an embodiment of the present invention;
图17是本发明实施例提供的一种电子设备结构示意图。FIG. 17 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
具体实施方式detailed description
为使本发明的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. Some embodiments of the invention, rather than all of the embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
本发明实施例提供了一种即时视频的传输方法,该方法用于一种至少包括两个电子设备的交互系统,其中,在该交互系统中,该至少两个电子设备通过运行自身所存储的应用程序实现即时视频的交互,电子设备至少包括发送/接收模块、视频输入模块以及具有触控功能的显示模块,该视频输入模块包括摄像头,显示模块可以包括显示屏,电子设备通过发送/接收模块实现即时视频的发 送与接收,通过视频输入模块实现即时视频的输入,通过具有触控功能的显示模块实现即时视频的显示以及接收用户触发的指令。An embodiment of the present invention provides a method for transmitting an instant video, where the method is used in an interactive system including at least two electronic devices, wherein in the interactive system, the at least two electronic devices are stored by running the same The application implements real-time video interaction, and the electronic device includes at least a transmitting/receiving module, a video input module, and a display module having a touch function, the video input module includes a camera, the display module may include a display screen, and the electronic device passes the transmitting/receiving module Realize instant video transmission Sending and receiving, real-time video input through the video input module, real-time video display and receiving user-triggered instructions through the display module with touch function.
值得注意的是,根据电子设备的不同,该电子设备所支持的传输策略也不同,电子设备支持传输策略包括电子设备预先配置与该传输策略对应的代码,该传输策略包括即时视频的发送与即时视频的接收,电子设备所述支持的传输策略包括:电子设备同时支持第一传输策略、第二传输策略、第三传输策略和第四传输策略;电子设备支持第一传输策略、第二传输策略、第三传输策略和第四传输策略中的任意一个;电子设备支持第一传输策略、第二传输策略、第三传输策略和第四传输策略中的任意两个;电子设备支持第一传输策略、第二传输策略、第三传输策略和第四传输策略中的任意三个。It is worth noting that, depending on the electronic device, the transmission strategy supported by the electronic device is also different. The electronic device supports the transmission policy, and the electronic device pre-configures a code corresponding to the transmission policy, where the transmission strategy includes instant video transmission and instant transmission. The receiving of the video, the supported transmission strategy of the electronic device includes: the electronic device simultaneously supports the first transmission policy, the second transmission policy, the third transmission policy, and the fourth transmission policy; and the electronic device supports the first transmission policy and the second transmission policy And any one of a third transmission policy and a fourth transmission policy; the electronic device supports any two of the first transmission policy, the second transmission policy, the third transmission policy, and the fourth transmission policy; and the electronic device supports the first transmission policy Any three of the second transmission policy, the third transmission policy, and the fourth transmission policy.
上述交互系统仅仅是示例性的,是为了进一步说明本发明实施例所提供的方法,并非特指,本发明实施例对具体的交互系统不加以限定。The above-mentioned interactive system is merely exemplary, and is a description of the method provided by the embodiment of the present invention. The specific embodiment of the present invention does not limit the specific interactive system.
实施例一为本发明实施例提供的一种即时视频的传输方法,参考图1所示,该方法具体包括:Embodiment 1 is a method for transmitting an instant video according to an embodiment of the present invention. Referring to FIG. 1 , the method specifically includes:
101、接收用户触发的选择指令,选择指令用于指示用户所选择的预设形状。101. Receive a user-triggered selection instruction, and the selection instruction is used to indicate a preset shape selected by the user.
具体的,选择指令包括预设形状的大小参数、预设形状的位置参数、预设形状的边框参数以及预设形状的特效参数中的至少一个。Specifically, the selection instruction includes at least one of a size parameter of the preset shape, a position parameter of the preset shape, a frame parameter of the preset shape, and a special effect parameter of the preset shape.
102、在当前即时视频帧中确定预设形状所指示的区域。102. Determine an area indicated by the preset shape in the current instant video frame.
具体的,通过以下操作中的任意一个,在当前即时视频帧中确定预设形状所指示的区域:Specifically, the area indicated by the preset shape is determined in the current instant video frame by any one of the following operations:
预设形状的位置参数包括坐标参数,根据坐标参数,在当前即时视频帧中确定预设形状所指示的区域;或者,The position parameter of the preset shape includes a coordinate parameter, and the area indicated by the preset shape is determined in the current instant video frame according to the coordinate parameter; or
预设形状的位置参数包括描述参数,在当前即时视频帧中识别描述参数所指示的细节;The position parameter of the preset shape includes a description parameter, and the details indicated by the description parameter are identified in the current instant video frame;
根据细节,在当前即时视频帧中确定预设形状所指示的区域。According to the details, the area indicated by the preset shape is determined in the current instant video frame.
103、判断网络带宽是否满足第一预设条件、第二预设条件、第三预设条件 以及第四预设条件中的任意一个。103. Determine whether the network bandwidth meets the first preset condition, the second preset condition, and the third preset condition. And any one of the fourth preset conditions.
104、若网络带宽满足第一预设条件,且电子设备支持第一传输策略,则根据第一传输策略,传输包括预设形状所指示的区域的当前即时视频帧,结束。104. If the network bandwidth meets the first preset condition, and the electronic device supports the first transmission policy, according to the first transmission policy, the current instant video frame including the area indicated by the preset shape is transmitted, and ends.
具体的,根据与当前即时视频帧对应的重要性矩阵,对当前即时视频进行处理,获取处理后的即时视频帧;Specifically, the current live video is processed according to an importance matrix corresponding to the current instant video frame, and the processed instant video frame is obtained;
传输处理后的即时视频帧。Transmit processed instant video frames.
若网络带宽满足第一预设条件,且电子设备不支持第一传输策略,则结束,并在结束之后,通过常规的传输方式传输即时视频帧。If the network bandwidth meets the first preset condition, and the electronic device does not support the first transmission policy, the process ends, and after the end, the instant video frame is transmitted by using a conventional transmission mode.
105、若网络带宽满足第二预设条件,且电子设备支持第二传输策略,则根据第二传输策略,传输包括预设形状所指示的区域的当前即时视频帧,结束。105. If the network bandwidth meets the second preset condition, and the electronic device supports the second transmission policy, according to the second transmission policy, the current instant video frame including the area indicated by the preset shape is transmitted, and ends.
具体的,将至少包括预设形状所指示的区域的即时视频帧划分为至少一个宏块,并设置组成至少一个宏块所对应的量化参数;Specifically, the instant video frame including at least the area indicated by the preset shape is divided into at least one macro block, and the quantization parameter corresponding to the at least one macro block is set;
根据量化参数,对至少一个宏块进行编码,生成编码后的即时视频帧;Encoding at least one macroblock according to the quantization parameter to generate an encoded instant video frame;
传输编码后的即时视频帧。Transmit the encoded instant video frame.
若网络带宽满足第二预设条件,且电子设备支持第二传输策略,则结束,并在结束之后,通过常规的传输方式传输即时视频帧。If the network bandwidth meets the second preset condition, and the electronic device supports the second transmission policy, the process ends, and after the end, the instant video frame is transmitted by using a conventional transmission mode.
106、若网络带宽满足第三预设条件,且电子设备支持第三传输策略,则根据第三传输策略,传输包括预设形状所指示的区域的当前即时视频帧,结束。106. If the network bandwidth meets the third preset condition, and the electronic device supports the third transmission policy, according to the third transmission policy, the current instant video frame including the area indicated by the preset shape is transmitted, and ends.
具体的,获取包括预设形状所指示的区域的当前即时视频帧与参考帧之间的残差数据;Specifically, acquiring residual data between the current instant video frame and the reference frame including the area indicated by the preset shape;
传输残差数据。Transmit residual data.
若网络带宽满足第三预设条件,且电子设备不支持第三传输策略,则结束,并在结束之后,通过常规的传输方式传输即时视频帧。If the network bandwidth satisfies the third preset condition, and the electronic device does not support the third transmission policy, the process ends, and after the end, the instant video frame is transmitted by the conventional transmission mode.
107、若网络带宽满足第四预设条件,且电子设备支持第四传输策略,则根据第四传输策略,传输包括预设形状所指示的区域的当前即时视频帧,结束。107. If the network bandwidth meets the fourth preset condition, and the electronic device supports the fourth transmission policy, according to the fourth transmission policy, the current instant video frame including the area indicated by the preset shape is transmitted, and ends.
具体的,获取用于描述预设形状所指示的区域的特征参数; Specifically, acquiring a feature parameter for describing an area indicated by the preset shape;
传输特征参数。Transfer feature parameters.
若网络带宽满足第四预设条件,且电子设备不支持第四传输策略,则结束,并在结束之后,通过常规的传输方式传输即时视频帧。If the network bandwidth satisfies the fourth preset condition, and the electronic device does not support the fourth transmission policy, the process ends, and after the end, the instant video frame is transmitted through the conventional transmission mode.
可选的,除了上述步骤之外,本发明实施例所提供的方法还可以包括:Optionally, in addition to the foregoing steps, the method provided by the embodiment of the present invention may further include:
将选择指令发送至其他电子设备。Send selection instructions to other electronic devices.
本发明实施例提供了一种即时视频的传输方法,通过判断网络带宽是否满足第一预设条件、第二预设条件、第三预设条件和第四预设条件中的任意一个,从而可以根据不同的网络带宽对包括预设形状所指示的区域的当前即时视频帧采取不同的传输策略,相比于传统的即时视频的传输方法,不仅满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验,还提高了网络带宽的利用率,节省网络资源,从而提高了即时视频的传输效率,提高了用户体验;另外,由于本发明实施例的方法是在从当前即时视频帧中获取预设形状所指示的区域后,对当前即时视频帧进行处理,使得相比于传统的即时视频编码方法,在带宽资源不变的情况下,将更多的宽带资源用于预设形状所指示的区域的传输,从而保证了预设形状所指示的区域的传输,进一步满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验。An embodiment of the present invention provides a method for transmitting an instant video, by determining whether the network bandwidth meets any one of a first preset condition, a second preset condition, a third preset condition, and a fourth preset condition, thereby According to different network bandwidths, different transmission strategies are adopted for the current instant video frames including the area indicated by the preset shape. Compared with the traditional instant video transmission method, the user not only satisfies the user's attention to a certain area in the instant video. The degree is greater than other areas, the user's requirements for the definition of a certain area and the amount of detail retention are greater than other areas and other users who want the instant video interaction to migrate the attention to the diverse needs of the user-specified area, improve the user The experience also improves the utilization of the network bandwidth and saves the network resources, thereby improving the transmission efficiency of the instant video and improving the user experience. In addition, the method of the embodiment of the present invention acquires the preset shape from the current instant video frame. After the indicated area, the current instant video frame is processed so that compared to the traditional The instant video coding method uses more broadband resources for the transmission of the area indicated by the preset shape when the bandwidth resource is unchanged, thereby ensuring the transmission of the area indicated by the preset shape, further satisfying the user's The interest in one area of the instant video is greater than that of other areas, the user's definition of the clarity of the area and the amount of detail retention is greater than that of other areas, and other participants who want the instant video interaction to migrate the attention to the user-specified The diverse needs of the region have improved the user experience.
实施例二为本发明实施例提供的一种即时视频的显示方法,参照图2所示,该方法包括: Embodiment 2 is a method for displaying an instant video according to an embodiment of the present invention. Referring to FIG. 2, the method includes:
201、获取电子设备根据第一传输策略、第二传输策略、第三传输策略以及第四传输策略中的任意一个传输的当前即时视频帧。201. Acquire a current instant video frame that is transmitted by the electronic device according to any one of the first transmission policy, the second transmission policy, the third transmission policy, and the fourth transmission policy.
202、获取用户触发的选择指令,选择指令用于指示用户所选择的预设形状;202. Acquire a user-triggered selection instruction, where the selection instruction is used to indicate a preset shape selected by the user;
203、根据选择指令以及用户所支持的传输策略,显示当前即时视频帧。 203. Display a current instant video frame according to the selection instruction and a transmission policy supported by the user.
具体的,显示该选择指令所指示的形状。Specifically, the shape indicated by the selection instruction is displayed.
本发明实施例提供了一种即时视频的显示方法,通过获取并显示根据第一传输策略、第二传输策略、第三传输策略以及第四传输策略中的任意一个传输的当前即时视频帧,满足了即时视频过程中用户希望对所选择的区域的清晰度以及细节保留量大于其他区域的需求,进一步提高了用户体验。另外,通过获取并显示用户触发的选择指令,增加了用户选择该区域的方式,增加了用户在即时视频交互过程中的互动方式,进一步满足了用户的多样化需求,提高了用户体验。An embodiment of the present invention provides a method for displaying an instant video, which is obtained by acquiring and displaying a current instant video frame transmitted according to any one of a first transmission policy, a second transmission policy, a third transmission policy, and a fourth transmission policy. In the process of instant video, the user desires to have more clarity and detail retention of the selected area than other areas, further improving the user experience. In addition, by acquiring and displaying the user-triggered selection instruction, the manner in which the user selects the area is increased, and the interaction mode of the user in the instant video interaction process is increased, thereby further satisfying the diversified needs of the user and improving the user experience.
实施例三为本发明实施例提供的一种即时视频的传输方法,参照图3所示,在本发明实施例中,预设形状的位置参数包括坐标参数,该方法具体包括:Embodiment 3 is a method for transmitting an instant video according to an embodiment of the present invention. Referring to FIG. 3, in the embodiment of the present invention, a position parameter of a preset shape includes a coordinate parameter, and the method specifically includes:
301、接收用户触发的选择指令,选择指令用于指示用户所选择的预设形状。301. Receive a user-triggered selection instruction, and the selection instruction is used to indicate a preset shape selected by the user.
具体的,选择指令包括预设形状的大小参数、预设形状的位置参数、预设形状的边框参数以及预设形状的特效参数中的至少一个;该位置参数包括坐标参数,该坐标参数可以为包括预设形状的几何中心的至少一个点的坐标。Specifically, the selection instruction includes at least one of a size parameter of the preset shape, a position parameter of the preset shape, a frame parameter of the preset shape, and a special effect parameter of the preset shape; the position parameter includes a coordinate parameter, and the coordinate parameter may be The coordinates of at least one point including the geometric center of the preset shape.
该接收用户触发的选择指令的过程可以为:The process of receiving a user-triggered selection instruction may be:
当用户在即时视频界面触发包括至少一个预设形状的第一选择界面,在该第一选择界面选择至少一个预设形状中的一个,并在即时视频界面显示该预设形状,获取该预设形状;When the user triggers a first selection interface including at least one preset shape on the instant video interface, select one of the at least one preset shape on the first selection interface, and display the preset shape on the instant video interface to obtain the preset shape;
当用户在即时视频界面拉伸该预设形状后,获取用户停止拉伸时该预设形状的大小参数;After the user stretches the preset shape in the instant video interface, obtaining a size parameter of the preset shape when the user stops stretching;
当用户在即时视频界面拖动该预设形状后,获取用户停止拖动时该预设形状在即时视频界面中的位置参数;After the user drags the preset shape in the instant video interface, the position parameter of the preset shape in the instant video interface when the user stops dragging is obtained;
当用户在即时视频界面触发包括至少一个边框的第二选择界面,在该第二选择界面选择至少一个边框中的一个后,获取该边框的边框参数;其中,该边框参数包括边框所包括的元素和边框的颜色等;When the user triggers a second selection interface including at least one border on the instant video interface, after selecting one of the at least one border in the second selection interface, acquiring a border parameter of the border; wherein the border parameter includes an element included in the border And the color of the border, etc.;
当用户在即时视频界面触发包括至少一个特效的第三选择界面,在该第三 选择界面选择至少一个特效中的一个后,获取该特效的特效参数,该特效包括多个特效元素对应的动画特效,该特效参数包括该特效所包括的多个特效元素、与所有特效元素对应的特效动画以及该动画的显示时间等;When the user triggers a third selection interface including at least one special effect on the instant video interface, in the third The selection interface selects one of the at least one special effects, and obtains the special effect parameter of the special effect, the special effect includes an animation effect corresponding to the plurality of special effect elements, the special effect parameter includes a plurality of special effect elements included in the special effect, and corresponding to all the special effect elements. The effect animation and the display time of the animation;
在实际应用中,上述用户触发选择指令的过程中,步骤当用户在即时视频界面触发包括至少一个预设形状的第一选择界面,在该第一选择界面选择至少一个预设形状中的一个后,获取该预设形状之后的各个步骤的执行顺序只是示例性的,用户可以在选择至少一个预设形状中的一个后,在即时视频界面拉伸该预设形状,再在即时视频界面拖动该预设形状,之后再在即时视频界面触发包括至少一个边框的第二选择界面以及在用户在即时视频界面触发包括至少一个特效的第三选择界面,还可以按照其他顺序,本发明实施例对具体的顺序不加以限定。In a practical application, in the process of triggering the selection instruction by the user, the step is: when the user triggers the first selection interface including the at least one preset shape on the instant video interface, after selecting one of the at least one preset shape in the first selection interface The execution order of each step after the preset shape is obtained is merely exemplary. The user can stretch the preset shape in the instant video interface after selecting one of the at least one preset shape, and then dragging on the instant video interface. The preset shape, and then triggering a second selection interface including at least one border on the instant video interface and triggering a third selection interface including at least one special effect on the instant video interface, and may also be in other sequences, in accordance with an embodiment of the present invention The specific order is not limited.
为了使本领域技术人员更进一步了解本发明实施例的方法,下面将结合附图对本发明实施例的方法作更进一步的说明,假设即时视频界面参照图4中的a所示,用户在该即时视频界面触发包括至少一个预设形状的第一选择界面后的界面可以参照图4中的b所示;用户在选定预设形状之后,在即时视频界面拉伸该预设形状的界面可以参照图4中的c所示;用户在选定预设形状之后,在即时视频界面拖动该预设形状的界面可以参照图4中的d所示;用户在选定预设形状之后,在即时视频界面触发包括至少一个边框的第二选择界面后的界面可以参照图4中的e所示;用户在选定预设形状之后,在即时视频界面触发包括至少一个特效的第三选择界面后的界面可以参照图4中的f所示。假设用户的操作顺序为:触发第一选择界面,拉伸预设形状,拖动预设形状,触发第二选择界面,触发第三选择界面,对应的,界面的显示顺序为:a,b,c,d,e,f,可以参照图5所示;其中,上述用户的操作顺序只是示例性的,在实际应用中,用户的操作顺序还可以为其他顺序,如:触发第一选择界面,拖动预设形状拉,伸预设形状,触发第二选择界面,触发第三选择界面等,还可以包括其他操作顺序,本发明实施例对具体的操作顺序不加以限定。 In order to make the method of the embodiment of the present invention more familiar to those skilled in the art, the method of the embodiment of the present invention will be further described below with reference to the accompanying drawings. It is assumed that the instant video interface is as shown in a of FIG. The interface of the video interface triggering the first selection interface including at least one preset shape may be referred to b in FIG. 4; after the user selects the preset shape, the interface for stretching the preset shape in the instant video interface may refer to The c is shown in FIG. 4; after the user selects the preset shape, the interface for dragging the preset shape on the instant video interface can be referred to d in FIG. 4; after the user selects the preset shape, the instant is The interface of the video interface triggering the second selection interface including at least one border may be referred to e in FIG. 4; after the user selects the preset shape, after the instant video interface triggers the third selection interface including at least one special effect, The interface can be referred to as f in FIG. Assume that the operation sequence of the user is: triggering the first selection interface, stretching the preset shape, dragging the preset shape, triggering the second selection interface, and triggering the third selection interface, correspondingly, the display order of the interface is: a, b, For example, the operation sequence of the user is only exemplary. In an actual application, the sequence of operations of the user may be other sequences, such as triggering the first selection interface. Dragging the preset shape, extending the preset shape, triggering the second selection interface, triggering the third selection interface, etc., may also include other operation sequences, and the specific operation sequence is not limited in the embodiment of the present invention.
在即时视频交互的场景下,当用户对即时视频中的某一区域的关注度大于其他区域;或者,当用户对某一区域的清晰度以及细节保留量的要求大于其他区域;或者,当用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域时,通过获取用户触发的选择指令,根据该选择指令确定用户所选择的预设形状确定用户所选择的区域,不仅满足了即时视频过程中用户希望对所选择的区域的清晰度以及细节保留量大于其他区域的需求,更进一步的增加了用户选择该区域的方式,增加了用户在即时视频交互过程中的互动方式,进一步满足了用户的多样化需求,提高了用户体验。另外,由于选择指令包括预设形状的大小参数、预设形状的位置参数、预设形状的边框参数以及预设形状的特效参数中的至少一个,所以增加了即时视频的显示形式,进一步满足了用户的多样化需求,提高了用户体验。In the scenario of instant video interaction, when the user pays more attention to an area in the instant video than other areas; or when the user has greater requirements for the definition of the area and the amount of detail retention than other areas; or, when the user When other participants of the instant video interaction want to migrate the attention degree to the area specified by the user, by obtaining the user-triggered selection instruction, determining the preset shape selected by the user according to the selection instruction determines the area selected by the user, which not only satisfies In the process of real-time video, the user wants to have more clarity and detail retention of the selected area than other areas, further increasing the way the user selects the area, and increasing the interaction mode of the user in the process of instant video interaction, further Meet the diverse needs of users and improve the user experience. In addition, since the selection instruction includes at least one of a size parameter of the preset shape, a position parameter of the preset shape, a frame parameter of the preset shape, and a special effect parameter of the preset shape, the display form of the instant video is increased, and the content is further satisfied. The diverse needs of users have improved the user experience.
302、在当前即时视频帧中确定预设形状所指示的区域。302. Determine an area indicated by the preset shape in the current instant video frame.
具体的,根据坐标参数,在当前即时视频帧中确定预设形状所指示的区域。Specifically, according to the coordinate parameter, the area indicated by the preset shape is determined in the current instant video frame.
该过程可以为:The process can be:
在当前即时视频帧中确定该坐标参数所指示的至少一个点;Determining at least one point indicated by the coordinate parameter in a current instant video frame;
设置该至少一个点为描述预设形状的至少一个点,该描述预设形状的至少一个点包括预设形状的中心。。The at least one point is set to be at least one point describing a preset shape, and the at least one point describing the preset shape includes a center of the preset shape. .
303、判断网络带宽是否大于或者等于第一预设值,若是,且电子设备支持第一传输策略,则执行步骤304;若不是,则判断网络带宽是否小于第一预设值,且大于或者等于第二预设值;若是,且电子设备支持第二传输策略,则执行步骤306;若不是,则判断网络带宽小于第二预设值,且大于或者等于第三预设值;若是,且电子设备支持第三传输策略,则执行步骤309;若不是,且电子设备支持第四传输策略,则执行步骤311。303. Determine whether the network bandwidth is greater than or equal to the first preset value. If yes, and the electronic device supports the first transmission policy, perform step 304; if not, determine whether the network bandwidth is less than the first preset value, and greater than or equal to a second preset value; if yes, and the electronic device supports the second transmission policy, performing step 306; if not, determining that the network bandwidth is less than the second preset value and greater than or equal to the third preset value; if yes, and If the device supports the third transmission policy, step 309 is performed; if not, and the electronic device supports the fourth transmission policy, step 311 is performed.
具体的,判断网络带宽与第一预设值、第二预设值和第三预设值之间的数值关系,本发明实施例对具体的判断方式不加以限定。Specifically, determining a numerical relationship between the network bandwidth and the first preset value, the second preset value, and the third preset value, the specific manner of determining the specific manner in the embodiment of the present invention is not limited.
若网络带宽大于或者等于第一预设值,则判定网络带宽满足第一预设条件; If the network bandwidth is greater than or equal to the first preset value, determining that the network bandwidth meets the first preset condition;
若网络带宽小于第一预设值,且大于或者等于第二预设值,则判定网络带宽满足第二预设条件;If the network bandwidth is less than the first preset value and greater than or equal to the second preset value, determining that the network bandwidth meets the second preset condition;
若网络带宽小于第二预设值,且大于或者等于第三预设值,则判定网络带宽满足第三预设条件;If the network bandwidth is less than the second preset value and greater than or equal to the third preset value, determining that the network bandwidth meets the third preset condition;
若网络带宽小于第三预设条件,则判定网络带宽满足第四预设条件。If the network bandwidth is less than the third preset condition, determining that the network bandwidth meets the fourth preset condition.
判断网络带宽与第一预设值、第二预设值和第三预设值之间的数值关系的过程可以为:The process of determining the numerical relationship between the network bandwidth and the first preset value, the second preset value, and the third preset value may be:
判断网络带宽是否大于或者等于第一预设值,若是,则判定网络带宽满足第一预设条件,并执行步骤304;若不是,则判断网络带宽是否大于或者等于第二预设值,若是,则判定网络带宽满足第二预设条件,并执行步骤306;若不是,则判断网络带宽是否大于或者等于第三预设值,若是,则判定网络带宽满足第三预设条件,并执行步骤309;若不是,则判定网络带宽满足第四预设条件,并执行步骤311。Determining whether the network bandwidth is greater than or equal to the first preset value, and if yes, determining that the network bandwidth meets the first preset condition, and performing step 304; if not, determining whether the network bandwidth is greater than or equal to the second preset value, and if so, Then, it is determined that the network bandwidth meets the second preset condition, and step 306 is performed; if not, it is determined whether the network bandwidth is greater than or equal to the third preset value, and if yes, it is determined that the network bandwidth meets the third preset condition, and step 309 is performed. If not, it is determined that the network bandwidth meets the fourth preset condition, and step 311 is performed.
其中,在实际应用中,第一预设值可以为100kb/s,第二预设值可以为50kb/s,第三预设值可以为10kb/s。The actual preset value may be 100 kb/s, the second preset value may be 50 kb/s, and the third preset value may be 10 kb/s.
可选的,由于网络传输时网络带宽的不稳定性,所以,可以判断当前时刻之前的预设时间段内网络带宽的平均值是否满足第一预设条件、第二预设条件、第三预设条件和第四预设条件中的任意一个。Optionally, because the network bandwidth is unstable during network transmission, it may be determined whether the average value of the network bandwidth in the preset time period before the current time meets the first preset condition, the second preset condition, and the third pre-predetermined Set any of the conditions and the fourth preset condition.
其中,在实际应用中,预设时间段可以为0.2秒。Among them, in practical applications, the preset time period may be 0.2 seconds.
通过判断当前时刻之间的预设时间段内网络带宽的平均值是否满足预设条件,消除了网络传输时网络带宽的不稳定性,保证了即时视频编码的可靠性,提高了用户体验。By determining whether the average value of the network bandwidth in the preset time period meets the preset condition, the network bandwidth instability during network transmission is eliminated, the reliability of the instant video coding is ensured, and the user experience is improved.
需要说明的是,若网络带宽大于或者等于第一预设值,且电子设备不支持第一传输策略,则通过常规的传输方式传输即时视频帧。It should be noted that if the network bandwidth is greater than or equal to the first preset value, and the electronic device does not support the first transmission policy, the instant video frame is transmitted through the conventional transmission mode.
若网络带宽小于第一预设值,大于或者等于第二预设值,且电子设备不支持第二传输策略,则通过常规的传输方式传输即时视频帧。 If the network bandwidth is less than the first preset value, greater than or equal to the second preset value, and the electronic device does not support the second transmission policy, the instant video frame is transmitted by using a conventional transmission manner.
若网络带宽小于第二预设值,大于或者等于第三预设值,且电子设备不支持第三传输策略,则通过常规的传输方式传输即时视频帧。If the network bandwidth is less than the second preset value, greater than or equal to the third preset value, and the electronic device does not support the third transmission policy, the instant video frame is transmitted through the conventional transmission mode.
若网络带宽小于第三预设值,且电子设备不支持第四传输策略,则通过常规的传输方式传输即时视频帧。If the network bandwidth is less than the third preset value, and the electronic device does not support the fourth transmission policy, the instant video frame is transmitted through the conventional transmission mode.
由于通过判断网络带宽是否满足预设条件,所以在判定网络带宽低时,对即时视频进行处理,不仅可以提高网络带宽的利用率,节省网络资源,提高即时视频的传输效率,还可以在网络带宽低时,满足用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,进一步提高了用户体验。By judging whether the network bandwidth meets the preset condition, when the network bandwidth is determined to be low, processing the instant video can not only improve the utilization of the network bandwidth, save network resources, improve the transmission efficiency of the instant video, but also can be used in the network bandwidth. When low, the user's attention to a certain area in the instant video is greater than other areas, the user's definition of a certain area and the amount of detail retention is greater than other areas and other participants who want the instant video interaction will pay attention. The diversified needs of migrating to the area specified by the user further enhances the user experience.
304、根据与当前即时视频帧对应的重要性矩阵,对当前即时视频进行处理,获取处理后的即时视频帧;304. Process the current instant video according to an importance matrix corresponding to the current instant video frame, and obtain the processed instant video frame.
具体的,获取所述预设形状所指示的区域的重要性矩阵。该获取过程可以是:设置当前即时视频帧内所有像素点的重要性度量值;设置预设形状所指示的区域内所有像素点的重要性度量值为第一数值;设置当前即时视频中非预设形状所指示的区域内的所有像素点的重要性度量值为第二数值;其中,设置第一数值大于第二数值,且该重要性度量值的取值在0和1之间。Specifically, an importance matrix of the area indicated by the preset shape is obtained. The obtaining process may be: setting an importance metric value of all pixels in the current instant video frame; setting an importance metric value of all pixels in the area indicated by the preset shape to a first value; setting a current instant video in a non-pre The importance measure value of all the pixels in the area indicated by the shape is a second value; wherein the first value is set to be greater than the second value, and the value of the importance measure is between 0 and 1.
对当前即时视频帧进行低通滤波,本发明实施例对具体的滤波方式不加以限定。The current filtering mode is low-pass filtered, and the specific filtering manner is not limited in the embodiment of the present invention.
根据滤波后的当前即时视频帧、当前即时视频帧以及重要性矩阵,获取处理后的即时视频帧。The processed instant video frame is obtained according to the filtered current instant video frame, the current instant video frame, and the importance matrix.
可以通过预设的生成算法,在重要性矩阵的基础上,对当前即时视频帧和滤波后的当前即时视频帧进行融合,获取处理后的即时视频帧,该算法可以为:The current instant video frame and the filtered current instant video frame may be merged on the basis of the importance matrix by using a preset generation algorithm to obtain the processed instant video frame. The algorithm may be:
Figure PCTCN2016086140-appb-000001
Figure PCTCN2016086140-appb-000001
其中,out为处理后的即时视频帧,src为当前即时视频帧,low为滤波后的当前即时视频帧,
Figure PCTCN2016086140-appb-000002
为重要性矩阵。
Where out is the processed instant video frame, src is the current instant video frame, and low is the filtered current instant video frame.
Figure PCTCN2016086140-appb-000002
For the importance matrix.
通过对当前即时视频进行低通滤波,消除该当前即时视频中的高频信号,减少当前即时视频所占用的带宽资源,从而可以提高即时视频的传输效率,进一步满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验;另外,由于重要性矩阵指示了即时视频帧内的预设形状所指示的区域和非预设形状所指示的区域,所以,通过重要性矩阵,对重要性矩阵所指示的预设形状所指示的区域进行保留,利用低通滤波后的即时视频帧内的非预设形状所指示的区域替换即时视频帧内的非预设形状所指示的区域,使得输出的处理后的即时视频帧中预设形状所指示的区域的图像为不失真的原始图像,非预设形状所指示的区域的图像为不包括高频信号的图像,从而使得在传输该处理后的即时视频帧时,减少了传输时所需的带宽资源,提高了即时视频的传输效率,进一步满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验。By performing low-pass filtering on the current instant video, the high-frequency signal in the current instant video is eliminated, and the bandwidth resource occupied by the current instant video is reduced, thereby improving the transmission efficiency of the instant video, and further satisfying the user's One area's attention is greater than other areas, users' requirements for a certain area's clarity and detail retention are greater than other areas and other users who want instant video interactions to divert attention to the diverse needs of the user's designated area. , the user experience is improved; in addition, since the importance matrix indicates the area indicated by the preset shape in the instant video frame and the area indicated by the non-preset shape, the importance matrix indicates the importance matrix The area indicated by the preset shape is reserved, and the area indicated by the non-preset shape in the instant video frame is replaced by the area indicated by the non-preset shape in the low-pass filtered instant video frame, so that the processed output is processed. The image of the area indicated by the preset shape in the instant video frame is an undistorted original image The image of the area indicated by the non-preset shape is an image that does not include a high-frequency signal, so that when the processed instant video frame is transmitted, the bandwidth resource required for transmission is reduced, and the transmission efficiency of the instant video is improved. Further satisfying the user's attention to an area in the instant video is greater than other areas, the user's requirement for the clarity and detail retention of a certain area is greater than that of other areas, and other participants who want the instant video interaction to migrate attention. The diverse needs of the area specified by the user enhance the user experience.
305、传输处理后的即时视频帧,结束。305. Transmit the processed instant video frame and end.
具体的,将该处理后的即时视频帧输入编码器,由编码器对该处理后的即时视频帧编码,生成码流数据;Specifically, the processed instant video frame is input to the encoder, and the processed instant video frame is encoded by the encoder to generate code stream data;
传输该码流数据,本发明实施例对具体的传输方式不加以限定。The specific transmission mode is not limited in the embodiment of the present invention.
值得注意的是,步骤304至步骤305是实现根据第一传输策略,传输包括预设形状所指示的区域的当前即时视频帧的过程,除了上述步骤所述的方式之外,还可以通过其他方式实现该过程,本发明实施例对具体的方式不加以限定。It should be noted that, in step 304 to step 305, a process of transmitting a current instant video frame including an area indicated by a preset shape according to the first transmission policy may be implemented, and other manners may be used in addition to the manner described in the foregoing steps. The specific manner of the embodiment of the present invention is not limited.
由于本发明实施例是根据重要性矩阵对当前即时视频帧进行处理,而重要性矩阵指示了当前即时视频内每一个像素的重要性度量值,从而对每一个像素点进行处理,提高了处理后的即时视频的画面质量,进一步满足了用户对即时 视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验。The embodiment of the present invention processes the current instant video frame according to the importance matrix, and the importance matrix indicates the importance metric value of each pixel in the current instant video, thereby processing each pixel point, thereby improving the processing. The quality of the live video, further satisfying the user's instant The interest in one area of the video is greater than that of other areas, the user's definition of the clarity of the area and the amount of detail retention is greater than other areas and other participants who want the instant video interaction to migrate the attention to the area specified by the user. The diverse needs have improved the user experience.
306、将至少包括预设形状所指示的区域的即时视频帧划分为至少一个宏块,并设置组成至少一个宏块所对应的量化参数。306. Divide an instant video frame including at least an area indicated by the preset shape into at least one macro block, and set a quantization parameter corresponding to the at least one macro block.
具体的,可以按照预设的划分规则将处理后的当前即时视频帧划分为至少一个宏块,本发明实施例对具体的划分规则不加以限定。Specifically, the processed current instant video frame may be divided into at least one macroblock according to a preset division rule, and the specific division rule is not limited in the embodiment of the present invention.
设置包括全部或者部分预设形状所指示的区域的宏块的量化参数为第一数值;由于在实际应用中,量化参数的取值范围为0至51之间,所以该第一数值可以为0至25之间用户或者系统中的任意一个所定义的任意数值。The quantization parameter of the macroblock including the area indicated by all or part of the preset shape is set to be the first value; since the value of the quantization parameter ranges from 0 to 51 in practical applications, the first value may be 0. Any value defined by any one of the user or system between 25.
设置不包括全部或者部分预设形状所指示的区域的宏块的量化参数为第二数值;该第二数值可以为25至51之间用户或者系统中的任意一个所定义的任意数值。The quantization parameter of the macroblock that does not include the area indicated by all or part of the preset shape is a second value; the second value may be any value defined by any one of the user or the system between 25 and 51.
由于在即时视频交互的场景下,交互双方对于即时视频中如人脸所在区域等预设形状所指示的区域的关注度和画面质量要求大于其他区域,所以,可以通过设置该包括全部或者部分预设形状所指示的区域的宏块的量化参数为第一数值,在编码过程中,较多的保留该预设形状所指示的区域的细节,使得在即时视频过程中能够保证预设形状所指示的区域的画面质量,满足用户对预设形状所指示的区域的画面细节的要求,进一步满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验。另外,由于在即时视频交互的场景下,交互双方对于即时视频中如人脸所在区域等预设形状所指示的区域的关注度和画面质量要求大于其他区域,所以,可以设置不包括全部或者部分预设形状所指示的区域的宏块的量化参数为第二数值,在编码过程中,对该不包括全部或者部分预设形状所指示的区域的宏块的细节不进行保留,减少不包括全部 或者部分预设形状所指示的区域的宏块在传输时所占用的带宽,使得相比于传统的即时视频传输方法,该方法所需的带宽资源更少,从而能够节省带宽资源,提高即时视频传输的效率,进一步满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验。另外,通过设置包括全部或者部分预设形状所指示的区域的宏块的量化参数为第一数值,设置不包括全部或者部分预设形状所指示的区域的宏块的量化参数为第二数值,使得在编码过程中,保留了预设形状所指示的区域的细节,对非预设形状所指示的区域的细节不进行保留,使得在对预设形状所指示的区域进行不失真传输的基础上,进一步减少了非预设形状所指示的区域在传输时所占用的带宽,使得相比于传统的即时视频传输方法,该方法不仅能够保证预设形状所指示的区域的画面质量,而且所需的带宽资源更少,从而能够进一步节省带宽资源,提高即时视频传输的效率,进一步满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验。In the scenario of real-time video interaction, both the interaction parties and the picture quality requirements for the area indicated by the preset shape such as the area where the face is located in the live video are larger than other areas, so that all or part of the The quantization parameter of the macroblock of the area indicated by the shape is a first value. During the encoding process, more details of the area indicated by the preset shape are retained, so that the preset shape can be guaranteed during the instant video process. The picture quality of the area satisfies the user's requirements for the picture details of the area indicated by the preset shape, further satisfies the user's attention to an area in the instant video is greater than other areas, the user's definition of a certain area, and The requirement for detail retention is greater than other regions and other participants who want instant video interactions to migrate attention to the diverse needs of the user-specified region, improving the user experience. In addition, in the scenario of real-time video interaction, the interaction party and the picture quality requirement for the area indicated by the preset shape such as the area where the face is located in the instant video are larger than other areas, so it may be set not to include all or part of The quantization parameter of the macroblock of the area indicated by the preset shape is a second value. During the encoding process, the details of the macroblock not including the area indicated by all or part of the preset shape are not reserved, and the reduction does not include all Or the bandwidth occupied by the macroblock of the area indicated by the partial preset shape during transmission, so that the method requires less bandwidth resources than the traditional instant video transmission method, thereby saving bandwidth resources and improving real-time video. The efficiency of transmission further satisfies the user's attention to a certain area in the instant video is greater than other areas, the user's requirements for the definition of a certain area and the amount of detail retention are greater than other areas and other participants who want the instant video interaction. The user experience is enhanced by migrating attention to the diverse needs of the area specified by the user. In addition, by setting a quantization parameter of a macroblock including an area indicated by all or part of the preset shape as a first value, setting a quantization parameter of a macroblock not including an area indicated by all or part of the preset shape to a second value, In the encoding process, the details of the area indicated by the preset shape are retained, and the details of the area indicated by the non-preset shape are not preserved, so that the undistorted transmission is performed on the area indicated by the preset shape. Further reducing the bandwidth occupied by the area indicated by the non-preset shape during transmission, so that the method can not only ensure the picture quality of the area indicated by the preset shape but also requires the traditional instant video transmission method. The bandwidth resources are less, which can further save bandwidth resources and improve the efficiency of instant video transmission, further satisfying the user's attention to an area in the instant video is greater than other areas, the user's definition of a certain area and details retention The amount of requirements is greater than other areas and other participants who want instant video interaction will pay attention Migrate to the diverse needs of the region specified by the user, improve the user experience.
307、根据量化参数,对至少一个宏块进行编码,生成编码后的即时视频帧。307. Encode at least one macroblock according to the quantization parameter to generate an encoded instant video frame.
具体的,根据所述第一数值和所述第二数值,对所述至少一个宏块进行编码,生成编码后的当前即时视频帧。Specifically, the at least one macroblock is encoded according to the first value and the second value, to generate an encoded current instant video frame.
根据第一数值和第二数值对该处理后的即时视频帧进行编码。The processed instant video frame is encoded according to the first value and the second value.
本发明实施例对具体的编码方式不加以限定。The specific coding manner is not limited in the embodiment of the present invention.
308、传输编码后的即时视频帧,结束。308. Transmit the encoded instant video frame and end.
具体的,本发明实施例对具体的传输方式不加以限定。Specifically, the specific transmission mode is not limited in the embodiment of the present invention.
值得注意的是,步骤306至步骤308是实现根据第二传输策略,传输包括预设形状所指示的区域的当前即时视频帧的过程,除了上述步骤所述的方式之外,还可以通过其他方式实现该过程,本发明实施例对具体的方式不加以限定。 It should be noted that, in step 306 to step 308, a process of transmitting a current instant video frame including an area indicated by a preset shape according to the second transmission policy is implemented, and other methods may be used in addition to the manner described in the foregoing steps. The specific manner of the embodiment of the present invention is not limited.
由于根据用于指示宏块在编码过程中的精细程度的量化参数,对至少一个宏块进行编码,使得在编码过程中,保留了预设形状所指示的区域的细节,非预设形状所指示的区域的细节不加以保留,不仅将更多的宽带资源用于预设形状所指示的区域的传输,而且保证了即时视频中预设形状所指示的区域的画面质量,从而保证了预设形状所指示的区域的传输,提高了即时视频的传输效率,进一步满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验。Since at least one macroblock is encoded according to a quantization parameter for indicating the degree of fineness of the macroblock in the encoding process, in the encoding process, the details of the area indicated by the preset shape are retained, as indicated by the non-preset shape The details of the area are not preserved, not only the use of more broadband resources for the transmission of the area indicated by the preset shape, but also the picture quality of the area indicated by the preset shape in the instant video, thereby ensuring the preset shape. The transmission of the indicated area improves the transmission efficiency of the instant video, further satisfies the user's attention to an area in the instant video is greater than other areas, the user's definition of a certain area and the amount of detail retention is greater than other The region and the other participants who want the instant video interaction to move the attention to the diverse needs of the user-specified area improve the user experience.
可选的,在实际应用中,在执行步骤306之前,还可以执行步骤304。Optionally, in the actual application, before performing step 306, step 304 may also be performed.
309、获取包括预设形状所指示的区域的当前即时视频帧与参考帧之间的残差数据。309. Acquire residual data between the current instant video frame and the reference frame including the area indicated by the preset shape.
具体的,从当前即时视频帧中获取预设形状所指示的区域的位置参数与姿态参数。Specifically, the location parameter and the posture parameter of the area indicated by the preset shape are obtained from the current instant video frame.
对位置参数与姿态参数进行归一化处理,生成标准位置参数与标准姿态参数。The position parameter and the attitude parameter are normalized to generate a standard position parameter and a standard posture parameter.
根据标准位置参数与标准姿态参数,获取包括预设形状所指示的区域的当前即时视频帧与参考帧之间的残差数据。其中,该参考帧中预设形状所指示的区域的姿态参数为标准姿态参数。Obtaining residual data between the current instant video frame and the reference frame including the area indicated by the preset shape according to the standard position parameter and the standard posture parameter. The posture parameter of the area indicated by the preset shape in the reference frame is a standard posture parameter.
由于当前即时视频帧中预设形状所指示的区域的姿态参数与参考帧中预设形状所指示的区域的姿态参数为标准姿态参数,所以根据标准位置参数与标准姿态参数,获取包括预设形状所指示的区域的当前即时视频帧与参考帧之间的残差数据,相比于根据当前即时视频帧中预设形状所指示的区域的姿态参数位置参数,与参考帧中的位置参数和姿态参数,生成残差数据,减少了即时视频传输过程中数据传输量和处理量,提高了即时视频的传输效率,进一步满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰 度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验。另外,通过获取当前即时视频帧中的预设形状所指示的区域与参考帧中的预设形状所指示的区域之间的残差数据,实现即时视频的传输,相比于传统的即时视频传输方法,该方法进一步减少了即时视频传输过程中数据传输量和处理量,从而提高了即时视频的传输效率,进一步满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验。The posture parameter of the region indicated by the preset shape in the current instant video frame and the posture parameter of the region indicated by the preset shape in the reference frame are standard posture parameters, so that the preset shape is obtained according to the standard position parameter and the standard posture parameter. The residual data between the current instant video frame and the reference frame of the indicated area, compared to the position parameter position parameter of the area indicated by the preset shape in the current instant video frame, and the position parameter and posture in the reference frame The parameters generate residual data, which reduces the amount of data transmission and processing during the instant video transmission, improves the transmission efficiency of the instant video, and further satisfies the user's attention to a certain area in the instant video is greater than other areas and users. Clearness of a certain area The degree of detail and detail retention requirements are greater than other areas and other participants who want instant video interactions to migrate attention to the diverse needs of the user-specified area, improving the user experience. In addition, real-time video transmission is realized by acquiring residual data between the area indicated by the preset shape in the current instant video frame and the area indicated by the preset shape in the reference frame, compared to the conventional instant video transmission. The method further reduces the data transmission amount and the processing amount in the instant video transmission process, thereby improving the transmission efficiency of the instant video, further satisfying the user's attention to an area in the instant video is greater than other areas, and the user is The resolution of a region and the requirement for detail retention are greater than those of other regions and other participants who want the instant video interaction to move the attention to the diverse needs of the user-specified region, improving the user experience.
310、传输残差数据,结束。310. Transmit residual data and end.
具体的,本发明实施例对具体的传输方式不加以限定。Specifically, the specific transmission mode is not limited in the embodiment of the present invention.
值得注意的是,步骤309至步骤310是实现根据第三传输策略,传输包括预设形状所指示的区域的当前即时视频帧的过程,除了上述步骤所述的方式之外,还可以通过其他方式实现该过程,本发明实施例对具体的方式不加以限定。It should be noted that, in step 309 to step 310, a process of transmitting a current instant video frame including an area indicated by a preset shape according to the third transmission policy is implemented, and in addition to the manner described in the foregoing steps, other manners may be adopted. The specific manner of the embodiment of the present invention is not limited.
由于获取并传输包括预设形状所指示的区域的当前即时视频帧与参考帧之间的残差数据,相比于传统的传输全部即时视频帧,该方法节省了网络带宽资源,同时保证了即时视频中预设形状所指示的区域的画面质量,保证了预设形状所指示的区域的传输,从而提高了即时视频的传输效率,进一步满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验。Since the residual data between the current instant video frame and the reference frame including the area indicated by the preset shape is acquired and transmitted, the method saves network bandwidth resources and ensures instantness compared to conventional transmission of all real-time video frames. The picture quality of the area indicated by the preset shape in the video ensures the transmission of the area indicated by the preset shape, thereby improving the transmission efficiency of the instant video, and further satisfying the user's attention to an area in the instant video is greater than Other areas, users' requirements for the definition of a certain area and the amount of detail retention are greater than other areas and other users who want the instant video interaction to migrate the attention to the diverse needs of the user-specified area, improving the user experience.
可选的,在实际应用中,在执行步骤309之前,还可以执行步骤304和步骤306中的至少一个。Optionally, in an actual application, at least one of step 304 and step 306 may also be performed before step 309 is performed.
311、获取用于描述预设形状所指示的区域的特征参数。311. Acquire a feature parameter used to describe an area indicated by the preset shape.
具体的,对预设形状所指示的区域进行三角分割,获取至少一个三角区域。Specifically, the area indicated by the preset shape is triangulated to obtain at least one triangular area.
获取用于描述任意一个三角区域的三个特征点的位置参数和姿态参数。 Obtain positional parameters and attitude parameters for describing three feature points of any one of the triangular regions.
根据三个特征点的位置参数和姿态参数,生成与任意一个三角区域对应的姿态参数和位置参数。According to the position parameter and the attitude parameter of the three feature points, the attitude parameter and the position parameter corresponding to any one of the triangular regions are generated.
根据至少一个三角区域对应的姿态参数和位置参数,生成特征参数。The feature parameter is generated according to the attitude parameter and the position parameter corresponding to the at least one triangular region.
本发明实施例对具体的生成方式不加以限定。The specific generation manner of the embodiment of the present invention is not limited.
由于三角区域的姿态参数和位置参数指示了三角区域当前的位置和姿态,通过调整该特征参数,可以实现对三角区域的驱动,通过该当前即时视频中组成该预设形状所指示的区域的至少一个三角区域的姿态参数和位置参数,调整已经传输的即时视频帧中相同三角区域的姿态参数和位置参数,可以实现将当前即时视频帧中的预设形状所指示的区域迁移至已经传输的即时视频帧,相比于传输当前即时视频帧,节省了网络带宽,提高了即时视频的传输效率,进一步满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验。Since the attitude parameter and the position parameter of the triangular area indicate the current position and posture of the triangular area, the driving of the triangular area can be realized by adjusting the characteristic parameter, and at least the area indicated by the preset shape is formed in the current instant video. The attitude parameter and the position parameter of a triangular area, adjusting the attitude parameter and the position parameter of the same triangular area in the transmitted instant video frame, can realize the migration of the area indicated by the preset shape in the current instant video frame to the already transmitted instant. Compared with the transmission of the current instant video frame, the video frame saves the network bandwidth and improves the transmission efficiency of the instant video, further satisfies the user's attention to an area in the instant video is greater than that of other areas, and the user belongs to a certain area. The clarity and detail retention requirements are greater than other areas and other participants who wish to have instant video interactions migrate the attention to the diverse needs of the user-specified area, improving the user experience.
312、传输特征参数,结束。312. Transfer the feature parameters and end.
具体的,本发明实施例对具体的传输方式不加以限定。Specifically, the specific transmission mode is not limited in the embodiment of the present invention.
值得注意的是,步骤311至步骤312是实现根据第四传输策略,传输包括预设形状所指示的区域的当前即时视频帧的过程,除了上述步骤所述的方式之外,还可以通过其他方式实现该过程,本发明实施例对具体的方式不加以限定。It should be noted that, in step 311 to step 312, a process of transmitting a current instant video frame including an area indicated by a preset shape according to the fourth transmission policy is implemented, and other methods may be used in addition to the manner described in the foregoing steps. The specific manner of the embodiment of the present invention is not limited.
通过只传输用于描述预设形状所指示的区域的特征参数,相比于传输全部即时视频帧数据,节省了带宽资源,从而进一步提高了即时视频的传输效率,进一步满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验。By transmitting only the feature parameters for describing the area indicated by the preset shape, bandwidth resources are saved compared to transmitting all the real-time video frame data, thereby further improving the transmission efficiency of the instant video, and further satisfying the user in the instant video. The interest of a certain area is greater than that of other areas, the user's requirement for the clarity of a certain area and the amount of detail retention is greater than that of other areas and other participants who want the instant video interaction to move the attention to the area specified by the user. Demand has increased the user experience.
可选的,除了上述步骤之外,本发明实施例所提供的方法还可以包括:Optionally, in addition to the foregoing steps, the method provided by the embodiment of the present invention may further include:
将选择指令发送至其他电子设备。 Send selection instructions to other electronic devices.
通过将该选择指令发送至其他电子设备,使得其他电子设备可以显示该选择指令所指示的预设形状,增加了即时视频的交互形式,满足了用户在即时视频过程中的多样化需求,进一步提高了用户体验。另外,通过将该选择指令发送至其他电子设备,相较于将该预设形状的数据发送至其他电子设备,减少了传输时的数据量,节省了网络资源,提高了即时视频的传输效率,进一步提高了用户体验。By sending the selection instruction to other electronic devices, the other electronic devices can display the preset shape indicated by the selection instruction, increase the interactive form of the instant video, and satisfy the diversified needs of the user in the instant video process, and further improve The user experience. In addition, by transmitting the selection instruction to other electronic devices, the data of the preset shape is transmitted to other electronic devices, thereby reducing the amount of data during transmission, saving network resources, and improving the transmission efficiency of the instant video. Further improve the user experience.
为了进一步说明本发明实施例提供的方法所达到的效果,下面将结合附图对本发明实施例所提供的方法作出进一步的说明,假设用户所选定的预设形状为图6所示的形状,对图7中的a执行本发明实施例的方法后,生成的界面可以参照图7中的b所示,在图7中,第二显示效果所指示的清晰度以及细节保留量大于或者等于第一显示效果所指示的清晰度以及细节保留量,第三显示效果所指示的清晰度以及细节保留量小于第一显示效果所指示的清晰度以及细节保留量。In order to further illustrate the effect achieved by the method provided by the embodiment of the present invention, the method provided by the embodiment of the present invention will be further described below with reference to the accompanying drawings, assuming that the preset shape selected by the user is the shape shown in FIG. After performing the method of the embodiment of the present invention on the a in FIG. 7, the generated interface may be referred to b in FIG. 7. In FIG. 7, the resolution and the detail retention indicated by the second display effect are greater than or equal to the first The sharpness indicated by the display effect and the amount of detail retention, the sharpness indicated by the third display effect and the amount of detail retention are smaller than the sharpness indicated by the first display effect and the amount of detail retention.
在即时视频交互的场景下,本发明实施例所提供的方法满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,增加了即时视频的交互性和趣味性,进一步提高了用户体验。In the scenario of the instant video interaction, the method provided by the embodiment of the present invention satisfies the requirement that the user pays more attention to an area in the instant video than other areas, and the user's requirement for the clarity and detail retention of the area is greater than other The region and other participants who want the instant video interaction migrate the attention to the diverse needs of the user-specified area, increasing the interactivity and fun of the instant video, further enhancing the user experience.
本发明实施例提供了一种即时视频的传输方法,通过判断网络带宽是否满足第一预设条件、第二预设条件、第三预设条件和第四预设条件中的任意一个,从而可以根据不同的网络带宽对包括预设形状所指示的区域的当前即时视频帧采取不同的传输策略,相比于传统的即时视频的传输方法,不仅满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验,还提高了网络带宽的利用率,节省网络资源,从而提高了即时视频的传输效率,提高了用户 体验;另外,由于本发明实施例的方法是在从当前即时视频帧中获取预设形状所指示的区域后,对当前即时视频帧进行处理,使得相比于传统的即时视频编码方法,在带宽资源不变的情况下,将更多的宽带资源用于预设形状所指示的区域的传输,从而保证了预设形状所指示的区域的传输,进一步满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验。An embodiment of the present invention provides a method for transmitting an instant video, by determining whether the network bandwidth meets any one of a first preset condition, a second preset condition, a third preset condition, and a fourth preset condition, thereby According to different network bandwidths, different transmission strategies are adopted for the current instant video frames including the area indicated by the preset shape. Compared with the traditional instant video transmission method, the user not only satisfies the user's attention to a certain area in the instant video. The degree is greater than other areas, the user's requirements for the definition of a certain area and the amount of detail retention are greater than other areas and other users who want the instant video interaction to migrate the attention to the diverse needs of the user-specified area, improve the user Experience, also improve the utilization of network bandwidth, save network resources, thereby improving the efficiency of real-time video transmission, and improve users In addition, the method of the embodiment of the present invention processes the current instant video frame after obtaining the area indicated by the preset shape from the current instant video frame, so that the bandwidth is compared to the traditional instant video encoding method. When the resources are unchanged, more broadband resources are used for the transmission of the area indicated by the preset shape, thereby ensuring the transmission of the area indicated by the preset shape, and further satisfying the user to an area in the instant video. The attention is greater than other areas, the user's requirements for the clarity and detail retention of a certain area are greater than other areas and other participants who want the instant video interaction to move the attention to the diverse needs of the user-specified area, improve The user experience.
实施例四为本发明实施例提供的一种即时视频的显示方法,参照图8所示,在本发明实施例中,预设形状的位置参数包括坐标参数,该方法具体包括:Embodiment 4 is a method for displaying an instant video according to an embodiment of the present invention. Referring to FIG. 8 , in the embodiment of the present invention, a position parameter of a preset shape includes a coordinate parameter, and the method specifically includes:
801、获取电子设备根据第一传输策略、第二传输策略、第三传输策略以及第四传输策略中的任意一个传输的当前即时视频帧。801. Acquire a current instant video frame that is transmitted by the electronic device according to any one of the first transmission policy, the second transmission policy, the third transmission policy, and the fourth transmission policy.
具体的,电子设备可以接收其他电子设备发送的处理后的当前即时视频帧,也可以在本电子设备接收用户触发的用于指示用户所选择的预设形状的选择指令,且网络带宽满足预设条件后,根据预设形状所指示的区域的重要性矩阵,对至少包括区域的当前即时视频帧进行处理,获取处理后的当前即时视频帧。Specifically, the electronic device may receive the processed current instant video frame sent by the other electronic device, or may receive a selection instruction triggered by the user to indicate the preset shape selected by the user, and the network bandwidth meets the preset. After the condition, the current instant video frame including at least the area is processed according to the importance matrix of the area indicated by the preset shape, and the processed current instant video frame is obtained.
802、获取用户触发的选择指令,选择指令用于指示用户所选择的预设形状。802. Acquire a user-triggered selection instruction, and the selection instruction is used to indicate a preset shape selected by the user.
具体的,该选择指令包括预设形状的位置参数,该位置参数包括坐标参数。Specifically, the selection instruction includes a position parameter of a preset shape, and the position parameter includes a coordinate parameter.
电子设备可以接收其他电子设备发送的选择指令,也可以在本电子设备接收用户触发的用于指示用户所选择的预设形状的选择指令,且网络带宽满足预设条件后,根据预设形状所指示的区域的重要性矩阵,对至少包括区域的当前即时视频帧进行处理,获取处理后的当前即时视频帧后,获取该选择指令。The electronic device may receive a selection instruction sent by another electronic device, or may receive a selection instruction triggered by the user to indicate a preset shape selected by the user, and the network bandwidth meets the preset condition, according to the preset shape. The importance matrix of the indicated area, processing the current instant video frame including at least the area, and acquiring the processed current instant video frame, and acquiring the selection instruction.
803、根据选择指令以及电子设备所支持的传输策略,显示当前即时视频帧。803. Display a current instant video frame according to the selection instruction and a transmission policy supported by the electronic device.
具体的,显示该选择指令所指示的区域;Specifically, the area indicated by the selection instruction is displayed;
根据坐标参数,显示处理后的当前即时视频帧。The processed current instant video frame is displayed according to the coordinate parameter.
本发明实施例对具体的显示方式不加以限定。The specific display manner is not limited in the embodiment of the present invention.
其中,若该电子设备不支持获取的当前即时视频帧所对应的传输策略,则 向发送该即时视频帧的电子设备或者服务器发送提示信息,以提示该电子设备不支持获取的当前即时视频帧所对应的传输策略,以使服务器或者发送该即时视频帧的电子设备在接收到该提示信息后,向该电子设备发送与该传输策略对应的代码,以便该电子设备配置该代码。Wherein, if the electronic device does not support the transmission strategy corresponding to the acquired current instant video frame, Sending a prompt message to the electronic device or the server that sends the instant video frame to prompt the electronic device does not support the obtained transmission policy corresponding to the current instant video frame, so that the server or the electronic device that sends the instant video frame receives the After prompting the information, a code corresponding to the transmission policy is sent to the electronic device, so that the electronic device configures the code.
由于当前即时视频帧中预设形状所指示的区域的画面质量优于其他区域,从而满足了将本电子设备的用户关注度迁移至即时视频中预设形状所指示的区域,从而满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验。另外,通过显示预设形状,可以进一步实现将本电子设备的用户关注度迁移至即时视频中预设形状所指示的区域,从而满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验。另外,由于选择指令包括预设形状的大小参数、预设形状的位置参数、预设形状的边框参数以及预设形状的特效参数中的至少一个,所以增加了即时视频的显示形式,进一步满足了用户的多样化需求,提高了用户体验。Since the picture quality of the area indicated by the preset shape in the current instant video frame is superior to other areas, the user attention of the electronic device is migrated to the area indicated by the preset shape in the instant video, thereby satisfying the user pair. The interest in one area of the instant video is greater than that of other areas, the user's definition of the clarity of the area and the amount of detail retention is greater than that of other areas, and other participants who want the instant video interaction to migrate the attention to the user-specified The diverse needs of the region have improved the user experience. In addition, by displaying the preset shape, the user attention of the electronic device can be further migrated to the area indicated by the preset shape in the instant video, thereby satisfying the user's attention to a certain area in the instant video is greater than other areas. The user's requirement for the clarity and detail retention of a certain area is greater than that of other areas and other participants who want the instant video interaction to migrate the attention to the diverse needs of the user-specified area, thereby improving the user experience. In addition, since the selection instruction includes at least one of a size parameter of the preset shape, a position parameter of the preset shape, a frame parameter of the preset shape, and a special effect parameter of the preset shape, the display form of the instant video is increased, and the content is further satisfied. The diverse needs of users have improved the user experience.
为了进一步说明本发明实施例提供的方法所达到的效果,下面将结合附图对本发明实施例所提供的方法作出进一步的说明,假设用户所选定的预设形状为图6所示的形状,获取处理后的当前即时视频帧显示的界面可以参照图9中的b所示,图9中的a是获取当前即时视频帧后显示的界面,在图9中,第二显示效果所指示的清晰度以及细节保留量大于或者等于第一显示效果所指示的清晰度以及细节保留量,第三显示效果所指示的清晰度以及细节保留量小于第一显示效果所指示的清晰度以及细节保留量。In order to further illustrate the effect achieved by the method provided by the embodiment of the present invention, the method provided by the embodiment of the present invention will be further described below with reference to the accompanying drawings, assuming that the preset shape selected by the user is the shape shown in FIG. The interface for obtaining the current current video frame display after processing may be referred to b in FIG. 9. A in FIG. 9 is an interface displayed after acquiring the current instant video frame, and in FIG. 9, the second display effect indicates clearness. The degree and the detail retention amount are greater than or equal to the sharpness indicated by the first display effect and the detail retention amount, and the sharpness and the detail retention amount indicated by the third display effect are smaller than the sharpness indicated by the first display effect and the detail retention amount.
本发明实施例提供了一种即时视频的显示方法,通过获取并显示根据第一传输策略、第二传输策略、第三传输策略以及第四传输策略中的任意一个传输 的当前即时视频帧,满足了即时视频过程中用户希望对所选择的区域的清晰度以及细节保留量大于其他区域的需求,进一步提高了用户体验。另外,通过获取并显示用户触发的选择指令,增加了用户选择该区域的方式,增加了用户在即时视频交互过程中的互动方式,进一步满足了用户的多样化需求,提高了用户体验。An embodiment of the present invention provides a method for displaying an instant video by acquiring and displaying any one of the first transmission policy, the second transmission policy, the third transmission policy, and the fourth transmission policy. The current instant video frame satisfies the demand of the user in the process of real-time video, and the content retention of the selected area is larger than that of other areas, thereby further improving the user experience. In addition, by acquiring and displaying the user-triggered selection instruction, the manner in which the user selects the area is increased, and the interaction mode of the user in the instant video interaction process is increased, thereby further satisfying the diversified needs of the user and improving the user experience.
实施例五为本发明实施例提供的一种即时视频的传输方法,参照图10所示,所示,在本发明实施例中,预设形状的位置参数包括描述参数,该描述参数用于描述即时视频帧中用户所选定的预设形状所指示区域内的细节,示例性的,若用户所选定的预设形状所指示区域内至少包括人脸,则该细节可以为用户的眼睛、鼻子、嘴部和眉毛等,该方法具体包括:Embodiment 5 is a method for transmitting an instant video according to an embodiment of the present invention. Referring to FIG. 10, in the embodiment of the present invention, a position parameter of a preset shape includes a description parameter, and the description parameter is used to describe The details in the area indicated by the preset shape selected by the user in the instant video frame. Illustratively, if the area indicated by the preset shape selected by the user includes at least a human face, the detail may be the eyes of the user. The nose, the mouth and the eyebrows, etc., the method specifically includes:
1001、接收用户触发的选择指令,选择指令用于指示用户所选择的预设形状。1001: Receive a user-triggered selection instruction, and the selection instruction is used to indicate a preset shape selected by the user.
具体的,该步骤与步骤301相同,此处再不加以赘述。Specifically, the step is the same as step 301, and details are not described herein again.
在即时视频交互的场景下,当用户对即时视频中的某一区域的关注度大于其他区域;或者,当用户对某一区域的清晰度以及细节保留量的要求大于其他区域;或者,当用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域时,通过获取用户触发的选择指令,根据该选择指令确定用户所选择的预设形状确定用户所选择的区域,不仅满足了即时视频过程中用户希望对所选择的区域的清晰度以及细节保留量大于其他区域的需求,更进一步的增加了用户选择该区域的方式,增加了用户在即时视频交互过程中的互动方式,进一步满足了用户的多样化需求,提高了用户体验。另外,由于选择指令包括预设形状的大小参数、预设形状的位置参数、预设形状的边框参数以及预设形状的特效参数中的至少一个,所以增加了即时视频的显示形式,进一步满足了用户的多样化需求,提高了用户体验。In the scenario of instant video interaction, when the user pays more attention to an area in the instant video than other areas; or when the user has greater requirements for the definition of the area and the amount of detail retention than other areas; or, when the user When other participants of the instant video interaction want to migrate the attention degree to the area specified by the user, by obtaining the user-triggered selection instruction, determining the preset shape selected by the user according to the selection instruction determines the area selected by the user, which not only satisfies In the process of real-time video, the user wants to have more clarity and detail retention of the selected area than other areas, further increasing the way the user selects the area, and increasing the interaction mode of the user in the process of instant video interaction, further Meet the diverse needs of users and improve the user experience. In addition, since the selection instruction includes at least one of a size parameter of the preset shape, a position parameter of the preset shape, a frame parameter of the preset shape, and a special effect parameter of the preset shape, the display form of the instant video is increased, and the content is further satisfied. The diverse needs of users have improved the user experience.
1002、在当前即时视频帧中识别描述参数所指示的细节。1002. Identify details indicated by the description parameters in the current instant video frame.
具体的,获取当前即时视频帧内所有特征点的描述参数; Specifically, obtaining description parameters of all feature points in the current instant video frame;
获取描述参数与选择指令中所包括的描述参数之间的相似度大于或者等于预设阈值的所有描述点;Obtaining all description points whose similarity between the description parameter and the description parameter included in the selection instruction is greater than or equal to a preset threshold;
确定该所有描述点所组成的细节为描述参数所指示的细节。The details of all the description points are determined to be the details indicated by the description parameters.
用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,是对该区域内的细节的关注度大于其他区域、对该区域的细节的清晰度以及细节保留量的要求大于其他区域以及希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的细节,通过在当前即时视频帧中识别描述参数所指示的细节,满足了用户对该区域内的细节的关注度大于其他区域、对该区域的细节的清晰度以及细节保留量的要求大于其他区域以及希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的细节的多样化需求。The user's attention to an area in the instant video is greater than that of other areas, the user's requirement for the clarity and detail retention of a certain area is greater than that of other areas, and other participants who want the instant video interaction to migrate the attention to the user. The diversified needs of the designated area are that the attention to details in the area is greater than that of other areas, the clarity of details of the area and the amount of detail retention are greater than other areas and other participants who wish to have instant video interaction will pay attention The degree of migration to the details of the area specified by the user, by identifying the details indicated by the description parameters in the current instant video frame, satisfies the user's attention to the details in the area is greater than other areas, the clarity of the details of the area And the requirement for detail retention is greater than the diversified needs of other areas and other participants who wish to have instant video interactions to move attention to the details of the area specified by the user.
1003、根据细节,在当前即时视频帧中确定预设形状所指示的区域。1003. Determine, according to the details, an area indicated by the preset shape in the current instant video frame.
具体的,将该组成该细节的描述点的坐标设置为预设形状所指示的区域中的点的坐标。Specifically, the coordinates of the description points constituting the detail are set as the coordinates of the points in the area indicated by the preset shape.
除此之外,还可以通过其他方式,实现根据细节,在当前即时视频帧中确定预设形状所指示的区域,本发明实施例对具体的方式不加以限定。In addition, the area indicated by the preset shape is determined in the current instant video frame according to the details, and the specific manner is not limited in the embodiment of the present invention.
由于预设形状所指示的区域内的细节的位置会发生改变,所以根据细节在当前即时视频帧中确定预设形状所指示的区域,进一步的满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,增加了即时视频的交互性和趣味性,进一步提高了用户体验。Since the position of the detail in the area indicated by the preset shape changes, determining the area indicated by the preset shape in the current instant video frame according to the detail further satisfies the user's attention to a certain area in the instant video. The degree is greater than other areas, the user's requirements for the clarity and detail retention of a certain area are greater than other areas and other participants who want the instant video interaction to migrate the attention to the diverse needs of the user-specified area, increasing the instant The interactivity and fun of the video further enhances the user experience.
值得注意的是,步骤1002至步骤1003是实现在当前即时视频帧中确定预设形状所指示的区域的过程,除了上述步骤所述的方式之外,还可以通过其他方式实现该过程,本发明实施例对具体的方式不加以限定。 It should be noted that the steps 1002 to 1003 are processes for determining an area indicated by the preset shape in the current instant video frame, and the process may be implemented by other means in addition to the manner described in the foregoing steps. The embodiment does not limit the specific manner.
通过在当前即时视频帧中识别描述参数所指示的细节,并根据细节,在当前即时视频帧中确定预设形状所指示的区域,在即时视频帧中预设形状所指示的区域内的细节位置发生变化的情况下,满足了用户对预设形状所指示的区域内的细节的关注度大于其他区域、对预设形状所指示的区域的细节的清晰度以及细节保留量的要求大于其他区域以及希望即时视频交互的其他参与者将关注度迁移至预设形状所指示的区域的细节,从而进一步满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,增加了即时视频的交互性和趣味性,进一步提高了用户体验。By identifying the detail indicated by the description parameter in the current instant video frame, and determining the area indicated by the preset shape in the current instant video frame according to the detail, the detail position in the area indicated by the preset shape in the instant video frame In the case of a change, the user's attention to the details in the area indicated by the preset shape is satisfied is greater than that of the other areas, the definition of the detail indicated by the preset shape, and the detail retention amount is greater than other areas and It is hoped that other participants of the instant video interaction will shift the attention to the details of the area indicated by the preset shape, thereby further satisfying the user's attention to an area in the instant video is greater than that of other areas, and the user is clear about an area. The requirement for degree and detail retention is greater than that of other regions and other participants who want real-time video interaction to migrate attention to the diverse needs of the user-specified region, which increases the interactivity and interest of instant video, further enhancing the user. Experience.
1004、判断网络带宽是否大于或者等于第一预设值,若是,且电子设备支持第一传输策略,则执行步骤1005;若不是,则判断网络带宽是否小于第一预设值,且大于或者等于第二预设值;若是,且电子设备支持第二传输策略,则执行步骤1007;若不是,则判断网络带宽小于第二预设值,且大于或者等于第三预设值;若是,且电子设备支持第三传输策略,则执行步骤1010;若不是,且电子设备支持第四传输策略,则执行步骤1012。1004: Determine whether the network bandwidth is greater than or equal to the first preset value. If yes, and the electronic device supports the first transmission policy, perform step 1005; if not, determine whether the network bandwidth is less than the first preset value, and greater than or equal to a second preset value; if yes, and the electronic device supports the second transmission policy, step 1007 is performed; if not, determining that the network bandwidth is less than the second preset value and greater than or equal to the third preset value; if yes, and If the device supports the third transmission policy, step 1010 is performed; if not, and the electronic device supports the fourth transmission policy, step 1012 is performed.
具体的,该步骤与步骤303相同,此处再不加以赘述。Specifically, the step is the same as step 303, and details are not described herein again.
可选的,由于网络传输时网络带宽的不稳定性,所以,可以判断当前时刻之前的预设时间段内网络带宽的平均值是否满足第一预设条件、第二预设条件、第三预设条件和第四预设条件中的任意一个。Optionally, because the network bandwidth is unstable during network transmission, it may be determined whether the average value of the network bandwidth in the preset time period before the current time meets the first preset condition, the second preset condition, and the third pre-predetermined Set any of the conditions and the fourth preset condition.
其中,在实际应用中,预设时间段可以为0.2秒。Among them, in practical applications, the preset time period may be 0.2 seconds.
通过判断当前时刻之间的预设时间段内网络带宽的平均值是否满足预设条件,消除了网络传输时网络带宽的不稳定性,保证了即时视频编码的可靠性,提高了用户体验。By determining whether the average value of the network bandwidth in the preset time period meets the preset condition, the network bandwidth instability during network transmission is eliminated, the reliability of the instant video coding is ensured, and the user experience is improved.
需要说明的是,若网络带宽大于或者等于第一预设值,且电子设备不支持第一传输策略,则通过常规的传输方式传输即时视频帧。 It should be noted that if the network bandwidth is greater than or equal to the first preset value, and the electronic device does not support the first transmission policy, the instant video frame is transmitted through the conventional transmission mode.
若网络带宽小于第一预设值,大于或者等于第二预设值,且电子设备不支持第二传输策略,则通过常规的传输方式传输即时视频帧。If the network bandwidth is less than the first preset value, greater than or equal to the second preset value, and the electronic device does not support the second transmission policy, the instant video frame is transmitted by using a conventional transmission manner.
若网络带宽小于第二预设值,大于或者等于第三预设值,且电子设备不支持第三传输策略,则通过常规的传输方式传输即时视频帧。If the network bandwidth is less than the second preset value, greater than or equal to the third preset value, and the electronic device does not support the third transmission policy, the instant video frame is transmitted through the conventional transmission mode.
若网络带宽小于第三预设值,且电子设备不支持第四传输策略,则通过常规的传输方式传输即时视频帧。If the network bandwidth is less than the third preset value, and the electronic device does not support the fourth transmission policy, the instant video frame is transmitted through the conventional transmission mode.
由于通过判断网络带宽是否满足预设条件,所以在判定网络带宽低时,对即时视频进行处理,不仅可以提高网络带宽的利用率,节省网络资源,提高即时视频的传输效率,还可以在网络带宽低时,满足用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,进一步提高了用户体验。By judging whether the network bandwidth meets the preset condition, when the network bandwidth is determined to be low, processing the instant video can not only improve the utilization of the network bandwidth, save network resources, improve the transmission efficiency of the instant video, but also can be used in the network bandwidth. When low, the user's attention to a certain area in the instant video is greater than other areas, the user's definition of a certain area and the amount of detail retention is greater than other areas and other participants who want the instant video interaction will pay attention. The diversified needs of migrating to the area specified by the user further enhances the user experience.
1005、根据与当前即时视频帧对应的重要性矩阵,对当前即时视频进行处理,获取处理后的即时视频帧;1005. Process the current instant video according to an importance matrix corresponding to the current instant video frame, and obtain the processed instant video frame.
具体的,该步骤与步骤304相同,此处再不加以赘述。Specifically, the step is the same as step 304, and details are not described herein again.
通过对当前即时视频进行低通滤波,消除该当前即时视频中的高频信号,减少当前即时视频所占用的带宽资源,从而可以提高即时视频的传输效率,进一步满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验;另外,由于重要性矩阵指示了即时视频帧内的预设形状所指示的区域和非预设形状所指示的区域,所以,通过重要性矩阵,对重要性矩阵所指示的预设形状所指示的区域进行保留,利用低通滤波后的即时视频帧内的非预设形状所指示的区域替换即时视频帧内的非预设形状所指示的区域,使得输出的处理后的即时视频帧中预设形状所指示的区域的图像为不失真的原始图像,非预设形状所指示的区域的图像为不包括高频信号的图像,从而使得在传输该处理后的 即时视频帧时,减少了传输时所需的带宽资源,提高了即时视频的传输效率,进一步满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验。By performing low-pass filtering on the current instant video, the high-frequency signal in the current instant video is eliminated, and the bandwidth resource occupied by the current instant video is reduced, thereby improving the transmission efficiency of the instant video, and further satisfying the user's One area's attention is greater than other areas, users' requirements for a certain area's clarity and detail retention are greater than other areas and other users who want instant video interactions to divert attention to the diverse needs of the user's designated area. , the user experience is improved; in addition, since the importance matrix indicates the area indicated by the preset shape in the instant video frame and the area indicated by the non-preset shape, the importance matrix indicates the importance matrix The area indicated by the preset shape is reserved, and the area indicated by the non-preset shape in the instant video frame is replaced by the area indicated by the non-preset shape in the low-pass filtered instant video frame, so that the processed output is processed. The image of the area indicated by the preset shape in the instant video frame is an undistorted original image Non-indicated preset shape image region is an image that does not include a high frequency signal, so that after the transfer process In the case of instant video frames, the bandwidth resources required for transmission are reduced, and the transmission efficiency of the instant video is improved, which further satisfies the user's attention to an area in the instant video is greater than that of other areas, and the user's definition of an area. The user experience is enhanced by the requirement that the amount of detail retention is greater than that of other areas and other participants who want the instant video interaction to move the attention to the area specified by the user.
1006、传输处理后的即时视频帧,结束。1006. The instant video frame after the transmission process ends.
具体的,该步骤与步骤305相同,此处再不加以赘述。Specifically, the step is the same as step 305, and details are not described herein again.
值得注意的是,步骤1005至步骤1006是实现根据第一传输策略,传输包括预设形状所指示的区域的当前即时视频帧的过程,除了上述步骤所述的方式之外,还可以通过其他方式实现该过程,本发明实施例对具体的方式不加以限定。It should be noted that, in step 1005 to step 1006, a process of transmitting a current instant video frame including an area indicated by a preset shape according to the first transmission policy, in addition to the manner described in the foregoing steps, may be performed in other manners. The specific manner of the embodiment of the present invention is not limited.
由于本发明实施例是根据重要性矩阵对当前即时视频帧进行处理,而重要性矩阵指示了当前即时视频内每一个像素的重要性度量值,从而对每一个像素点进行处理,提高了处理后的即时视频的画面质量,进一步满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验。The embodiment of the present invention processes the current instant video frame according to the importance matrix, and the importance matrix indicates the importance metric value of each pixel in the current instant video, thereby processing each pixel point, thereby improving the processing. The picture quality of the instant video further satisfies the user's attention to a certain area in the instant video is greater than other areas, the user's requirement for the clarity and detail retention of a certain area is greater than other areas and the user wants instant video interaction. Other participants have increased the user experience by migrating their attention to the diverse needs of the area specified by the user.
1007、将至少包括预设形状所指示的区域的即时视频帧划分为至少一个宏块,并设置组成至少一个宏块所对应的量化参数。1007. Divide an instant video frame including at least an area indicated by the preset shape into at least one macro block, and set a quantization parameter corresponding to the at least one macro block.
具体的,该步骤与步骤306相同,此处再不加以赘述。Specifically, the step is the same as step 306, and details are not described herein again.
由于在即时视频交互的场景下,交互双方对于即时视频中如人脸所在区域等预设形状所指示的区域的关注度和画面质量要求大于其他区域,所以,可以通过设置该包括全部或者部分预设形状所指示的区域的宏块的量化参数为第一数值,在编码过程中,较多的保留该预设形状所指示的区域的细节,使得在即时视频过程中能够保证预设形状所指示的区域的画面质量,满足用户对预设形状所指示的区域的画面细节的要求,进一步满足了用户对即时视频中的某一区 域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验。另外,由于在即时视频交互的场景下,交互双方对于即时视频中如人脸所在区域等预设形状所指示的区域的关注度和画面质量要求大于其他区域,所以,可以设置不包括全部或者部分预设形状所指示的区域的宏块的量化参数为第二数值,在编码过程中,对该不包括全部或者部分预设形状所指示的区域的宏块的细节不进行保留,减少不包括全部或者部分预设形状所指示的区域的宏块在传输时所占用的带宽,使得相比于传统的即时视频传输方法,该方法所需的带宽资源更少,从而能够节省带宽资源,提高即时视频传输的效率,进一步满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验。另外,通过设置包括全部或者部分预设形状所指示的区域的宏块的量化参数为第一数值,设置不包括全部或者部分预设形状所指示的区域的宏块的量化参数为第二数值,使得在编码过程中,保留了预设形状所指示的区域的细节,对非预设形状所指示的区域的细节不进行保留,使得在对预设形状所指示的区域进行不失真传输的基础上,进一步减少了非预设形状所指示的区域在传输时所占用的带宽,使得相比于传统的即时视频传输方法,该方法不仅能够保证预设形状所指示的区域的画面质量,而且所需的带宽资源更少,从而能够进一步节省带宽资源,提高即时视频传输的效率,进一步满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验。In the scenario of real-time video interaction, both the interaction parties and the picture quality requirements for the area indicated by the preset shape such as the area where the face is located in the live video are larger than other areas, so that all or part of the The quantization parameter of the macroblock of the area indicated by the shape is a first value. During the encoding process, more details of the area indicated by the preset shape are retained, so that the preset shape can be guaranteed during the instant video process. The picture quality of the area satisfies the user's requirements for the picture details of the area indicated by the preset shape, and further satisfies the user's certain area in the instant video. The domain's attention is greater than other regions, the user's requirements for the clarity of a certain region and the amount of detail retention are greater than other regions and other users who want the instant video interaction to migrate the attention to the diverse needs of the user-specified region. Improve the user experience. In addition, in the scenario of real-time video interaction, the interaction party and the picture quality requirement for the area indicated by the preset shape such as the area where the face is located in the instant video are larger than other areas, so it may be set not to include all or part of The quantization parameter of the macroblock of the area indicated by the preset shape is a second value. During the encoding process, the details of the macroblock not including the area indicated by all or part of the preset shape are not reserved, and the reduction does not include all Or the bandwidth occupied by the macroblock of the area indicated by the partial preset shape during transmission, so that the method requires less bandwidth resources than the traditional instant video transmission method, thereby saving bandwidth resources and improving real-time video. The efficiency of transmission further satisfies the user's attention to a certain area in the instant video is greater than other areas, the user's requirements for the definition of a certain area and the amount of detail retention are greater than other areas and other participants who want the instant video interaction. Increased focus on the diversified needs of the user-specified area Experience. In addition, by setting a quantization parameter of a macroblock including an area indicated by all or part of the preset shape as a first value, setting a quantization parameter of a macroblock not including an area indicated by all or part of the preset shape to a second value, In the encoding process, the details of the area indicated by the preset shape are retained, and the details of the area indicated by the non-preset shape are not preserved, so that the undistorted transmission is performed on the area indicated by the preset shape. Further reducing the bandwidth occupied by the area indicated by the non-preset shape during transmission, so that the method can not only ensure the picture quality of the area indicated by the preset shape but also requires the traditional instant video transmission method. The bandwidth resources are less, which can further save bandwidth resources and improve the efficiency of instant video transmission, further satisfying the user's attention to an area in the instant video is greater than other areas, the user's definition of a certain area and details retention The amount of requirements is greater than other areas and other participants who want instant video interaction will pay attention Migrate to the diverse needs of the region specified by the user, improve the user experience.
1008、根据量化参数,对至少一个宏块进行编码,生成编码后的即时视频帧。1008. Encode at least one macroblock according to the quantization parameter to generate an encoded instant video frame.
具体的,该步骤与步骤307相同,此处再不加以赘述。 Specifically, the step is the same as step 307, and details are not described herein again.
1009、传输编码后的即时视频帧,结束。1009. Transmit the encoded instant video frame and end.
具体的,该步骤与步骤308相同,此处再不加以赘述。Specifically, the step is the same as step 308, and details are not described herein again.
值得注意的是,步骤1007至步骤1009是实现根据第二传输策略,传输包括预设形状所指示的区域的当前即时视频帧的过程,除了上述步骤所述的方式之外,还可以通过其他方式实现该过程,本发明实施例对具体的方式不加以限定。It is to be noted that the steps 1007 to 1009 are a process for transmitting a current instant video frame including an area indicated by a preset shape according to the second transmission policy, and may be performed by other means in addition to the manner described in the foregoing steps. The specific manner of the embodiment of the present invention is not limited.
由于根据用于指示宏块在编码过程中的精细程度的量化参数,对至少一个宏块进行编码,使得在编码过程中,保留了预设形状所指示的区域的细节,非预设形状所指示的区域的细节不加以保留,不仅将更多的宽带资源用于预设形状所指示的区域的传输,而且保证了即时视频中预设形状所指示的区域的画面质量,从而保证了预设形状所指示的区域的传输,提高了即时视频的传输效率,进一步满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验。Since at least one macroblock is encoded according to a quantization parameter for indicating the degree of fineness of the macroblock in the encoding process, in the encoding process, the details of the area indicated by the preset shape are retained, as indicated by the non-preset shape The details of the area are not preserved, not only the use of more broadband resources for the transmission of the area indicated by the preset shape, but also the picture quality of the area indicated by the preset shape in the instant video, thereby ensuring the preset shape. The transmission of the indicated area improves the transmission efficiency of the instant video, further satisfies the user's attention to an area in the instant video is greater than other areas, the user's definition of a certain area and the amount of detail retention is greater than other The region and the other participants who want the instant video interaction to move the attention to the diverse needs of the user-specified area improve the user experience.
可选的,在实际应用中,在执行步骤1007之前,还可以执行步骤1005。Optionally, in the actual application, before performing step 1007, step 1005 may also be performed.
1010、获取包括预设形状所指示的区域的当前即时视频帧与参考帧之间的残差数据;1010. Acquire residual data between a current instant video frame and a reference frame including an area indicated by the preset shape.
具体的,该步骤与步骤309相同,此处再不加以赘述。Specifically, the step is the same as step 309, and details are not described herein again.
由于当前即时视频帧中预设形状所指示的区域的姿态参数与参考帧中预设形状所指示的区域的姿态参数为标准姿态参数,所以根据标准位置参数与标准姿态参数,获取包括预设形状所指示的区域的当前即时视频帧与参考帧之间的残差数据,相比于根据当前即时视频帧中预设形状所指示的区域的姿态参数位置参数,与参考帧中的位置参数和姿态参数,生成残差数据,减少了即时视频传输过程中数据传输量和处理量,提高了即时视频的传输效率,进一步满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰 度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验。另外,通过获取当前即时视频帧中的预设形状所指示的区域与参考帧中的预设形状所指示的区域之间的残差数据,实现即时视频的传输,相比于传统的即时视频传输方法,该方法进一步减少了即时视频传输过程中数据传输量和处理量,从而提高了即时视频的传输效率,进一步满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验。The posture parameter of the region indicated by the preset shape in the current instant video frame and the posture parameter of the region indicated by the preset shape in the reference frame are standard posture parameters, so that the preset shape is obtained according to the standard position parameter and the standard posture parameter. The residual data between the current instant video frame and the reference frame of the indicated area, compared to the position parameter position parameter of the area indicated by the preset shape in the current instant video frame, and the position parameter and posture in the reference frame The parameters generate residual data, which reduces the amount of data transmission and processing during the instant video transmission, improves the transmission efficiency of the instant video, and further satisfies the user's attention to a certain area in the instant video is greater than other areas and users. Clearness of a certain area The degree of detail and detail retention requirements are greater than other areas and other participants who want instant video interactions to migrate attention to the diverse needs of the user-specified area, improving the user experience. In addition, real-time video transmission is realized by acquiring residual data between the area indicated by the preset shape in the current instant video frame and the area indicated by the preset shape in the reference frame, compared to the conventional instant video transmission. The method further reduces the data transmission amount and the processing amount in the instant video transmission process, thereby improving the transmission efficiency of the instant video, further satisfying the user's attention to an area in the instant video is greater than other areas, and the user is The resolution of a region and the requirement for detail retention are greater than those of other regions and other participants who want the instant video interaction to move the attention to the diverse needs of the user-specified region, improving the user experience.
1011、传输残差数据,结束。1011. Transmit residual data and end.
具体的,该步骤与步骤310相同,此处再不加以赘述。Specifically, the step is the same as step 310, and details are not described herein again.
值得注意的是,步骤1010至步骤1011是实现根据第三传输策略,传输包括预设形状所指示的区域的当前即时视频帧的过程,除了上述步骤所述的方式之外,还可以通过其他方式实现该过程,本发明实施例对具体的方式不加以限定。It should be noted that, in step 1010 to step 1011, a process of transmitting a current instant video frame including an area indicated by a preset shape according to a third transmission policy is implemented, and other methods than the foregoing steps may be used. The specific manner of the embodiment of the present invention is not limited.
由于获取并传输包括预设形状所指示的区域的当前即时视频帧与参考帧之间的残差数据,相比于传统的传输全部即时视频帧,该方法节省了网络带宽资源,同时保证了即时视频中预设形状所指示的区域的画面质量,保证了预设形状所指示的区域的传输,从而提高了即时视频的传输效率,进一步满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验。Since the residual data between the current instant video frame and the reference frame including the area indicated by the preset shape is acquired and transmitted, the method saves network bandwidth resources and ensures instantness compared to conventional transmission of all real-time video frames. The picture quality of the area indicated by the preset shape in the video ensures the transmission of the area indicated by the preset shape, thereby improving the transmission efficiency of the instant video, and further satisfying the user's attention to an area in the instant video is greater than Other areas, users' requirements for the definition of a certain area and the amount of detail retention are greater than other areas and other users who want the instant video interaction to migrate the attention to the diverse needs of the user-specified area, improving the user experience.
可选的,在实际应用中,在执行步骤1010之前,还可以执行步骤1005和步骤1009中的至少一个。Optionally, in an actual application, at least one of step 1005 and step 1009 may also be performed before step 1010 is performed.
1012、获取用于描述预设形状所指示的区域的特征参数。1012. Obtain a feature parameter used to describe an area indicated by the preset shape.
具体的,该步骤与步骤311相同,此处再不加以赘述。 Specifically, the step is the same as step 311, and details are not described herein again.
由于三角区域的姿态参数和位置参数指示了三角区域当前的位置和姿态,通过调整该特征参数,可以实现对三角区域的驱动,通过该当前即时视频中组成该预设形状所指示的区域的至少一个三角区域的姿态参数和位置参数,调整已经传输的即时视频帧中相同三角区域的姿态参数和位置参数,可以实现将当前即时视频帧中的预设形状所指示的区域迁移至已经传输的即时视频帧,相比于传输当前即时视频帧,节省了网络带宽,提高了即时视频的传输效率,进一步满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验。Since the attitude parameter and the position parameter of the triangular area indicate the current position and posture of the triangular area, the driving of the triangular area can be realized by adjusting the characteristic parameter, and at least the area indicated by the preset shape is formed in the current instant video. The attitude parameter and the position parameter of a triangular area, adjusting the attitude parameter and the position parameter of the same triangular area in the transmitted instant video frame, can realize the migration of the area indicated by the preset shape in the current instant video frame to the already transmitted instant. Compared with the transmission of the current instant video frame, the video frame saves the network bandwidth and improves the transmission efficiency of the instant video, further satisfies the user's attention to an area in the instant video is greater than that of other areas, and the user belongs to a certain area. The clarity and detail retention requirements are greater than other areas and other participants who wish to have instant video interactions migrate the attention to the diverse needs of the user-specified area, improving the user experience.
1013、传输特征参数。1013. Transmission characteristic parameters.
具体的,该步骤312相同,此处再不加以赘述。Specifically, the step 312 is the same and will not be further described herein.
值得注意的是,步骤1012至步骤1013是实现根据第四传输策略,传输包括预设形状所指示的区域的当前即时视频帧的过程,除了上述步骤所述的方式之外,还可以通过其他方式实现该过程,本发明实施例对具体的方式不加以限定。It should be noted that, in step 1012 to step 1013, a process of transmitting a current instant video frame including an area indicated by a preset shape according to the fourth transmission policy is implemented, and other manners may be used in addition to the manner described in the foregoing steps. The specific manner of the embodiment of the present invention is not limited.
通过只传输用于描述预设形状所指示的区域的特征参数,相比于传输全部即时视频帧数据,节省了带宽资源,从而进一步提高了即时视频的传输效率,进一步满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验。By transmitting only the feature parameters for describing the area indicated by the preset shape, bandwidth resources are saved compared to transmitting all the real-time video frame data, thereby further improving the transmission efficiency of the instant video, and further satisfying the user in the instant video. The interest of a certain area is greater than that of other areas, the user's requirement for the clarity of a certain area and the amount of detail retention is greater than that of other areas and other participants who want the instant video interaction to move the attention to the area specified by the user. Demand has increased the user experience.
可选的,除了上述步骤之外,本发明实施例所提供的方法还可以包括:Optionally, in addition to the foregoing steps, the method provided by the embodiment of the present invention may further include:
将选择指令发送至其他电子设备。Send selection instructions to other electronic devices.
通过将该选择指令发送至其他电子设备,使得其他电子设备可以显示该选择指令所指示的预设形状,增加了即时视频的交互形式,满足了用户在即时视频过程中的多样化需求,进一步提高了用户体验。另外,通过将该选择指令发 送至其他电子设备,相较于将该预设形状的数据发送至其他电子设备,减少了传输时的数据量,节省了网络资源,提高了即时视频的传输效率,进一步提高了用户体验。By sending the selection instruction to other electronic devices, the other electronic devices can display the preset shape indicated by the selection instruction, increase the interactive form of the instant video, and satisfy the diversified needs of the user in the instant video process, and further improve The user experience. In addition, by sending the selection command The data is sent to other electronic devices, and the data of the preset shape is transmitted to other electronic devices, thereby reducing the amount of data during transmission, saving network resources, improving the transmission efficiency of the instant video, and further improving the user experience.
为了进一步说明本发明实施例提供的方法所达到的效果,下面将结合附图对本发明实施例所提供的方法作出进一步的说明,假设用户所选定的预设形状为图6所示的形状,对图11中的a执行本发明实施例的方法后,生成的界面可以参照图11中的b所示,若即时视频界面中的用户在画面中的位置发生变化,则界面可以参照图11中的c所示,在图11中,第二显示效果所指示的清晰度以及细节保留量大于或者等于第一显示效果所指示的清晰度以及细节保留量,第三显示效果所指示的清晰度以及细节保留量小于第一显示效果所指示的清晰度以及细节保留量。In order to further illustrate the effect achieved by the method provided by the embodiment of the present invention, the method provided by the embodiment of the present invention will be further described below with reference to the accompanying drawings, assuming that the preset shape selected by the user is the shape shown in FIG. After the method of the embodiment of the present invention is performed on the a in FIG. 11 , the generated interface may be referred to b in FIG. 11 . If the position of the user in the screen changes in the instant video interface, the interface may refer to FIG. 11 . As shown in c, in FIG. 11, the sharpness and detail retention indicated by the second display effect are greater than or equal to the sharpness indicated by the first display effect and the amount of detail retention, and the sharpness indicated by the third display effect and The amount of detail retention is less than the sharpness indicated by the first display effect and the amount of detail retention.
在即时视频交互的场景下,本发明实施例所提供的方法满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,增加了即时视频的交互性和趣味性,进一步提高了用户体验。另外,由于预设形状所指示的区域内的细节的位置会发生改变,所以根据细节在当前即时视频帧中确定预设形状所指示的区域,使得在即时视频帧中预设形状所指示的区域内的细节位置发生变化的情况下,依然可以保证该细节所在区域的画面质量,从而更进一步的满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,增加了即时视频的交互性和趣味性,进一步提高了用户体验。例如,预设形状所指示的区域内包括人脸,通过执行本发明实施例的方法,当人脸位置发生变化时,预设形状所指示的区域的位置也会随着人脸发生变化,从而保证该人脸所在区域的画面质量。In the scenario of the instant video interaction, the method provided by the embodiment of the present invention satisfies the requirement that the user pays more attention to an area in the instant video than other areas, and the user's requirement for the clarity and detail retention of the area is greater than other The region and other participants who want the instant video interaction migrate the attention to the diverse needs of the user-specified area, increasing the interactivity and fun of the instant video, further enhancing the user experience. In addition, since the position of the detail in the area indicated by the preset shape changes, the area indicated by the preset shape is determined in the current instant video frame according to the detail, so that the area indicated by the shape is preset in the instant video frame. In the case where the position of the detail changes, the picture quality of the area in which the detail is located can still be ensured, thereby further satisfying the user's attention to an area in the instant video is greater than that of other areas, and the user is clear about an area. The requirement for degree and detail retention is greater than that of other regions and other participants who want real-time video interaction to migrate attention to the diverse needs of the user-specified region, which increases the interactivity and interest of instant video, further enhancing the user. Experience. For example, the area indicated by the preset shape includes a human face. By performing the method of the embodiment of the present invention, when the position of the face changes, the position of the area indicated by the preset shape also changes with the face. Ensure the picture quality of the area where the face is located.
本发明实施例提供了一种即时视频的传输方法,通过判断网络带宽是否满 足第一预设条件、第二预设条件、第三预设条件和第四预设条件中的任意一个,从而可以根据不同的网络带宽对包括预设形状所指示的区域的当前即时视频帧采取不同的传输策略,相比于传统的即时视频的传输方法,不仅满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验,还提高了网络带宽的利用率,节省网络资源,从而提高了即时视频的传输效率,提高了用户体验;另外,由于本发明实施例的方法是在从当前即时视频帧中获取预设形状所指示的区域后,对当前即时视频帧进行处理,使得相比于传统的即时视频编码方法,在带宽资源不变的情况下,将更多的宽带资源用于预设形状所指示的区域的传输,从而保证了预设形状所指示的区域的传输,进一步满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验。另外,通过根据细节在当前即时视频帧中确定预设形状所指示的区域,使得在即时视频帧中预设形状所指示的区域内的细节位置发生变化的情况下,依然可以保证该细节所在区域的画面质量,从而更进一步的满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,增加了即时视频的交互性和趣味性,进一步提高了用户体验。The embodiment of the invention provides a method for transmitting instant video by determining whether the network bandwidth is full. Any one of a first preset condition, a second preset condition, a third preset condition, and a fourth preset condition, so that the current instant video frame including the area indicated by the preset shape may be according to different network bandwidths Adopting different transmission strategies, compared with the traditional instant video transmission method, not only satisfies the user's attention to an area in the instant video is greater than other areas, the user's definition of a certain area and the amount of detail retention. Greater than other areas and other participants who want instant video interactions to divert attention to the diverse needs of the user-specified area, improve user experience, improve network bandwidth utilization, save network resources, and improve instant The transmission efficiency of the video improves the user experience. In addition, the method of the embodiment of the present invention processes the current instant video frame after acquiring the area indicated by the preset shape from the current instant video frame, so that the current video frame is compared with the traditional Instant video coding method, using more broadband resources for the same bandwidth resources The transmission of the area indicated by the shape is ensured, thereby ensuring the transmission of the area indicated by the preset shape, further satisfying the user's attention to an area in the instant video is greater than other areas, the user's definition of an area, and The requirement for detail retention is greater than other regions and other participants who want instant video interactions to migrate attention to the diverse needs of the user-specified region, improving the user experience. In addition, by determining the area indicated by the preset shape in the current instant video frame according to the details, so that the detail position in the area indicated by the preset shape in the instant video frame changes, the area of the detail can still be guaranteed. The picture quality further satisfies the user's attention to a certain area in the instant video is greater than other areas, the user's requirements for the clarity and detail retention of a certain area are greater than other areas and the user wants instant video interaction. Other participants have moved their attention to the diverse needs of the user-specified area, increasing the interactivity and fun of instant video, further enhancing the user experience.
实施例六为本发明实施例提供的一种即时视频的显示方法,参照图12所示,在本发明实施例中,预设形状的位置参数包括描述参数,该描述参数用于描述即时视频帧中用户所选定的预设形状所指示区域内的细节,示例性的,若用户所选定的预设形状所指示区域内至少包括人脸,则该细节可以为用户的眼睛、鼻子、嘴部和眉毛等,该方法具体包括: Embodiment 6 is a method for displaying an instant video according to an embodiment of the present invention. Referring to FIG. 12, in the embodiment of the present invention, a position parameter of a preset shape includes a description parameter, and the description parameter is used to describe an instant video frame. The details in the area indicated by the preset shape selected by the user. Illustratively, if the area indicated by the preset shape selected by the user includes at least a face, the detail may be the eyes, nose, and mouth of the user. Department and eyebrows, etc., the method specifically includes:
1201、获取电子设备根据第一传输策略、第二传输策略、第三传输策略以及第四传输策略中的任意一个传输的当前即时视频帧。1201. Acquire a current instant video frame that is transmitted by the electronic device according to any one of the first transmission policy, the second transmission policy, the third transmission policy, and the fourth transmission policy.
具体的,该步骤与步骤801相同,此处再不加以赘述。Specifically, the step is the same as step 801, and details are not described herein again.
1202、获取用户触发的选择指令,选择指令用于指示用户所选择的预设形状。1202: Acquire a user-triggered selection instruction, and the selection instruction is used to indicate a preset shape selected by the user.
具体的,该步骤与步骤802相同,此处再不加以赘述。Specifically, the step is the same as step 802, and details are not described herein again.
1203、在当前即时视频帧中识别描述参数所指示的细节。1203. Identify details indicated by the description parameters in the current instant video frame.
具体的,该步骤与步骤1002相同,此处再不加以赘述。Specifically, the step is the same as step 1002, and details are not described herein again.
用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,是对该区域内的细节的关注度大于其他区域、对该区域的细节的清晰度以及细节保留量的要求大于其他区域以及希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的细节,通过在当前即时视频帧中识别描述参数所指示的细节,满足了用户对该区域内的细节的关注度大于其他区域、对该区域的细节的清晰度以及细节保留量的要求大于其他区域以及希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的细节的多样化需求。The user's attention to an area in the instant video is greater than that of other areas, the user's requirement for the clarity and detail retention of a certain area is greater than that of other areas, and other participants who want the instant video interaction to migrate the attention to the user. The diversified needs of the designated area are that the attention to details in the area is greater than that of other areas, the clarity of details of the area and the amount of detail retention are greater than other areas and other participants who wish to have instant video interaction will pay attention The degree of migration to the details of the area specified by the user, by identifying the details indicated by the description parameters in the current instant video frame, satisfies the user's attention to the details in the area is greater than other areas, the clarity of the details of the area And the requirement for detail retention is greater than the diversified needs of other areas and other participants who wish to have instant video interactions to move attention to the details of the area specified by the user.
1204、根据细节以及电子设备所支持的传输策略,在当前即时视频帧中显示预设形状所指示的区域。1204. Display an area indicated by the preset shape in the current instant video frame according to details and a transmission strategy supported by the electronic device.
具体的,将该组成该细节的描述点的坐标设置为预设形状所指示的区域中的点的坐标。Specifically, the coordinates of the description points constituting the detail are set as the coordinates of the points in the area indicated by the preset shape.
根据该坐标,显示预设形状所指示的区域。Based on the coordinates, the area indicated by the preset shape is displayed.
除此之外,还可以通过其他方式,实现根据细节,在当前即时视频帧中显示预设形状所指示的区域,本发明实施例对具体的方式不加以限定。In addition, the area indicated by the preset shape is displayed in the current instant video frame according to the details, and the specific manner is not limited in the embodiment of the present invention.
由于预设形状所指示的区域内的细节的位置会发生改变,所以根据细节在当前即时视频帧中确定预设形状所指示的区域,进一步的满足了用户对即时视 频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,增加了即时视频的交互性和趣味性,进一步提高了用户体验。Since the position of the detail in the area indicated by the preset shape changes, the area indicated by the preset shape is determined in the current instant video frame according to the detail, further satisfying the user's instant view A certain area of the frequency is more concerned than other areas, the user's requirements for the definition of a certain area and the amount of detail retention are greater than other areas and other participants who want the instant video interaction to migrate the attention to the area specified by the user. The diverse needs increase the interactivity and fun of instant video, further enhancing the user experience.
值得注意的是,步骤1203至步骤1204是实现根据选择指令,显示当前即时视频帧的过程,除了上述步骤所述的方式之外,还可以通过其他方式实现该过程,本发明实施例对具体的方式不加以限定。It is to be noted that, in the step 1203 to the step 1204, the process of displaying the current instant video frame according to the selection instruction is implemented. In addition to the manner described in the foregoing steps, the process may be implemented in other manners. The method is not limited.
由于当前即时视频帧中预设形状所指示的区域的画面质量优于其他区域,从而满足了将本电子设备的用户关注度迁移至即时视频中预设形状所指示的区域,从而满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验。另外,通过显示预设形状,可以进一步实现将本电子设备的用户关注度迁移至即时视频中预设形状所指示的区域,从而满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验。另外,由于选择指令包括预设形状的大小参数、预设形状的位置参数、预设形状的边框参数以及预设形状的特效参数中的至少一个,所以增加了即时视频的显示形式,进一步满足了用户的多样化需求,提高了用户体验。另外,通过根据细节,显示处理后的当前即时视频帧,在即时视频帧中预设形状所指示的区域内的细节位置发生变化的情况下,满足了用户对预设形状所指示的区域内的细节的关注度大于其他区域、对预设形状所指示的区域的细节的清晰度以及细节保留量的要求大于其他区域以及希望即时视频交互的其他参与者将关注度迁移至预设形状所指示的的区域的细节,从而进一步满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希 望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,增加了即时视频的交互性和趣味性,进一步提高了用户体验。另外,由于预设形状所指示的区域内的细节的位置会发生改变,所以根据细节在当前即时视频帧中确定预设形状所指示的区域,使得在即时视频帧中预设形状所指示的区域内的细节位置发生变化的情况下,依然可以保证该细节所在区域的画面质量,从而更进一步的满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,增加了即时视频的交互性和趣味性,进一步提高了用户体验。例如,预设形状所指示的区域内包括人脸,通过执行本发明实施例的方法,当人脸位置发生变化时,预设形状所指示的区域的位置也会随着人脸发生变化,从而保证该人脸所在区域的画面质量。Since the picture quality of the area indicated by the preset shape in the current instant video frame is superior to other areas, the user attention of the electronic device is migrated to the area indicated by the preset shape in the instant video, thereby satisfying the user pair. The interest in one area of the instant video is greater than that of other areas, the user's definition of the clarity of the area and the amount of detail retention is greater than that of other areas, and other participants who want the instant video interaction to migrate the attention to the user-specified The diverse needs of the region have improved the user experience. In addition, by displaying the preset shape, the user attention of the electronic device can be further migrated to the area indicated by the preset shape in the instant video, thereby satisfying the user's attention to a certain area in the instant video is greater than other areas. The user's requirement for the clarity and detail retention of a certain area is greater than that of other areas and other participants who want the instant video interaction to migrate the attention to the diverse needs of the user-specified area, thereby improving the user experience. In addition, since the selection instruction includes at least one of a size parameter of the preset shape, a position parameter of the preset shape, a frame parameter of the preset shape, and a special effect parameter of the preset shape, the display form of the instant video is increased, and the content is further satisfied. The diverse needs of users have improved the user experience. In addition, by displaying the processed current instant video frame according to the details, in a case where the detail position in the area indicated by the preset shape changes in the instant video frame, the user is satisfied in the area indicated by the preset shape. The attention of detail is greater than that of other areas, the clarity of the details of the area indicated by the preset shape, and the amount of detail retention is greater than that of other areas and other participants who wish to have instant video interactions shift the attention to the preset shape. The details of the area further satisfy the user's attention to a certain area in the instant video is greater than other areas, the user's requirements for the definition of a certain area and the amount of detail retention are greater than other areas and users It is hoped that other participants of the instant video interaction will shift the attention to the diverse needs of the user-specified area, increasing the interactivity and interest of the instant video, further enhancing the user experience. In addition, since the position of the detail in the area indicated by the preset shape changes, the area indicated by the preset shape is determined in the current instant video frame according to the detail, so that the area indicated by the shape is preset in the instant video frame. In the case where the position of the detail changes, the picture quality of the area in which the detail is located can still be ensured, thereby further satisfying the user's attention to an area in the instant video is greater than that of other areas, and the user is clear about an area. The requirement for degree and detail retention is greater than that of other regions and other participants who want real-time video interaction to migrate attention to the diverse needs of the user-specified region, which increases the interactivity and interest of instant video, further enhancing the user. Experience. For example, the area indicated by the preset shape includes a human face. By performing the method of the embodiment of the present invention, when the position of the face changes, the position of the area indicated by the preset shape also changes with the face. Ensure the picture quality of the area where the face is located.
其中,若该电子设备不支持获取的当前即时视频帧所对应的传输策略,则向发送该即时视频帧的电子设备或者服务器发送提示信息,以提示该电子设备不支持获取的当前即时视频帧所对应的传输策略,以使服务器或者发送该即时视频帧的电子设备在接收到该提示信息后,向该电子设备发送与该传输策略对应的代码,以便该电子设备配置该代码。If the electronic device does not support the transmission policy corresponding to the current current video frame, the electronic device or the server that sends the instant video frame sends a prompt message to prompt the electronic device not to support the acquired current instant video frame. Corresponding transmission policy, so that the server or the electronic device that sends the instant video frame, after receiving the prompt information, sends a code corresponding to the transmission policy to the electronic device, so that the electronic device configures the code.
为了进一步说明本发明实施例提供的方法所达到的效果,下面将结合附图对本发明实施例所提供的方法作出进一步的说明,假设用户所选定的预设形状为图6所示的形状,获取处理后的当前即时视频帧显示的界面可以参照图13中的b所示,图13中的a是获取当前即时视频帧后显示的界面,若即时视频界面中的用户在画面中的位置发生变化,则界面可以参照图13中的c所示,在图13中,第二显示效果所指示的清晰度以及细节保留量大于或者等于第一显示效果所指示的清晰度以及细节保留量,第三显示效果所指示的清晰度以及细节保留量小于第一显示效果所指示的清晰度以及细节保留量。In order to further illustrate the effect achieved by the method provided by the embodiment of the present invention, the method provided by the embodiment of the present invention will be further described below with reference to the accompanying drawings, assuming that the preset shape selected by the user is the shape shown in FIG. The interface for obtaining the current instant video frame display after processing may be referred to b in FIG. 13, where a in FIG. 13 is an interface displayed after acquiring the current instant video frame, if the user in the instant video interface occurs in the position in the screen. For the change, the interface may be referred to as c in FIG. 13. In FIG. 13, the sharpness and the detail retention indicated by the second display effect are greater than or equal to the sharpness and detail retention indicated by the first display effect, The sharpness indicated by the three display effects and the amount of detail retention are smaller than the sharpness indicated by the first display effect and the amount of detail retention.
本发明实施例提供了一种即时视频的显示方法,通过获取并显示根据第一 传输策略、第二传输策略、第三传输策略以及第四传输策略中的任意一个传输的当前即时视频帧,满足了即时视频过程中用户希望对所选择的区域的清晰度以及细节保留量大于其他区域的需求,进一步提高了用户体验。另外,通过获取并显示用户触发的选择指令,增加了用户选择该区域的方式,增加了用户在即时视频交互过程中的互动方式,进一步满足了用户的多样化需求,提高了用户体验。另外,通过根据细节在当前即时视频帧中确定并显示预设形状所指示的区域,使得在即时视频帧中预设形状所指示的区域内的细节位置发生变化的情况下,依然可以保证该细节所在区域的画面质量,从而更进一步的满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,增加了即时视频的交互性和趣味性,进一步提高了用户体验。An embodiment of the present invention provides a method for displaying an instant video by acquiring and displaying according to the first The current instant video frame transmitted by any one of the transmission policy, the second transmission policy, the third transmission policy, and the fourth transmission policy satisfies the fact that the user desires to have greater clarity and detail retention for the selected region than other The needs of the region further enhance the user experience. In addition, by acquiring and displaying the user-triggered selection instruction, the manner in which the user selects the area is increased, and the interaction mode of the user in the instant video interaction process is increased, thereby further satisfying the diversified needs of the user and improving the user experience. In addition, by determining and displaying the area indicated by the preset shape in the current instant video frame according to the details, such that the detail position in the area indicated by the preset shape changes in the instant video frame, the detail can still be guaranteed. The picture quality of the area, which further satisfies the user's attention to an area in the instant video is greater than other areas, the user's requirements for the clarity and detail retention of a certain area are greater than other areas and the user wants instant video. Other participants in the interaction migrated the attention to the diverse needs of the user-specified area, increasing the interactivity and fun of the instant video, further enhancing the user experience.
实施例七为本发明实施例提供的一种电子设备14,参照图14所示,电子设备14包括:Embodiment 7 is an electronic device 14 according to an embodiment of the present invention. Referring to FIG. 14, the electronic device 14 includes:
接收模块1401,用于接收用户触发的选择指令,选择指令用于指示用户所选择的预设形状;The receiving module 1401 is configured to receive a user-triggered selection instruction, where the selection instruction is used to indicate a preset shape selected by the user;
第一处理模块1403,用于在当前即时视频帧中确定预设形状所指示的区域;The first processing module 1403 is configured to determine, in the current instant video frame, an area indicated by the preset shape;
判决模块1402,用于判断网络带宽是否满足第一预设条件、第二预设条件、第三预设条件和第四预设条件中的任意一个;The determining module 1402 is configured to determine whether the network bandwidth meets any one of the first preset condition, the second preset condition, the third preset condition, and the fourth preset condition;
第一处理模块1403还用于根据网络带宽所满足的预设条件以及电子设备所支持的传输策略,触发以下模块中的任意一个:The first processing module 1403 is further configured to trigger any one of the following modules according to a preset condition that the network bandwidth meets and a transmission policy supported by the electronic device:
第二处理模块1404,用于在网络带宽满足第一预设条件时,根据第一传输策略,传输包括预设形状所指示的区域的当前即时视频帧;或者,The second processing module 1404 is configured to: when the network bandwidth meets the first preset condition, transmit, according to the first transmission policy, a current instant video frame that includes an area indicated by the preset shape; or
第三处理模块1405,用于在网络带宽满足第二预设条件时,根据第二传输策略,传输包括预设形状所指示的区域的当前即时视频帧;或者,The third processing module 1405 is configured to: when the network bandwidth meets the second preset condition, transmit the current instant video frame including the area indicated by the preset shape according to the second transmission policy; or
第四处理模块1406,用于在网络带宽满足第三预设条件时,根据第三传输 策略,传输包括预设形状所指示的区域的当前即时视频帧;或者,The fourth processing module 1406 is configured to perform, according to the third transmission, when the network bandwidth meets the third preset condition a policy of transmitting a current instant video frame including an area indicated by a preset shape; or
第五处理模块1407,用于在网络带宽满足第四预设条件时,根据第四传输策略,传输包括预设形状所指示的区域的当前即时视频帧。The fifth processing module 1407 is configured to: when the network bandwidth meets the fourth preset condition, transmit the current instant video frame including the area indicated by the preset shape according to the fourth transmission policy.
可选的,选择指令包括预设形状的大小参数、预设形状的位置参数、预设形状的边框参数以及预设形状的特效参数中的至少一个,第一处理模块用于执行以下操作中的任意一个:Optionally, the selection instruction includes at least one of a size parameter of the preset shape, a position parameter of the preset shape, a frame parameter of the preset shape, and a special effect parameter of the preset shape, where the first processing module is configured to perform the following operations. anyone:
预设形状的位置参数包括坐标参数,根据坐标参数,在当前即时视频帧中确定预设形状所指示的区域;或者,The position parameter of the preset shape includes a coordinate parameter, and the area indicated by the preset shape is determined in the current instant video frame according to the coordinate parameter; or
预设形状的位置参数包括描述参数,在当前即时视频帧中识别描述参数所指示的细节;The position parameter of the preset shape includes a description parameter, and the details indicated by the description parameter are identified in the current instant video frame;
根据细节,在当前即时视频帧中确定预设形状所指示的区域。According to the details, the area indicated by the preset shape is determined in the current instant video frame.
可选的,第二处理模块1404具体用于:Optionally, the second processing module 1404 is specifically configured to:
根据与当前即时视频帧对应的重要性矩阵,对当前即时视频进行处理,获取处理后的即时视频帧;The current instant video is processed according to an importance matrix corresponding to the current instant video frame, and the processed instant video frame is obtained;
传输处理后的即时视频帧。Transmit processed instant video frames.
可选的,第二处理模块1404具体用于:Optionally, the second processing module 1404 is specifically configured to:
获取预设形状所指示的区域的重要性矩阵;Obtaining an importance matrix of the area indicated by the preset shape;
对当前即时视频帧进行低通滤波,获取滤波后的当前即时视频帧;Performing low-pass filtering on the current instant video frame to obtain the filtered current instant video frame;
根据重要性矩阵,对当前即时视频帧与滤波后的当前即时视频帧进行融合,生成处理后的当前即时视频帧。According to the importance matrix, the current instant video frame is merged with the filtered current instant video frame to generate a processed current instant video frame.
可选的,第三处理模块1405具体用于:Optionally, the third processing module 1405 is specifically configured to:
将至少包括预设形状所指示的区域的即时视频帧划分为至少一个宏块,并设置组成至少一个宏块所对应的量化参数;Dividing an instant video frame including at least an area indicated by the preset shape into at least one macro block, and setting a quantization parameter corresponding to the at least one macro block;
根据量化参数,对至少一个宏块进行编码,生成编码后的即时视频帧;Encoding at least one macroblock according to the quantization parameter to generate an encoded instant video frame;
传输编码后的即时视频帧。Transmit the encoded instant video frame.
可选的,第三处理模块1405具体用于: Optionally, the third processing module 1405 is specifically configured to:
设置包括全部或者部分预设形状所指示的区域的宏块的量化参数为第一数值;Setting a quantization parameter of a macroblock including an area indicated by all or part of the preset shape as a first value;
设置不包括全部或者部分预设形状所指示的区域的宏块的量化参数为第二数值;Setting a quantization parameter of a macroblock that does not include an area indicated by all or part of the preset shape as a second value;
第三处理模块1405具体用于:The third processing module 1405 is specifically configured to:
根据第一数值和第二数值,对至少一个宏块进行编码,生成编码后的当前即时视频帧。And encoding at least one macroblock according to the first value and the second value to generate the encoded current instant video frame.
可选的,第四处理模块146具体用于:Optionally, the fourth processing module 146 is specifically configured to:
获取包括预设形状所指示的区域的当前即时视频帧与参考帧之间的残差数据;Obtaining residual data between the current instant video frame and the reference frame including the area indicated by the preset shape;
传输残差数据。Transmit residual data.
可选的,第四处理模块146具体用于:Optionally, the fourth processing module 146 is specifically configured to:
获取预设形状所指示的区域的位置参数与姿态参数;Obtaining a position parameter and a posture parameter of the area indicated by the preset shape;
对位置参数与姿态参数进行归一化处理,生成标准位置参数与标准姿态参数;Normalizing the position parameter and the attitude parameter to generate a standard position parameter and a standard posture parameter;
根据标准位置参数与标准姿态参数,获取包括预设形状所指示的区域的当前即时视频帧与参考帧之间的残差数据。Obtaining residual data between the current instant video frame and the reference frame including the area indicated by the preset shape according to the standard position parameter and the standard posture parameter.
可选的,第四处理模块146具体用于:Optionally, the fourth processing module 146 is specifically configured to:
获取用于描述预设形状所指示的区域的特征参数;Obtaining a feature parameter for describing an area indicated by the preset shape;
传输特征参数。Transfer feature parameters.
可选的,第四处理模块146具体用于:Optionally, the fourth processing module 146 is specifically configured to:
对预设形状所指示的区域进行三角分割,获取至少一个三角区域;Triangulating the area indicated by the preset shape to obtain at least one triangular area;
获取至少一个三角区域对应的姿态参数和位置参数;Obtaining at least one posture parameter and a position parameter corresponding to the triangular area;
根据至少一个三角区域对应的姿态参数和位置参数,生成特征参数。The feature parameter is generated according to the attitude parameter and the position parameter corresponding to the at least one triangular region.
可选的,电子设备还包括发送模块,用于:Optionally, the electronic device further includes a sending module, configured to:
将选择指令发送至其他电子设备。 Send selection instructions to other electronic devices.
本发明实施例提供了一种电子设备,该电子设备通过判断网络带宽是否满足第一预设条件、第二预设条件、第三预设条件和第四预设条件中的任意一个,从而可以根据不同的网络带宽对包括预设形状所指示的区域的当前即时视频帧采取不同的传输策略,相比于传统的即时视频的传输方法,不仅满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验,还提高了网络带宽的利用率,节省网络资源,从而提高了即时视频的传输效率,提高了用户体验;另外,由于本发明实施例的方法是在从当前即时视频帧中获取预设形状所指示的区域后,对当前即时视频帧进行处理,使得相比于传统的即时视频编码方法,在带宽资源不变的情况下,将更多的宽带资源用于预设形状所指示的区域的传输,从而保证了预设形状所指示的区域的传输,进一步满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验。An embodiment of the present invention provides an electronic device, where the electronic device determines whether the network bandwidth meets any one of a first preset condition, a second preset condition, a third preset condition, and a fourth preset condition, thereby According to different network bandwidths, different transmission strategies are adopted for the current instant video frames including the area indicated by the preset shape. Compared with the traditional instant video transmission method, the user not only satisfies the user's attention to a certain area in the instant video. The degree is greater than other areas, the user's requirements for the definition of a certain area and the amount of detail retention are greater than other areas and other users who want the instant video interaction to migrate the attention to the diverse needs of the user-specified area, improve the user The experience also improves the utilization of the network bandwidth and saves the network resources, thereby improving the transmission efficiency of the instant video and improving the user experience. In addition, the method of the embodiment of the present invention acquires the preset shape from the current instant video frame. After the indicated area, the current instant video frame is processed so that compared to the traditional The instant video coding method uses more broadband resources for the transmission of the area indicated by the preset shape when the bandwidth resource is unchanged, thereby ensuring the transmission of the area indicated by the preset shape, further satisfying the user's The interest in one area of the instant video is greater than that of other areas, the user's definition of the clarity of the area and the amount of detail retention is greater than that of other areas, and other participants who want the instant video interaction to migrate the attention to the user-specified The diverse needs of the region have improved the user experience.
实施例八为本发明实施例提供的一种电子设备15,参照图15所示,电子设备15包括发送模块1501、存储器1502以及与发送模块1501、存储器1502连接的处理器1503,其中,存储器1502用于存储一组程序代码,处理器1503调用存储器1502所存储的程序代码用于执行以下操作:Embodiment 8 is an electronic device 15 according to an embodiment of the present invention. Referring to FIG. 15 , the electronic device 15 includes a sending module 1501 , a memory 1502 , and a processor 1503 connected to the sending module 1501 and the memory 1502 . The memory 1502 . For storing a set of program code, the processor 1503 calls the program code stored in the memory 1502 for performing the following operations:
接收用户触发的选择指令,选择指令用于指示用户所选择的预设形状;Receiving a user-triggered selection instruction, the selection instruction is used to indicate a preset shape selected by the user;
在当前即时视频帧中确定预设形状所指示的区域;Determining an area indicated by the preset shape in the current live video frame;
根据网络带宽所满足的预设条件以及电子设备所支持的传输策略,执行以下操作中的任意一个:Perform any of the following operations based on the preset conditions that the network bandwidth meets and the transmission policies supported by the electronic device:
若网络带宽满足第一预设条件,则根据第一传输策略,传输包括预设形状所指示的区域的当前即时视频帧;或者,If the network bandwidth meets the first preset condition, transmitting, according to the first transmission policy, a current instant video frame including an area indicated by the preset shape; or
若网络带宽满足第二预设条件,则根据第二传输策略,传输包括预设形状 所指示的区域的当前即时视频帧;或者,If the network bandwidth meets the second preset condition, the transmission includes the preset shape according to the second transmission policy The current instant video frame of the indicated area; or,
若网络带宽满足第三预设条件,则根据第三传输策略,传输包括预设形状所指示的区域的当前即时视频帧;或者,If the network bandwidth meets the third preset condition, transmitting, according to the third transmission policy, a current instant video frame including an area indicated by the preset shape; or
若网络带宽满足第四预设条件,则根据第四传输策略,传输包括预设形状所指示的区域的当前即时视频帧。If the network bandwidth meets the fourth preset condition, the current instant video frame including the area indicated by the preset shape is transmitted according to the fourth transmission policy.
可选的,选择指令包括预设形状的大小参数、预设形状的位置参数、预设形状的边框参数以及预设形状的特效参数中的至少一个,处理器1503调用存储器1502所存储的程序代码用于执行以下操作:Optionally, the selection instruction includes at least one of a size parameter of the preset shape, a position parameter of the preset shape, a frame parameter of the preset shape, and a special effect parameter of the preset shape, and the processor 1503 calls the program code stored by the memory 1502. Used to do the following:
预设形状的位置参数包括坐标参数,根据坐标参数,在当前即时视频帧中确定预设形状所指示的区域;或者,The position parameter of the preset shape includes a coordinate parameter, and the area indicated by the preset shape is determined in the current instant video frame according to the coordinate parameter; or
预设形状的位置参数包括描述参数,在当前即时视频帧中识别描述参数所指示的细节;The position parameter of the preset shape includes a description parameter, and the details indicated by the description parameter are identified in the current instant video frame;
根据细节,在当前即时视频帧中确定预设形状所指示的区域。According to the details, the area indicated by the preset shape is determined in the current instant video frame.
可选的,处理器1503调用存储器1502所存储的程序代码用于执行以下操作:Optionally, the processor 1503 calls the program code stored in the memory 1502 to perform the following operations:
根据与当前即时视频帧对应的重要性矩阵,对当前即时视频进行处理,获取处理后的即时视频帧;The current instant video is processed according to an importance matrix corresponding to the current instant video frame, and the processed instant video frame is obtained;
传输处理后的即时视频帧。Transmit processed instant video frames.
可选的,处理器1503调用存储器1502所存储的程序代码用于执行以下操作:Optionally, the processor 1503 calls the program code stored in the memory 1502 to perform the following operations:
获取预设形状所指示的区域的重要性矩阵;Obtaining an importance matrix of the area indicated by the preset shape;
对当前即时视频帧进行低通滤波,获取滤波后的当前即时视频帧;Performing low-pass filtering on the current instant video frame to obtain the filtered current instant video frame;
根据重要性矩阵,对当前即时视频帧与滤波后的当前即时视频帧进行融合,生成处理后的当前即时视频帧。According to the importance matrix, the current instant video frame is merged with the filtered current instant video frame to generate a processed current instant video frame.
可选的,处理器1503调用存储器1502所存储的程序代码用于执行以下操作: Optionally, the processor 1503 calls the program code stored in the memory 1502 to perform the following operations:
将至少包括预设形状所指示的区域的即时视频帧划分为至少一个宏块,并设置组成至少一个宏块所对应的量化参数;Dividing an instant video frame including at least an area indicated by the preset shape into at least one macro block, and setting a quantization parameter corresponding to the at least one macro block;
根据量化参数,对至少一个宏块进行编码,生成编码后的即时视频帧;Encoding at least one macroblock according to the quantization parameter to generate an encoded instant video frame;
传输编码后的即时视频帧。Transmit the encoded instant video frame.
可选的,处理器1503调用存储器1502所存储的程序代码用于执行以下操作:Optionally, the processor 1503 calls the program code stored in the memory 1502 to perform the following operations:
设置包括全部或者部分预设形状所指示的区域的宏块的量化参数为第一数值;Setting a quantization parameter of a macroblock including an area indicated by all or part of the preset shape as a first value;
设置不包括全部或者部分预设形状所指示的区域的宏块的量化参数为第二数值;Setting a quantization parameter of a macroblock that does not include an area indicated by all or part of the preset shape as a second value;
处理器1503调用存储器1502所存储的程序代码用于执行以下操作:The processor 1503 calls the program code stored in the memory 1502 for performing the following operations:
根据第一数值和第二数值,对至少一个宏块进行编码,生成编码后的当前即时视频帧。And encoding at least one macroblock according to the first value and the second value to generate the encoded current instant video frame.
可选的,处理器1503调用存储器1502所存储的程序代码用于执行以下操作:Optionally, the processor 1503 calls the program code stored in the memory 1502 to perform the following operations:
获取包括预设形状所指示的区域的当前即时视频帧与参考帧之间的残差数据;Obtaining residual data between the current instant video frame and the reference frame including the area indicated by the preset shape;
传输残差数据。Transmit residual data.
可选的,处理器1503调用存储器1502所存储的程序代码用于执行以下操作:Optionally, the processor 1503 calls the program code stored in the memory 1502 to perform the following operations:
获取预设形状所指示的区域的位置参数与姿态参数;Obtaining a position parameter and a posture parameter of the area indicated by the preset shape;
对位置参数与姿态参数进行归一化处理,生成标准位置参数与标准姿态参数;Normalizing the position parameter and the attitude parameter to generate a standard position parameter and a standard posture parameter;
根据标准位置参数与标准姿态参数,获取包括预设形状所指示的区域的当前即时视频帧与参考帧之间的残差数据。Obtaining residual data between the current instant video frame and the reference frame including the area indicated by the preset shape according to the standard position parameter and the standard posture parameter.
可选的,处理器1503调用存储器1502所存储的程序代码用于执行以下操 作:Optionally, the processor 1503 calls the program code stored in the memory 1502 to perform the following operations. Make:
获取用于描述预设形状所指示的区域的特征参数;Obtaining a feature parameter for describing an area indicated by the preset shape;
传输特征参数。Transfer feature parameters.
可选的,处理器1503调用存储器1502所存储的程序代码用于执行以下操作:Optionally, the processor 1503 calls the program code stored in the memory 1502 to perform the following operations:
可选的,处理器1503调用存储器1502所存储的程序代码用于执行以下操作:Optionally, the processor 1503 calls the program code stored in the memory 1502 to perform the following operations:
将选择指令发送至其他电子设备。Send selection instructions to other electronic devices.
本发明实施例提供了一种电子设备,该电子设备通过判断网络带宽是否满足第一预设条件、第二预设条件、第三预设条件和第四预设条件中的任意一个,从而可以根据不同的网络带宽对包括预设形状所指示的区域的当前即时视频帧采取不同的传输策略,相比于传统的即时视频的传输方法,不仅满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验,还提高了网络带宽的利用率,节省网络资源,从而提高了即时视频的传输效率,提高了用户体验;另外,由于本发明实施例的方法是在从当前即时视频帧中获取预设形状所指示的区域后,对当前即时视频帧进行处理,使得相比于传统的即时视频编码方法,在带宽资源不变的情况下,将更多的宽带资源用于预设形状所指示的区域的传输,从而保证了预设形状所指示的区域的传输,进一步满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验。An embodiment of the present invention provides an electronic device, where the electronic device determines whether the network bandwidth meets any one of a first preset condition, a second preset condition, a third preset condition, and a fourth preset condition, thereby According to different network bandwidths, different transmission strategies are adopted for the current instant video frames including the area indicated by the preset shape. Compared with the traditional instant video transmission method, the user not only satisfies the user's attention to a certain area in the instant video. The degree is greater than other areas, the user's requirements for the definition of a certain area and the amount of detail retention are greater than other areas and other users who want the instant video interaction to migrate the attention to the diverse needs of the user-specified area, improve the user The experience also improves the utilization of the network bandwidth and saves the network resources, thereby improving the transmission efficiency of the instant video and improving the user experience. In addition, the method of the embodiment of the present invention acquires the preset shape from the current instant video frame. After the indicated area, the current instant video frame is processed so that compared to the traditional The instant video coding method uses more broadband resources for the transmission of the area indicated by the preset shape when the bandwidth resource is unchanged, thereby ensuring the transmission of the area indicated by the preset shape, further satisfying the user's The interest in one area of the instant video is greater than that of other areas, the user's definition of the clarity of the area and the amount of detail retention is greater than that of other areas, and other participants who want the instant video interaction to migrate the attention to the user-specified The diverse needs of the region have improved the user experience.
实施例九为本发明实施例提供的一种电子设备16,参照图16所示,电子设备16包括:Embodiment 9 is an electronic device 16 according to an embodiment of the present invention. Referring to FIG. 16, the electronic device 16 includes:
第一获取模块1601,用于获取电子设备根据第一传输策略、第二传输策略、 第三传输策略以及第四传输策略中的任意一个传输的当前即时视频帧;The first obtaining module 1601 is configured to acquire, according to the first transmission policy, the second transmission policy, a current instant video frame transmitted by any one of the third transmission policy and the fourth transmission policy;
第二获取模块1602,用于获取用户触发的选择指令,选择指令用于指示用户所选择的预设形状;a second obtaining module 1602, configured to acquire a user-triggered selection instruction, where the selection instruction is used to indicate a preset shape selected by the user;
显示模块1603,用于根据选择指令以及电子设备所支持的传输策略,显示当前即时视频帧。The display module 1603 is configured to display the current instant video frame according to the selection instruction and a transmission policy supported by the electronic device.
本发明实施例提供了一种电子设备,该电子设备通过获取并显示根据第一传输策略、第二传输策略、第三传输策略以及第四传输策略中的任意一个传输的当前即时视频帧,满足了即时视频过程中用户希望对所选择的区域的清晰度以及细节保留量大于其他区域的需求,进一步提高了用户体验。另外,通过获取并显示用户触发的选择指令,增加了用户选择该区域的方式,增加了用户在即时视频交互过程中的互动方式,进一步满足了用户的多样化需求,提高了用户体验。An embodiment of the present invention provides an electronic device that satisfies and displays a current instant video frame transmitted according to any one of a first transmission policy, a second transmission policy, a third transmission policy, and a fourth transmission policy. In the process of instant video, the user desires to have more clarity and detail retention of the selected area than other areas, further improving the user experience. In addition, by acquiring and displaying the user-triggered selection instruction, the manner in which the user selects the area is increased, and the interaction mode of the user in the instant video interaction process is increased, thereby further satisfying the diversified needs of the user and improving the user experience.
实施例十为本发明实施例提供的一种电子设备17,参照图17所示,电子设备17包括显示屏1701、存储器1702以及与显示屏1701、存储器1702连接的处理器1703,其中,存储器1702用于存储一组程序代码,处理器1703调用存储器1702所存储的程序代码用于执行以下操作:Embodiment 10 is an electronic device 17 according to an embodiment of the present invention. Referring to FIG. 17, the electronic device 17 includes a display 1701, a memory 1702, and a processor 1703 connected to the display 1701 and the memory 1702. The memory 1702 For storing a set of program code, the processor 1703 calls the program code stored in the memory 1702 for performing the following operations:
获取电子设备根据第一传输策略、第二传输策略、第三传输策略以及第四传输策略中的任意一个传输的当前即时视频帧;Obtaining a current instant video frame that is transmitted by the electronic device according to any one of the first transmission policy, the second transmission policy, the third transmission policy, and the fourth transmission policy;
获取用户触发的选择指令,选择指令用于指示用户所选择的预设形状;Obtaining a user-triggered selection instruction, and the selection instruction is used to indicate a preset shape selected by the user;
根据选择指令以及电子设备所支持的传输策略,显示当前即时视频帧。The current instant video frame is displayed according to the selection instruction and the transmission policy supported by the electronic device.
本发明实施例提供了一种电子设备,该电子设备通过获取并显示根据第一传输策略、第二传输策略、第三传输策略以及第四传输策略中的任意一个传输的当前即时视频帧,满足了即时视频过程中用户希望对所选择的区域的清晰度以及细节保留量大于其他区域的需求,进一步提高了用户体验。另外,通过获取并显示用户触发的选择指令,增加了用户选择该区域的方式,增加了用户在即时视频交互过程中的互动方式,进一步满足了用户的多样化需求,提高了用 户体验。An embodiment of the present invention provides an electronic device that satisfies and displays a current instant video frame transmitted according to any one of a first transmission policy, a second transmission policy, a third transmission policy, and a fourth transmission policy. In the process of instant video, the user desires to have more clarity and detail retention of the selected area than other areas, further improving the user experience. In addition, by obtaining and displaying the user-triggered selection instruction, the manner in which the user selects the area is increased, the interaction mode of the user in the instant video interaction process is increased, and the diversified needs of the user are further satisfied, and the use is improved. User experience.
值得注意的是,本发明实施例中的界面仅仅是示例性的,是为了对本发明实施例所提供的方法作进一步的说明,此处并非特指,本发明实施例对具体的界面不加以限定。It is to be noted that the interface in the embodiment of the present invention is merely exemplary, and is a further description of the method provided by the embodiment of the present invention. The specific embodiment of the present invention does not limit the specific interface. .
上述所有可选技术方案,可以采用任意结合形成本发明的可选实施例,在此不再一一赘述。All of the above optional technical solutions may be used in any combination to form an optional embodiment of the present invention, and will not be further described herein.
需要说明的是:上述实施例提供的电子设备在进行即时视频的编码时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将设备的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的即时视频的传输方法与电子设备实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。It should be noted that, when the electronic device provided by the foregoing embodiment performs the encoding of the instant video, only the division of the above functional modules is illustrated. In actual applications, the function distribution may be completed by different functional modules as needed. The internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the method for transmitting the instant video provided by the foregoing embodiment is the same as the embodiment of the electronic device, and the specific implementation process is described in detail in the method embodiment, and details are not described herein again.
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。A person skilled in the art can understand that all or part of the steps of implementing the above embodiments may be completed by hardware, or may be executed by a program to instruct related hardware, and the program may be stored in a computer readable storage medium. The storage medium may be a read only memory, a magnetic disk or an optical disk or the like.
以上仅为本发明的较佳实施例,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。 The above are only the preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalents, improvements, etc., which are within the spirit and scope of the present invention, should be included in the scope of the present invention. Inside.

Claims (14)

  1. 一种即时视频的传输方法,其特征在于,所述方法包括:A method for transmitting an instant video, characterized in that the method comprises:
    接收用户触发的选择指令,所述选择指令用于指示所述用户所选择的预设形状;Receiving a user-triggered selection instruction, the selection instruction is used to indicate a preset shape selected by the user;
    在当前即时视频帧中确定所述预设形状所指示的区域;Determining an area indicated by the preset shape in a current instant video frame;
    根据网络带宽所满足的预设条件以及电子设备所支持的传输策略,执行以下操作中的任意一个:Perform any of the following operations based on the preset conditions that the network bandwidth meets and the transmission policies supported by the electronic device:
    若网络带宽满足第一预设条件,则根据第一传输策略,传输包括所述预设形状所指示的区域的所述当前即时视频帧;或者,If the network bandwidth meets the first preset condition, transmitting the current instant video frame including the area indicated by the preset shape according to the first transmission policy; or
    若网络带宽满足第二预设条件,则根据第二传输策略,传输包括所述预设形状所指示的区域的所述当前即时视频帧;或者,If the network bandwidth meets the second preset condition, transmitting, according to the second transmission policy, the current instant video frame including the area indicated by the preset shape; or
    若网络带宽满足第三预设条件,则根据第三传输策略,传输包括所述预设形状所指示的区域的所述当前即时视频帧;或者,If the network bandwidth meets the third preset condition, transmitting, according to the third transmission policy, the current instant video frame that includes the area indicated by the preset shape; or
    若网络带宽满足第四预设条件,则根据第四传输策略,传输包括所述预设形状所指示的区域的所述当前即时视频帧。If the network bandwidth meets the fourth preset condition, transmitting the current instant video frame including the area indicated by the preset shape according to the fourth transmission policy.
  2. 根据权利要求1所述的方法,其特征在于,所述选择指令包括所述预设形状的大小参数、所述预设形状的位置参数、所述预设形状的边框参数以及所述预设形状的特效参数中的至少一个,通过以下操作中的任意一个,在当前即时视频帧中确定所述预设形状所指示的区域:The method according to claim 1, wherein the selection instruction comprises a size parameter of the preset shape, a position parameter of the preset shape, a frame parameter of the preset shape, and the preset shape At least one of the effect parameters determines an area indicated by the preset shape in the current instant video frame by any one of the following operations:
    所述预设形状的位置参数包括坐标参数,根据所述坐标参数,在当前即时视频帧中确定所述预设形状所指示的区域;或者,The position parameter of the preset shape includes a coordinate parameter, and determining, according to the coordinate parameter, an area indicated by the preset shape in a current instant video frame; or
    所述预设形状的位置参数包括描述参数,在所述当前即时视频帧中识别所述描述参数所指示的细节;The position parameter of the preset shape includes a description parameter, and the details indicated by the description parameter are identified in the current instant video frame;
    根据所述细节,在所述当前即时视频帧中确定所述预设形状所指示的区域。 According to the details, an area indicated by the preset shape is determined in the current instant video frame.
  3. 根据权利要求1或2所述的方法,其特征在于,所述根据第一传输策略,传输包括所述预设形状所指示的区域的所述当前即时视频帧包括:The method according to claim 1 or 2, wherein the transmitting the current instant video frame including the area indicated by the preset shape according to the first transmission policy comprises:
    根据与所述当前即时视频帧对应的重要性矩阵,对所述当前即时视频进行处理,获取处理后的即时视频帧;And processing the current instant video according to an importance matrix corresponding to the current instant video frame, and acquiring the processed instant video frame;
    传输所述处理后的即时视频帧。Transmitting the processed instant video frame.
  4. 根据权利要求3所述的方法,其特征在于,所述根据与所述当前即时视频帧对应的重要性矩阵,对所述当前即时视频进行处理,获取处理后的即时视频帧包括:The method according to claim 3, wherein the processing the current instant video according to the importance matrix corresponding to the current instant video frame, and acquiring the processed instant video frame comprises:
    获取所述预设形状所指示的区域的重要性矩阵;Obtaining an importance matrix of the area indicated by the preset shape;
    对所述当前即时视频帧进行低通滤波,获取滤波后的当前即时视频帧;Performing low-pass filtering on the current instant video frame to obtain the filtered current instant video frame;
    根据所述重要性矩阵,对所述当前即时视频帧与所述滤波后的当前即时视频帧进行融合,生成所述处理后的当前即时视频帧。And merging the current instant video frame with the filtered current instant video frame according to the importance matrix to generate the processed current instant video frame.
  5. 根据权利要求1至4任一所述的方法,其特征在于,所述根据第二传输策略,传输包括所述预设形状所指示的区域的所述当前即时视频帧策略包括:The method according to any one of claims 1 to 4, wherein the transmitting the current instant video frame policy including the area indicated by the preset shape according to the second transmission policy comprises:
    将至少包括所述预设形状所指示的区域的即时视频帧划分为至少一个宏块,并设置所述至少一个宏块所对应的量化参数;Dividing an instant video frame including at least an area indicated by the preset shape into at least one macro block, and setting a quantization parameter corresponding to the at least one macro block;
    根据所述量化参数,对所述至少一个宏块进行编码,生成编码后的即时视频帧;Encoding the at least one macroblock according to the quantization parameter to generate an encoded instant video frame;
    传输所述编码后的即时视频帧。Transmitting the encoded instant video frame.
  6. 根据权利要求5所述的方法,其特征在于,The method of claim 5 wherein:
    所述设置所述至少一个宏块所对应的量化参数包括:The setting the quantization parameter corresponding to the at least one macro block includes:
    设置包括全部或者部分所述预设形状所指示的区域的宏块的量化参数为第一数值;Setting a quantization parameter of a macroblock including all or part of the area indicated by the preset shape as a first value;
    设置不包括所述全部或者部分所述预设形状所指示的区域的宏块的量化参数为第二数值;Setting a quantization parameter of a macroblock that does not include all or part of the area indicated by the preset shape as a second value;
    所述根据所述量化参数,对所述至少一个宏块进行编码,生成编码后的即 时视频帧包括:Encoding the at least one macroblock according to the quantization parameter, and generating the encoded The video frame includes:
    根据所述第一数值和所述第二数值,对所述至少一个宏块进行编码,生成编码后的当前即时视频帧。And encoding the at least one macroblock according to the first value and the second value to generate an encoded current instant video frame.
  7. 根据权利要求1至6任一所述的方法,其特征在于,所述根据第三传输策略,传输包括所述预设形状所指示的区域的所述当前即时视频帧包括:The method according to any one of claims 1 to 6, wherein the transmitting the current instant video frame including the area indicated by the preset shape according to the third transmission policy comprises:
    获取包括所述预设形状所指示的区域的当前即时视频帧与参考帧之间的残差数据;Acquiring residual data between the current instant video frame and the reference frame including the area indicated by the preset shape;
    传输所述残差数据。Transmitting the residual data.
  8. 根据权利要求7所述的方法,其特征在于,所述获取包括所述预设形状所指示的区域的当前即时视频帧与参考帧之间的残差数据包括:The method according to claim 7, wherein the obtaining the residual data between the current instant video frame and the reference frame including the region indicated by the preset shape comprises:
    获取所述预设形状所指示的区域的位置参数与姿态参数;Obtaining a position parameter and a posture parameter of the area indicated by the preset shape;
    对所述位置参数与所述姿态参数进行归一化处理,生成标准位置参数与标准姿态参数;Normalizing the position parameter and the posture parameter to generate a standard position parameter and a standard posture parameter;
    根据所述标准位置参数与所述标准姿态参数,获取包括所述预设形状所指示的区域的当前即时视频帧与参考帧之间的残差数据。Obtaining residual data between the current instant video frame and the reference frame including the region indicated by the preset shape according to the standard position parameter and the standard posture parameter.
  9. 根据权利要求1所述的方法,其特征在于,所述根据第四传输策略,传输包括所述预设形状所指示的区域的所述当前即时视频帧包括:The method according to claim 1, wherein the transmitting the current instant video frame including the area indicated by the preset shape according to the fourth transmission policy comprises:
    获取用于描述所述预设形状所指示的区域的特征参数;Obtaining a feature parameter for describing an area indicated by the preset shape;
    传输所述特征参数。Transmitting the feature parameters.
  10. 根据权利要求9所述的方法,其特征在于,所述获取用于描述所述预设形状所指示的区域的特征参数包括:The method according to claim 9, wherein the acquiring the feature parameters for describing the area indicated by the preset shape comprises:
    对所述预设形状所指示的区域进行三角分割,获取至少一个三角区域;Triangulating the area indicated by the preset shape to obtain at least one triangular area;
    获取所述至少一个三角区域对应的姿态参数和位置参数;Acquiring the attitude parameter and the position parameter corresponding to the at least one triangular area;
    根据所述至少一个三角区域对应的姿态参数和位置参数,生成所述特征参数。And generating the feature parameter according to the posture parameter and the position parameter corresponding to the at least one triangular region.
  11. 根据权利要求1至10任一所述的方法,其特征在于,所述方法还包括: The method according to any one of claims 1 to 10, wherein the method further comprises:
    将所述选择指令发送至其他电子设备。The selection instruction is sent to other electronic devices.
  12. 一种即时视频的显示方法,其特征在于,所述方法包括:A method for displaying an instant video, the method comprising:
    获取电子设备根据第一传输策略、第二传输策略、第三传输策略以及第四传输策略中的任意一个传输的当前即时视频帧;Obtaining a current instant video frame that is transmitted by the electronic device according to any one of the first transmission policy, the second transmission policy, the third transmission policy, and the fourth transmission policy;
    获取用户触发的选择指令,所述选择指令用于指示所述用户所选择的预设形状;Obtaining a user-triggered selection instruction, the selection instruction is used to indicate a preset shape selected by the user;
    根据所述选择指令以及电子设备所支持的传输策略,显示所述当前即时视频帧。The current instant video frame is displayed according to the selection instruction and a transmission policy supported by the electronic device.
  13. 一种电子设备,其特征在于,所述电子设备包括:An electronic device, comprising:
    接收模块,用于接收所述用户触发的选择指令,所述选择指令用于指示所述用户所选择的预设形状;a receiving module, configured to receive the user-triggered selection instruction, where the selection instruction is used to indicate a preset shape selected by the user;
    第一处理模块,用于在当前即时视频帧中确定所述预设形状所指示的区域;a first processing module, configured to determine an area indicated by the preset shape in a current instant video frame;
    判决模块,用于判断网络带宽是否满足第一预设条件、第二预设条件、第三预设条件和第四预设条件中的任意一个;a determining module, configured to determine whether the network bandwidth meets any one of a first preset condition, a second preset condition, a third preset condition, and a fourth preset condition;
    所述第一处理模块还用于根据网络带宽所满足的预设条件以及电子设备所支持的传输策略,触发以下模块中的任意一个:The first processing module is further configured to trigger any one of the following modules according to a preset condition that the network bandwidth meets and a transmission policy supported by the electronic device:
    第二处理模块,用于在网络带宽满足第一预设条件时,根据第一传输策略,传输包括所述预设形状所指示的区域的所述当前即时视频帧;或者,a second processing module, configured to: when the network bandwidth meets the first preset condition, transmit the current instant video frame that includes the area indicated by the preset shape according to the first transmission policy; or
    第三处理模块,用于在网络带宽满足第二预设条件时,根据第二传输策略,传输包括所述预设形状所指示的区域的所述当前即时视频帧;或者,a third processing module, configured to: when the network bandwidth meets the second preset condition, transmit the current instant video frame that includes the area indicated by the preset shape according to the second transmission policy; or
    第四处理模块,用于在网络带宽满足第三预设条件时,根据第三传输策略,传输包括所述预设形状所指示的区域的所述当前即时视频帧;或者,a fourth processing module, configured to: when the network bandwidth meets the third preset condition, transmit the current instant video frame that includes the area indicated by the preset shape according to the third transmission policy; or
    第五处理模块,用于在网络带宽满足第四预设条件时,根据第四传输策略,传输包括所述预设形状所指示的区域的所述当前即时视频帧。And a fifth processing module, configured to: when the network bandwidth meets the fourth preset condition, transmit the current instant video frame including the area indicated by the preset shape according to the fourth transmission policy.
  14. 一种电子设备,其特征在于,所述电子设备包括:An electronic device, comprising:
    第一获取模块,用于获取电子设备根据第一传输策略、第二传输策略、第 三传输策略以及第四传输策略中的任意一个传输的当前即时视频帧;a first acquiring module, configured to acquire, according to the first transmission policy, the second transmission policy, a current transmission video frame transmitted by any of the three transmission policies and the fourth transmission policy;
    第二获取模块,用于获取用户触发的选择指令,所述选择指令用于指示所述用户所选择的预设形状;a second acquiring module, configured to acquire a user-triggered selection instruction, where the selection instruction is used to indicate a preset shape selected by the user;
    显示模块,用于根据所述选择指令以及电子设备所支持的传输策略,显示所述当前即时视频帧。 And a display module, configured to display the current instant video frame according to the selection instruction and a transmission policy supported by the electronic device.
PCT/CN2016/086140 2015-06-19 2016-06-17 Real-time video transmission method and electronic apparatus WO2016202286A1 (en)

Applications Claiming Priority (10)

Application Number Priority Date Filing Date Title
CN201510346211.5 2015-06-19
CN201510346187.5 2015-06-19
CN201510346212.X 2015-06-19
CN201510346064.1 2015-06-19
CN201510346211.5A CN105163198B (en) 2015-06-19 2015-06-19 A kind of coding method of instant video and electronic equipment
CN201510346064.1A CN105163194A (en) 2015-06-19 2015-06-19 Real-time video coding method and electronic equipment
CN201510346212.XA CN105163199A (en) 2015-06-19 2015-06-19 Real-time video coding method and electronic equipment
CN201510346186.0A CN104967867A (en) 2015-06-19 2015-06-19 Instant video coding method and electronic device
CN201510346187.5A CN105049947A (en) 2015-06-19 2015-06-19 Transmission method of instant video and electronic equipment
CN201510346186.0 2015-06-19

Publications (1)

Publication Number Publication Date
WO2016202286A1 true WO2016202286A1 (en) 2016-12-22

Family

ID=57545051

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/086140 WO2016202286A1 (en) 2015-06-19 2016-06-17 Real-time video transmission method and electronic apparatus

Country Status (1)

Country Link
WO (1) WO2016202286A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111093076A (en) * 2019-12-25 2020-05-01 西安万像电子科技有限公司 Encoding mode determining method and device

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102984495A (en) * 2012-12-06 2013-03-20 北京小米科技有限责任公司 Video image processing method and device
CN104469253A (en) * 2015-01-05 2015-03-25 掌赢信息科技(上海)有限公司 Face beautification method in real-time video and electronic equipment
CN104616347A (en) * 2015-01-05 2015-05-13 掌赢信息科技(上海)有限公司 Expression migration method, electronic equipment and system
CN105049948A (en) * 2015-06-19 2015-11-11 美国掌赢信息科技有限公司 Coding method of instant video and electronic equipment
CN105049947A (en) * 2015-06-19 2015-11-11 美国掌赢信息科技有限公司 Transmission method of instant video and electronic equipment
CN105163197A (en) * 2015-06-19 2015-12-16 美国掌赢信息科技有限公司 Real-time video coding method and electronic equipment
CN105163194A (en) * 2015-06-19 2015-12-16 美国掌赢信息科技有限公司 Real-time video coding method and electronic equipment
CN105163196A (en) * 2015-06-19 2015-12-16 美国掌赢信息科技有限公司 Real-time video coding method and electronic equipment
CN105163195A (en) * 2015-06-19 2015-12-16 美国掌赢信息科技有限公司 Real-time video coding method and electronic equipment
CN105163198A (en) * 2015-06-19 2015-12-16 美国掌赢信息科技有限公司 Real-time video coding method and electronic equipment
CN105163125A (en) * 2015-06-19 2015-12-16 美国掌赢信息科技有限公司 Real-time video coding method and electronic equipment
CN105163199A (en) * 2015-06-19 2015-12-16 美国掌赢信息科技有限公司 Real-time video coding method and electronic equipment

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102984495A (en) * 2012-12-06 2013-03-20 北京小米科技有限责任公司 Video image processing method and device
CN104469253A (en) * 2015-01-05 2015-03-25 掌赢信息科技(上海)有限公司 Face beautification method in real-time video and electronic equipment
CN104616347A (en) * 2015-01-05 2015-05-13 掌赢信息科技(上海)有限公司 Expression migration method, electronic equipment and system
CN105049948A (en) * 2015-06-19 2015-11-11 美国掌赢信息科技有限公司 Coding method of instant video and electronic equipment
CN105049947A (en) * 2015-06-19 2015-11-11 美国掌赢信息科技有限公司 Transmission method of instant video and electronic equipment
CN105163197A (en) * 2015-06-19 2015-12-16 美国掌赢信息科技有限公司 Real-time video coding method and electronic equipment
CN105163194A (en) * 2015-06-19 2015-12-16 美国掌赢信息科技有限公司 Real-time video coding method and electronic equipment
CN105163196A (en) * 2015-06-19 2015-12-16 美国掌赢信息科技有限公司 Real-time video coding method and electronic equipment
CN105163195A (en) * 2015-06-19 2015-12-16 美国掌赢信息科技有限公司 Real-time video coding method and electronic equipment
CN105163198A (en) * 2015-06-19 2015-12-16 美国掌赢信息科技有限公司 Real-time video coding method and electronic equipment
CN105163125A (en) * 2015-06-19 2015-12-16 美国掌赢信息科技有限公司 Real-time video coding method and electronic equipment
CN105163199A (en) * 2015-06-19 2015-12-16 美国掌赢信息科技有限公司 Real-time video coding method and electronic equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
IAIN E. ET AL., H.264 AND MPEG-4 VIDEO COMPRESSION VIDEO CODING FOR NEXT-GENERATION MULTIMEDIA, 31 December 2003 (2003-12-31) *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111093076A (en) * 2019-12-25 2020-05-01 西安万像电子科技有限公司 Encoding mode determining method and device

Similar Documents

Publication Publication Date Title
CN113141380B (en) Coding optimization for blurred media
US10750121B2 (en) Modifying images from a camera
CN107251567B (en) Method and apparatus for generating annotations of a video stream
US8970656B2 (en) Static and dynamic video calling avatars
CN107111427B (en) Modifying video call data
CN105554429A (en) Video conversation display method and video conversation equipment
US10044979B2 (en) Acquiring regions of remote shared content with high resolution
WO2016110188A1 (en) Method and electronic device for aesthetic enhancements of face in real-time video
CN109121000A (en) A kind of method for processing video frequency and client
JP2016031411A (en) Radio communication system, display device and display method
US9035999B2 (en) Bandwidth reduction system and method
WO2024037556A1 (en) Image processing method and apparatus, and device and storage medium
WO2016202285A1 (en) Real-time video transmission method and electronic apparatus
CN105049947A (en) Transmission method of instant video and electronic equipment
CN105163195A (en) Real-time video coding method and electronic equipment
CN105049948A (en) Coding method of instant video and electronic equipment
US20180018398A1 (en) Positioning content in computer-generated displays based on available display space
WO2016202286A1 (en) Real-time video transmission method and electronic apparatus
CN104994405A (en) Instant-video transmission method and electronic equipment
CN105163196A (en) Real-time video coding method and electronic equipment
CN105163199A (en) Real-time video coding method and electronic equipment
CN105163198B (en) A kind of coding method of instant video and electronic equipment
CN105163194A (en) Real-time video coding method and electronic equipment
CN105163125A (en) Real-time video coding method and electronic equipment
JP5818326B2 (en) Video viewing history analysis method, video viewing history analysis apparatus, and video viewing history analysis program

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 11/05/2018)

122 Ep: pct application non-entry in european phase

Ref document number: 16811027

Country of ref document: EP

Kind code of ref document: A1