[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

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

Real-time video transmission method and electronic apparatus Download PDF

Info

Publication number
WO2016202287A1
WO2016202287A1 PCT/CN2016/086144 CN2016086144W WO2016202287A1 WO 2016202287 A1 WO2016202287 A1 WO 2016202287A1 CN 2016086144 W CN2016086144 W CN 2016086144W WO 2016202287 A1 WO2016202287 A1 WO 2016202287A1
Authority
WO
WIPO (PCT)
Prior art keywords
instant video
user
shape
video frame
area indicated
Prior art date
Application number
PCT/CN2016/086144
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 CN201510346079.8A external-priority patent/CN105163196A/en
Priority claimed from CN201510346189.4A external-priority patent/CN105163125A/en
Priority claimed from CN201510346076.4A external-priority patent/CN105163195A/en
Priority claimed from CN201510346190.7A external-priority patent/CN105163197A/en
Priority claimed from CN201510346227.6A external-priority patent/CN104994405A/en
Application filed by 美国掌赢信息科技有限公司, 武俊敏 filed Critical 美国掌赢信息科技有限公司
Publication of WO2016202287A1 publication Critical patent/WO2016202287A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/20Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using video object coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/478Supplemental services, e.g. displaying phone caller identification, shopping application
    • H04N21/4788Supplemental services, e.g. displaying phone caller identification, shopping application communicating with other users, e.g. chatting

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 acquiring the shape of the user input includes:
  • the partial curve included in the curve is a closed curve, and determining that the shape indicated by the closed curve is a shape input by the user;
  • the area indicated by the shape is determined in the current instant video frame by any of the following operations:
  • the position parameter includes a coordinate parameter, and according to the coordinate parameter, determining an area indicated by the shape in a current instant video frame; or
  • the location parameter includes a description parameter that identifies details indicated by the description parameter in the current instant video frame;
  • an area indicated by the shape is determined in the current instant video frame.
  • the transmitting, according to the first transmission policy, indicating that the shape including the user input is The current instant video frame of the region includes:
  • the current real video is processed according to an importance matrix corresponding to the current instant video frame, and the processing is performed.
  • the following instant video frames include:
  • the transmitting according to the second transmission policy, the area indicated by the shape of the user input is transmitted
  • the current instant video frame strategy includes:
  • the setting, by the setting, the quantization parameter corresponding to the at least one macroblock includes:
  • Encoding the at least one macroblock according to the quantization parameter, and generating the encoded The video frame includes:
  • the transmitting, by the third transmission policy, the area indicated by the shape of the user input is transmitted
  • the current instant video frame includes:
  • the acquiring includes a residual between a current instant video frame and a reference frame of an area indicated by a shape of the user input
  • the data includes:
  • the transmitting, by the fourth transmission policy, the current instant video frame that includes an area indicated by a shape of the user input include:
  • the acquiring, by using the feature parameter that is used to describe the area indicated by the shape of the user input includes:
  • the method further includes:
  • the shape input by the user is sent to other electronic devices.
  • a method for displaying an instant video comprising:
  • the current instant video frame is displayed according to the shape of the user input and a transmission policy supported by the electronic device.
  • an electronic device comprising:
  • a first processing module configured to determine an area indicated by the 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 including an area indicated by the shape of the user input 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 including an area indicated by the shape of the user input 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 including an area indicated by the shape of the user input 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 shape of the user input according to the fourth transmission policy.
  • the acquiring module is specifically configured to:
  • the partial curve included in the curve is a closed curve, and determining that the shape indicated by the closed curve is a shape input by the user;
  • the first processing module is configured to perform any one of the following operations:
  • the position parameter includes a coordinate parameter, and according to the coordinate parameter, determining an area indicated by the shape in a current instant video frame; or
  • the location parameter includes a description parameter that identifies details indicated by the description parameter in the current instant video frame;
  • an area indicated by the 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:
  • the third processing module is specifically configured to:
  • the fourth processing module is specifically configured to:
  • the fourth processing module is specifically configured to include:
  • the fifth processing module is specifically configured to include:
  • the fifth processing module is specifically configured to:
  • the electronic device further includes: a sending module, configured to:
  • the shape input by the user 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 transmission includes the shape according to the fourth transmission policy The current instant video frame of the indicated area.
  • the processor invokes program code stored in the memory to perform the following operations:
  • the partial curve included in the curve is a closed curve, and determining that the shape indicated by the closed curve is a shape input by the user;
  • the processor invokes the program code stored by the memory to perform any one of the following operations:
  • the position parameter includes a coordinate parameter, and according to the coordinate parameter, determining an area indicated by the shape in a current instant video frame; or
  • the location parameter includes a description parameter that identifies details indicated by the description parameter in the current instant video frame;
  • an area indicated by the shape is determined in the current instant video frame.
  • 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 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 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 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 shape input by the user 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 obtaining module configured to acquire a shape input by the user
  • a display module configured to display the current instant video frame according to the shape of the user input 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 stores a set of program codes, the processor The program code stored in the memory is called to perform the following operations:
  • the current instant video frame is displayed according to the shape of the user input.
  • An embodiment of the present invention provides an instant video transmission method and an electronic device, including: acquiring a shape input by a user; determining an area indicated by a shape input by the user in the current instant video frame; determining whether the network bandwidth satisfies the first preset a condition, a second preset condition, a third preset condition, and a fourth preset condition; if the network bandwidth satisfies the first preset condition, transmitting, according to the first transmission policy, the shape including the shape input by the user a current instant video frame of the area; if the network bandwidth satisfies the second preset condition, transmitting, according to the second transmission policy, a current instant video frame including an area indicated by the shape input by the user; if the network bandwidth satisfies the third preset condition, Transmitting, according to the third transmission policy, a current instant video frame including an area indicated by the shape input by the user; if the network bandwidth satisfies the fourth preset condition, transmitting, according to the fourth transmission policy, the area indicated
  • the shape including the shape input by the user may be indicated according to different network bandwidths.
  • the current instant video frames of the area adopt different transmission strategies. Compared with the traditional instant video transmission method, the user not only satisfies the user's attention to an area in the instant video more than other areas, and the user's definition of a certain area. As well as the requirement for detail retention is greater than other areas and other participants who want instant video interaction to divert attention to the diverse needs of the user-specified area, improve user experience, improve network bandwidth utilization, save network The resource is used to improve the transmission efficiency of the instant video, and the user experience is improved.
  • the method of the embodiment of the present invention performs the current video frame after acquiring the area indicated by the shape of the user input from the current instant video frame. Processing so that bandwidth resources are compared to traditional instant video coding methods In the case of change, more broadband resources are used for the transmission of the area indicated by the shape input by the user, thereby ensuring the transmission of the area indicated by the shape input by the user, further satisfying the user's access to an area in the instant video.
  • the attention is greater than other areas, the user's requirements for the clarity 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 diverse needs of the area specified by the user enhance the user experience.
  • the form of the area indicated by the user input is increased, the interest and interaction of the instant video interaction are improved, and the interaction mode of the user in the process of instant video interaction is further increased, thereby further satisfying the user's Diversified needs and improved 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 sending/acquising 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 sending/acquising module Realizing the sending and receiving of instant video, realizing the input of instant video through the video input module, realizing the display of the instant video and obtaining the instruction triggered by the user through the display module with the 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 acquisition of the video, the supported transmission strategy of the electronic device includes: the electronic device supports the first transmission policy, the second transmission policy, the third transmission policy, and the fourth transmission policy at the same time; 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 curve input by the user is obtained, and the partial curve included in the curve is a closed curve, and the shape indicated by the closed curve is determined to be a shape input by the user;
  • the position parameter includes any one of a coordinate parameter and a description parameter.
  • the area indicated by the shape is determined in the current instant video frame by any one of the following operations:
  • the position parameter includes a coordinate parameter, and the area indicated by the shape is determined in the current instant video frame according to the coordinate parameter;
  • the location parameter includes a description parameter that identifies the details indicated by the description parameter in the current instant video frame;
  • the area indicated by the shape is determined in the current instant video frame.
  • the current instant video frame including the area indicated by the shape input by the user 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 shape input by the user is transmitted, and ends.
  • the instant video frame including at least the area indicated by the shape input by the user 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 shape input by the user 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 shape input by the user 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 Current instant of the area indicated by the shape including the user input according to different network bandwidths Video frames adopt different transmission strategies. Compared with the traditional method of transmitting real-time video, the user not only satisfies the user's attention to a certain area in the instant video, but also the resolution and detail retention of the user.
  • the method of the embodiment of the present invention processes the current instant video frame after acquiring the area indicated by the shape of the user input 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 shape input by the user, thereby ensuring the transmission of the area indicated by the shape input by the user. , further satisfying the user's attention to a certain area in the instant video.
  • 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:
  • 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 shape input by the user increasing the form of the area indicated by the user input, improving the interest and interaction of the instant video interaction, increasing the interaction mode of the user in the process of instant video interaction, further satisfying the diversified needs of the user , improved user experience.
  • Embodiment 3 is a method for transmitting an instant video according to an embodiment of the present invention.
  • the location parameter includes a coordinate parameter, and as shown in FIG. 3, the method includes:
  • acquiring a curve of the user inputting at least one frame of the instant video frame wherein acquiring a partial curve corresponding to the any one frame of the instant video frame input by the user in any one of the at least one frame of the instant video frame
  • the process can be:
  • the method simplifies the operation steps and improves the user.
  • the step of inputting 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 area 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; in addition, by acquiring the curve of the user input, the form of the area indicated by the user input is increased.
  • the user's requirement for the definition of a certain area and the amount of detail retention is greater than other areas and The user wants other participants of the instant video interaction to move the attention to the diverse needs of the user-specified area, improving the user experience.
  • the prompt information for indicating that the user inputs at least the closed curve is displayed to the user.
  • whether the curve obtained by the user input includes a closed curve may be determined according to whether all points of the curve that constitute the user input include an identical point.
  • the prompt information may be text information.
  • the text information may be: “The curve you input does not include a closed curve, please input again”.
  • the specific determining process is not limited in the embodiment of the present invention.
  • the form of the area indicated by the user input is increased, further satisfying that the user's attention to an area in the instant video is greater than that of other areas, and the user is interested in 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 coordinate parameter is a coordinate parameter of a geometric center of a shape input by the user.
  • steps 301 to 303 are to implement the process of obtaining the shape of the user input.
  • the process may be implemented in other manners in addition to the manner of the foregoing steps.
  • the form of the area indicated by the user input is increased, and the interest and interaction of the instant video interaction are improved, which further satisfies the user's attention to an area in the instant video is greater than other areas and users.
  • the 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 area specified by the user, improving the user experience.
  • the area indicated by the shape of the user input is determined in the current instant video frame according to the coordinate parameter.
  • 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 306 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 306; if not, determine whether the network bandwidth is less than the first preset value, and is greater than or equal to a second preset value; if yes, and the electronic device supports the second transmission policy, step 308 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 311 is performed; if not, and the electronic device supports the fourth transmission policy, step 313 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 306 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 306; 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 308 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 311 is performed. If not, it is determined that the network bandwidth meets the fourth preset condition, and step 313 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.
  • Instant video processing can not only improve the utilization of network bandwidth, save network resources, improve the transmission efficiency of instant video, but also satisfy users' attention to a certain area in instant video when the network bandwidth is low.
  • 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, further improving the user experience.
  • an importance matrix of the area indicated by the 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 shape to a first value; setting a current shape in the non-shape
  • the importance metric of all pixels in the indicated area is a second value; wherein the first value is set to be greater than the second value, and the value of the importance metric 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. , improved user body
  • the importance matrix indicates the area indicated by the shape of the user input in the instant video frame and the area indicated by the shape of the non-user input, the user input indicated by the importance matrix is passed through the importance matrix.
  • the area indicated by the shape is reserved, and the area indicated by the shape of the non-user input in the instant video frame is replaced with the area indicated by the shape of the non-user input in the low-pass filtered instant video frame, so that the output is processed
  • the image of the area indicated by the shape input by the user in the instant video frame is an undistorted original image
  • the image of the area indicated by the shape not input by the user is an image not including the high frequency signal, so that after the processing is transmitted
  • 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 requirement for detail retention is greater than other areas and other participation that users want for instant video interaction.
  • the attention to the diverse needs of users to migrate specified area improve the user experience.
  • 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.
  • steps 306 to 307 are processes for transmitting a current instant video frame including an area indicated by a shape input by a user according to the first transmission policy, and may be implemented by other means in addition to the manner of the foregoing steps.
  • the specific embodiment of the present invention does not limit the specific manner.
  • 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.
  • 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.
  • a quantization parameter of a macroblock including an area indicated by all or part of the user input shape as a first value; since the value of the quantization parameter ranges from 0 to 51 in practical applications, the first value may be Any value defined between 0 to 25 by the user or any of the systems.
  • the quantization parameter of the macroblock that does not include the area indicated by all or part of the user input shape is set to a second value; the second value may be any value defined by any one of the user or system between 25 and 51.
  • the mutual attention and the picture quality requirement of the area indicated by the shape input by the user such as the area of the face in the instant video are greater than other areas, so the whole or part of the inclusion may be set.
  • the quantization parameter of the macroblock of the area indicated by the shape input by the user is a first value, and during the encoding process, more details of the area indicated by the shape of the user input are retained, so that user input can be guaranteed in the instant video process.
  • the picture quality of the area indicated by the shape satisfies the user's requirement for the picture detail of the area indicated by the shape input by the user, further satisfies the user's attention to a certain area in the instant video is greater than that of other areas, and the user
  • the clarity of the area and the requirement for detail retention 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, improving the user experience.
  • the mutual attention and the picture quality requirements of the area indicated by the shape input by the user 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
  • the quantization parameter of the macroblock of the area indicated by the shape input by the part of the user is a second value, and the details of the macroblock of the area indicated by the shape not including all or part of the user input are not reserved during the encoding process, and are reduced.
  • the bandwidth occupied by the macroblock of the area indicated by the shape indicated by all or part of the user input is not included, so that the method requires less bandwidth resources than the conventional instant video transmission method, thereby saving bandwidth resources.
  • setting the quantization parameter of the macroblock including the area indicated by the shape of all or part of the user input as the first numerical value setting the quantization parameter of the macroblock not including the area indicated by the shape of all or part of the user input is the second The value is such that during the encoding process, the details of the area indicated by the shape input by the user are retained, and the details of the area indicated by the shape of the non-user input are not retained, so that the area indicated by the shape input by the user is not On the basis of the distortion transmission, the bandwidth occupied by the area indicated by the shape of the non-user input is further reduced, so that the method can not only ensure the area indicated by the shape of the user input compared to the conventional instant video transmission method.
  • the picture quality is less, and the required bandwidth resources are less, thereby further saving bandwidth resources and improving 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 is to a certain
  • the definition of the area and the amount of detail retention are greater than other areas
  • the user wants to interact with other participants in real-time video will migrate attention 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 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 308 to step 310 a process of transmitting a current instant video frame including an area indicated by a shape input by a user according to the second transmission policy, in addition to the manner of the foregoing steps, may be implemented by other means.
  • the specific embodiment of the present invention does not limit the specific manner.
  • the macroblock is encoded such that during the encoding process, the details of the area indicated by the shape of the user input are preserved, and the details of the area indicated by the shape of the non-user input are not preserved, not only more bandwidth resources are used for user input.
  • the transmission of the area indicated by the shape, and the picture quality of the area indicated by the shape input by the user in the instant video is ensured, thereby ensuring the transmission of the area indicated by the shape input by the user, and improving the transmission efficiency of the instant video, further It 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 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 diverse needs of the area specified by the user enhance the user experience.
  • step 306 may also be performed.
  • the position parameter and the posture parameter of the area indicated by the shape input by the user are acquired 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 residual data between the current instant video frame and the reference frame including the area indicated by the shape input by the user is obtained according to the standard position parameter and the standard posture parameter.
  • the posture parameter of the area indicated by the shape input by the user in the reference frame is a standard posture parameter.
  • the acquisition includes the user 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 area indicated by the input shape is compared with the attitude parameter position parameter of the area indicated by the shape of the user input in the current instant video frame, and the reference frame.
  • the position parameter and the attitude parameter generate residual data, which reduces the data transmission amount and processing amount in the instant video transmission process, 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
  • the requirements of the region and the user for the clarity and detail retention of a certain area are greater than those of other regions and users.
  • real-time video transmission is realized by acquiring residual data between the area indicated by the shape of the user input in the current instant video frame and the area indicated by the shape of the user input in the reference frame, compared to the conventional instant.
  • the video transmission 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, and further satisfies the user's attention to an area in the instant video is greater than other areas and users.
  • the 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 area specified by the user, 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 shape input by a user according to the third transmission policy is implemented, and in addition to the manner of the foregoing steps, the method may be implemented by other means.
  • the specific embodiment of the present invention does not limit the specific manner.
  • the method saves network bandwidth resources and ensures the network bandwidth resource compared to the conventional transmission of all the instant video frames.
  • the picture quality of the area indicated by the shape input by the user in the instant video ensures the transmission of the area indicated by the shape input by the user, thereby improving the transmission efficiency of the instant video and further satisfying the user's access to an area in the instant video.
  • the degree of attention is greater than 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 diverse needs of the user-specified area. user experience.
  • step 311 before performing step 311, at least one of step 306 and step 308 may also be performed.
  • the area indicated by the shape input by the user is triangulated to obtain at least one of three Corner 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.
  • attitude parameter and the position parameter of the triangular area indicate the current position and posture of the triangular area
  • driving of the triangular area can be realized, and the area indicated by the shape of the current input video is formed by the current instant video.
  • the instant video frame saves the network bandwidth compared to the transmission of the current instant video frame, 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, the user is certain
  • the clarity of the area and the requirement for detail retention 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, improving the user experience.
  • the specific transmission mode is not limited in the embodiment of the present invention.
  • steps 313 to 314 are processes for implementing a current instant video frame including an area indicated by a shape input by a user according to the fourth transmission policy, and may be implemented by other means in addition to the manner of the foregoing steps.
  • the specific embodiment of the present invention does not limit the specific manner.
  • bandwidth resources are saved compared to transmitting all the instant video frame data, thereby further improving the transmission efficiency of the instant video, and further satisfying the user's instant video.
  • One area in the area is more focused than other areas, the user's requirements for the clarity of a certain area and the amount of detail retention are greater than other areas and the user wants instant Other participants in the video interaction have increased the user experience by migrating attention to the diverse needs of the user-specified area.
  • the method provided by the embodiment of the present invention may further include:
  • other electronic devices can display the shape of the user input 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, further Improve the user experience.
  • the selection command to other electronic devices the data of the shape input by the user 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 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 shape of the user input 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 sharpness indicated by the first 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
  • different transmission strategies are adopted for the current instant video frames including the area indicated by the shape input by the user, which is not only satisfied compared with the traditional instant video transmission method.
  • 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 demand of the specified area improves the user experience, improves the utilization of the network bandwidth, saves 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 is After obtaining the area indicated by the shape of the user input from the current instant video frame, the current instant video frame is processed, so that compared with the conventional instant video encoding method, in the case where the bandwidth resource is unchanged, more The broadband resource is used for the transmission of the area indicated by the shape input by the user, thereby ensuring the transmission of the area indicated by the shape input by the user, further satisfying the user's attention to a certain area in the instant video is greater than other areas, the user pair The definition of a certain area and the amount of detail retention are greater than other areas.
  • Embodiment 4 is a method for displaying an instant video according to an embodiment of the present invention.
  • the location parameter includes a coordinate parameter, and as shown in FIG. 8, the method includes:
  • the electronic device may obtain the processed current instant video frame sent by the other electronic device, and may also acquire, in the electronic device, a selection instruction triggered by the user to indicate the shape of the user input selected by the user, and the network bandwidth satisfies the pre- After the condition is set, the current instant video frame including at least the area is processed according to the importance matrix of the area indicated by the shape input by the user, and the processed current instant video frame is obtained.
  • the selection instruction includes a position parameter of a shape input by the user, and the position parameter includes a coordinate parameter.
  • the electronic device may acquire a selection instruction sent by another electronic device, or may acquire a selection instruction triggered by the user for indicating a shape of the user input selected by the user, and after the network bandwidth meets the preset condition, according to the user input An importance matrix of the area indicated by the shape, processing the current instant video frame including at least the area, and acquiring the processed current instant video frame, and acquiring the selection instruction.
  • the shape of the user input is displayed according to the position coordinates.
  • the specific display manner is not limited in the embodiment of the present invention.
  • 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 sends the code corresponding to the transmission policy to the electronic device after the prompt information is obtained, so that the electronic device configures the code.
  • the content of the user's attention of the electronic device is shifted to the area indicated by the shape of the user input in the instant video, thereby satisfying
  • 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 diverse needs of the designated area enhance the user experience.
  • the user attention of the electronic device can be further migrated to the area indicated by the shape input by the user in the instant video, thereby satisfying the user's attention to a certain 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.
  • the selection instruction includes at least one of a size parameter of a shape input by the user, a position parameter of a shape input by the user, a frame parameter of a shape input by the user, and an effect parameter of a shape input by the user. Therefore, the display form of instant video has been added to further meet the diverse needs of users and improve the user experience.
  • the interface for obtaining the current current video frame display after processing may be referred to b in FIG. 9, where a in FIG. 9 is an interface displayed after acquiring the current instant video frame, and in FIG. 9, the second display effect indicates The sharpness 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, 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 form of the area indicated by the user input is increased, the interest and interaction of the instant video interaction are improved, and the interaction mode of the user in the process of instant video interaction is further increased, thereby further satisfying the user's Diversified needs and improved user experience.
  • Embodiment 5 is a method for transmitting an instant video according to an embodiment of the present invention.
  • a location parameter of a shape input by a user includes a description parameter, where the description parameter is used to describe a user selected in an instant video frame.
  • the details of the area indicated by the shape input by the user exemplarily, if the shape indicated by the shape of the user input selected by the user includes at least a human face, the detail may be the eyes, nose, mouth and eyebrows of the user.
  • the method includes:
  • step 301 is the same as step 301, and details are not described herein again.
  • the method simplifies the operation steps and improves the user. Steps to enter the indicated area to improve live video
  • the transmission efficiency 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 improved by migrating the attention to the diversified needs of the area specified by the user; in addition, by obtaining the curve of the user input, the form of the area indicated by the user input is increased, and the user is further satisfied with the video in the instant video.
  • 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. , improved user experience.
  • step is the same as step 302, and details are not described herein again.
  • the form of the area indicated by the user input is increased, further satisfying that the user's attention to an area in the instant video is greater than that of other areas, and the user is interested in 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 303 is the same as step 303, and details are not described herein again.
  • step 1001 to the step 1003 is a process for obtaining the shape of the user input.
  • the process may be implemented in other manners, and the specific manner is not limited in the embodiment of the present invention.
  • the form of the area indicated by the user input is increased, and the interest and interaction of the instant video interaction are improved, which further satisfies the user's attention to an area in the instant video is greater than other areas and users.
  • the 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 area specified by the user, improving 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 feature points constituting the detail are set as the coordinates of the points in the input region.
  • the input region 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.
  • the input area is determined in the current instant video frame according to the details, which further satisfies the user's attention to a certain area in the instant video is greater than other areas, the user is certain
  • the clarity and detail retention requirements of an area are greater than other areas and other participants who want real-time video interactions to migrate attention to the diverse needs of the user-specified area, increasing the interactivity and interest of instant video. Further improve the user experience.
  • steps 1004 to 1005 are a process for determining an area indicated by the shape of the user input in the current instant video frame.
  • the process may be implemented in other manners. The specific method is not limited.
  • the area of the input video frame determines the input area, and when the detail position in the area input in the instant video frame changes, the user's attention to the details in the input area is greater than that of other areas and the input area.
  • the definition of detail and the amount of detail retention are greater than other areas and other participants who wish to interact with the video to move the attention to the details of the input area, thereby further satisfying the user's attention to a certain area in the instant video is greater than Other areas, users have more requirements for clarity and detail retention of a certain area than other areas and other participants who want instant video interactions to migrate attention to the diverse needs of the user-specified area, adding instant video Interactivity and fun further enhance the user experience.
  • step 1006 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 1007; 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 1009 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 1012 is performed; if not, and the electronic device supports the fourth transmission policy, step 1014 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 shape of the user input in the instant video frame and the area indicated by the shape of the non-user input, the importance matrix is used by the importance matrix.
  • the indicated area indicated by the shape of the user input is reserved, replacing the area indicated by the shape of the non-user input within the instant video frame with the area indicated by the shape of the non-user input within the low pass filtered instant video frame, such that Output the shape of the user input in the processed instant video frame
  • the image of the indicated area is an undistorted original image
  • the image of the area indicated by the shape not input by the user is an image that does not include a high frequency signal, thereby reducing the transmission time when transmitting the processed instant video frame.
  • the required bandwidth resources improve the transmission efficiency of instant video and further satisfy the user's instant video.
  • One area of interest is greater than other areas, the user's requirements for the clarity 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. Diversified needs and improved user experience.
  • step 305 is the same as step 305, and details are not described herein again.
  • steps 1007 to 1008 are a process for transmitting a current instant video frame including an area indicated by a shape input by a user according to the first transmission policy, and may be implemented by other means in addition to the manner of the foregoing steps.
  • the specific embodiment of the present invention does not limit the specific manner.
  • 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.
  • the mutual attention and the picture quality requirement of the area indicated by the shape input by the user such as the area of the face in the instant video are greater than other areas, so the whole or part of the inclusion may be set.
  • the quantization parameter of the macroblock of the area indicated by the shape input by the user is a first value, and during the encoding process, more details of the area indicated by the shape of the user input are retained, so that user input can be guaranteed in the instant video process.
  • the picture quality of the area indicated by the shape satisfies the user's requirement for the picture detail of the area indicated by the shape input by the user, further satisfies the user's attention to a certain area in the instant video is greater than that of other areas, and the user
  • the resolution of the area and the amount of detail retention are greater than other areas and other users who want instant video interaction Participants migrated their attention to the diverse needs of the area specified by the user, improving the user experience.
  • the mutual attention and the picture quality requirements of the area indicated by the shape input by the user 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
  • the quantization parameter of the macroblock of the area indicated by the shape input by the part of the user is a second value, and the details of the macroblock of the area indicated by the shape not including all or part of the user input are not reserved during the encoding process, and are reduced.
  • the bandwidth occupied by the macroblock of the area indicated by the shape indicated by all or part of the user input is not included, so that the method requires less bandwidth resources than the conventional instant video transmission method, thereby saving bandwidth resources.
  • setting the quantization parameter of the macroblock including the area indicated by the shape of all or part of the user input as the first numerical value setting the quantization parameter of the macroblock not including the area indicated by the shape of all or part of the user input is the second The value is such that during the encoding process, the details of the area indicated by the shape input by the user are retained, and the details of the area indicated by the shape of the non-user input are not retained, so that the area indicated by the shape input by the user is not On the basis of the distortion transmission, the bandwidth occupied by the area indicated by the shape of the non-user input is further reduced, so that the method can not only ensure the area indicated by the shape of the user input compared to the conventional instant video transmission method.
  • the picture quality is less, and the required bandwidth resources are less, thereby further saving bandwidth resources and improving 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 is to a certain
  • the definition of the area and the amount of detail retention are greater than other areas
  • the user wants to interact with other participants in real-time video will migrate attention 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 1009 to 1011 are a process for transmitting a current instant video frame including an area indicated by a shape input by a user according to the second transmission policy, and may be implemented by other means in addition to the manner of the foregoing steps.
  • the specific embodiment of the present invention does not limit the specific manner.
  • the details of the area indicated by the shape of the user input are retained, the shape of the non-user input
  • the details of the indicated area are not preserved, not only the use of more broadband resources for the transmission of the area indicated by the shape input by the user, but also the picture quality of the area indicated by the shape of the user input in the instant video, thereby ensuring
  • the transmission of the area indicated by the shape input by the user 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 detail retention
  • the demand for quantity is greater than other areas and other participants who want the instant video interaction to migrate the attention to the diverse needs of the area specified by the user, improving the user experience.
  • step is the same as step 309, and details are not described herein again.
  • the acquisition includes the user 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 area indicated by the input shape is compared with the attitude parameter position parameter of the area indicated by the shape of the user input in the current instant video frame, and the reference frame.
  • the position parameter and the attitude parameter generate residual data, which reduces the data transmission amount and processing amount in the instant video transmission process, 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
  • the requirements of the region and the user for the clarity and detail retention of a certain area are greater than those of other regions and users.
  • real-time video transmission is realized by acquiring residual data between the area indicated by the shape of the user input in the current instant video frame and the area indicated by the shape of the user input in the reference frame, compared to the conventional instant.
  • the video transmission 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, and further satisfies the user's attention to an area in the instant video is greater than other areas and users.
  • the 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 area specified by the user, improving the user experience.
  • step 310 is the same as step 310, and details are not described herein again.
  • step 1012 to step 1013 are processes for implementing a current instant video frame including an area indicated by a shape input by a user according to the third transmission policy, and may be implemented by other means in addition to the manner of the foregoing steps.
  • the specific embodiment of the present invention does not limit the specific manner.
  • the method saves network bandwidth resources and ensures the network bandwidth resource compared to the conventional transmission of all the instant video frames.
  • the picture quality of the area indicated by the shape input by the user in the instant video ensures the transmission of the area indicated by the shape input by the user, thereby improving the transmission efficiency of the instant video and further satisfying the user's access to an area in the instant video.
  • the degree of attention is greater than 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 diverse needs of the user-specified area. user experience.
  • step 1007 and step 1011 may also be performed before step 1012 is performed.
  • step is the same as step 311, and details are not described herein again.
  • attitude parameter and the position parameter of the triangular area indicate the current position and posture of the triangular area
  • driving of the triangular area can be realized, and the area indicated by the shape of the current input video is formed by the current instant video.
  • the instant video frame saves the network bandwidth compared to the transmission of the current instant video frame, 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, the user is certain
  • the clarity of the area and the requirement for detail retention 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, improving the user experience.
  • step 312 is the same and will not be further described herein.
  • step 1014 to the step 1015 is a process for transmitting a current instant video frame including an area indicated by a shape input by a user according to the fourth transmission policy, and may be implemented by other means in addition to the manner of the foregoing steps.
  • the specific embodiment of the present invention does not limit the specific manner.
  • bandwidth resources are saved compared to transmitting all the instant video frame data, thereby further improving the transmission efficiency of the instant video, and further satisfying the user's instant video.
  • One area of interest is greater than other areas, the user's requirements for the clarity 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. Diversified needs and improved user experience.
  • the method provided by the embodiment of the present invention may further include:
  • other electronic devices can display the shape of the user input indicated by the selection instruction, increasing the interaction form of the instant video, satisfying the user's The diverse needs of the instant video process further enhance the user experience.
  • the selection command to other electronic devices, the data of the shape input by the user 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 improving the user experience.
  • 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 c in FIG. In FIG. 11, the sharpness and the 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 and detail retention indicated by the third display effect are 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 shape of the user input is determined in the current instant video frame according to the detail, so that the shape input by the user in the instant video frame is In the case where the position of the detail in the indicated area 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 The clarity and detail retention requirements of the 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 interactivity and interest of the instant video, further Improve the user experience.
  • the area indicated by the shape input by the user includes a human face.
  • the position of the face changes the position of the area indicated by the shape input by the user also changes with the face. To ensure that the face is located The picture quality of the area.
  • 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
  • different transmission strategies are adopted for the current instant video frames including the area indicated by the shape input by the user, and the traditional instant video transmission method not only satisfies the user's access to a certain area in the instant video.
  • the degree of attention is greater than 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 diverse needs of the user-specified area.
  • the user experience also improves the utilization of network bandwidth and saves 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 user input from the current instant video frame. After the area indicated by the shape, the current instant video frame is processed so that Compared with the traditional instant video coding method, in the case where the bandwidth resources are unchanged, more broadband resources are used for the transmission of the area indicated by the shape of the user input, thereby ensuring the area indicated by the shape input by the user.
  • the transmission 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 definition of a certain area is larger than the other areas, and other participants who want the instant video interaction will pay attention to
  • the gradual migration to the diverse needs of the user-specified area increases the user experience.
  • the form of the area indicated by the user input is increased, the interest and interaction of the instant video interaction are improved, and the interaction mode of the user in the process of instant video interaction is further increased, thereby further satisfying the user's Diversified needs and improved 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 6 is a method for displaying an instant video according to an embodiment of the present invention.
  • a location parameter of a shape input by a user includes a description parameter, where the description parameter is used to describe a user selected in an instant video frame.
  • the details of the area indicated by the shape input by the user exemplarily, if the shape indicated by the shape of the user input selected by the user includes at least a human face, the detail may be the eyes, nose, mouth and eyebrows of the user.
  • the method includes:
  • step 801 is the same as step 801, and details are not described herein again.
  • the selection instruction includes a position parameter of a shape input by the user, and the position parameter includes a description parameter.
  • step 802 is the same as step 802, and will not be described again here.
  • step 1004 is the same as step 1004, 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 feature points constituting the detail are set as the coordinates of the points in the input region.
  • the processed current instant video frame is displayed.
  • the input and the input area are determined and displayed in the current instant video frame according to the details.
  • the specific embodiment of the present invention does not limit the specific manner.
  • the input area is determined in the current instant video frame according to the details, which further satisfies the user's attention to a certain area in the instant video is greater than other areas, the user is certain
  • the clarity and detail retention requirements of an area are greater than other areas and other participants who want real-time video interactions to migrate attention to the diverse needs of the user-specified area, increasing the interactivity and interest of instant video. Further improve the user experience.
  • step 1203 to the step 1204 is a process of displaying the current instant video frame according to the shape input by the user.
  • the process may be implemented in other manners. The method is not limited.
  • the user's attention of the electronic device is migrated to the input area in the instant video, thereby satisfying the user to somewhere in the instant video.
  • 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. , improved user experience.
  • the details indicated by the description parameters in the current instant video frame and determining the input region in the current instant video frame according to the details, in the case where the detail position in the region input in the instant video frame changes, the content is satisfied.
  • the user's attention to details in the input area is greater than other areas, the definition of the details of the input area and the amount of detail retention are greater than other areas and other participants who wish to interact with the video migrate the attention to the input.
  • 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 other participation of the user who wants instant video interaction.
  • the migration of attention to the diverse needs of the user-specified area increases the interactivity and fun of instant video, further enhancing the user experience.
  • by displaying the shape input by the user it is further possible to migrate the user attention of the electronic device to the shape indicated by the user input in the instant video.
  • the area so that the user's attention to an area in the instant video is greater than that of 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 gradual migration to the diverse needs of the user-specified area increases the user experience.
  • the processed current instant video frame acquires the shape input by the user, and the network bandwidth satisfies the preset condition, according to the importance matrix of the input region, the area indicated by the shape including at least the input shape is included.
  • the current instant video frame is processed and obtained, wherein the process of obtaining the processed current instant video frame may be implemented on other electronic devices, or may be implemented on the electronic device.
  • 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 sends the code corresponding to the transmission policy to the electronic device after the prompt information is obtained, so that the electronic device configures the code.
  • the interface for obtaining the current current 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, and if the user in the instant video interface is in the screen position, If the change occurs, the interface may refer to c in FIG. 13.
  • the sharpness and the 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.
  • 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.
  • 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 shape input by the user increasing the form of the area indicated by the user input, improving the interest and interaction of the instant video interaction, increasing the interaction mode of the user in the process of instant video interaction, further satisfying the diversified needs of the user , improved user experience.
  • the position of the detail in the area indicated by the shape input by the user in the instant video frame is still guaranteed.
  • the picture quality of the area in which the detail is located further satisfies 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 other areas and the user desires
  • Other participants in the instant video 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 obtaining module 1401 is configured to acquire a shape input by the user
  • the first processing module 1402 is configured to determine an area indicated by the shape in the current instant video frame
  • the determining module 1403 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 1402 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 a shape input by the user; or
  • the third processing module 1405 is configured to: when the network bandwidth meets the second preset condition, transmit, according to the second transmission policy, a current instant video frame that includes an area indicated by a shape input by the user; or
  • the fourth processing module 1406 is configured to: when the network bandwidth meets the third preset condition, transmit, according to the third transmission policy, a current instant video frame that includes an area indicated by a shape input by the user; 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 shape input by the user according to the fourth transmission policy.
  • the obtaining module 1401 is specifically configured to:
  • the partial curve included in the curve is a closed curve, and determining that the shape indicated by the closed curve is a shape input by the user;
  • the position parameter includes any one of a coordinate parameter and a feature parameter.
  • the first processing module 1402 is configured to perform any one of the following operations:
  • the position parameter includes a coordinate parameter, and the area indicated by the shape is determined in the current instant video frame according to the coordinate parameter;
  • the location parameter includes a description parameter that identifies the details indicated by the description parameter in the current instant video frame;
  • the area indicated by the 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 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 1406 is specifically configured to:
  • the fourth processing module 1406 is specifically configured to:
  • the fifth processing module 1407 is specifically configured to include:
  • the fifth processing module 1407 is specifically configured to:
  • 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
  • different transmission strategies are adopted for the current instant video frames including the area indicated by the shape input by the user, and the traditional instant video transmission method not only satisfies the user's access to a certain area in the instant video.
  • the degree of attention is greater than 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 diverse needs of the user-specified area.
  • the user experience also improves the utilization of network bandwidth and saves 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 user input from the current instant video frame. After the area indicated by the shape, the current instant video frame is processed so that Compared with the traditional instant video coding method, in the case where the bandwidth resources are unchanged, more broadband resources are used for the transmission of the area indicated by the shape of the user input, thereby ensuring the area indicated by the shape input by the user.
  • the transmission 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 definition of a certain area is larger than the other areas, and other participants who want the instant video interaction will pay attention to
  • the gradual migration to the diverse needs of the user-specified area increases the user experience.
  • the form of the area indicated by the user input is increased, the interest and interaction of the instant video interaction are improved, and the interaction mode of the user in the process of instant video interaction is further increased, thereby further satisfying the user's Diversified needs and improved 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 .
  • 1502 is 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 current instant video frame including the area indicated by the shape is transmitted according to the fourth transmission policy.
  • the processor 1503 calls the program code stored in the memory 1502 to perform the following operations:
  • the partial curve included in the curve is a closed curve, and determining that the shape indicated by the closed curve is a shape input by the user;
  • the position parameter includes any one of a coordinate parameter and a feature parameter.
  • the processor 1503 calls the program code stored in the memory 1502 to perform any one of the following operations:
  • the position parameter includes a coordinate parameter, and the area indicated by the shape is determined in the current instant video frame according to the coordinate parameter;
  • the location parameter includes a description parameter that identifies the details indicated by the description parameter in the current instant video frame;
  • the area indicated by the 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. 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:
  • 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. 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:
  • 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
  • different transmission strategies are adopted for the current instant video frames including the area indicated by the shape input by the user, and the traditional instant video transmission method not only satisfies the user's access to a certain area in the instant video.
  • the degree of attention is greater than 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 diverse needs of the user-specified area.
  • the utilization of the network bandwidth saves 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 is to obtain the shape of the user input from the current instant video frame, After the area, the current instant video frame is processed, so that compared with the traditional instant video coding method, more bandwidth resources are used for the transmission of the area indicated by the shape of the user input when the bandwidth resources are unchanged. Thereby, the transmission of the area indicated by the shape input by the user is ensured, further satisfying that the user's attention to an area in the instant video is greater than that of other areas, the user's requirement for the definition of a certain area and the amount of detail retention is greater than other areas.
  • the other needs of the user who wants the instant video interaction to move the attention to the diverse needs of the user-specified area, improving the user experience.
  • the form of the area indicated by the user input is increased, the interest and interaction of the instant video interaction are improved, and the interaction mode of the user in the process of instant video interaction is further increased, thereby further satisfying the user's Diversified needs and improved 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 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 obtaining module 1602 configured to acquire a shape input by a user
  • the display module 1603 is configured to display the current instant video frame according to the shape of the user input 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 form of the area indicated by the user input is increased, the interest and interaction of the instant video interaction are improved, and the interaction mode of the user in the process of instant video interaction is further increased, thereby further satisfying the user's Diversified needs and improved user experience.
  • Embodiment 10 is an electronic device 17 according to an embodiment of the present invention.
  • the electronic device is shown in FIG.
  • the device 17 includes a display 1701, a memory 1702, and a processor 1703 coupled to the display 1701, the memory 1702, wherein the memory 1702 stores a set of program codes, and 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 shape of the user input 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 form of the area indicated by the user input is increased, the interest and interaction of the instant video interaction are improved, and the interaction mode of the user in the process of instant video interaction is further increased, thereby further satisfying the user's Diversified needs and 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 storage medium may be a read only memory, a magnetic disk or an optical disk or the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The invention relates to the field of video technology. Provided are a real-time video transmission method and electronic apparatus comprising: acquiring a shape inputted by a user; determining a region indicated by the shape inputted by the user 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 comprising the region indicated by the shape inputted by the user, 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:
获取用户输入的形状;Get the shape entered by the user;
在当前即时视频帧中确定所述形状所指示的区域; Determining an area indicated by the 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 shape according to the first transmission policy; or
若网络带宽满足第二预设条件,则根据第二传输策略,传输包括所述形状所指示的区域的所述当前即时视频帧;或者,If the network bandwidth meets the second preset condition, transmitting the current instant video frame including the area indicated by the shape according to the second transmission policy; or
若网络带宽满足第三预设条件,则根据第三传输策略,传输包括所述形状所指示的区域的所述当前即时视频帧;或者,If the network bandwidth meets the third preset condition, transmitting the current instant video frame including the area indicated by the shape according to the third transmission policy; or
若网络带宽满足第四预设条件,则根据第四传输策略,传输包括所述形状所指示的区域的所述当前即时视频帧。If the network bandwidth meets the fourth preset condition, transmitting the current instant video frame including the area indicated by the shape according to the fourth transmission policy.
结合第一方面,在第一种可能的实现方式中,所述获取所述用户输入的形状包括:In conjunction with the first aspect, in a first possible implementation, the acquiring the shape of the user input includes:
获取用户输入的曲线,所述曲线所包括的部分曲线为闭合曲线,并确定所述闭合曲线所指示的形状为所述用户输入的形状;Obtaining a curve input by a user, the partial curve included in the curve is a closed curve, and determining that the shape indicated by the closed curve is a shape input by the user;
获取所述用户输入的位置参数,所述位置参数包括坐标参数和特征参数中的任意一个。Obtaining a position parameter input by the user, the position parameter including any one of a coordinate parameter and a feature parameter.
结合第一方面或第一方面的第一种可能的实现方式,在第二种可能的实现方式中,通过以下操作中的任意一个,在当前即时视频帧中确定所述形状所指示的区域:In conjunction with the first aspect or the first possible implementation of the first aspect, in a second possible implementation, the area indicated by the shape is determined in the current instant video frame by any of the following operations:
所述位置参数包括坐标参数,根据所述坐标参数,在当前即时视频帧中确定所述形状所指示的区域;或者,The position parameter includes a coordinate parameter, and according to the coordinate parameter, determining an area indicated by the shape in a current instant video frame; or
所述位置参数包括描述参数,在所述当前即时视频帧中识别所述描述参数所指示的细节;The location parameter includes a description parameter that identifies details indicated by the description parameter in the current instant video frame;
根据所述细节,在所述当前即时视频帧中确定所述形状所指示的区域。According to the details, an area indicated by the shape is determined in the current instant video frame.
结合第一方面至第一方面的第二种任一可能的实现方式,在第三种可能的实现方式中,所述根据第一传输策略,传输包括所述用户输入的形状所指示的 区域的所述当前即时视频帧包括:With reference to the first aspect to any one of the second possible implementation manners of the first aspect, in a third possible implementation, the transmitting, according to the first transmission policy, indicating that the shape including the user input is The current instant video frame of the region includes:
根据与所述当前即时视频帧对应的重要性矩阵,对所述当前即时视频进行处理,获取处理后的即时视频帧;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.
结合第一方面的第三种可能的实现方式,在第四种可能的实现方式中,所述根据与所述当前即时视频帧对应的重要性矩阵,对所述当前即时视频进行处理,获取处理后的即时视频帧包括:With reference to the third possible implementation manner of the first aspect, in a fourth possible implementation, the current real video is processed according to an importance matrix corresponding to the current instant video frame, and the processing is performed. The following instant video frames include:
获取所述形状所指示的区域的重要性矩阵;Obtaining an importance matrix of the area indicated by the 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 possible implementations of the fourth aspect, in a fifth possible implementation, the transmitting, according to the second transmission policy, the area indicated by the shape of the user input is transmitted The current instant video frame strategy includes:
将至少包括所述用户输入的形状所指示的区域的即时视频帧划分为至少一个宏块,并设置组成所述至少一个宏块所对应的量化参数;Dividing an instant video frame including at least an area indicated by the shape of the user input 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.
结合第一方面的第五种可能的实现方式,在第六种可能的实现方式中,所述设置组成所述至少一个宏块所对应的量化参数包括:With reference to the fifth possible implementation manner of the foregoing aspect, in a sixth possible implementation, the setting, by the setting, the quantization parameter corresponding to the at least one macroblock includes:
设置包括全部或者部分所述形状所指示的区域的宏块的量化参数为第一数值;Setting a quantization parameter of a macroblock including all or part of the area indicated by the 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 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 instant video frame.
结合第一方面至第一方面的第六种任一可能的实现方式,在第七种可能的实现方式中,所述根据第三传输策略,传输包括所述用户输入的形状所指示的区域的所述当前即时视频帧包括:With reference to the first aspect to any one of the sixth possible implementation manners of the first aspect, in a seventh possible implementation, the transmitting, by the third transmission policy, the area indicated by the shape of the user input is transmitted The current instant video frame includes:
获取包括所述用户输入的形状所指示的区域的当前即时视频帧与参考帧之间的残差数据;Acquiring residual data between a current instant video frame and a reference frame including an area indicated by the shape of the user input;
传输所述残差数据。Transmitting the residual data.
结合第一方面的第七种可能的实现方式,在第八种可能的实现方式中,所述获取包括所述用户输入的形状所指示的区域的当前即时视频帧与参考帧之间的残差数据包括:With reference to the seventh possible implementation of the first aspect, in an eighth possible implementation, the acquiring includes a residual between a current instant video frame and a reference frame of an area indicated by a shape of the user input The data includes:
获取所述形状所指示的区域的位置参数与姿态参数;Obtaining a position parameter and a posture parameter of the area indicated by the 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 shape according to the standard position parameter and the standard posture parameter.
结合第一方面的第二种可能的实现方式,在第九种可能的实现方式中,所述根据第四传输策略,传输包括所述用户输入的形状所指示的区域的所述当前即时视频帧包括:In conjunction with the second possible implementation of the first aspect, in a ninth possible implementation, the transmitting, by the fourth transmission policy, the current instant video frame that includes an area indicated by a shape of the user input include:
获取用于描述所述用户输入的形状所指示的区域的特征参数;Obtaining a feature parameter for describing an area indicated by the shape of the user input;
传输所述特征参数。Transmitting the feature parameters.
结合第一方面的第九种可能的实现方式,在第十种可能的实现方式中,所述获取用于描述所述用户输入的形状所指示的区域的特征参数包括:With reference to the ninth possible implementation manner of the first aspect, in the tenth possible implementation manner, the acquiring, by using the feature parameter that is used to describe the area indicated by the shape of the user input, includes:
对所述形状所指示的区域进行三角分割,获取至少一个三角区域;Triangulating the area indicated by the 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 tenth aspect, in an eleventh possible implementation, the method further includes:
将所述用户输入的形状发送至其他电子设备。The shape input by the user 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;
获取用户输入的形状;Get the shape entered by the user;
根据所述用户输入的形状以及电子设备所支持的传输策略,显示所述当前即时视频帧。The current instant video frame is displayed according to the shape of the user input and a transmission policy supported by the electronic device.
第三方面,提供了一种电子设备,所述电子设备包括:In a third aspect, an electronic device is provided, the electronic device comprising:
获取模块,用于获取用户输入的形状;An acquisition module for obtaining a shape input by a user;
第一处理模块,用于在当前即时视频帧中确定所述形状所指示的区域;a first processing module, configured to determine an area indicated by the 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 including an area indicated by the shape of the user input 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 including an area indicated by the shape of the user input 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 including an area indicated by the shape of the user input 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 shape of the user input according to the fourth transmission policy.
结合第三方面,在第一种可能的实现方式中,所述获取模块具体用于:With reference to the third aspect, in a first possible implementation manner, the acquiring module is specifically configured to:
获取用户输入的曲线,所述曲线所包括的部分曲线为闭合曲线,并确定所述闭合曲线所指示的形状为所述用户输入的形状;Obtaining a curve input by a user, the partial curve included in the curve is a closed curve, and determining that the shape indicated by the closed curve is a shape input by the user;
获取所述用户输入的位置参数,所述位置参数包括坐标参数和特征参数中的任意一个。Obtaining a position parameter input by the user, the position parameter including any one of a coordinate parameter and a feature parameter.
结合第三方面或第三方面的第一种可能的实现方式,在第二种可能的实现方式中,所述第一处理模块用于执行以下操作中的任意一个:With reference to the third aspect or the first possible implementation manner of the third aspect, in a second possible implementation manner, the first processing module is configured to perform any one of the following operations:
所述位置参数包括坐标参数,根据所述坐标参数,在当前即时视频帧中确定所述形状所指示的区域;或者,The position parameter includes a coordinate parameter, and according to the coordinate parameter, determining an area indicated by the shape in a current instant video frame; or
所述位置参数包括描述参数,在所述当前即时视频帧中识别所述描述参数所指示的细节;The location parameter includes a description parameter that identifies details indicated by the description parameter in the current instant video frame;
根据所述细节,在所述当前即时视频帧中确定所述形状所指示的区域。According to the details, an area indicated by the shape is determined in the current instant video frame.
结合第三方面至第三方面的第二种任一可能的实现方式,在第三种可能的实现方式中,所述第二处理模块具体用于:With reference to any of the third aspect to the second possible implementation of the third aspect, in a third possible implementation, 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 third possible implementation of the third aspect, in a fourth possible implementation, the second processing module is specifically configured to:
获取所述形状所指示的区域的重要性矩阵;Obtaining an importance matrix of the area indicated by the 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 fourth possible implementation of the third aspect, in a fifth possible implementation, the third processing module is specifically configured to:
将至少包括所述用户输入的形状所指示的区域的即时视频帧划分为至少一 个宏块,并设置组成所述至少一个宏块所对应的量化参数;Dividing an instant video frame including at least an area indicated by the shape of the user input into at least one Macroblocks, and setting quantization parameters 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 fifth possible implementation of the third aspect, in a sixth 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 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 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 instant video frame.
结合第三方面至第三方面的第六种任一可能的实现方式,在第七种可能的实现方式中,所述第四处理模块具体用于:With reference to any of the third aspect to the sixth possible implementation manner of the third aspect, in a seventh possible implementation, the fourth processing module is specifically configured to:
获取包括所述用户输入的形状所指示的区域的当前即时视频帧与参考帧之间的残差数据;Acquiring residual data between a current instant video frame and a reference frame including an area indicated by the shape of the user input;
传输所述残差数据。Transmitting the residual data.
结合第三方面的第七种可能的实现方式,在第八种可能的实现方式中,所述第四处理模块具体用于包括:With reference to the seventh possible implementation of the third aspect, in the eighth possible implementation, the fourth processing module is specifically configured to include:
获取所述形状所指示的区域的位置参数与姿态参数;Obtaining a position parameter and a posture parameter of the area indicated by the 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 shape according to the standard position parameter and the standard posture parameter.
结合第三方面的第二种可能的实现方式,在第九种可能的实现方式中,所 述第五处理模块具体用于包括:In conjunction with the second possible implementation of the third aspect, in a ninth possible implementation manner, The fifth processing module is specifically configured to include:
获取用于描述所述用户输入的形状所指示的区域的特征参数;Obtaining a feature parameter for describing an area indicated by the shape of the user input;
传输所述特征参数。Transmitting the feature parameters.
结合第三方面的第九种可能的实现方式,在第十种可能的实现方式中,所述第五处理模块具体用于:In conjunction with the ninth possible implementation of the third aspect, in a tenth possible implementation, the fifth processing module is specifically configured to:
对所述形状所指示的区域进行三角分割,获取至少一个三角区域;Triangulating the area indicated by the 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 any one of the third aspect to the tenth aspect of the third aspect, in an eleventh possible implementation, the electronic device further includes: a sending module, configured to:
将所述用户输入的形状发送至其他电子设备。The shape input by the user 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:
获取用户输入的形状;Get the shape entered by the user;
在当前即时视频帧中确定所述形状所指示的区域;Determining an area indicated by the 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 shape according to the first transmission policy; or
若网络带宽满足第二预设条件,则根据第二传输策略,传输包括所述形状所指示的区域的所述当前即时视频帧;或者,If the network bandwidth meets the second preset condition, transmitting the current instant video frame including the area indicated by the shape according to the second transmission policy; or
若网络带宽满足第三预设条件,则根据第三传输策略,传输包括所述形状所指示的区域的所述当前即时视频帧;或者,If the network bandwidth meets the third preset condition, transmitting the current instant video frame including the area indicated by the shape according to the third transmission policy; or
若网络带宽满足第四预设条件,则根据第四传输策略,传输包括所述形状 所指示的区域的所述当前即时视频帧。If the network bandwidth satisfies the fourth preset condition, the transmission includes the shape according to the fourth transmission policy The current instant video frame of the indicated area.
结合第四方面,在第一种可能的实现方式中,所述处理器调用所述存储器所存储的程序代码用于执行以下操作:In conjunction with the fourth aspect, in a first possible implementation, the processor invokes program code stored in the memory to perform the following operations:
获取用户输入的曲线,所述曲线所包括的部分曲线为闭合曲线,并确定所述闭合曲线所指示的形状为所述用户输入的形状;Obtaining a curve input by a user, the partial curve included in the curve is a closed curve, and determining that the shape indicated by the closed curve is a shape input by the user;
获取所述用户输入的位置参数,所述位置参数包括坐标参数和特征参数中的任意一个。Obtaining a position parameter input by the user, the position parameter including any one of a coordinate parameter and a feature parameter.
结合第四方面或第四方面的第一种可能的实现方式,在第二种可能的实现方式中,所述处理器调用所述存储器所存储的程序代码用于执行以下操作中的任意一个: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 any one of the following operations:
所述位置参数包括坐标参数,根据所述坐标参数,在当前即时视频帧中确定所述形状所指示的区域;或者,The position parameter includes a coordinate parameter, and according to the coordinate parameter, determining an area indicated by the shape in a current instant video frame; or
所述位置参数包括描述参数,在所述当前即时视频帧中识别所述描述参数所指示的细节;The location parameter includes a description parameter that identifies details indicated by the description parameter in the current instant video frame;
根据所述细节,在所述当前即时视频帧中确定所述形状所指示的区域。According to the details, an area indicated by the shape is determined in the current instant video frame.
结合第四方面至第四方面的第二种任一可能的实现方式,在第三种可能的实现方式中,所述处理器调用所述存储器所存储的程序代码用于执行以下操作:With reference to any of the second aspect to 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:
根据与所述当前即时视频帧对应的重要性矩阵,对所述当前即时视频进行处理,获取处理后的即时视频帧;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 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:
获取所述形状所指示的区域的重要性矩阵;Obtaining an importance matrix of the area indicated by the 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 fourth aspect to 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:
将至少包括所述用户输入的形状所指示的区域的即时视频帧划分为至少一个宏块,并设置组成所述至少一个宏块所对应的量化参数;Dividing an instant video frame including at least an area indicated by the shape of the user input 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 fifth possible implementation of the fourth aspect, in a sixth 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 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 shape as a 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 instant video frame.
结合第四方面至第四方面的第六种任一可能的实现方式,在第七种可能的实现方式中,所述处理器调用所述存储器所存储的程序代码用于执行以下操作:With reference to any of the sixth aspect to 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:
获取包括所述用户输入的形状所指示的区域的当前即时视频帧与参考帧之间的残差数据;Acquiring residual data between a current instant video frame and a reference frame including an area indicated by the shape of the user input;
传输所述残差数据。Transmitting the residual data.
结合第四方面的第七种可能的实现方式,在第八种可能的实现方式中,所述处理器调用所述存储器所存储的程序代码用于执行以下操作:In conjunction with the seventh possible implementation of the fourth aspect, in an eighth 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 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 shape according to the standard position parameter and the standard posture parameter.
结合第四方面的第二种可能的实现方式,在第九种可能的实现方式中,所述处理器调用所述存储器所存储的程序代码用于执行以下操作:In conjunction with the second 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:
获取用于描述所述用户输入的形状所指示的区域的特征参数;Obtaining a feature parameter for describing an area indicated by the shape of the user input;
传输所述特征参数。Transmitting the feature parameters.
结合第四方面的第九种可能的实现方式,在第十种可能的实现方式中,所述处理器调用所述存储器所存储的程序代码用于执行以下操作:In conjunction with the ninth possible implementation of the fourth aspect, in a tenth possible implementation, the processor invokes the program code stored in the memory to perform the following operations:
对所述形状所指示的区域进行三角分割,获取至少一个三角区域;Triangulating the area indicated by the 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 any one of the fourth to fourth possible implementations of the fourth aspect, in an eleventh possible implementation, the processor invokes the program code stored in the memory to perform the following operations:
将所述用户输入的形状发送至其他电子设备。The shape input by the user 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 obtaining module, configured to acquire a shape input by the user;
显示模块,用于根据所述用户输入的形状以及电子设备所支持的传输策略,显示所述当前即时视频帧。And a display module, configured to display the current instant video frame according to the shape of the user input 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 stores a set of program codes, the processor The program code stored in the memory is called to perform the following operations:
获取电子设备根据第一传输策略、第二传输策略、第三传输策略以及第四 传输策略中的任意一个传输的当前即时视频帧;Acquiring the electronic device according to the first transmission policy, the second transmission policy, the third transmission policy, and the fourth The current instant video frame transmitted by any one of the transmission policies;
获取用户输入的形状;Get the shape entered by the user;
根据所述用户输入的形状,显示所述当前即时视频帧。The current instant video frame is displayed according to the shape of the user input.
本发明实施例提供了一种即时视频的传输方法和电子设备,包括:获取用户输入的形状;在当前即时视频帧中确定用户输入的形状所指示的区域;判断网络带宽是否满足第一预设条件、第二预设条件、第三预设条件以及第四预设条件中的任意一个;若网络带宽满足第一预设条件,则根据第一传输策略,传输包括用户输入的形状所指示的区域的当前即时视频帧;若网络带宽满足第二预设条件,则根据第二传输策略,传输包括用户输入的形状所指示的区域的当前即时视频帧;若网络带宽满足第三预设条件,则根据第三传输策略,传输包括用户输入的形状所指示的区域的当前即时视频帧;若网络带宽满足第四预设条件,则根据第四传输策略,传输包括用户输入的形状所指示的区域的当前即时视频帧。通过判断网络带宽是否满足第一预设条件、第二预设条件、第三预设条件和第四预设条件中的任意一个,从而可以根据不同的网络带宽对包括用户输入的形状所指示的区域的当前即时视频帧采取不同的传输策略,相比于传统的即时视频的传输方法,不仅满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验,还提高了网络带宽的利用率,节省网络资源,从而提高了即时视频的传输效率,提高了用户体验;另外,由于本发明实施例的方法是在从当前即时视频帧中获取用户输入的形状所指示的区域后,对当前即时视频帧进行处理,使得相比于传统的即时视频编码方法,在带宽资源不变的情况下,将更多的宽带资源用于用户输入的形状所指示的区域的传输,从而保证了用户输入的形状所指示的区域的传输,进一步满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至 用户所指定的区域的多样化需求,提高了用户体验。另外,通过获取用户输入的形状,增加了用户输入所指示的区域的形式,提高了即时视频交互的趣味性和交互性,增加了用户在即时视频交互过程中的互动方式,进一步满足了用户的多样化需求,提高了用户体验。An embodiment of the present invention provides an instant video transmission method and an electronic device, including: acquiring a shape input by a user; determining an area indicated by a shape input by the user in the current instant video frame; determining whether the network bandwidth satisfies the first preset a condition, a second preset condition, a third preset condition, and a fourth preset condition; if the network bandwidth satisfies the first preset condition, transmitting, according to the first transmission policy, the shape including the shape input by the user a current instant video frame of the area; if the network bandwidth satisfies the second preset condition, transmitting, according to the second transmission policy, a current instant video frame including an area indicated by the shape input by the user; if the network bandwidth satisfies the third preset condition, Transmitting, according to the third transmission policy, a current instant video frame including an area indicated by the shape input by the user; if the network bandwidth satisfies the fourth preset condition, transmitting, according to the fourth transmission policy, the area indicated by the shape input by the user Current instant video frame. 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 shape including the shape input by the user may be indicated according to different network bandwidths. The current instant video frames of the area adopt different transmission strategies. Compared with the traditional instant video transmission method, the user not only satisfies the user's attention to an area in the instant video more than other areas, and the user's definition of a certain area. As well as the requirement for detail retention is greater than other areas and other participants who want instant video interaction to divert attention to the diverse needs of the user-specified area, improve user experience, improve network bandwidth utilization, save network The resource is used to improve the transmission efficiency of the instant video, and the user experience is improved. In addition, the method of the embodiment of the present invention performs the current video frame after acquiring the area indicated by the shape of the user input from the current instant video frame. Processing so that bandwidth resources are compared to traditional instant video coding methods In the case of change, more broadband resources are used for the transmission of the area indicated by the shape input by the user, thereby ensuring the transmission of the area indicated by the shape input by the user, further satisfying the user's access to an area in the instant video. The attention is greater than other areas, the user's requirements for the clarity 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 diverse needs of the area specified by the user enhance the user experience. In addition, by obtaining the shape input by the user, the form of the area indicated by the user input is increased, the interest and interaction of the instant video interaction are improved, and the interaction mode of the user in the process of instant video interaction is further increased, thereby further satisfying the user's Diversified needs and improved 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 sending/acquising 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 sending/acquising module Realizing the sending and receiving of instant video, realizing the input of instant video through the video input module, realizing the display of the instant video and obtaining the instruction triggered by the user through the display module with the 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 acquisition of the video, the supported transmission strategy of the electronic device includes: the electronic device supports the first transmission policy, the second transmission policy, the third transmission policy, and the fourth transmission policy at the same time; 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. Obtain a shape input by a user.
具体的,获取用户输入的曲线,曲线所包括的部分曲线为闭合曲线,并确定闭合曲线所指示的形状为用户输入的形状;Specifically, the curve input by the user is obtained, and the partial curve included in the curve is a closed curve, and the shape indicated by the closed curve is determined to be a shape input by the user;
获取用户输入的位置参数,位置参数包括坐标参数和描述参数中的任意一个。Obtain a position parameter input by the user, and the position parameter includes any one of a coordinate parameter and a description parameter.
102、在当前即时视频帧中确定形状所指示的区域。102. Determine an area indicated by the shape in the current instant video frame.
具体的,通过以下操作中的任意一个,在当前即时视频帧中确定形状所指示的区域:Specifically, the area indicated by the shape is determined in the current instant video frame by any one of the following operations:
位置参数包括坐标参数,根据坐标参数,在当前即时视频帧中确定形状所指示的区域;或者,The position parameter includes a coordinate parameter, and the area indicated by the shape is determined in the current instant video frame according to the coordinate parameter; or
位置参数包括描述参数,在当前即时视频帧中识别描述参数所指示的细节;The location parameter includes a description parameter that identifies the details indicated by the description parameter in the current instant video frame;
根据细节,在当前即时视频帧中确定形状所指示的区域。According to the details, the area indicated by the shape is determined in the current instant video frame.
103、判断网络带宽是否满足第一预设条件、第二预设条件、第三预设条件以及第四预设条件中的任意一个。103. 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.
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 shape input by the user 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 shape input by the user is transmitted, and ends.
具体的,将至少包括用户输入的形状所指示的区域的即时视频帧划分为至少一个宏块,并设置组成至少一个宏块所对应的量化参数;Specifically, the instant video frame including at least the area indicated by the shape input by the user 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 shape input by the user is transmitted, and ends.
具体的,获取包括用户输入的形状所指示的区域的当前即时视频帧与参考帧之间的残差数据;Specifically, acquiring residual data between the current instant video frame and the reference frame including the area indicated by the shape input by the user;
传输残差数据。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 shape input by the user is transmitted, and ends.
具体的,获取用于描述用户输入的形状所指示的区域的特征参数;Specifically, acquiring a feature parameter for describing an area indicated by a shape input by the user;
传输特征参数。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 the shape entered by the user to another electronic device.
本发明实施例提供了一种即时视频的传输方法,通过判断网络带宽是否满足第一预设条件、第二预设条件、第三预设条件和第四预设条件中的任意一个,从而可以根据不同的网络带宽对包括用户输入的形状所指示的区域的当前即时 视频帧采取不同的传输策略,相比于传统的即时视频的传输方法,不仅满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验,还提高了网络带宽的利用率,节省网络资源,从而提高了即时视频的传输效率,提高了用户体验;另外,由于本发明实施例的方法是在从当前即时视频帧中获取用户输入的形状所指示的区域后,对当前即时视频帧进行处理,使得相比于传统的即时视频编码方法,在带宽资源不变的情况下,将更多的宽带资源用于用户输入的形状所指示的区域的传输,从而保证了用户输入的形状所指示的区域的传输,进一步满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验。另外,通过获取用户输入的形状,增加了用户输入所指示的区域的形式,提高了即时视频交互的趣味性和交互性,增加了用户在即时视频交互过程中的互动方式,进一步满足了用户的多样化需求,提高了用户体验。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 Current instant of the area indicated by the shape including the user input according to different network bandwidths Video frames adopt different transmission strategies. Compared with the traditional method of transmitting real-time video, the user not only satisfies the user's attention to a certain area in the instant video, but also the resolution and detail retention of the user. The requirements 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, improve the user experience, improve the utilization of network bandwidth, save network resources, and thus improve The transmission efficiency of the instant 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 shape of the user input from the current instant video frame. Compared with the traditional instant video coding method, when the bandwidth resources are unchanged, more broadband resources are used for the transmission of the area indicated by the shape input by the user, thereby ensuring the transmission of the area indicated by the shape input by the user. , further satisfying the user's attention to a certain area in the instant video. Other areas, users of the clarity and detail of a reserved area larger than the amount of the other regions as well as the user wants to interact with real-time video of other participants to migrate attention to the diverse needs of the region specified by the user, improve the user experience. In addition, by obtaining the shape input by the user, the form of the area indicated by the user input is increased, the interest and interaction of the instant video interaction are improved, and the interaction mode of the user in the process of instant video interaction is further increased, thereby further satisfying the user's Diversified needs and improved 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. Obtain a shape input by a user.
203、根据用户输入的形状以及用户所支持的传输策略,显示当前即时视频帧。203. Display the current instant video frame according to the shape input by the user and the transmission policy supported by the user.
本发明实施例提供了一种即时视频的显示方法,通过获取并显示根据第一传输策略、第二传输策略、第三传输策略以及第四传输策略中的任意一个传输的当前即时视频帧,满足了即时视频过程中用户希望对所选择的区域的清晰度以及细节保留量大于其他区域的需求,进一步提高了用户体验。另外,通过获 取用户输入的形状,增加了用户输入所指示的区域的形式,提高了即时视频交互的趣味性和交互性,增加了用户在即时视频交互过程中的互动方式,进一步满足了用户的多样化需求,提高了用户体验。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 Taking the shape input by the user, increasing the form of the area indicated by the user input, improving the interest and interaction of the instant video interaction, increasing the interaction mode of the user in the process of instant video interaction, further satisfying the diversified needs of the user , improved user experience.
实施例三为本发明实施例提供的一种即时视频的传输方法,在本发明实施例中,位置参数包括坐标参数,参照图3所示,该方法包括:Embodiment 3 is a method for transmitting an instant video according to an embodiment of the present invention. In the embodiment of the present invention, the location parameter includes a coordinate parameter, and as shown in FIG. 3, the method includes:
301、获取用户输入的曲线,曲线所包括的部分曲线为闭合曲线。301. Obtain a curve input by a user, and a part of the curve included in the curve is a closed curve.
具体的,获取用户在至少一帧即时视频帧输入的曲线,其中,获取用户在该至少一帧即时视频帧中的任意一帧即时视频帧输入的与该任意一帧即时视频帧对应的部分曲线的过程可以为:Specifically, acquiring a curve of the user inputting at least one frame of the instant video frame, wherein acquiring a partial curve corresponding to the any one frame of the instant video frame input by the user in any one of the at least one frame of the instant video frame The process can be:
获取用户在该任意一帧即时视频帧之前的所有帧即时视频帧输入的多个部分曲线以及该多个部分曲线的位置参数,该位置参数包括坐标参数和特征参数中的至少一个;Obtaining, by the user, a plurality of partial curves of all frame instant video frame inputs before the any one frame of the instant video frame and position parameters of the plurality of partial curves, the position parameter including at least one of a coordinate parameter and a feature parameter;
根据多个部分曲线的位置参数,将该多个部分曲线复制至该任意一帧即时视频帧;Copying the plurality of partial curves to the arbitrary one frame of the instant video frame according to the positional parameters of the plurality of partial curves;
获取用户在该至少一帧即时视频帧中的任意一帧即时视频帧输入的与该任意一帧即时视频帧对应的部分曲线;Obtaining a partial curve corresponding to the any one frame of the instant video frame input by the user in any one of the at least one frame of the instant video frame;
获取用户输入的该部分曲线的位置参数。Get the positional parameters of the part of the curve entered by the user.
通过获取用户输入的曲线,使得可以通过根据用户输入的曲线确定用户所指示的区域,相比于通过用户选择用户输入的形状来确定用户所指示的区域,该方法简化了操作步骤,提高了用户输入所指示的区域的步骤,提高即时视频的传输效率,进一步满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验;另外,通过获取用户输入的曲线,增加了用户输入所指示的区域的形式,进一步满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用 户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验。By obtaining the curve input by the user, it is possible to determine the area indicated by the user according to the curve input by the user, and to determine the area indicated by the user by selecting the shape of the user input by the user, the method simplifies the operation steps and improves the user. The step of inputting 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 area 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; in addition, by acquiring the curve of the user input, the form of the area indicated by the user input is increased. Further satisfying the user's attention to a certain area in the instant video is greater than other areas, the user's requirement for the definition of a certain area and the amount of detail retention is greater than other areas and The user wants other participants of the instant video interaction to move the attention to the diverse needs of the user-specified area, improving the user experience.
为了使本领域技术人员更进一步了解本发明实施例的方法,下面将结合附图对本发明实施例的方法作更进一步的说明,假设即时视频界面参照图4中的a所示,用户在该界面输入的曲线参照图4中的b所示。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 input curve is shown with reference to b in Fig. 4.
可选的,若检测到获取用户输入的曲线不包括闭合曲线,则向用户显示用于指示用户至少输入闭合曲线的提示信息。Optionally, if it is detected that the curve for obtaining the user input does not include the closed curve, the prompt information for indicating that the user inputs at least the closed curve is displayed to the user.
其中,可以根据组成用户输入的曲线所有点是否包括一个相同的点来判断获取用户输入的曲线是否包括闭合曲线。Wherein, whether the curve obtained by the user input includes a closed curve may be determined according to whether all points of the curve that constitute the user input include an identical point.
该提示信息可以为文字信息,示例性的,该文字信息可以为:“您所输入的曲线不包括闭合曲线,请再次输入”。The prompt information may be text information. For example, the text information may be: “The curve you input does not include a closed curve, please input again”.
302、确定闭合曲线所指示的形状为用户输入的形状。302. Determine that the shape indicated by the closed curve is a shape input by the user.
具体的,本发明实施例对具体的确定过程不加以限定。Specifically, the specific determining process is not limited in the embodiment of the present invention.
通过确定闭合曲线所指示的形状为用户输入的形状,增加了用户输入所指示的区域的形式,进一步满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验。By determining that the shape indicated by the closed curve is the shape input by the user, the form of the area indicated by the user input is increased, further satisfying that the user's attention to an area in the instant video is greater than that of other areas, and the user is interested in 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.
假设用户输入的曲线参照图4中的b所示,则确定闭合曲线所指示的形状为用户输入的形状则可以参照图5所示。Assuming that the curve input by the user is as shown by b in FIG. 4, it is determined that the shape indicated by the closed curve is the shape input by the user, and can be referred to FIG.
303、获取用户输入的位置参数,位置参数包括坐标参数。303. Obtain a location parameter input by the user, where the location parameter includes a coordinate parameter.
具体的,该坐标参数为用户输入的形状的几何中心的坐标参数。Specifically, the coordinate parameter is a coordinate parameter of a geometric center of a shape input by the user.
本发明实施例对具体的确定方式不加以限定。The specific manner of determining the embodiment of the present invention is not limited.
值得注意的是,步骤301至步骤303是实现获取用户输入的形状的过程,除了上述步骤的方式之外,还可以通过其他方式实现该过程,本发明实施例对具体的方式不加以限定。 It is to be noted that the steps 301 to 303 are to implement the process of obtaining the shape of the user input. The process may be implemented in other manners in addition to the manner of the foregoing steps.
通过获取用户输入的形状,增加了用户输入所指示的区域的形式,提高了即时视频交互的趣味性和交互性,进一步满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验。By obtaining the shape of the user input, the form of the area indicated by the user input is increased, and the interest and interaction of the instant video interaction are improved, which further satisfies the user's attention to an area in the instant video is greater than other areas and users. The 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 area specified by the user, improving the user experience.
304、在当前即时视频帧中确定形状所指示的区域。304. Determine an area indicated by the shape in the current instant video frame.
具体的,根据坐标参数,在当前即时视频帧中确定用户输入的形状所指示的区域。Specifically, the area indicated by the shape of the user input is determined in the current instant video frame according to the coordinate parameter.
该过程可以为: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.
305、判断网络带宽是否大于或者等于第一预设值,若是,且电子设备支持第一传输策略,则执行步骤306;若不是,则判断网络带宽是否小于第一预设值,且大于或者等于第二预设值;若是,且电子设备支持第二传输策略,则执行步骤308;若不是,则判断网络带宽小于第二预设值,且大于或者等于第三预设值;若是,且电子设备支持第三传输策略,则执行步骤311;若不是,且电子设备支持第四传输策略,则执行步骤313。305. 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 306; if not, determine whether the network bandwidth is less than the first preset value, and is greater than or equal to a second preset value; if yes, and the electronic device supports the second transmission policy, step 308 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 311 is performed; if not, and the electronic device supports the fourth transmission policy, step 313 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:
判断网络带宽是否大于或者等于第一预设值,若是,则判定网络带宽满足第一预设条件,并执行步骤306;若不是,则判断网络带宽是否大于或者等于第二预设值,若是,则判定网络带宽满足第二预设条件,并执行步骤308;若不是,则判断网络带宽是否大于或者等于第三预设值,若是,则判定网络带宽满足第三预设条件,并执行步骤311;若不是,则判定网络带宽满足第四预设条件,并执行步骤313。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 306; 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 308 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 311 is performed. If not, it is determined that the network bandwidth meets the fourth preset condition, and step 313 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.
由于通过判断网络带宽是否满足预设条件,所以在判定网络带宽低时,对 即时视频进行处理,不仅可以提高网络带宽的利用率,节省网络资源,提高即时视频的传输效率,还可以在网络带宽低时,满足用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,进一步提高了用户体验。Since it is determined whether the network bandwidth satisfies the preset condition, when it is determined that the network bandwidth is low, Instant video processing can not only improve the utilization of network bandwidth, save network resources, improve the transmission efficiency of instant video, but also satisfy users' attention to a certain area in instant video when the network bandwidth is low. 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, further improving the user experience.
306、根据与当前即时视频帧对应的重要性矩阵,对当前即时视频进行处理,获取处理后的即时视频帧。306. 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 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 shape to a first value; setting a current shape in the non-shape The importance metric of all pixels in the indicated area is a second value; wherein the first value is set to be greater than the second value, and the value of the importance metric 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 PCTCN2016086144-appb-000001
Figure PCTCN2016086144-appb-000001
其中,out为处理后的即时视频帧,src为当前即时视频帧,low为滤波后的当前即时视频帧,
Figure PCTCN2016086144-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 PCTCN2016086144-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. , improved user body In addition, since the importance matrix indicates the area indicated by the shape of the user input in the instant video frame and the area indicated by the shape of the non-user input, the user input indicated by the importance matrix is passed through the importance matrix. The area indicated by the shape is reserved, and the area indicated by the shape of the non-user input in the instant video frame is replaced with the area indicated by the shape of the non-user input in the low-pass filtered instant video frame, so that the output is processed The image of the area indicated by the shape input by the user in the instant video frame is an undistorted original image, and the image of the area indicated by the shape not input by the user is an image not including the high frequency signal, so that after the processing is transmitted 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. And the requirement for detail retention is greater than other areas and other participation that users want for instant video interaction. The attention to the diverse needs of users to migrate specified area, improve the user experience.
307、传输处理后的即时视频帧,结束。307. The instant video frame after the transmission process ends.
具体的,将该处理后的即时视频帧输入编码器,由编码器对该处理后的即时视频帧编码,生成码流数据;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.
值得注意的是,步骤306至步骤307是实现根据第一传输策略,传输包括用户输入的形状所指示的区域的当前即时视频帧的过程,除了上述步骤的方式之外,还可以通过其他方式实现该过程,本发明实施例对具体的方式不加以限定。It should be noted that steps 306 to 307 are processes for transmitting a current instant video frame including an area indicated by a shape input by a user according to the first transmission policy, and may be implemented by other means in addition to the manner of the foregoing steps. The specific embodiment of the present invention does not limit the specific manner.
由于本发明实施例是根据重要性矩阵对当前即时视频帧进行处理,而重要性矩阵指示了当前即时视频内每一个像素的重要性度量值,从而对每一个像素点进行处理,提高了处理后的即时视频的画面质量,进一步满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验。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.
308、将至少包括用户输入的形状所指示的区域的即时视频帧划分为至少一 个宏块,并设置组成至少一个宏块所对应的量化参数。308. Divide an instant video frame that includes at least an area indicated by a shape input by the user into at least one Macroblocks, and set the quantization parameters corresponding to at least one macroblock.
具体的,可以按照预设的划分规则将处理后的当前即时视频帧划分为至少一个宏块,本发明实施例对具体的划分规则不加以限定。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之间用户或者系统中的任意一个所定义的任意数值。Setting a quantization parameter of a macroblock including an area indicated by all or part of the user input shape as a first value; since the value of the quantization parameter ranges from 0 to 51 in practical applications, the first value may be Any value defined between 0 to 25 by the user or any of the systems.
设置不包括全部或者部分用户输入的形状所指示的区域的宏块的量化参数为第二数值;该第二数值可以为25至51之间用户或者系统中的任意一个所定义的任意数值。The quantization parameter of the macroblock that does not include the area indicated by all or part of the user input shape is set to a second value; the second value may be any value defined by any one of the user or system between 25 and 51.
由于在即时视频交互的场景下,交互双方对于即时视频中如人脸所在区域等用户输入的形状所指示的区域的关注度和画面质量要求大于其他区域,所以,可以通过设置该包括全部或者部分用户输入的形状所指示的区域的宏块的量化参数为第一数值,在编码过程中,较多的保留该用户输入的形状所指示的区域的细节,使得在即时视频过程中能够保证用户输入的形状所指示的区域的画面质量,满足用户对用户输入的形状所指示的区域的画面细节的要求,进一步满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验。另外,由于在即时视频交互的场景下,交互双方对于即时视频中如人脸所在区域等用户输入的形状所指示的区域的关注度和画面质量要求大于其他区域,所以,可以设置不包括全部或者部分用户输入的形状所指示的区域的宏块的量化参数为第二数值,在编码过程中,对该不包括全部或者部分用户输入的形状所指示的区域的宏块的细节不进行保留,减少不包括全部或者部分用户输入的形状所指示的区域的宏块在传输时所占用的带宽,使得相比于传统的即时视频传输方法,该方法所需的带宽资源更少,从而能够节省带宽资源,提高即时视频传输的效率,进一步满足了用户对即时视频中的某一区域的关注度大于其他区域、 用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验。另外,通过设置包括全部或者部分用户输入的形状所指示的区域的宏块的量化参数为第一数值,设置不包括全部或者部分用户输入的形状所指示的区域的宏块的量化参数为第二数值,使得在编码过程中,保留了用户输入的形状所指示的区域的细节,对非用户输入的形状所指示的区域的细节不进行保留,使得在对用户输入的形状所指示的区域进行不失真传输的基础上,进一步减少了非用户输入的形状所指示的区域在传输时所占用的带宽,使得相比于传统的即时视频传输方法,该方法不仅能够保证用户输入的形状所指示的区域的画面质量,而且所需的带宽资源更少,从而能够进一步节省带宽资源,提高即时视频传输的效率,进一步满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验。In the scenario of the instant video interaction, the mutual attention and the picture quality requirement of the area indicated by the shape input by the user such as the area of the face in the instant video are greater than other areas, so the whole or part of the inclusion may be set. The quantization parameter of the macroblock of the area indicated by the shape input by the user is a first value, and during the encoding process, more details of the area indicated by the shape of the user input are retained, so that user input can be guaranteed in the instant video process. The picture quality of the area indicated by the shape satisfies the user's requirement for the picture detail of the area indicated by the shape input by the user, further satisfies the user's attention to a certain area in the instant video is greater than that of other areas, and the user The clarity of the area and the requirement for detail retention 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, improving the user experience. In addition, in the scenario of real-time video interaction, the mutual attention and the picture quality requirements of the area indicated by the shape input by the user 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 The quantization parameter of the macroblock of the area indicated by the shape input by the part of the user is a second value, and the details of the macroblock of the area indicated by the shape not including all or part of the user input are not reserved during the encoding process, and are reduced. The bandwidth occupied by the macroblock of the area indicated by the shape indicated by all or part of the user input is not included, so that the method requires less bandwidth resources than the conventional instant video transmission method, thereby saving bandwidth resources. To improve the efficiency of instant video transmission, and further satisfy 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 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. Further, by setting the quantization parameter of the macroblock including the area indicated by the shape of all or part of the user input as the first numerical value, setting the quantization parameter of the macroblock not including the area indicated by the shape of all or part of the user input is the second The value is such that during the encoding process, the details of the area indicated by the shape input by the user are retained, and the details of the area indicated by the shape of the non-user input are not retained, so that the area indicated by the shape input by the user is not On the basis of the distortion transmission, the bandwidth occupied by the area indicated by the shape of the non-user input is further reduced, so that the method can not only ensure the area indicated by the shape of the user input compared to the conventional instant video transmission method. The picture quality is less, and the required bandwidth resources are less, thereby further saving bandwidth resources and improving 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 is to a certain The definition of the area and the amount of detail retention are greater than other areas And the user wants to interact with other participants in real-time video will migrate attention to the diverse needs of the region specified by the user, improve the user experience.
309、根据量化参数,对至少一个宏块进行编码,生成编码后的即时视频帧。309. 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 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.
310、传输编码后的即时视频帧,结束。310. Transmit the encoded instant video frame and end.
具体的,本发明实施例对具体的传输方式不加以限定。Specifically, the specific transmission mode is not limited in the embodiment of the present invention.
值得注意的是,步骤308至步骤310是实现根据第二传输策略,传输包括用户输入的形状所指示的区域的当前即时视频帧的过程,除了上述步骤的方式之外,还可以通过其他方式实现该过程,本发明实施例对具体的方式不加以限定。It should be noted that, in step 308 to step 310, a process of transmitting a current instant video frame including an area indicated by a shape input by a user according to the second transmission policy, in addition to the manner of the foregoing steps, may be implemented by other means. The specific embodiment of the present invention does not limit the specific manner.
由于根据用于指示宏块在编码过程中的精细程度的量化参数,对至少一个 宏块进行编码,使得在编码过程中,保留了用户输入的形状所指示的区域的细节,非用户输入的形状所指示的区域的细节不加以保留,不仅将更多的宽带资源用于用户输入的形状所指示的区域的传输,而且保证了即时视频中用户输入的形状所指示的区域的画面质量,从而保证了用户输入的形状所指示的区域的传输,提高了即时视频的传输效率,进一步满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验。Due to at least one of the quantization parameters according to the degree of fineness used to indicate the macroblock in the encoding process The macroblock is encoded such that during the encoding process, the details of the area indicated by the shape of the user input are preserved, and the details of the area indicated by the shape of the non-user input are not preserved, not only more bandwidth resources are used for user input. The transmission of the area indicated by the shape, and the picture quality of the area indicated by the shape input by the user in the instant video is ensured, thereby ensuring the transmission of the area indicated by the shape input by the user, and improving the transmission efficiency of the instant video, further It 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 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 diverse needs of the area specified by the user enhance the user experience.
可选的,在实际应用中,在执行步骤308之前,还可以执行步骤306。Optionally, in the actual application, before step 308 is performed, step 306 may also be performed.
311、获取包括用户输入的形状所指示的区域的当前即时视频帧与参考帧之间的残差数据。311. Acquire residual data between the current instant video frame and the reference frame including the area indicated by the shape input by the user.
具体的,从当前即时视频帧中获取用户输入的形状所指示的区域的位置参数与姿态参数。Specifically, the position parameter and the posture parameter of the area indicated by the shape input by the user are acquired 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 residual data between the current instant video frame and the reference frame including the area indicated by the shape input by the user is obtained according to the standard position parameter and the standard posture parameter. The posture parameter of the area indicated by the shape input by the user in the reference frame is a standard posture parameter.
由于当前即时视频帧中用户输入的形状所指示的区域的姿态参数与参考帧中用户输入的形状所指示的区域的姿态参数为标准姿态参数,所以根据标准位置参数与标准姿态参数,获取包括用户输入的形状所指示的区域的当前即时视频帧与参考帧之间的残差数据,相比于根据当前即时视频帧中用户输入的形状所指示的区域的姿态参数位置参数,与参考帧中的位置参数和姿态参数,生成残差数据,减少了即时视频传输过程中数据传输量和处理量,提高了即时视频的传输效率,进一步满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希 望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验。另外,通过获取当前即时视频帧中的用户输入的形状所指示的区域与参考帧中的用户输入的形状所指示的区域之间的残差数据,实现即时视频的传输,相比于传统的即时视频传输方法,该方法进一步减少了即时视频传输过程中数据传输量和处理量,从而提高了即时视频的传输效率,进一步满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验。Since the attitude parameter of the area indicated by the shape of the user input in the current instant video frame and the attitude parameter of the area indicated by the shape of the user input in the reference frame are standard posture parameters, the acquisition includes the user 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 area indicated by the input shape is compared with the attitude parameter position parameter of the area indicated by the shape of the user input in the current instant video frame, and the reference frame The position parameter and the attitude parameter generate residual data, which reduces the data transmission amount and processing amount in the instant video transmission process, 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 The requirements of the region and the user for the clarity and detail retention of a certain area are greater than those of other regions and users. It is hoped that other participants of the instant video interaction will move the attention to the diverse needs of the area designated by the user, improving the user experience. In addition, real-time video transmission is realized by acquiring residual data between the area indicated by the shape of the user input in the current instant video frame and the area indicated by the shape of the user input in the reference frame, compared to the conventional instant. The video transmission 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, and further satisfies the user's attention to an area in the instant video is greater than other areas and users. The 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 area specified by the user, improving the user experience.
312、传输残差数据,结束。312. Transmit residual data 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 shape input by a user according to the third transmission policy is implemented, and in addition to the manner of the foregoing steps, the method may be implemented by other means. The specific embodiment of the present invention does not limit the specific manner.
由于获取并传输包括用户输入的形状所指示的区域的当前即时视频帧与参考帧之间的残差数据,相比于传统的传输全部即时视频帧,该方法节省了网络带宽资源,同时保证了即时视频中用户输入的形状所指示的区域的画面质量,保证了用户输入的形状所指示的区域的传输,从而提高了即时视频的传输效率,进一步满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验。Since the residual data between the current instant video frame and the reference frame of the area indicated by the shape input by the user is acquired and transmitted, the method saves network bandwidth resources and ensures the network bandwidth resource compared to the conventional transmission of all the instant video frames. The picture quality of the area indicated by the shape input by the user in the instant video ensures the transmission of the area indicated by the shape input by the user, thereby improving the transmission efficiency of the instant video and further satisfying the user's access to an area in the instant video. The degree of attention is greater than 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 diverse needs of the user-specified area. user experience.
可选的,在实际应用中,在执行步骤311之前,还可以执行步骤306和步骤308中的至少一个。Optionally, in the actual application, before performing step 311, at least one of step 306 and step 308 may also be performed.
313、获取用于描述用户输入的形状所指示的区域的特征参数。313. Acquire a feature parameter for describing an area indicated by a shape input by the user.
具体的,对用户输入的形状所指示的区域进行三角分割,获取至少一个三 角区域。Specifically, the area indicated by the shape input by the user is triangulated to obtain at least one of three Corner 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, by adjusting the characteristic parameter, the driving of the triangular area can be realized, and the area indicated by the shape of the current input video is formed by the current instant video. Adjusting the attitude parameter and the position parameter of the at least one triangular region to adjust the posture parameter and the position parameter of the same triangular region in the transmitted instant video frame, so as to migrate the region indicated by the shape of the user input in the current instant video frame to the already transmitted The instant video frame saves the network bandwidth compared to the transmission of the current instant video frame, 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, the user is certain The clarity of the area and the requirement for detail retention 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, improving the user experience.
314、传输特征参数。314. Transfer characteristic parameters.
具体的,本发明实施例对具体的传输方式不加以限定。Specifically, the specific transmission mode is not limited in the embodiment of the present invention.
值得注意的是,步骤313至步骤314是实现根据第四传输策略,传输包括用户输入的形状所指示的区域的当前即时视频帧的过程,除了上述步骤的方式之外,还可以通过其他方式实现该过程,本发明实施例对具体的方式不加以限定。It should be noted that steps 313 to 314 are processes for implementing a current instant video frame including an area indicated by a shape input by a user according to the fourth transmission policy, and may be implemented by other means in addition to the manner of the foregoing steps. The specific embodiment of the present invention does not limit the specific manner.
通过只传输用于描述用户输入的形状所指示的区域的特征参数,相比于传输全部即时视频帧数据,节省了带宽资源,从而进一步提高了即时视频的传输效率,进一步满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时 视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验。By transmitting only the feature parameters for describing the area indicated by the shape of the user input, bandwidth resources are saved compared to transmitting all the instant video frame data, thereby further improving the transmission efficiency of the instant video, and further satisfying the user's instant video. One area in the area is more focused than other areas, the user's requirements for the clarity of a certain area and the amount of detail retention are greater than other areas and the user wants instant Other participants in the video interaction have increased the user experience by migrating attention to the diverse needs of the user-specified area.
可选的,除了上述步骤之外,本发明实施例所提供的方法还可以包括:Optionally, in addition to the foregoing steps, the method provided by the embodiment of the present invention may further include:
315、将用户输入的形状发送至其他电子设备。315. Send the shape input by the user to other electronic devices.
通过将该选择指令发送至其他电子设备,使得其他电子设备可以显示该选择指令所指示的用户输入的形状,增加了即时视频的交互形式,满足了用户在即时视频过程中的多样化需求,进一步提高了用户体验。另外,通过将该选择指令发送至其他电子设备,相较于将该用户输入的形状的数据发送至其他电子设备,减少了传输时的数据量,节省了网络资源,提高了即时视频的传输效率,进一步提高了用户体验。By transmitting the selection instruction to other electronic devices, other electronic devices can display the shape of the user input 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, further Improve the user experience. In addition, by transmitting the selection command to other electronic devices, the data of the shape input by the user 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 improving the user experience.
为了进一步说明本发明实施例提供的方法所达到的效果,下面将结合附图对本发明实施例所提供的方法作出进一步的说明,假设用户所选定的用户输入的形状为图6所示的形状,对图7中的a执行本发明实施例的方法后,生成的界面可以参照图7中的b所示,在图7中,第二显示效果所指示的清晰度以及细节保留量大于或者等于第一显示效果所指示的清晰度以及细节保留量,第三显示效果所指示的清晰度以及细节保留量小于第一显示效果所指示的清晰度以及细节保留量。In order to further illustrate the effects 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 shape of the user input 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 sharpness indicated by the first 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 shape input by the user, which is not only satisfied compared with the traditional instant video transmission method. 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 demand of the specified area improves the user experience, improves the utilization of the network bandwidth, saves network resources, thereby improving the transmission efficiency of the instant video, and improving the user experience. In addition, since the method of the embodiment of the present invention is After obtaining the area indicated by the shape of the user input from the current instant video frame, the current instant video frame is processed, so that compared with the conventional instant video encoding method, in the case where the bandwidth resource is unchanged, more The broadband resource is used for the transmission of the area indicated by the shape input by the user, thereby ensuring the transmission of the area indicated by the shape input by the user, further satisfying the user's attention to a certain area in the instant video is greater than other areas, the user pair The definition of a certain area and the amount of detail retention are greater than other areas. Users want to interact with real-time video of other participants to migrate attention to the diverse needs of the region specified by the user, improve the user experience. In addition, by obtaining the shape input by the user, the form of the area indicated by the user input is increased, the interest and interaction of the instant video interaction are improved, and the interaction mode of the user in the process of instant video interaction is further increased, thereby further satisfying the user's Diversified needs and improved user experience.
实施例四为本发明实施例提供的一种即时视频的显示方法,在本发明实施例中,位置参数包括坐标参数,参照图8所示,该方法包括:Embodiment 4 is a method for displaying an instant video according to an embodiment of the present invention. In the embodiment of the present invention, the location parameter includes a coordinate parameter, and as shown in FIG. 8, the method 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 obtain the processed current instant video frame sent by the other electronic device, and may also acquire, in the electronic device, a selection instruction triggered by the user to indicate the shape of the user input selected by the user, and the network bandwidth satisfies the pre- After the condition is set, the current instant video frame including at least the area is processed according to the importance matrix of the area indicated by the shape input by the user, and the processed current instant video frame is obtained.
802、获取用户输入的形状;802. Obtain a shape input by a user;
具体的,该选择指令包括用户输入的形状的位置参数,该位置参数包括坐标参数。 Specifically, the selection instruction includes a position parameter of a shape input by the user, and the position parameter includes a coordinate parameter.
电子设备可以获取其他电子设备发送的选择指令,也可以在本电子设备获取用户触发的用于指示用户所选择的用户输入的形状的选择指令,且网络带宽满足预设条件后,根据用户输入的形状所指示的区域的重要性矩阵,对至少包括区域的当前即时视频帧进行处理,获取处理后的当前即时视频帧后,获取该选择指令。The electronic device may acquire a selection instruction sent by another electronic device, or may acquire a selection instruction triggered by the user for indicating a shape of the user input selected by the user, and after the network bandwidth meets the preset condition, according to the user input An importance matrix of the area indicated by the shape, 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 a shape input by the user and a transmission policy supported by the electronic device.
具体的,根据位置坐标,显示该用户输入的形状。Specifically, the shape of the user input is displayed according to the position coordinates.
本发明实施例对具体的显示方式不加以限定。The specific display manner is not limited in the embodiment of the present invention.
其中,若该电子设备不支持获取的当前即时视频帧所对应的传输策略,则向发送该即时视频帧的电子设备或者服务器发送提示信息,以提示该电子设备不支持获取的当前即时视频帧所对应的传输策略,以使服务器或者发送该即时视频帧的电子设备在获取到该提示信息后,向该电子设备发送与该传输策略对应的代码,以便该电子设备配置该代码。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 sends the code corresponding to the transmission policy to the electronic device after the prompt information is obtained, so that the electronic device configures the code.
由于当前即时视频帧中用户输入的形状所指示的区域的画面质量优于其他区域,从而满足了将本电子设备的用户关注度迁移至即时视频中用户输入的形状所指示的区域,从而满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验。另外,通过显示用户输入的形状,可以进一步实现将本电子设备的用户关注度迁移至即时视频中用户输入的形状所指示的区域,从而满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验。另外,由于选择指令包括用户输入的形状的大小参数、用户输入的形状的位置参数、用户输入的形状的边框参数以及用户输入的形状的特效参数中的至少一 个,所以增加了即时视频的显示形式,进一步满足了用户的多样化需求,提高了用户体验。Since the picture quality of the area indicated by the shape input by the user in the current instant video frame is superior to other areas, the content of the user's attention of the electronic device is shifted to the area indicated by the shape of the user input in the instant video, thereby satisfying 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 diverse needs of the designated area enhance the user experience. In addition, by displaying the shape input by the user, the user attention of the electronic device can be further migrated to the area indicated by the shape input by the user in the instant video, thereby satisfying the user's attention to a certain 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. In addition, the selection instruction includes at least one of a size parameter of a shape input by the user, a position parameter of a shape input by the user, a frame parameter of a shape input by the user, and an effect parameter of a shape input by the user. Therefore, the display form of instant video has been added to further meet the diverse needs of users and improve the user experience.
为了进一步说明本发明实施例提供的方法所达到的效果,下面将结合附图对本发明实施例所提供的方法作出进一步的说明,假设用户所选定的用户输入的形状为图6所示的形状,获取处理后的当前即时视频帧显示的界面可以参照图9中的b所示,图9中的a是获取当前即时视频帧后显示的界面,在图9中,第二显示效果所指示的清晰度以及细节保留量大于或者等于第一显示效果所指示的清晰度以及细节保留量,第三显示效果所指示的清晰度以及细节保留量小于第一显示效果所指示的清晰度以及细节保留量。In order to further illustrate the effects 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 shape of the user input 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, where a in FIG. 9 is an interface displayed after acquiring the current instant video frame, and in FIG. 9, the second display effect indicates The sharpness 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, 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 obtaining the shape input by the user, the form of the area indicated by the user input is increased, the interest and interaction of the instant video interaction are improved, and the interaction mode of the user in the process of instant video interaction is further increased, thereby further satisfying the user's Diversified needs and improved user experience.
实施例五为本发明实施例提供的一种即时视频的传输方法,在本发明实施例中,用户输入的形状的位置参数包括描述参数,该描述参数用于描述即时视频帧中用户所选定的用户输入的形状所指示区域内的细节,示例性的,若用户所选定的用户输入的形状所指示区域内至少包括人脸,则该细节可以为用户的眼睛、鼻子、嘴部和眉毛等,参照图10所示,该方法包括:Embodiment 5 is a method for transmitting an instant video according to an embodiment of the present invention. In the embodiment of the present invention, a location parameter of a shape input by a user includes a description parameter, where the description parameter is used to describe a user selected in an instant video frame. The details of the area indicated by the shape input by the user, exemplarily, if the shape indicated by the shape of the user input selected by the user includes at least a human face, the detail may be the eyes, nose, mouth and eyebrows of the user. And, as shown in FIG. 10, the method includes:
1001、获取用户输入的曲线,曲线所包括的部分曲线为闭合曲线。1001. Obtain a curve input by a user, and a part of the curve included in the curve is a closed curve.
具体的,该步骤与步骤301相同,此处再不加以赘述。Specifically, the step is the same as step 301, and details are not described herein again.
通过获取用户输入的曲线,使得可以通过根据用户输入的曲线确定用户所指示的区域,相比于通过用户选择用户输入的形状来确定用户所指示的区域,该方法简化了操作步骤,提高了用户输入所指示的区域的步骤,提高即时视频 的传输效率,进一步满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验;另外,通过获取用户输入的曲线,增加了用户输入所指示的区域的形式,进一步满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验。By obtaining the curve input by the user, it is possible to determine the area indicated by the user according to the curve input by the user, and to determine the area indicated by the user by selecting the shape of the user input by the user, the method simplifies the operation steps and improves the user. Steps to enter the indicated area to improve live video The transmission efficiency 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 improved by migrating the attention to the diversified needs of the area specified by the user; in addition, by obtaining the curve of the user input, the form of the area indicated by the user input is increased, and the user is further satisfied with the video in the instant video. 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. , improved user experience.
1002、确定闭合曲线所指示的形状为用户输入的形状。1002. Determine that the shape indicated by the closed curve is a shape input by the user.
具体的,该步骤与步骤302相同,此处再不加以赘述。Specifically, the step is the same as step 302, and details are not described herein again.
通过确定闭合曲线所指示的形状为用户输入的形状,增加了用户输入所指示的区域的形式,进一步满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验。By determining that the shape indicated by the closed curve is the shape input by the user, the form of the area indicated by the user input is increased, further satisfying that the user's attention to an area in the instant video is greater than that of other areas, and the user is interested in 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.
1003、获取用户输入的位置参数,位置参数包括描述参数。1003. Obtain a location parameter input by a user, where the location parameter includes a description parameter.
具体的,该步骤与步骤303相同,此处再不加以赘述。Specifically, the step is the same as step 303, and details are not described herein again.
值得注意的是,步骤1001至步骤1003是实现获取用户输入的形状的过程,除了上述步骤的方式之外,还可以通过其他方式实现该过程,本发明实施例对具体的方式不加以限定。It is to be noted that the step 1001 to the step 1003 is a process for obtaining the shape of the user input. The process may be implemented in other manners, and the specific manner is not limited in the embodiment of the present invention.
通过获取用户输入的形状,增加了用户输入所指示的区域的形式,提高了即时视频交互的趣味性和交互性,进一步满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验。By obtaining the shape of the user input, the form of the area indicated by the user input is increased, and the interest and interaction of the instant video interaction are improved, which further satisfies the user's attention to an area in the instant video is greater than other areas and users. The 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 area specified by the user, improving the user experience.
1004、在当前即时视频帧中识别描述参数所指示的细节。 1004. Identify details indicated by the description parameters in the current instant video frame.
具体的,获取当前即时视频帧内所有特征点的特征参数;Specifically, acquiring feature parameters of all feature points in the current instant video frame;
获取特征参数与选择指令中所包括的特征参数之间的相似度大于或者等于预设阈值的所有特征点;Obtaining all feature points whose similarity between the feature parameter and the feature parameter included in the selection instruction is greater than or equal to a preset threshold;
确定该所有特征点所组成的细节为描述参数所指示的细节。It is determined that the details of all the feature points are 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.
1005、根据细节,在当前即时视频帧中确定形状所指示的区域。1005. Determine the area indicated by the shape in the current instant video frame according to the details.
具体的,将该组成该细节的特征点的坐标设置为输入的区域中的点的坐标。Specifically, the coordinates of the feature points constituting the detail are set as the coordinates of the points in the input region.
除此之外,还可以通过其他方式,实现根据细节,在当前即时视频帧中确定输入的区域,本发明实施例对具体的方式不加以限定。In addition, the input region 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 input area changes, the input area is determined in the current instant video frame according to the details, which further satisfies the user's attention to a certain area in the instant video is greater than other areas, the user is certain The clarity and detail retention requirements of an area are greater than other areas and other participants who want real-time video interactions to migrate attention to the diverse needs of the user-specified area, increasing the interactivity and interest of instant video. Further improve the user experience.
值得注意的是,步骤1004至步骤1005是实现在当前即时视频帧中确定用户输入的形状所指示的区域的过程,除了上述步骤的方式之外,还可以通过其他方式实现该过程,本发明实施例对具体的方式不加以限定。It should be noted that the steps 1004 to 1005 are a process for determining an area indicated by the shape of the user input in the current instant video frame. In addition to the manner of the foregoing steps, the process may be implemented in other manners. The specific method is not limited.
通过在当前即时视频帧中识别描述参数所指示的细节,并根据细节,在当 前即时视频帧中确定输入的区域,在即时视频帧中输入的区域内的细节位置发生变化的情况下,满足了用户对输入的区域内的细节的关注度大于其他区域、对输入的区域的细节的清晰度以及细节保留量的要求大于其他区域以及希望即时视频交互的其他参与者将关注度迁移至输入的区域的细节,从而进一步满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,增加了即时视频的交互性和趣味性,进一步提高了用户体验。By identifying the details indicated by the description parameters in the current instant video frame, and according to the details, The area of the input video frame determines the input area, and when the detail position in the area input in the instant video frame changes, the user's attention to the details in the input area is greater than that of other areas and the input area. The definition of detail and the amount of detail retention are greater than other areas and other participants who wish to interact with the video to move the attention to the details of the input area, thereby further satisfying the user's attention to a certain area in the instant video is greater than Other areas, users have more requirements for clarity and detail retention of a certain area than other areas and other participants who want instant video interactions to migrate attention to the diverse needs of the user-specified area, adding instant video Interactivity and fun further enhance the user experience.
1006、判断网络带宽是否大于或者等于第一预设值,若是,且电子设备支持第一传输策略,则执行步骤1007;若不是,则判断网络带宽是否小于第一预设值,且大于或者等于第二预设值;若是,且电子设备支持第二传输策略,则执行步骤1009;若不是,则判断网络带宽小于第二预设值,且大于或者等于第三预设值;若是,且电子设备支持第三传输策略,则执行步骤1012;若不是,且电子设备支持第四传输策略,则执行步骤1014。1006: 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 1007; 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 1009 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 1012 is performed; if not, and the electronic device supports the fourth transmission policy, step 1014 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.
1007、根据与当前即时视频帧对应的重要性矩阵,对当前即时视频进行处理,获取处理后的即时视频帧。1007. 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 shape of the user input in the instant video frame and the area indicated by the shape of the non-user input, the importance matrix is used by the importance matrix. The indicated area indicated by the shape of the user input is reserved, replacing the area indicated by the shape of the non-user input within the instant video frame with the area indicated by the shape of the non-user input within the low pass filtered instant video frame, such that Output the shape of the user input in the processed instant video frame The image of the indicated area is an undistorted original image, and the image of the area indicated by the shape not input by the user is an image that does not include a high frequency signal, thereby reducing the transmission time when transmitting the processed instant video frame. The required bandwidth resources improve the transmission efficiency of instant video and further satisfy the user's instant video. One area of interest is greater than other areas, the user's requirements for the clarity 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. Diversified needs and improved user experience.
1008、传输处理后的即时视频帧,结束。1008. 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.
值得注意的是,步骤1007至步骤1008是实现根据第一传输策略,传输包括用户输入的形状所指示的区域的当前即时视频帧的过程,除了上述步骤的方式之外,还可以通过其他方式实现该过程,本发明实施例对具体的方式不加以限定。It should be noted that the steps 1007 to 1008 are a process for transmitting a current instant video frame including an area indicated by a shape input by a user according to the first transmission policy, and may be implemented by other means in addition to the manner of the foregoing steps. The specific embodiment of the present invention does not limit the specific manner.
由于本发明实施例是根据重要性矩阵对当前即时视频帧进行处理,而重要性矩阵指示了当前即时视频内每一个像素的重要性度量值,从而对每一个像素点进行处理,提高了处理后的即时视频的画面质量,进一步满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验。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.
1009、将至少包括用户输入的形状所指示的区域的即时视频帧划分为至少一个宏块,并设置组成至少一个宏块所对应的量化参数。1009. Divide an instant video frame including at least an area indicated by a shape input by the user 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 the instant video interaction, the mutual attention and the picture quality requirement of the area indicated by the shape input by the user such as the area of the face in the instant video are greater than other areas, so the whole or part of the inclusion may be set. The quantization parameter of the macroblock of the area indicated by the shape input by the user is a first value, and during the encoding process, more details of the area indicated by the shape of the user input are retained, so that user input can be guaranteed in the instant video process. The picture quality of the area indicated by the shape satisfies the user's requirement for the picture detail of the area indicated by the shape input by the user, further satisfies the user's attention to a certain area in the instant video is greater than that of other areas, and the user The resolution of the area and the amount of detail retention are greater than other areas and other users who want instant video interaction Participants migrated their attention to the diverse needs of the area specified by the user, improving the user experience. In addition, in the scenario of real-time video interaction, the mutual attention and the picture quality requirements of the area indicated by the shape input by the user 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 The quantization parameter of the macroblock of the area indicated by the shape input by the part of the user is a second value, and the details of the macroblock of the area indicated by the shape not including all or part of the user input are not reserved during the encoding process, and are reduced. The bandwidth occupied by the macroblock of the area indicated by the shape indicated by all or part of the user input is not included, so that the method requires less bandwidth resources than the conventional instant video transmission method, thereby saving bandwidth resources. To 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 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 migrate attention to the area specified by the user Diverse needs, improve the user experience. Further, by setting the quantization parameter of the macroblock including the area indicated by the shape of all or part of the user input as the first numerical value, setting the quantization parameter of the macroblock not including the area indicated by the shape of all or part of the user input is the second The value is such that during the encoding process, the details of the area indicated by the shape input by the user are retained, and the details of the area indicated by the shape of the non-user input are not retained, so that the area indicated by the shape input by the user is not On the basis of the distortion transmission, the bandwidth occupied by the area indicated by the shape of the non-user input is further reduced, so that the method can not only ensure the area indicated by the shape of the user input compared to the conventional instant video transmission method. The picture quality is less, and the required bandwidth resources are less, thereby further saving bandwidth resources and improving 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 is to a certain The definition of the area and the amount of detail retention are greater than other areas And the user wants to interact with other participants in real-time video will migrate attention to the diverse needs of the region specified by the user, improve the user experience.
1010、根据量化参数,对至少一个宏块进行编码,生成编码后的即时视频帧。1010. 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.
1011、传输编码后的即时视频帧,结束。1011. 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.
值得注意的是,步骤1009至步骤1011是实现根据第二传输策略,传输包括用户输入的形状所指示的区域的当前即时视频帧的过程,除了上述步骤的方式之外,还可以通过其他方式实现该过程,本发明实施例对具体的方式不加以限定。It should be noted that the steps 1009 to 1011 are a process for transmitting a current instant video frame including an area indicated by a shape input by a user according to the second transmission policy, and may be implemented by other means in addition to the manner of the foregoing steps. The specific embodiment of the present invention does not limit the specific manner.
由于根据用于指示宏块在编码过程中的精细程度的量化参数,对至少一个宏块进行编码,使得在编码过程中,保留了用户输入的形状所指示的区域的细节,非用户输入的形状所指示的区域的细节不加以保留,不仅将更多的宽带资源用于用户输入的形状所指示的区域的传输,而且保证了即时视频中用户输入的形状所指示的区域的画面质量,从而保证了用户输入的形状所指示的区域的传输,提高了即时视频的传输效率,进一步满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验。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 shape of the user input are retained, the shape of the non-user input The details of the indicated area are not preserved, not only the use of more broadband resources for the transmission of the area indicated by the shape input by the user, but also the picture quality of the area indicated by the shape of the user input in the instant video, thereby ensuring The transmission of the area indicated by the shape input by the user 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 detail retention The demand for quantity is greater than other areas and other participants who want the instant video interaction to migrate the attention to the diverse needs of the area specified by the user, improving the user experience.
1012、获取包括用户输入的形状所指示的区域的当前即时视频帧与参考帧之间的残差数据。1012. Acquire residual data between the current instant video frame and the reference frame including the area indicated by the shape input by the user.
具体的,该步骤与步骤309相同,此处再不加以赘述。Specifically, the step is the same as step 309, and details are not described herein again.
由于当前即时视频帧中用户输入的形状所指示的区域的姿态参数与参考帧中用户输入的形状所指示的区域的姿态参数为标准姿态参数,所以根据标准位置参数与标准姿态参数,获取包括用户输入的形状所指示的区域的当前即时视频帧与参考帧之间的残差数据,相比于根据当前即时视频帧中用户输入的形状所指示的区域的姿态参数位置参数,与参考帧中的位置参数和姿态参数,生成残差数据,减少了即时视频传输过程中数据传输量和处理量,提高了即时视频的传输效率,进一步满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希 望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验。另外,通过获取当前即时视频帧中的用户输入的形状所指示的区域与参考帧中的用户输入的形状所指示的区域之间的残差数据,实现即时视频的传输,相比于传统的即时视频传输方法,该方法进一步减少了即时视频传输过程中数据传输量和处理量,从而提高了即时视频的传输效率,进一步满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验。Since the attitude parameter of the area indicated by the shape of the user input in the current instant video frame and the attitude parameter of the area indicated by the shape of the user input in the reference frame are standard posture parameters, the acquisition includes the user 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 area indicated by the input shape is compared with the attitude parameter position parameter of the area indicated by the shape of the user input in the current instant video frame, and the reference frame The position parameter and the attitude parameter generate residual data, which reduces the data transmission amount and processing amount in the instant video transmission process, 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 The requirements of the region and the user for the clarity and detail retention of a certain area are greater than those of other regions and users. It is hoped that other participants of the instant video interaction will move the attention to the diverse needs of the area designated by the user, improving the user experience. In addition, real-time video transmission is realized by acquiring residual data between the area indicated by the shape of the user input in the current instant video frame and the area indicated by the shape of the user input in the reference frame, compared to the conventional instant. The video transmission 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, and further satisfies the user's attention to an area in the instant video is greater than other areas and users. The 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 area specified by the user, improving the user experience.
1013、传输残差数据,结束。1013. Transmit residual data and end.
具体的,该步骤与步骤310相同,此处再不加以赘述。Specifically, the step is the same as step 310, and details are not described herein again.
值得注意的是,步骤1012至步骤1013是实现根据第三传输策略,传输包括用户输入的形状所指示的区域的当前即时视频帧的过程,除了上述步骤的方式之外,还可以通过其他方式实现该过程,本发明实施例对具体的方式不加以限定。It should be noted that step 1012 to step 1013 are processes for implementing a current instant video frame including an area indicated by a shape input by a user according to the third transmission policy, and may be implemented by other means in addition to the manner of the foregoing steps. The specific embodiment of the present invention does not limit the specific manner.
由于获取并传输包括用户输入的形状所指示的区域的当前即时视频帧与参考帧之间的残差数据,相比于传统的传输全部即时视频帧,该方法节省了网络带宽资源,同时保证了即时视频中用户输入的形状所指示的区域的画面质量,保证了用户输入的形状所指示的区域的传输,从而提高了即时视频的传输效率,进一步满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验。Since the residual data between the current instant video frame and the reference frame of the area indicated by the shape input by the user is acquired and transmitted, the method saves network bandwidth resources and ensures the network bandwidth resource compared to the conventional transmission of all the instant video frames. The picture quality of the area indicated by the shape input by the user in the instant video ensures the transmission of the area indicated by the shape input by the user, thereby improving the transmission efficiency of the instant video and further satisfying the user's access to an area in the instant video. The degree of attention is greater than 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 diverse needs of the user-specified area. user experience.
可选的,在实际应用中,在执行步骤1012之前,还可以执行步骤1007和步骤1011中的至少一个。Optionally, in an actual application, at least one of step 1007 and step 1011 may also be performed before step 1012 is performed.
1014、获取用于描述用户输入的形状所指示的区域的特征参数。1014. Obtain a feature parameter for describing an area indicated by a shape input by the user.
具体的,该步骤与步骤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, by adjusting the characteristic parameter, the driving of the triangular area can be realized, and the area indicated by the shape of the current input video is formed by the current instant video. Adjusting the attitude parameter and the position parameter of the at least one triangular region to adjust the posture parameter and the position parameter of the same triangular region in the transmitted instant video frame, so as to migrate the region indicated by the shape of the user input in the current instant video frame to the already transmitted The instant video frame saves the network bandwidth compared to the transmission of the current instant video frame, 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, the user is certain The clarity of the area and the requirement for detail retention 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, improving the user experience.
1015、传输特征参数。1015. Transmission characteristic parameters.
具体的,该步骤312相同,此处再不加以赘述。Specifically, the step 312 is the same and will not be further described herein.
值得注意的是,步骤1014至步骤1015是实现根据第四传输策略,传输包括用户输入的形状所指示的区域的当前即时视频帧的过程,除了上述步骤的方式之外,还可以通过其他方式实现该过程,本发明实施例对具体的方式不加以限定。It should be noted that the step 1014 to the step 1015 is a process for transmitting a current instant video frame including an area indicated by a shape input by a user according to the fourth transmission policy, and may be implemented by other means in addition to the manner of the foregoing steps. The specific embodiment of the present invention does not limit the specific manner.
通过只传输用于描述用户输入的形状所指示的区域的特征参数,相比于传输全部即时视频帧数据,节省了带宽资源,从而进一步提高了即时视频的传输效率,进一步满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验。By transmitting only the feature parameters for describing the area indicated by the shape of the user input, bandwidth resources are saved compared to transmitting all the instant video frame data, thereby further improving the transmission efficiency of the instant video, and further satisfying the user's instant video. One area of interest is greater than other areas, the user's requirements for the clarity 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. Diversified needs and improved user experience.
可选的,除了上述步骤之外,本发明实施例所提供的方法还可以包括:Optionally, in addition to the foregoing steps, the method provided by the embodiment of the present invention may further include:
1016、将用户输入的形状发送至其他电子设备。1016. Send the shape input by the user to another electronic device.
通过将该选择指令发送至其他电子设备,使得其他电子设备可以显示该选择指令所指示的用户输入的形状,增加了即时视频的交互形式,满足了用户在 即时视频过程中的多样化需求,进一步提高了用户体验。另外,通过将该选择指令发送至其他电子设备,相较于将该用户输入的形状的数据发送至其他电子设备,减少了传输时的数据量,节省了网络资源,提高了即时视频的传输效率,进一步提高了用户体验。By transmitting the selection instruction to other electronic devices, other electronic devices can display the shape of the user input indicated by the selection instruction, increasing the interaction form of the instant video, satisfying the user's The diverse needs of the instant video process further enhance the user experience. In addition, by transmitting the selection command to other electronic devices, the data of the shape input by the user 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 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 shape input by the user is the shape shown in FIG. After the method of the embodiment of the present invention is executed, 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 c in FIG. In FIG. 11, the sharpness and the 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 and detail retention indicated by the third display effect are 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 shape input by the user may change, the area indicated by the shape of the user input is determined in the current instant video frame according to the detail, so that the shape input by the user in the instant video frame is In the case where the position of the detail in the indicated area 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 The clarity and detail retention requirements of the 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 interactivity and interest of the instant video, further Improve the user experience. For example, the area indicated by the shape input by the user 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 shape input by the user also changes with the face. To ensure that the face is located The picture quality of the area.
本发明实施例提供了一种即时视频的传输方法,通过判断网络带宽是否满足第一预设条件、第二预设条件、第三预设条件和第四预设条件中的任意一个,从而可以根据不同的网络带宽对包括用户输入的形状所指示的区域的当前即时视频帧采取不同的传输策略,相比于传统的即时视频的传输方法,不仅满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验,还提高了网络带宽的利用率,节省网络资源,从而提高了即时视频的传输效率,提高了用户体验;另外,由于本发明实施例的方法是在从当前即时视频帧中获取用户输入的形状所指示的区域后,对当前即时视频帧进行处理,使得相比于传统的即时视频编码方法,在带宽资源不变的情况下,将更多的宽带资源用于用户输入的形状所指示的区域的传输,从而保证了用户输入的形状所指示的区域的传输,进一步满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验。另外,通过获取用户输入的形状,增加了用户输入所指示的区域的形式,提高了即时视频交互的趣味性和交互性,增加了用户在即时视频交互过程中的互动方式,进一步满足了用户的多样化需求,提高了用户体验。另外,通过根据细节在当前即时视频帧中确定用户输入的形状所指示的区域,使得在即时视频帧中用户输入的形状所指示的区域内的细节位置发生变化的情况下,依然可以保证该细节所在区域的画面质量,从而更进一步的满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,增加了即时视频的交互性和趣味性,进一步提高了用户体验。 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 shape input by the user, and the traditional instant video transmission method not only satisfies the user's access to a certain area in the instant video. The degree of attention is greater than 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 diverse needs of the user-specified area. The user experience also improves the utilization of network bandwidth and saves 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 user input from the current instant video frame. After the area indicated by the shape, the current instant video frame is processed so that Compared with the traditional instant video coding method, in the case where the bandwidth resources are unchanged, more broadband resources are used for the transmission of the area indicated by the shape of the user input, thereby ensuring the area indicated by the shape input by the user. The transmission 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 definition of a certain area is larger than the other areas, and other participants who want the instant video interaction will pay attention to The gradual migration to the diverse needs of the user-specified area increases the user experience. In addition, by obtaining the shape input by the user, the form of the area indicated by the user input is increased, the interest and interaction of the instant video interaction are improved, and the interaction mode of the user in the process of instant video interaction is further increased, thereby further satisfying the user's Diversified needs and improved user experience. In addition, by determining the area indicated by the shape of the user input in the current instant video frame according to the details, such that the detail position in the area indicated by the shape input by the user in the instant video frame changes, 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.
实施例六为本发明实施例提供的一种即时视频的显示方法,在本发明实施例中,用户输入的形状的位置参数包括描述参数,该描述参数用于描述即时视频帧中用户所选定的用户输入的形状所指示区域内的细节,示例性的,若用户所选定的用户输入的形状所指示区域内至少包括人脸,则该细节可以为用户的眼睛、鼻子、嘴部和眉毛等,参照图12所示,该方法包括:Embodiment 6 is a method for displaying an instant video according to an embodiment of the present invention. In the embodiment of the present invention, a location parameter of a shape input by a user includes a description parameter, where the description parameter is used to describe a user selected in an instant video frame. The details of the area indicated by the shape input by the user, exemplarily, if the shape indicated by the shape of the user input selected by the user includes at least a human face, the detail may be the eyes, nose, mouth and eyebrows of the user. And, as shown in FIG. 12, the method 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: Obtain a shape input by a user;
具体的,该选择指令包括用户输入的形状的位置参数,该位置参数包括描述参数。Specifically, the selection instruction includes a position parameter of a shape input by the user, and the position parameter includes a description parameter.
除此之外,该步骤与步骤802相同,此处再不加以赘述。Except for this, this step is the same as step 802, and will not be described again here.
1203、在当前即时视频帧中识别描述参数所指示的细节。1203. Identify details indicated by the description parameters in the current instant video frame.
具体的,该步骤与步骤1004相同,此处再不加以赘述。Specifically, the step is the same as step 1004, 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 shape in the current instant video frame according to details and a transmission strategy supported by the electronic device.
具体的,将该组成该细节的特征点的坐标设置为输入的区域中的点的坐标。 Specifically, the coordinates of the feature points constituting the detail are set as the coordinates of the points in the input region.
根据该坐标,显示处理后的当前即时视频帧。Based on the coordinates, the processed current instant video frame is displayed.
除此之外,还可以通过其他方式,实现根据细节,在当前即时视频帧中确定并显示输入的区域,本发明实施例对具体的方式不加以限定。In addition, the input and the input area are determined and displayed in the current instant video frame according to the details. The specific embodiment of the present invention does not limit the specific manner.
由于输入的区域内的细节的位置会发生改变,所以根据细节在当前即时视频帧中确定输入的区域,进一步的满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,增加了即时视频的交互性和趣味性,进一步提高了用户体验。Since the position of the detail in the input area changes, the input area is determined in the current instant video frame according to the details, which further satisfies the user's attention to a certain area in the instant video is greater than other areas, the user is certain The clarity and detail retention requirements of an area are greater than other areas and other participants who want real-time video interactions to migrate attention to the diverse needs of the user-specified area, increasing the interactivity and interest of instant video. Further improve the user experience.
值得注意的是,步骤1203至步骤1204是实现根据用户输入的形状,显示当前即时视频帧的过程,除了上述步骤的方式之外,还可以通过其他方式实现该过程,本发明实施例对具体的方式不加以限定。It is to be noted that the step 1203 to the step 1204 is a process of displaying the current instant video frame according to the shape input by the user. In addition to the manner of the foregoing steps, the process may be implemented in other manners. The method is not limited.
由于处理后的当前即时视频帧中输入的区域的画面质量优于其他区域,从而满足了将本电子设备的用户关注度迁移至即时视频中输入的区域,从而满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验。另外通过在当前即时视频帧中识别描述参数所指示的细节,并根据细节,在当前即时视频帧中确定输入的区域,在即时视频帧中输入的区域内的细节位置发生变化的情况下,满足了用户对输入的区域内的细节的关注度大于其他区域、对输入的区域的细节的清晰度以及细节保留量的要求大于其他区域以及希望即时视频交互的其他参与者将关注度迁移至输入的区域的细节,从而进一步满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,增加了即时视频的交互性和趣味性,进一步提高了用户体验。另外,通过显示用户输入的形状,可以进一步实现将本电子设备的用户关注度迁移至即时视频中用户输入的形状所指示的 区域,从而满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验。Since the picture quality of the input area in the current instant video frame is better than other areas, the user's attention of the electronic device is migrated to the input area in the instant video, thereby satisfying the user to somewhere in the instant video. 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. , improved user experience. In addition, by identifying the details indicated by the description parameters in the current instant video frame, and determining the input region in the current instant video frame according to the details, in the case where the detail position in the region input in the instant video frame changes, the content is satisfied. The user's attention to details in the input area is greater than other areas, the definition of the details of the input area and the amount of detail retention are greater than other areas and other participants who wish to interact with the video migrate the attention to the input. 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 other participation of the user who wants instant video interaction. The migration of attention to the diverse needs of the user-specified area increases the interactivity and fun of instant video, further enhancing the user experience. In addition, by displaying the shape input by the user, it is further possible to migrate the user attention of the electronic device to the shape indicated by the user input in the instant video. The area, so that the user's attention to an area in the instant video is greater than that of 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 gradual migration to the diverse needs of the user-specified area increases the user experience.
本发明实施例中,处理后的当前即时视频帧是在获取用户输入的形状,且网络带宽满足预设条件后,根据输入的区域的重要性矩阵,对至少包括输入的形状所指示的区域的当前即时视频帧进行处理获取的,其中,获取处理后的当前即时视频帧的过程可以是在其他电子设备上实现的,也可以是在本电子设备上实现的。In the embodiment of the present invention, after the processed current instant video frame acquires the shape input by the user, and the network bandwidth satisfies the preset condition, according to the importance matrix of the input region, the area indicated by the shape including at least the input shape is included. The current instant video frame is processed and obtained, wherein the process of obtaining the processed current instant video frame may be implemented on other electronic devices, or may be implemented on the electronic device.
其中,若该电子设备不支持获取的当前即时视频帧所对应的传输策略,则向发送该即时视频帧的电子设备或者服务器发送提示信息,以提示该电子设备不支持获取的当前即时视频帧所对应的传输策略,以使服务器或者发送该即时视频帧的电子设备在获取到该提示信息后,向该电子设备发送与该传输策略对应的代码,以便该电子设备配置该代码。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 sends the code corresponding to the transmission policy to the electronic device after the prompt information is obtained, so that the electronic device configures the code.
为了进一步说明本发明实施例提供的方法所达到的效果,下面将结合附图对本发明实施例所提供的方法作出进一步的说明,假设用户所选定的用户输入的形状为图6所示的形状,获取处理后的当前即时视频帧显示的界面可以参照图13中的b所示,图13中的a是获取当前即时视频帧后显示的界面,若即时视频界面中的用户在画面中的位置发生变化,则界面可以参照图13中的c所示,在图13中,第二显示效果所指示的清晰度以及细节保留量大于或者等于第一显示效果所指示的清晰度以及细节保留量,第三显示效果所指示的清晰度以及细节保留量小于第一显示效果所指示的清晰度以及细节保留量。In order to further illustrate the effects 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 shape of the user input 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. 13, where a in FIG. 13 is an interface displayed after acquiring the current instant video frame, and if the user in the instant video interface is in the screen position, If the change occurs, the interface may refer to 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 indicated by the first 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.
本发明实施例提供了一种即时视频的显示方法,通过获取并显示根据第一传输策略、第二传输策略、第三传输策略以及第四传输策略中的任意一个传输的当前即时视频帧,满足了即时视频过程中用户希望对所选择的区域的清晰度以及细节保留量大于其他区域的需求,进一步提高了用户体验。另外,通过获 取用户输入的形状,增加了用户输入所指示的区域的形式,提高了即时视频交互的趣味性和交互性,增加了用户在即时视频交互过程中的互动方式,进一步满足了用户的多样化需求,提高了用户体验。另外,通过根据细节在当前即时视频帧中确定并显示用户输入的形状所指示的区域,使得在即时视频帧中用户输入的形状所指示的区域内的细节位置发生变化的情况下,依然可以保证该细节所在区域的画面质量,从而更进一步的满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,增加了即时视频的交互性和趣味性,进一步提高了用户体验。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 Taking the shape input by the user, increasing the form of the area indicated by the user input, improving the interest and interaction of the instant video interaction, increasing the interaction mode of the user in the process of instant video interaction, further satisfying the diversified needs of the user , improved user experience. In addition, by determining and displaying the area indicated by the shape of the user input in the current instant video frame according to the details, the position of the detail in the area indicated by the shape input by the user in the instant video frame is still guaranteed. The picture quality of the area in which the detail is located further satisfies 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 other areas and the user desires Other participants in the instant video 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 obtaining module 1401 is configured to acquire a shape input by the user;
第一处理模块1402,用于在当前即时视频帧中确定形状所指示的区域;The first processing module 1402 is configured to determine an area indicated by the shape in the current instant video frame;
判决模块1403,用于判断网络带宽是否满足第一预设条件、第二预设条件、第三预设条件和第四预设条件中的任意一个;The determining module 1403 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;
第一处理模块1402还用于根据网络带宽所满足的预设条件以及电子设备所支持的传输策略,触发以下模块中的任意一个:The first processing module 1402 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 a shape input by the user; or
第三处理模块1405,用于在网络带宽满足第二预设条件时,根据第二传输策略,传输包括用户输入的形状所指示的区域的当前即时视频帧;或者,The third processing module 1405 is configured to: when the network bandwidth meets the second preset condition, transmit, according to the second transmission policy, a current instant video frame that includes an area indicated by a shape input by the user; or
第四处理模块1406,用于在网络带宽满足第三预设条件时,根据第三传输策略,传输包括用户输入的形状所指示的区域的当前即时视频帧;或者,The fourth processing module 1406 is configured to: when the network bandwidth meets the third preset condition, transmit, according to the third transmission policy, a current instant video frame that includes an area indicated by a shape input by the user; 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 shape input by the user according to the fourth transmission policy.
可选的,获取模块1401具体用于:Optionally, the obtaining module 1401 is specifically configured to:
获取用户输入的曲线,曲线所包括的部分曲线为闭合曲线,并确定闭合曲线所指示的形状为用户输入的形状;Obtaining a curve input by the user, the partial curve included in the curve is a closed curve, and determining that the shape indicated by the closed curve is a shape input by the user;
获取用户输入的位置参数,位置参数包括坐标参数和特征参数中的任意一个。Obtain a position parameter input by the user, and the position parameter includes any one of a coordinate parameter and a feature parameter.
可选的,第一处理模块1402用于执行以下操作中的任意一个:Optionally, the first processing module 1402 is configured to perform any one of the following operations:
位置参数包括坐标参数,根据坐标参数,在当前即时视频帧中确定形状所指示的区域;或者,The position parameter includes a coordinate parameter, and the area indicated by the shape is determined in the current instant video frame according to the coordinate parameter; or
位置参数包括描述参数,在当前即时视频帧中识别描述参数所指示的细节;The location parameter includes a description parameter that identifies the details indicated by the description parameter in the current instant video frame;
根据细节,在当前即时视频帧中确定形状所指示的区域。According to the details, the area indicated by the 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 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.
可选的,第三处理模块1405具体用于:Optionally, the third processing module 1405 is specifically configured to:
将至少包括用户输入的形状所指示的区域的即时视频帧划分为至少一个宏块,并设置组成至少一个宏块所对应的量化参数;Dividing an instant video frame including at least an area indicated by a shape input by the user 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 all or part of the area indicated by the shape to a first number value;
设置不包括所述全部或者部分所述形状所指示的区域的宏块的量化参数为第二数值;Setting a quantization parameter of a macroblock that does not include all or part of the area indicated by the shape as a second value;
第三处理模块1405具体用于:The third processing module 1405 is specifically configured to:
根据所述第一数值和所述第二数值,对所述至少一个宏块进行编码,生成编码后的即时视频帧。And encoding the at least one macroblock according to the first value and the second value to generate an encoded instant video frame.
可选的,第四处理模块1406具体用于:Optionally, the fourth processing module 1406 is specifically configured to:
获取包括用户输入的形状所指示的区域的当前即时视频帧与参考帧之间的残差数据;Obtaining residual data between a current instant video frame and a reference frame including an area indicated by a shape input by the user;
传输残差数据。Transmit residual data.
可选的,第四处理模块1406具体用于:Optionally, the fourth processing module 1406 is specifically configured to:
获取所述形状所指示的区域的位置参数与姿态参数;Obtaining a position parameter and a posture parameter of the area indicated by the 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 shape according to the standard position parameter and the standard posture parameter.
可选的,第五处理模块1407具体用于包括:Optionally, the fifth processing module 1407 is specifically configured to include:
获取用于描述用户输入的形状所指示的区域的特征参数;Obtaining a feature parameter for describing an area indicated by a shape input by the user;
传输特征参数。Transfer feature parameters.
可选的,第五处理模块1407具体用于:Optionally, the fifth processing module 1407 is specifically configured to:
对所述形状所指示的区域进行三角分割,获取至少一个三角区域;Triangulating the area indicated by the 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.
可选的,电子设备还包括发送模块,用于:Optionally, the electronic device further includes a sending module, configured to:
将用户输入的形状发送至其他电子设备。 Send the shape entered by the user to another electronic device.
本发明实施例提供了一种电子设备,该电子设备通过判断网络带宽是否满足第一预设条件、第二预设条件、第三预设条件和第四预设条件中的任意一个,从而可以根据不同的网络带宽对包括用户输入的形状所指示的区域的当前即时视频帧采取不同的传输策略,相比于传统的即时视频的传输方法,不仅满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验,还提高了网络带宽的利用率,节省网络资源,从而提高了即时视频的传输效率,提高了用户体验;另外,由于本发明实施例的方法是在从当前即时视频帧中获取用户输入的形状所指示的区域后,对当前即时视频帧进行处理,使得相比于传统的即时视频编码方法,在带宽资源不变的情况下,将更多的宽带资源用于用户输入的形状所指示的区域的传输,从而保证了用户输入的形状所指示的区域的传输,进一步满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验。另外,通过获取用户输入的形状,增加了用户输入所指示的区域的形式,提高了即时视频交互的趣味性和交互性,增加了用户在即时视频交互过程中的互动方式,进一步满足了用户的多样化需求,提高了用户体验。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 shape input by the user, and the traditional instant video transmission method not only satisfies the user's access to a certain area in the instant video. The degree of attention is greater than 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 diverse needs of the user-specified area. The user experience also improves the utilization of network bandwidth and saves 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 user input from the current instant video frame. After the area indicated by the shape, the current instant video frame is processed so that Compared with the traditional instant video coding method, in the case where the bandwidth resources are unchanged, more broadband resources are used for the transmission of the area indicated by the shape of the user input, thereby ensuring the area indicated by the shape input by the user. The transmission 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 definition of a certain area is larger than the other areas, and other participants who want the instant video interaction will pay attention to The gradual migration to the diverse needs of the user-specified area increases the user experience. In addition, by obtaining the shape input by the user, the form of the area indicated by the user input is increased, the interest and interaction of the instant video interaction are improved, and the interaction mode of the user in the process of instant video interaction is further increased, thereby further satisfying the user's Diversified needs and improved 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 . 1502 is for storing a set of program code, and the processor 1503 calls the program code stored in the memory 1502 for performing the following operations:
获取用户输入的形状;Get the shape entered by the user;
在当前即时视频帧中确定形状所指示的区域;Determining an area indicated by the 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 shape; or
若网络带宽满足第二预设条件,则根据第二传输策略,传输包括形状所指示的区域的当前即时视频帧;或者,If the network bandwidth meets the second preset condition, transmitting the current instant video frame including the area indicated by the shape according to the second transmission policy; or
若网络带宽满足第三预设条件,则根据第三传输策略,传输包括形状所指示的区域的当前即时视频帧;或者,If the network bandwidth meets the third preset condition, transmitting, according to the third transmission policy, the current instant video frame including the area indicated by the shape; or
若网络带宽满足第四预设条件,则根据第四传输策略,传输包括形状所指示的区域的当前即时视频帧。If the network bandwidth satisfies the fourth preset condition, the current instant video frame including the area indicated by the shape is transmitted according to the fourth transmission policy.
可选的,处理器1503调用存储器1502所存储的程序代码用于执行以下操作:Optionally, the processor 1503 calls the program code stored in the memory 1502 to perform the following operations:
获取用户输入的曲线,曲线所包括的部分曲线为闭合曲线,并确定闭合曲线所指示的形状为用户输入的形状;Obtaining a curve input by the user, the partial curve included in the curve is a closed curve, and determining that the shape indicated by the closed curve is a shape input by the user;
获取用户输入的位置参数,位置参数包括坐标参数和特征参数中的任意一个。Obtain a position parameter input by the user, and the position parameter includes any one of a coordinate parameter and a feature parameter.
可选的,处理器1503调用存储器1502所存储的程序代码用于执行以下操作中的任意一个:Optionally, the processor 1503 calls the program code stored in the memory 1502 to perform any one of the following operations:
位置参数包括坐标参数,根据坐标参数,在当前即时视频帧中确定形状所指示的区域;或者,The position parameter includes a coordinate parameter, and the area indicated by the shape is determined in the current instant video frame according to the coordinate parameter; or
位置参数包括描述参数,在当前即时视频帧中识别描述参数所指示的细节;The location parameter includes a description parameter that identifies the details indicated by the description parameter in the current instant video frame;
根据细节,在当前即时视频帧中确定形状所指示的区域。According to the details, the area indicated by the 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. Make:
获取所述形状所指示的区域的重要性矩阵;Obtaining an importance matrix of the area indicated by the 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.
可选的,处理器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 a shape input by the user 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 all or part of the area indicated by the 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 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 the at least one macroblock according to the first value and the second value to generate an encoded 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 a current instant video frame and a reference frame including an area indicated by a shape input by the user;
传输残差数据。Transmit residual data.
可选的,处理器1503调用存储器1502所存储的程序代码用于执行以下操 作:Optionally, the processor 1503 calls the program code stored in the memory 1502 to perform the following operations. Make:
获取所述形状所指示的区域的位置参数与姿态参数;Obtaining a position parameter and a posture parameter of the area indicated by the 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 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:
获取用于描述用户输入的形状所指示的区域的特征参数;Obtaining a feature parameter for describing an area indicated by a shape input by the user;
传输特征参数。Transfer feature parameters.
可选的,处理器1503调用存储器1502所存储的程序代码用于执行以下操作:Optionally, the processor 1503 calls the program code stored in the memory 1502 to perform the following operations:
对所述形状所指示的区域进行三角分割,获取至少一个三角区域;Triangulating the area indicated by the 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.
可选的,处理器1503调用存储器1502所存储的程序代码用于执行以下操作:Optionally, the processor 1503 calls the program code stored in the memory 1502 to perform the following operations:
将用户输入的形状发送至其他电子设备。Send the shape entered by the user to another electronic device.
本发明实施例提供了一种电子设备,该电子设备通过判断网络带宽是否满足第一预设条件、第二预设条件、第三预设条件和第四预设条件中的任意一个,从而可以根据不同的网络带宽对包括用户输入的形状所指示的区域的当前即时视频帧采取不同的传输策略,相比于传统的即时视频的传输方法,不仅满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验,还提高 了网络带宽的利用率,节省网络资源,从而提高了即时视频的传输效率,提高了用户体验;另外,由于本发明实施例的方法是在从当前即时视频帧中获取用户输入的形状所指示的区域后,对当前即时视频帧进行处理,使得相比于传统的即时视频编码方法,在带宽资源不变的情况下,将更多的宽带资源用于用户输入的形状所指示的区域的传输,从而保证了用户输入的形状所指示的区域的传输,进一步满足了用户对即时视频中的某一区域的关注度大于其他区域、用户对某一区域的清晰度以及细节保留量的要求大于其他区域以及用户希望即时视频交互的其他参与者将关注度迁移至用户所指定的区域的多样化需求,提高了用户体验。另外,通过获取用户输入的形状,增加了用户输入所指示的区域的形式,提高了即时视频交互的趣味性和交互性,增加了用户在即时视频交互过程中的互动方式,进一步满足了用户的多样化需求,提高了用户体验。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 shape input by the user, and the traditional instant video transmission method not only satisfies the user's access to a certain area in the instant video. The degree of attention is greater than 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 diverse needs of the user-specified area. User experience, also improved The utilization of the network bandwidth saves network resources, thereby improving the transmission efficiency of the instant video and improving the user experience. In addition, since the method of the embodiment of the present invention is to obtain the shape of the user input from the current instant video frame, After the area, the current instant video frame is processed, so that compared with the traditional instant video coding method, more bandwidth resources are used for the transmission of the area indicated by the shape of the user input when the bandwidth resources are unchanged. Thereby, the transmission of the area indicated by the shape input by the user is ensured, further satisfying that the user's attention to an area in the instant video is greater than that of other areas, the user's requirement for the definition of a certain area and the amount of detail retention is greater than other areas. And the other needs of the user who wants the instant video interaction to move the attention to the diverse needs of the user-specified area, improving the user experience. In addition, by obtaining the shape input by the user, the form of the area indicated by the user input is increased, the interest and interaction of the instant video interaction are improved, and the interaction mode of the user in the process of instant video interaction is further increased, thereby further satisfying the user's Diversified needs and improved 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 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;
第二获取模块1602,用于获取用户输入的形状;a second obtaining module 1602, configured to acquire a shape input by a user;
显示模块1603,用于根据所述用户输入的形状以及电子设备所支持的传输策略,显示当前即时视频帧。The display module 1603 is configured to display the current instant video frame according to the shape of the user input 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 the shape input by the user, the form of the area indicated by the user input is increased, the interest and interaction of the instant video interaction are improved, and the interaction mode of the user in the process of instant video interaction is further increased, thereby further satisfying the user's Diversified needs and improved 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 is shown in FIG. The device 17 includes a display 1701, a memory 1702, and a processor 1703 coupled to the display 1701, the memory 1702, wherein the memory 1702 stores a set of program codes, and 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;
获取用户输入的形状;Get the shape entered by the user;
根据所述用户输入的形状以及电子设备所支持的传输策略,显示当前即时视频帧。The current instant video frame is displayed according to the shape of the user input 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 the shape input by the user, the form of the area indicated by the user input is increased, the interest and interaction of the instant video interaction are improved, and the interaction mode of the user in the process of instant video interaction is further increased, thereby further satisfying the user's Diversified needs and 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 embodiment of the present invention is the same as the embodiment of the method for transmitting an instant video. 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 (15)

  1. 一种即时视频的传输方法,其特征在于,所述方法包括:A method for transmitting an instant video, characterized in that the method comprises:
    获取用户输入的形状;Get the shape entered by the user;
    在当前即时视频帧中确定所述形状所指示的区域;Determining an area indicated by the 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 shape according to the first transmission policy; or
    若所述网络带宽满足第二预设条件,则根据第二传输策略,传输包括所述形状所指示的区域的所述当前即时视频帧;或者,If the network bandwidth meets the second preset condition, transmitting the current instant video frame including the area indicated by the shape according to the second transmission policy; or
    若所述网络带宽满足第三预设条件,则根据第三传输策略,传输包括所述形状所指示的区域的所述当前即时视频帧;或者,If the network bandwidth meets a third preset condition, transmitting, according to the third transmission policy, the current instant video frame including the area indicated by the shape; or
    若所述网络带宽满足第四预设条件,则根据第四传输策略,传输包括所述形状所指示的区域的所述当前即时视频帧。If the network bandwidth meets the fourth preset condition, transmitting the current instant video frame including the area indicated by the shape according to the fourth transmission policy.
  2. 根据权利要求1所述的方法,其特征在于,所述获取所述用户输入的形状包括:The method of claim 1 wherein said obtaining a shape of said user input comprises:
    获取用户输入的曲线,所述曲线所包括的部分曲线为闭合曲线,并确定所述闭合曲线所指示的形状为所述用户输入的形状;Obtaining a curve input by a user, the partial curve included in the curve is a closed curve, and determining that the shape indicated by the closed curve is a shape input by the user;
    获取所述用户输入的位置参数,所述位置参数包括坐标参数和特征参数中的任意一个。Obtaining a position parameter input by the user, the position parameter including any one of a coordinate parameter and a feature parameter.
  3. 根据权利要求1或2所述的方法,其特征在于,通过以下操作中的任意一个,在当前即时视频帧中确定所述形状所指示的区域:The method according to claim 1 or 2, wherein the area indicated by the shape is determined in the current instant video frame by any one of the following operations:
    所述位置参数包括坐标参数,根据所述坐标参数,在当前即时视频帧中确定所述形状所指示的区域;或者, The position parameter includes a coordinate parameter, and according to the coordinate parameter, determining an area indicated by the shape in a current instant video frame; or
    所述位置参数包括描述参数,在所述当前即时视频帧中识别所述描述参数所指示的细节;The location parameter includes a description parameter that identifies details indicated by the description parameter in the current instant video frame;
    根据所述细节,在所述当前即时视频帧中确定所述形状所指示的区域。According to the details, an area indicated by the shape is determined in the current instant video frame.
  4. 根据权利要求1至3任一所述的方法,其特征在于,所述根据第一传输策略,传输包括所述用户输入的形状所指示的区域的所述当前即时视频帧包括:The method according to any one of claims 1 to 3, wherein the transmitting the current instant video frame including the area indicated by the shape of the user input 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.
  5. 根据权利要求4所述的方法,其特征在于,所述根据与所述当前即时视频帧对应的重要性矩阵,对所述当前即时视频进行处理,获取处理后的即时视频帧包括:The method according to claim 4, 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 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.
  6. 根据权利要求1至5任一所述的方法,其特征在于,所述根据第二传输策略,传输包括所述用户输入的形状所指示的区域的所述当前即时视频帧策略包括:The method according to any one of claims 1 to 5, wherein the transmitting the current instant video frame policy including the area indicated by the shape of the user input according to the second transmission policy comprises:
    将至少包括所述用户输入的形状所指示的区域的即时视频帧划分为至少一个宏块,并设置组成所述至少一个宏块所对应的量化参数;Dividing an instant video frame including at least an area indicated by the shape of the user input 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.
  7. 根据权利要求6所述的方法,其特征在于,The method of claim 6 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 shape to a first number value;
    设置不包括所述全部或者部分所述形状所指示的区域的宏块的量化参数为第二数值;Setting a quantization parameter of a macroblock that does not include all or part of the area indicated by the 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 instant video frame.
  8. 根据权利要求1至7任一所述的方法,其特征在于,所述根据第三传输策略,传输包括所述用户输入的形状所指示的区域的所述当前即时视频帧包括:The method according to any one of claims 1 to 7, wherein the transmitting the current instant video frame including the area indicated by the shape of the user input according to the third transmission policy comprises:
    获取包括所述用户输入的形状所指示的区域的当前即时视频帧与参考帧之间的残差数据;Acquiring residual data between a current instant video frame and a reference frame including an area indicated by the shape of the user input;
    传输所述残差数据。Transmitting the residual data.
  9. 根据权利要求8所述的方法,其特征在于,所述获取包括所述用户输入的形状所指示的区域的当前即时视频帧与参考帧之间的残差数据包括:The method according to claim 8, wherein the obtaining the residual data between the current instant video frame and the reference frame of the region indicated by the shape of the user input comprises:
    获取所述形状所指示的区域的位置参数与姿态参数;Obtaining a position parameter and a posture parameter of the area indicated by the 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 shape according to the standard position parameter and the standard posture parameter.
  10. 根据权利要求3所述的方法,其特征在于,所述根据第四传输策略,传输包括所述用户输入的形状所指示的区域的所述当前即时视频帧包括:The method according to claim 3, wherein the transmitting the current instant video frame including the area indicated by the shape of the user input according to the fourth transmission policy comprises:
    获取用于描述所述用户输入的形状所指示的区域的特征参数;Obtaining a feature parameter for describing an area indicated by the shape of the user input;
    传输所述特征参数。Transmitting the feature parameters.
  11. 根据权利要求10所述的方法,其特征在于,所述获取用于描述所述用户输入的形状所指示的区域的特征参数包括:The method according to claim 10, wherein the acquiring characteristic parameters for describing an area indicated by the shape of the user input comprises:
    对所述形状所指示的区域进行三角分割,获取至少一个三角区域; Triangulating the area indicated by the 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.
  12. 根据权利要求1至11任一所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 11, wherein the method further comprises:
    将所述用户输入的形状发送至其他电子设备。The shape input by the user is sent to other electronic devices.
  13. 一种即时视频显示方法,其特征在于,所述方法包括:An instant video display method, 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;
    获取用户输入的形状;Get the shape entered by the user;
    根据所述用户输入的形状以及电子设备所支持的传输策略,显示所述当前即时视频帧。The current instant video frame is displayed according to the shape of the user input and a transmission policy supported by the electronic device.
  14. 一种电子设备,其特征在于,所述电子设备包括:An electronic device, comprising:
    获取模块,用于获取用户输入的形状;An acquisition module for obtaining a shape input by a user;
    第一处理模块,用于在当前即时视频帧中确定所述形状所指示的区域;a first processing module, configured to determine an area indicated by the 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 including an area indicated by the shape of the user input 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 including an area indicated by the shape of the user input 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 including an area indicated by the shape of the user input 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 shape of the user input according to the fourth transmission policy.
  15. 一种电子设备,其特征在于,所述电子设备包括: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 obtaining module, configured to acquire a shape input by the user;
    显示模块,用于根据所述用户输入的形状以及电子设备所支持的传输策略,显示所述当前即时视频帧。 And a display module, configured to display the current instant video frame according to the shape of the user input and a transmission policy supported by the electronic device.
PCT/CN2016/086144 2015-06-19 2016-06-17 Real-time video transmission method and electronic apparatus WO2016202287A1 (en)

Applications Claiming Priority (10)

Application Number Priority Date Filing Date Title
CN201510346079.8A CN105163196A (en) 2015-06-19 2015-06-19 Real-time video coding method and electronic equipment
CN201510346189.4A CN105163125A (en) 2015-06-19 2015-06-19 Real-time video coding method and electronic equipment
CN201510346076.4A CN105163195A (en) 2015-06-19 2015-06-19 Real-time video coding method and electronic equipment
CN201510346227.6 2015-06-19
CN201510346190.7A CN105163197A (en) 2015-06-19 2015-06-19 Real-time video coding method and electronic equipment
CN201510346227.6A CN104994405A (en) 2015-06-19 2015-06-19 Instant-video transmission method and electronic equipment
CN201510346189.4 2015-06-19
CN201510346076.4 2015-06-19
CN201510346190.7 2015-06-19
CN201510346079.8 2015-06-19

Publications (1)

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

Family

ID=57545026

Family Applications (1)

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

Country Status (1)

Country Link
WO (1) WO2016202287A1 (en)

Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101079716A (en) * 2006-04-06 2007-11-28 通用电气公司 Adaptive selection of image streaming mode
CN101164341A (en) * 2005-03-01 2008-04-16 高通股份有限公司 Quality metric-biased region-of-interest coding for video telephony
CN101588496A (en) * 2008-05-20 2009-11-25 吴平 A kind of communication system of the finely-coded local regions based on video content
CN102238374A (en) * 2010-04-21 2011-11-09 腾讯科技(深圳)有限公司 Method and device for compressing and coding image data
WO2014000238A1 (en) * 2012-06-28 2014-01-03 宇龙计算机通信科技(深圳)有限公司 Terminal and video image compression method
US20140136686A1 (en) * 2012-11-09 2014-05-15 Institute For Information Industry Dynamic resolution regulating system and dynamic resolution regulating method
CN104967867A (en) * 2015-06-19 2015-10-07 美国掌赢信息科技有限公司 Instant video coding method and electronic device
CN104994405A (en) * 2015-06-19 2015-10-21 美国掌赢信息科技有限公司 Instant-video transmission method and electronic equipment
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
CN105163125A (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
CN105163194A (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
CN105163199A (en) * 2015-06-19 2015-12-16 美国掌赢信息科技有限公司 Real-time video coding method and electronic equipment
CN105163197A (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

Patent Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101164341A (en) * 2005-03-01 2008-04-16 高通股份有限公司 Quality metric-biased region-of-interest coding for video telephony
CN101079716A (en) * 2006-04-06 2007-11-28 通用电气公司 Adaptive selection of image streaming mode
CN101588496A (en) * 2008-05-20 2009-11-25 吴平 A kind of communication system of the finely-coded local regions based on video content
CN102238374A (en) * 2010-04-21 2011-11-09 腾讯科技(深圳)有限公司 Method and device for compressing and coding image data
WO2014000238A1 (en) * 2012-06-28 2014-01-03 宇龙计算机通信科技(深圳)有限公司 Terminal and video image compression method
US20140136686A1 (en) * 2012-11-09 2014-05-15 Institute For Information Industry Dynamic resolution regulating system and dynamic resolution regulating method
CN105049948A (en) * 2015-06-19 2015-11-11 美国掌赢信息科技有限公司 Coding method of instant video and electronic equipment
CN104994405A (en) * 2015-06-19 2015-10-21 美国掌赢信息科技有限公司 Instant-video transmission method and electronic equipment
CN104967867A (en) * 2015-06-19 2015-10-07 美国掌赢信息科技有限公司 Instant video coding method and electronic device
CN105049947A (en) * 2015-06-19 2015-11-11 美国掌赢信息科技有限公司 Transmission method of instant video and electronic equipment
CN105163125A (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
CN105163194A (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
CN105163199A (en) * 2015-06-19 2015-12-16 美国掌赢信息科技有限公司 Real-time video coding method and electronic equipment
CN105163197A (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

Similar Documents

Publication Publication Date Title
CN111681167B (en) Image quality adjusting method and device, storage medium and electronic equipment
CN113141380B (en) Coding optimization for blurred media
CN109983757B (en) View dependent operations during panoramic video playback
US9172907B2 (en) Method and apparatus for dynamically adjusting aspect ratio of images during a video call
US10044979B2 (en) Acquiring regions of remote shared content with high resolution
CN105554429A (en) Video conversation display method and video conversation equipment
EP2905945B1 (en) Inter-terminal image sharing method, terminal device and communication system
CN109983500A (en) Re-projecting a flat-panel projection of panoramic video pictures for rendering by an application
JP2016031411A (en) Radio communication system, display device and display method
US20190166410A1 (en) Methods for streaming visible blocks of volumetric video
WO2024037556A1 (en) Image processing method and apparatus, and device and storage medium
CN104469398A (en) Network video image processing method and device
CN113301342B (en) Video coding method, network live broadcasting method, device and terminal equipment
WO2016202285A1 (en) Real-time video transmission method and electronic apparatus
CN105163195A (en) Real-time video coding method and electronic equipment
CN106131563A (en) The method and system of hardware decoding H264 video flowing are carried out based on DXVA
CN105049947A (en) Transmission method of instant video and electronic equipment
US20180018398A1 (en) Positioning content in computer-generated displays based on available display space
CN105163197A (en) Real-time video coding method and electronic equipment
CN104994405A (en) Instant-video transmission method and electronic equipment
US20150186095A1 (en) Inter-terminal image sharing method, terminal device, and communications system
CN105163196A (en) Real-time video coding method and electronic equipment
CN105163125A (en) Real-time video coding method and electronic equipment
CN113810755B (en) Panoramic video preview method and device, electronic equipment and storage medium
WO2016202287A1 (en) Real-time video transmission method and electronic apparatus

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16811028

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 1205 DATED 04/04/2018)

122 Ep: pct application non-entry in european phase

Ref document number: 16811028

Country of ref document: EP

Kind code of ref document: A1