CN114390310A - Data pushing method and device, storage medium and electronic equipment - Google Patents

Data pushing method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN114390310A
CN114390310A CN202210039310.9A CN202210039310A CN114390310A CN 114390310 A CN114390310 A CN 114390310A CN 202210039310 A CN202210039310 A CN 202210039310A CN 114390310 A CN114390310 A CN 114390310A
Authority
CN
China
Prior art keywords
picture
target
proportion
live broadcast
rotation
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202210039310.9A
Other languages
Chinese (zh)
Inventor
陈文琼
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Fanxing Huyu IT Co Ltd
Original Assignee
Guangzhou Fanxing Huyu IT Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Fanxing Huyu IT Co Ltd filed Critical Guangzhou Fanxing Huyu IT Co Ltd
Priority to CN202210039310.9A priority Critical patent/CN114390310A/en
Publication of CN114390310A publication Critical patent/CN114390310A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/21Server components or server architectures
    • H04N21/218Source of audio or video content, e.g. local disk arrays
    • H04N21/2187Live feed
    • 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/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/436Interfacing a local distribution network, e.g. communicating with another STB or one or more peripheral devices inside the home
    • H04N21/4363Adapting the video stream to a specific local network, e.g. a Bluetooth® network
    • H04N21/43637Adapting the video stream to a specific local network, e.g. a Bluetooth® network involving a wireless protocol, e.g. Bluetooth, RF or wireless LAN [IEEE 802.11]
    • 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/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • 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/485End-user interface for client configuration
    • H04N21/4858End-user interface for client configuration for modifying screen layout parameters, e.g. fonts, size of the windows

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Human Computer Interaction (AREA)
  • Databases & Information Systems (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The invention discloses a data pushing method and device, a storage medium and electronic equipment. Wherein, the method comprises the following steps: under the condition that a first anchor client and a second anchor client are in a session connection state, acquiring a first picture pushed by the first anchor client and a second picture pushed by the second anchor client, wherein the resolution of the first picture is a first proportion, and the resolution of the second picture is a second proportion; carrying out boundary compensation processing and rotation processing on a mixed flow picture obtained by mixing the first picture and the second picture to obtain a target picture with a resolution ratio of a target proportion, wherein the target proportion is a display proportion meeting the playing condition of a playing client; and carrying out data encapsulation on the target picture to obtain a live broadcast data packet, and sending the live broadcast data packet. The invention solves the technical problem that the live broadcast display is blocked by the existing data push method.

Description

Data pushing method and device, storage medium and electronic equipment
Technical Field
The invention relates to the field of computers, in particular to a data pushing method and device, a storage medium and electronic equipment.
Background
In order to enrich the live broadcast interaction form, the existing live broadcast platform usually can provide a 'wheat connecting' interaction mode, namely different anchor broadcasters are simultaneously displayed in a live broadcast room through 'wheat connecting' operation, and the anchor broadcasters interact in the live broadcast room, so that the interactivity of live broadcast scenes is increased.
Under the condition of switching from a single-person live broadcast room of one main broadcast to a connecting-to-live interactive mode of a plurality of main broadcasts, the proportion of picture display can be changed. Because for live pictures with different proportions, a decoder at the pull end needs to set different parameters to realize data decoding. Therefore, when the user client acquires that the live-broadcast picture proportion in the live-broadcast stream data changes, the parameters of the decoder need to be reset. During the reset process of the decoder, the live picture can be obviously displayed and blocked. That is, based on the existing live streaming method, the live streaming end can only reset the decoder to perform the decoding operation on the live video data including different video proportions, which may cause the blocking of the live video at the live streaming end.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the invention provides a data pushing method and device, a storage medium and electronic equipment, and aims to at least solve the technical problem that live broadcast display is blocked by the existing data pushing method.
According to an aspect of an embodiment of the present invention, there is provided a data pushing method, including: under the condition that a first anchor client and a second anchor client are in a session connection state, acquiring a first picture pushed by the first anchor client and a second picture pushed by the second anchor client, wherein the resolution of the first picture is a first proportion, and the resolution of the second picture is a second proportion; carrying out boundary compensation processing and rotation processing on a mixed flow picture obtained by mixing the first picture and the second picture to obtain a target picture with a resolution ratio of a target proportion, wherein the target proportion is a display proportion meeting the playing condition of a playing client; and carrying out data encapsulation on the target picture to obtain a live broadcast data packet, and sending the live broadcast data packet.
According to another aspect of the embodiments of the present invention, there is also provided a data pushing apparatus, including: the system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a first picture pushed by a first anchor client and a second picture pushed by a second anchor client under the condition that the first anchor client and the second anchor client are in a session connection state, wherein the resolution of the first picture is a first proportion, and the resolution of the second picture is a second proportion; the processing unit is used for carrying out boundary compensation processing and rotation processing on a mixed flow picture obtained by mixing the first picture and the second picture to obtain a target picture with a resolution ratio of a target proportion, wherein the target proportion is a display proportion meeting the playing condition of the playing client; and the packaging unit is used for carrying out data packaging on the target picture to obtain a live broadcast data packet and sending the live broadcast data packet.
According to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium, in which a computer program is stored, where the computer program is configured to execute the above data pushing method when running.
According to yet another aspect of embodiments herein, there is provided a computer program product comprising a computer program/instructions stored in a computer readable storage medium. The processor of the computer device reads the computer program/instruction from the computer-readable storage medium, and the processor executes the computer program/instruction, so that the computer device executes the data push method as above.
According to another aspect of the embodiments of the present invention, there is also provided an electronic device, including a memory and a processor, where the memory stores a computer program, and the processor is configured to execute the data pushing method through the computer program.
In the embodiment of the present invention, under the condition that a first anchor client and a second anchor client are in a session connection state, a first picture pushed by the first anchor client and a second picture pushed by the second anchor client are obtained, wherein the resolution of the first picture is a first ratio, and the resolution of the second picture is a second ratio; carrying out boundary compensation processing and rotation processing on a mixed flow picture obtained by mixing the first picture and the second picture to obtain a target picture with a resolution ratio of a target proportion, wherein the target proportion is a display proportion meeting the playing condition of a playing client; carry out data package to the target picture and obtain live broadcast data package to send live broadcast data package, thereby carry out the preliminary treatment through treating the live broadcast data of propelling movement, the resolution ratio control that makes the live broadcast picture that includes in the live broadcast data of propelling movement be the target proportion, and then avoided the stream end of drawing to pass through the decoder of resetting in order to realize the decoding to the data of the live broadcast picture of different proportions, thereby the realization directly decodes the operation under the circumstances that keeps the original parameter setting of decoder, has promoted live broadcast display effect.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a schematic diagram of an application environment of an alternative data push method according to an embodiment of the invention;
FIG. 2 is a flow diagram of an alternative data push method according to an embodiment of the invention;
FIG. 3 is a schematic diagram of an alternative data push method according to an embodiment of the invention;
FIG. 4 is a schematic diagram of an alternative data push method according to an embodiment of the invention;
FIG. 5 is a schematic diagram of yet another alternative data pushing method according to an embodiment of the present invention;
FIG. 6 is a schematic structural diagram of an alternative data pushing apparatus according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an alternative electronic device according to an embodiment of the invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to an aspect of the embodiments of the present invention, a data pushing method is provided, as an alternative implementation, the data pushing method may be applied, but not limited to, in an environment as shown in fig. 1.
According to an aspect of the embodiments of the present invention, a data pushing method is provided, and optionally, as an optional implementation manner, the data pushing method may be applied to, but is not limited to, a data pushing system in a hardware environment as shown in fig. 1. The data push system may include, but is not limited to, the terminal device 102, the network 104, the server 106, the database 108, and the terminal device 109. A target client (such as the live interface shown in fig. 1, which may be an anchor version client of a live platform) runs in the terminal device 102. The terminal device 102 includes a human-computer interaction screen, a processor and a memory. The man-machine interaction screen is used for displaying a live interface of the anchor client (such as the live interface of the anchor client shown in fig. 1); and the system is also used for providing a human-computer interaction interface to receive human-computer interaction operation for live network broadcast by a user by using live broadcast software. The processor is configured to generate an interaction instruction in response to the human-computer interaction operation, and send the interaction instruction to the server 106. The memory is used for storing related attribute data, such as interface special effect information of a live interface, different virtual gift information of a live platform and the like. The terminal device 109 also includes a human-computer interaction screen for displaying a live interface of the viewer client, a processor, and a memory.
The specific process comprises the following steps: in step S102, in the clients operating in the terminal device 102, when the first anchor client and the second anchor client are in a session connection state, a first picture pushed by the first anchor client and a second picture pushed by the second anchor client are obtained; then, step S104 is executed, and the terminal apparatus 102 transmits the screen data to the server 106 via the network 104. The server 106 executes the steps S106-S110 to perform mixed flow operation on the first picture and the second picture to obtain mixed flow operation; carrying out boundary compensation processing and rotation processing on the mixed flow picture to obtain a target picture with the resolution ratio of a target proportion; and carrying out data encapsulation on the target picture to obtain a live broadcast data packet. Then, as step S112, the server 106 pushes the live data packet to the terminal device 102 and the terminal device 109 through the network 104; finally, in step S114, the terminal device 102 decodes the live data packet and displays the live picture.
As another alternative, when the terminal device 102 has a relatively high computing processing capability, the steps S106 to S110 may also be performed by the terminal device 102. Here, this is an example, and this is not limited in this embodiment.
Optionally, in this embodiment, the terminal device may be a terminal device configured with a target client, and may include, but is not limited to, at least one of the following: mobile phones (such as Android phones, iOS phones, etc.), notebook computers, tablet computers, palm computers, MID (Mobile Internet Devices), PAD, desktop computers, smart televisions, etc. The target client may be a video client, an instant messaging client, a browser client, an educational client, etc. Such networks may include, but are not limited to: a wired network, a wireless network, wherein the wired network comprises: a local area network, a metropolitan area network, and a wide area network, the wireless network comprising: bluetooth, WIFI, and other networks that enable wireless communication. The server may be a single server, a server cluster composed of a plurality of servers, or a cloud server. The above is merely an example, and this is not limited in this embodiment.
As an alternative implementation, as shown in fig. 2, the data pushing method includes:
s202, under the condition that a first anchor client and a second anchor client are in a session connection state, acquiring a first picture pushed by the first anchor client and a second picture pushed by the second anchor client, wherein the resolution of the first picture is a first proportion, and the resolution of the second picture is a second proportion;
s204, carrying out boundary compensation processing and rotation processing on a mixed flow picture obtained by mixing the first picture and the second picture to obtain a target picture with a resolution ratio of a target proportion, wherein the target proportion is a display proportion meeting the playing condition of the playing client;
and S206, carrying out data encapsulation on the target picture to obtain a live broadcast data packet, and sending the live broadcast data packet.
Taking the interface shown in fig. 3 as an example, it can be understood that the live view is an interface displayed when a live view is performed by a main broadcast client applied to the terminal. The interface may be divided into four display areas, including a live zone 301: the system comprises a display screen, a display screen and a display screen, wherein the display screen is used for displaying a picture played to audience users by a main broadcast user in a live broadcast process; the interaction area 302: the system is used for displaying the interaction information of audience users; setting area 303: the control is used for displaying a control used for setting live broadcast parameters; search area 304: and the control is used for displaying the control used for acquiring the target picture. As shown in the live broadcast area 301, a mixed flow picture obtained by mixing the first picture and the second picture is displayed in this area.
It should be noted that, the above-mentioned situation that the first anchor client and the second anchor client are in the session connection state may be regarded as a "connecting to the wheat" interaction mode, that is, the anchor accounts originally located in different live broadcast rooms are operated through "connecting to the wheat" so that different anchor objects are simultaneously displayed in the same live broadcast room. The above-described case of the session connection state is explained with reference to fig. 4. As shown in fig. 4 (a) and (b), the screen display modes of two different anchor broadcasters when performing live broadcasting independently are respectively shown, where the area determined by the square frame is the live-broadcasting screen display area. In this embodiment, the picture proportions of anchor a and anchor B are the same when they are live broadcast separately. In the case where the anchor a and the anchor B are in the session connection state, as shown in (c) in fig. 4, the anchor a and the anchor B are simultaneously displayed in the live view display area, and the display ratio of the live view display area is also changed. It is observed that, when the live broadcast is switched from the one-person live broadcast to the multi-person live broadcast, "live broadcast" the display width of the live broadcast screen display area (i.e., the display width: the display height) increases. Therefore, when the live display mode is changed, the live picture scale is also changed accordingly. In the prior art, when a stream pulling end acquires live broadcast picture data packets with different widths and high proportions, decoding of live broadcast picture data can be realized only by resetting parameters of a decoder, and in the process of resetting the parameters of the decoder, pictures displayed by a client in live broadcast can be blocked.
Optionally, the first scale of the first picture and the second scale of the second picture may be the same or different, and in the embodiment shown in fig. 4, the first scale of the first picture and the second scale of the second picture are the same. The display scale of the different screens is not limited.
Alternatively, the mixing may be performed not only on two screens but also on a plurality of screens. That is to say, in this embodiment, there may be a plurality of anchor clients in the session connection state, and the mixed flow processing may be performed on a plurality of live frames corresponding to the live frames of the anchor clients to obtain the mixed flow frame.
The target ratio may or may not be the same as the first ratio of the first screen. For example, the target ratio may be set to be consistent with the first ratio of the first frame, and both the target ratio and the first ratio are fixed to be 1: 1. In another preferred mode, the target proportion may be determined as a proportion of pictures pushed when the one-man anchor is live.
It can be understood that, because the probability of the anchor user performing the single live broadcast is usually greater than the probability of performing the live broadcast, in an alternative embodiment, the live broadcast picture ratio of a single anchor client may be set as a target ratio, and in the live broadcast picture data push process, the picture data is encapsulated and pushed according to the single live broadcast picture ratio. When the live video data is acquired, the pull stream end (which may be an anchor client or a viewer client) decodes the live video data according to a target ratio by a built-in decoder. When the anchor client is switched to the session connection state, the resolution of the mixed flow picture which needs to be pushed and displayed is changed, namely, the mixed flow picture is subjected to picture compensation and rotation processing to obtain a target picture matched with a target proportion, and then the target picture is packaged and pushed. After the data packet including the target picture is obtained, the stream pulling end can directly decode the received live broadcast data packet and display the restored mixed-flow picture under the condition of avoiding resetting the decoder, and further the technical problem that the live broadcast picture is blocked due to the existing method is solved.
In the embodiment of the invention, under the condition that a first anchor client and a second anchor client are in a session connection state, a first picture pushed by the first anchor client and a second picture pushed by the second anchor client are obtained; carrying out boundary compensation processing and rotation processing on a mixed flow picture obtained by mixing the first picture and the second picture to obtain a target picture with a resolution ratio of a target proportion; carry out data package to the target picture and obtain live broadcast data package to send live broadcast data package, thereby carry out the preliminary treatment through treating the live broadcast data of propelling movement, the resolution ratio control that makes the live broadcast picture that includes in the live broadcast data of propelling movement be the target proportion, and then avoided the stream end of drawing to pass through the decoder of resetting in order to realize the decoding to the data of the live broadcast picture of different proportions, thereby the realization directly decodes the operation under the circumstances that keeps the original parameter setting of decoder, has promoted live broadcast display effect.
As an optional implementation manner, the performing boundary compensation processing and rotation processing on the mixed flow picture obtained by mixing the first picture and the second picture to obtain the target picture with the resolution being the target ratio includes:
s1, carrying out boundary compensation processing on the mixed flow picture according to the target proportion to obtain a reference picture;
and S2, rotating the reference picture according to the target angle to obtain the target picture.
The method described above will be described below with reference to fig. 4 and 5. Fig. 4 shows a display diagram of the mixed flow before and after the mixed flow is displayed at different clients. As shown in fig. 4 (a) and (b), when the anchor client performs single-person live broadcasting, the width-height ratio of the live broadcasting screen is 9:16, and when the mode is switched to the two-anchor "live broadcasting" mode, the width-height ratio of the mixed-flow screen is 1: 1. Fig. 5 shows a picture processing process diagram after the mixed flow operation. Fig. 5 (a) shows a mixed flow picture that has a width to height ratio of 1: 1. In the case of obtaining the mixed flow picture illustrated in (a) of fig. 5, first, the boundary compensation process is performed on the left and right sides of the picture, that is, the mixed flow picture is widened. It is understood that the widening may be performed by directly adding blank areas with a pixel value of 0 on both sides of the picture, or adding black areas with a pixel value of 256, and the specific form of widening is not limited herein. After the widening processing is performed on the diagram (a) in fig. 5, the diagram (b) in fig. 5 is obtained, wherein the width-to-height ratio of the reference picture after widening is 16: 9. The obtained reference picture is rotated by 90 °, so that the target picture shown in (c) of fig. 5 is obtained, and the width-to-height ratio of the target picture is 9: 16. At this point, a target picture adapted to the target proportion is obtained through compensation processing and rotation processing of the mixed flow picture.
According to the method in the embodiment of the application, the mixed flow picture is subjected to boundary compensation processing according to the target proportion to obtain a reference picture; the reference picture is rotated according to the target angle to obtain the processing mode of the target picture, so that the pushed picture proportion is consistent with the preset target proportion, the situation that a decoder is reset by a stream pulling end according to live broadcast data with changed picture proportion is avoided, and the technical problem that the live broadcast picture is blocked in the prior art is solved.
As an alternative, performing boundary compensation processing on the mixed-flow picture according to the target ratio to obtain the reference picture includes:
s1, determining a target boundary to be compensated based on the resolution of the mixed flow picture;
and S2, performing filling compensation on the compensation area corresponding to the target boundary according to the target proportion to obtain a reference picture.
The above method will be described with reference to fig. 4 and 5. As shown in fig. 4 (c), the ratio of the width to the height of the direct broadcast frame indicated by the resolution of the mixed-flow frame is 1:1, and when the preset target ratio is 9:16, it can be determined that the width of the frame to be compensated on the left and right sides of the mixed-flow frame illustrated in fig. 5 (a) is 7/18 of the mixed-flow frame width, that is, 7/18 of the mixed-flow frame width is required to be compensated on the left and right sides of the direct broadcast frame illustrated in fig. 4 (c), and the height of the compensated frame is consistent with the height of the mixed-flow frame. Further, the picture width-height ratio of the compensated reference picture is 16: 9.
By the method of the embodiment, the target boundary to be compensated is determined according to the resolution ratio based on the mixed flow picture; and filling and compensating the compensation area corresponding to the target boundary according to the target proportion to obtain a reference picture, so that the width-height proportion of the reference picture subjected to picture compensation is matched with the target proportion, and further the efficiency of picture data transmission and decoding is improved.
As an optional mode, the performing data encapsulation on the target picture to obtain a live data packet, and sending the live data packet includes:
s1, coding the target picture to obtain a coded data frame;
and S2, adding the boundary compensation parameters of the boundary compensation processing and the rotation parameters of the rotation processing to the frame tail of the encoded data frame, and performing data encapsulation to obtain a live broadcast data packet.
It can be understood that the operations of compensating and rotating the picture are all implemented in the data processing process, and the picture is not actually displayed on the client.
The operation of compensating the mixed flow picture can be specifically that pixel data is filled directly on the basis of the mixed flow picture data, and then picture data of a reference picture is obtained; the rotation operation is performed on the reference picture, specifically, the transposition operation is directly performed on the pixel matrix of the reference picture, so as to obtain the picture data of the target picture. The above operation may be any data processing method that can be used to achieve the above effects, and the specific manner is not limited herein.
On the basis of performing compensation operation and rotation operation on the mixed flow picture, corresponding operation parameters need to be added at the frame tail of the corresponding picture data frame. The boundary compensation parameters may include a picture width-height ratio indicated by the resolution of the target picture and a picture width-height ratio indicated by the resolution of the mixed-flow picture; the above rotation operation may include a rotation angle, and in the present embodiment, the above rotation operation is actually a rotation angle of 90 °, so 90 ° may be added as a rotation parameter to the corresponding frame end of the picture data frame. And finally, encapsulating the data frame added with the compensation parameter and the rotation parameter to obtain a live broadcast data packet.
By the embodiment of the application, the target picture is coded to obtain the coded data frame; the boundary compensation parameters of the boundary compensation processing and the rotation parameters of the rotation processing are added to the frame tail of the encoded data frame, and the live broadcast data packet is obtained by data encapsulation.
As an optional mode, before adding the boundary compensation parameter of the boundary compensation processing and the rotation parameter of the rotation processing to the end of the encoded data frame and performing data encapsulation to obtain the live broadcast data packet, the method further includes:
s1, determining the width and height of the compensation area during the boundary compensation processing as the boundary compensation parameters;
at S2, a rotation vector at the time of rotation processing is specified as a rotation parameter.
The above method is explained with reference to fig. 5. As shown in fig. 5 (a), assuming that the resolution of the mixed flow image indicates that the width of the mixed flow image is 180 pixels and the height of the mixed flow image is 180 pixels, in order to make the width-to-height ratio of the compensated reference image be 16:9, it is necessary to respectively compensate the compensation regions with the width of 70 pixels and the height of 180 pixels on the left and right sides of the mixed flow image, so that the width of the compensated reference image is 320 pixels and the height of 180 pixels, and further the image width-to-height ratio is controlled to be 16: 9. That is, in this embodiment, the width of 70 pixels and the height of 180 pixels of the compensation region are used as the boundary compensation parameters.
It is understood that after the reference picture is obtained, the rotation angle of 90 ° and the rotation direction (counterclockwise direction) are collectively used as the rotation parameters.
In another alternative embodiment, the boundary compensation parameter may also be a width-to-height ratio of the mixed flow picture before compensation of the mixed flow picture and a width-to-height ratio of the target picture after compensation.
By the method of the embodiment of the application, the target picture is coded to obtain a coded data frame; the boundary compensation parameters of the boundary compensation processing and the rotation parameters of the rotation processing are added to the frame tail of the encoded data frame, and the live broadcast data packet is obtained by data encapsulation.
As an alternative embodiment, in a case that the first anchor client and the second anchor client are not in a session connection state, it is determined that the first picture is played at the playing client according to the first ratio, and the rotation vector at the time of the rotation processing is determined to be zero.
It is understood that, in the case where the anchor client performs the one-man sole casting, as shown in (d) diagram and (e) diagram in fig. 5, since the ratio of the width to the height of the one-man sole casting is 9:16, which is a target ratio, the one-man sole casting can be directly decoded and displayed at the stream end. In order to indicate that the picture can be normally displayed without adjustment in the data frame, a boundary compensation parameter for indicating the proportion of the current picture and a rotation parameter of a rotation state can be added at the tail part of the data frame. For example, in the single-player mode, the target proportion and the picture proportion in the boundary compensation parameter added at the tail of the data frame are both 9:16, that is, the picture is indicated to be not compensated; while adding a rotation parameter of 0 deg., indicating that the picture is not rotated.
By applying the method in the embodiment, when the first anchor client and the second anchor client are not in a session connection state, it is determined that the first picture is played at the playing client according to the first proportion, and the rotation vector during rotation processing is determined to be zero, and the compensation parameter and the rotation parameter are also added to the picture data frame played by a single player alone, so that the formats of the data frames are kept consistent, and the stream pulling end can determine whether to perform reduction processing through specific data of the operation parameters, thereby improving the display efficiency of the live broadcast picture.
As an optional implementation, the method further includes:
s1, receiving a live broadcast data packet;
s2, analyzing the live broadcast data packet to obtain a live broadcast data frame of each frame;
s3, restoring the target picture according to the boundary compensation parameter and the rotation parameter to obtain a mixed flow picture;
and S4, displaying the mixed flow picture.
It will be appreciated that the above method may be applied to a pull end, which may be a viewer client or a cast client of other casts. Under the condition that the live broadcast data packet is obtained by the method, the mixed flow picture can be obtained by restoring the target picture by analyzing the boundary compensation parameter and the rotation parameter included in the data packet, so that the mixed flow picture can be directly displayed at the stream pulling end. For example, when the rotation parameter included in the current frame in the received data packet is 90 °, and the boundary compensation parameter includes 70 pixels in width and 180 pixels in height, the stream pulling end reversely rotates the acquired image data by 90 °, and cuts off the compensation regions of the 70 pixels in width and the 180 pixels in height on the left and right sides, so as to obtain the mixed-flow image capable of being directly played.
According to the embodiment of the application, the live broadcast data packet is received at the pull stream end; analyzing the live broadcast data packet to obtain a live broadcast data frame of each frame; reducing the target picture according to the boundary compensation parameter and the rotation parameter to obtain a mixed flow picture; and displaying the mixed flow picture, thereby realizing that the live broadcast picture in the data packet is displayed through the restoration operation under the condition of avoiding resetting the decoder, and improving the efficiency of displaying the live broadcast picture.
An embodiment of the present application will be described below with reference to fig. 5.
As shown in fig. 5, in the first embodiment, the display ratio 9:16 of the single-person live view is determined as the target ratio:
as shown in (d) and (e) of fig. 5, before data transmission of the single-person live picture, compensation parameters are determined as 9:16 and 9:16, a rotation parameter is determined as 0 °, and a parameter is added to the end of the live picture frame. And actually, the compensation and rotation processing is not carried out, and the packaged product is transmitted to a current pulling end. Under the condition that the stream pulling section receives the live broadcast picture data, analyzing to obtain compensation parameters which are determined to be 9:16 and 9:16, determining the rotation parameter to be 0 degree, determining that the single live broadcast picture is directly displayed without reduction operation;
in the 'Lianmai' mode, the picture display ratio is 4: 3. As shown in fig. 5 (a), before the "live-view" picture data transmission, the "live-view" picture with the picture ratio of 4:3 is subjected to the picture compensation operation to obtain the picture (b) in fig. 5, the width-height ratio of the reference picture is 16:9, and further, the operation of 90 ° rotation is further performed to obtain the target picture with the width-height ratio of the picture of 9:16, i.e., the picture (c) in fig. 5. Further, the compensation operation parameters 4:3 and 9:16 and the rotation operation parameter 90 ° are added to the frame end of the 'Lianmai' picture, and the live streaming data packet is pushed. And after the live broadcast stream data packet is acquired, the live broadcast picture data with the picture ratio of 9:16 can be directly analyzed through a decoder, and the live broadcast picture data is restored and displayed after the compensation operation parameters 4:3 and 9:16 and the rotation operation parameter of 90 degrees are acquired.
In the embodiment of the present invention, under the condition that a first anchor client and a second anchor client are in a session connection state, a first picture pushed by the first anchor client and a second picture pushed by the second anchor client are obtained, wherein the resolution of the first picture is a first ratio, and the resolution of the second picture is a second ratio; carrying out boundary compensation processing and rotation processing on a mixed flow picture obtained by mixing the first picture and the second picture to obtain a target picture with a resolution ratio of a target proportion, wherein the target proportion is a display proportion meeting the playing condition of a playing client; carry out data package to the target picture and obtain live broadcast data package to send live broadcast data package, thereby carry out the preliminary treatment through treating the live broadcast data of propelling movement, the resolution ratio control that makes the live broadcast picture that includes in the live broadcast data of propelling movement be the target proportion, and then avoided the stream end of drawing to pass through the decoder of resetting in order to realize the decoding to the data of the live broadcast picture of different proportions, thereby the realization directly decodes the operation under the circumstances that keeps the original parameter setting of decoder, has promoted live broadcast display effect.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
According to another aspect of the embodiment of the present invention, there is also provided a data pushing apparatus for implementing the data pushing method. As shown in fig. 6, the apparatus includes:
an obtaining unit 602, configured to obtain, when a first anchor client and a second anchor client are in a session connection state, a first picture pushed by the first anchor client and a second picture pushed by the second anchor client, where a resolution of the first picture is a first ratio and a resolution of the second picture is a second ratio;
a processing unit 604, configured to perform boundary compensation processing and rotation processing on a mixed flow picture obtained by mixing a first picture with a second picture to obtain a target picture with a resolution being a target proportion, where the target proportion is a display proportion meeting a playing condition of a playing client;
and the encapsulating unit 606 is configured to perform data encapsulation on the target picture to obtain a live broadcast data packet, and send the live broadcast data packet.
Optionally, in this embodiment, reference may be made to the above-mentioned method embodiments for implementing the above-mentioned unit modules, which are not described herein again.
According to another aspect of the embodiment of the present invention, there is also provided an electronic device for implementing the data pushing method, where the electronic device may be the terminal device or the server shown in fig. 1. The present embodiment takes the electronic device as a terminal device as an example for explanation. As shown in fig. 7, the electronic device comprises a display 701, a transmission apparatus 702, a processor 703 and a memory 704, wherein the memory 704 has a computer program stored therein, and the processor 703 is configured to perform the steps in any of the above-described method embodiments by means of the computer program.
Optionally, in this embodiment, the electronic device may be located in at least one network device of a plurality of network devices of a computer network.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, under the condition that the first anchor client and the second anchor client are in a session connection state, acquiring a first picture pushed by the first anchor client and a second picture pushed by the second anchor client, wherein the resolution of the first picture is a first proportion, and the resolution of the second picture is a second proportion;
s2, carrying out boundary compensation processing and rotation processing on a mixed flow picture obtained by mixing the first picture and the second picture to obtain a target picture with a resolution ratio of a target ratio, wherein the target ratio is a display ratio meeting the playing condition of the playing client;
and S3, performing data encapsulation on the target picture to obtain a live broadcast data packet, and sending the live broadcast data packet.
Alternatively, it can be understood by those skilled in the art that the structure shown in fig. 7 is only an illustration, and the electronic device may also be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palmtop computer, a Mobile Internet Device (MID), a PAD, and the like. Fig. 7 is a diagram illustrating a structure of the electronic device. For example, the electronics may also include more or fewer components (e.g., network interfaces, etc.) than shown in FIG. 7, or have a different configuration than shown in FIG. 7.
The memory 704 may be used to store software programs and modules, such as program instructions/modules corresponding to the data pushing method and apparatus in the embodiments of the present invention, and the processor 703 executes various functional applications and data processing by running the software programs and modules stored in the memory 704, that is, implementing the data pushing method described above. The memory 704 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 704 may further include memory located remotely from the processor 703, which may be connected to the terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof. As an example, as shown in fig. 7, the memory 704 may include, but is not limited to, an obtaining unit 602, a processing unit 604, and an encapsulating unit 606 in the data pushing apparatus. In addition, the data pushing apparatus may further include, but is not limited to, other module units in the data pushing apparatus, which is not described in this example again.
Optionally, the transmission device 702 is used for receiving or sending data via a network. Examples of the network may include a wired network and a wireless network. In one example, the transmission device 702 includes a Network adapter (NIC) that can be connected to a router via a Network cable and other Network devices to communicate with the internet or a local area Network. In one example, the transmission device 702 is a Radio Frequency (RF) module, which is used to communicate with the internet in a wireless manner.
In addition, the electronic device further includes: a display 701 configured to display a live view, wherein a face of a virtual animal subject is displayed in the target picture; and a connection bus 710 for connecting the respective module parts in the above-described electronic apparatus.
In other embodiments, the terminal device or the server may be a node in a distributed system, where the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting a plurality of nodes through a network communication. Nodes can form a Peer-To-Peer (P2P, Peer To Peer) network, and any type of computing device, such as a server, a terminal, and other electronic devices, can become a node in the blockchain system by joining the Peer-To-Peer network.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
According to an aspect of the present application, there is provided a computer-readable storage medium, a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the data pushing method.
Alternatively, in the present embodiment, the above-mentioned computer-readable storage medium may be configured to store a computer program for executing the steps of:
s1, under the condition that the first anchor client and the second anchor client are in a session connection state, acquiring a first picture pushed by the first anchor client and a second picture pushed by the second anchor client, wherein the resolution of the first picture is a first proportion, and the resolution of the second picture is a second proportion;
s2, carrying out boundary compensation processing and rotation processing on a mixed flow picture obtained by mixing the first picture and the second picture to obtain a target picture with a resolution ratio of a target ratio, wherein the target ratio is a display ratio meeting the playing condition of the playing client;
and S3, performing data encapsulation on the target picture to obtain a live broadcast data packet, and sending the live broadcast data packet.
Alternatively, in this embodiment, a person skilled in the art may understand that all or part of the steps in the methods of the foregoing embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing one or more computer devices (which may be personal computers, servers, network devices, etc.) to execute all or part of the steps of the above methods according to the embodiments of the present invention.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, the above-described division of the units is only one type of division of logical functions, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (11)

1. A data pushing method, comprising:
under the condition that a first anchor client and a second anchor client are in a session connection state, acquiring a first picture pushed by the first anchor client and a second picture pushed by the second anchor client, wherein the resolution of the first picture is a first proportion, and the resolution of the second picture is a second proportion;
carrying out boundary compensation processing and rotation processing on a mixed flow picture obtained by mixing the first picture and the second picture to obtain a target picture with a resolution ratio of a target proportion, wherein the target proportion is a display proportion meeting the playing condition of a playing client;
and carrying out data encapsulation on the target picture to obtain a live broadcast data packet, and sending the live broadcast data packet.
2. The method of claim 1, wherein performing a boundary compensation process and a rotation process on a mixed image obtained by mixing the first image and the second image to obtain a target image with a target resolution ratio comprises:
performing boundary compensation processing on the mixed flow picture according to the target proportion to obtain a reference picture;
and rotating the reference picture according to a target angle to obtain the target picture.
3. The method of claim 2, wherein the performing the boundary compensation process on the mixed-flow picture according to the target ratio to obtain the reference picture comprises:
determining a target boundary to be compensated based on the resolution of the mixed flow picture;
and performing filling compensation on a compensation area corresponding to the target boundary according to the target proportion to obtain the reference picture.
4. The method of claim 1, wherein the data encapsulation of the target picture is performed to obtain a live data packet, and the sending the live data packet comprises:
coding the target picture to obtain a coded data frame;
and adding the boundary compensation parameters of the boundary compensation processing and the rotation parameters of the rotation processing to the frame tail of the encoded data frame, and performing data encapsulation to obtain the live broadcast data packet.
5. The method according to claim 4, before adding the boundary compensation parameter of the boundary compensation process and the rotation parameter of the rotation process to the end of the encoded data frame and performing data encapsulation to obtain the live data packet, further comprising:
determining the width and height of a compensation area during the boundary compensation processing as the boundary compensation parameters;
and determining a rotation vector in the rotation processing as the rotation parameter.
6. The method of any one of claims 1 to 5, further comprising:
and under the condition that the first anchor client and the second anchor client are not in the session connection state, determining that the first picture is played at the playing client according to the first proportion, and determining a rotation vector during the rotation processing to be zero.
7. The method of any one of claims 1 to 5, further comprising:
receiving the live broadcast data packet;
analyzing the live broadcast data packet to obtain a live broadcast data frame of each frame;
reducing the target picture according to the boundary compensation parameter and the rotation parameter to obtain the mixed flow picture;
and displaying the mixed flow picture.
8. A data pushing apparatus, comprising:
the system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a first picture pushed by a first anchor client and a second picture pushed by a second anchor client under the condition that the first anchor client and the second anchor client are in a session connection state, the resolution of the first picture is a first proportion, and the resolution of the second picture is a second proportion;
the processing unit is used for carrying out boundary compensation processing and rotation processing on a mixed flow picture obtained by mixing the first picture and the second picture to obtain a target picture with a resolution ratio of a target proportion, wherein the target proportion is a display proportion meeting the playing condition of a playing client;
and the packaging unit is used for carrying out data packaging on the target picture to obtain a live broadcast data packet and sending the live broadcast data packet.
9. A computer-readable storage medium, comprising a stored program, wherein the program when executed performs the method of any one of claims 1 to 7.
10. A computer program product comprising computer program/instructions, characterized in that the computer program/instructions, when executed by a processor, implement the steps of the method of any of claims 1 to 7.
11. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method of any of claims 1 to 7 by means of the computer program.
CN202210039310.9A 2022-01-13 2022-01-13 Data pushing method and device, storage medium and electronic equipment Pending CN114390310A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210039310.9A CN114390310A (en) 2022-01-13 2022-01-13 Data pushing method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210039310.9A CN114390310A (en) 2022-01-13 2022-01-13 Data pushing method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN114390310A true CN114390310A (en) 2022-04-22

Family

ID=81202760

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210039310.9A Pending CN114390310A (en) 2022-01-13 2022-01-13 Data pushing method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN114390310A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140139736A1 (en) * 2012-11-20 2014-05-22 Sony Network Entertainment International Llc Method and apparatus for processing a video signal for display
WO2018054375A1 (en) * 2016-09-26 2018-03-29 腾讯科技(深圳)有限公司 Live broadcast information processing method and device, and storage medium
CN107864122A (en) * 2017-10-18 2018-03-30 武汉斗鱼网络科技有限公司 A kind of display methods and device of even wheat main broadcaster's live TV stream
CN110636321A (en) * 2019-09-30 2019-12-31 北京达佳互联信息技术有限公司 Data processing method, device, system, mobile terminal and storage medium
CN113225577A (en) * 2021-05-07 2021-08-06 北京百度网讯科技有限公司 Live stream processing method, device and system, electronic equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140139736A1 (en) * 2012-11-20 2014-05-22 Sony Network Entertainment International Llc Method and apparatus for processing a video signal for display
WO2018054375A1 (en) * 2016-09-26 2018-03-29 腾讯科技(深圳)有限公司 Live broadcast information processing method and device, and storage medium
CN107864122A (en) * 2017-10-18 2018-03-30 武汉斗鱼网络科技有限公司 A kind of display methods and device of even wheat main broadcaster's live TV stream
CN110636321A (en) * 2019-09-30 2019-12-31 北京达佳互联信息技术有限公司 Data processing method, device, system, mobile terminal and storage medium
CN113225577A (en) * 2021-05-07 2021-08-06 北京百度网讯科技有限公司 Live stream processing method, device and system, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
US11303881B2 (en) Method and client for playing back panoramic video
CN110557649B (en) Live broadcast interaction method, live broadcast system, electronic equipment and storage medium
CN111681167B (en) Image quality adjusting method and device, storage medium and electronic equipment
US20190325652A1 (en) Information Processing Method and Apparatus
CN111416989A (en) Video live broadcast method and system and electronic equipment
CN109698952B (en) Panoramic video image playing method and device, storage medium and electronic device
CN113457160B (en) Data processing method, device, electronic equipment and computer readable storage medium
US11438645B2 (en) Media information processing method, related device, and computer storage medium
TW200935917A (en) Tile-based system and method for compressing video
WO2019137339A1 (en) Method and device for processing media data
CN110913278B (en) Video playing method, display terminal and storage medium
EP4009644A1 (en) Method for providing and method for acquiring immersive media, apparatus, device, and storage medium
EP3637722A1 (en) Method and apparatus for processing media information
CN103763614A (en) Intelligent cloud IPTV terminal system and implementation method thereof
CN103442288A (en) Method, device and system for processing of trans-equipment data contents
CN112492324A (en) Data processing method and system
CN113453035A (en) Live broadcasting method based on augmented reality, related device and storage medium
KR102417055B1 (en) Method and device for post processing of a video stream
CN114390310A (en) Data pushing method and device, storage medium and electronic equipment
CN110662071A (en) Video decoding method and apparatus, storage medium, and electronic apparatus
CN115134664A (en) Real-time video stream playing method and system and nonvolatile storage medium
KR101915065B1 (en) Live streaming system for virtual reality contents and operating method thereof
CA2848271A1 (en) Clear screen broadcasting
WO2015042767A1 (en) Method for inserting an advertisement into a video stream of an application on demand (aod) service, aod processing device and aod server
CN113825016A (en) Video rendering method, device, equipment, storage medium and computer program product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination