CN113794723A - Live broadcast picture lazy loading method and system - Google Patents

Live broadcast picture lazy loading method and system Download PDF

Info

Publication number
CN113794723A
CN113794723A CN202111081450.4A CN202111081450A CN113794723A CN 113794723 A CN113794723 A CN 113794723A CN 202111081450 A CN202111081450 A CN 202111081450A CN 113794723 A CN113794723 A CN 113794723A
Authority
CN
China
Prior art keywords
picture
loaded
original
live broadcast
pictures
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
CN202111081450.4A
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.)
Beijing Kuailai Culture Communication Group Co ltd
Original Assignee
Beijing Kuailai Culture Communication Group 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 Beijing Kuailai Culture Communication Group Co ltd filed Critical Beijing Kuailai Culture Communication Group Co ltd
Priority to CN202111081450.4A priority Critical patent/CN113794723A/en
Publication of CN113794723A publication Critical patent/CN113794723A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/75Media network packet handling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/85Assembly of content; Generation of multimedia applications
    • H04N21/858Linking data to content, e.g. by linking an URL to a video object, by creating a hotspot

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Software Systems (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Human Computer Interaction (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The invention discloses a live broadcast picture lazy loading method and a live broadcast picture lazy loading system, wherein the loading method comprises the following steps: the live broadcast client requests to add pictures to an operation interface; a live broadcast server receives a request of a live broadcast client; acquiring the size of an original picture, processing the original picture to enable the width of the original picture to be smaller than or equal to W/K and/or the height of the original picture to be smaller than or equal to H, obtaining a first loading picture, sending the first loading picture to a live broadcast client side, and loading the first loading picture to an operation interface; and after browsing the first loaded picture of the 1 st picture line, the live broadcast client sends a first continuous browsing request to the live broadcast server, or after browsing the first loaded picture of the Nth picture line, the live broadcast client sends a second continuous browsing request, and the live broadcast server processes the original picture to obtain a second loaded picture and sends the second loaded picture to the live broadcast client, so that the first loaded picture in the 1 st picture line is replaced, or the first loaded picture in the Nth picture line is replaced. The invention realizes the lazy loading of the pictures on the premise of saving data streams.

Description

Live broadcast picture lazy loading method and system
Technical Field
The invention relates to the technical field of computers, in particular to a live picture lazy loading method and a live picture lazy loading system.
Background
Live broadcast is a modern and hot entertainment and learning mode, a director can live broadcast games, sports events, live broadcast delivery, table singing, dancing and other programs on a live broadcast platform, and audiences can select the interested director to watch on the live broadcast platform, so that the current youngest life mode is formed.
In the prior art, if a client sends a picture loading request to watch pictures in a live broadcast client, a live broadcast server needs to cache all picture data in the live broadcast client at the same time, the data flow is large,
therefore, it is desirable to provide a live picture lazy loading method and system capable of reducing data streaming.
Disclosure of Invention
In view of this, the invention provides a live broadcast picture lazy loading method and system, which reduce data stream.
On one hand, the invention provides a live broadcast picture lazy loading method, which comprises the following steps:
the method comprises the steps that a live broadcast client requests to add pictures to an operation interface, the operation interface comprises N picture lines, the width of each picture line is W, the height of each picture line is H, and K pictures are arranged in each picture line;
a live broadcast server receives a request of a live broadcast client, wherein the live broadcast server comprises a plurality of original pictures;
acquiring the size of the original picture, and if the width of the original picture is larger than W/K and/or the height of the original picture is larger than H, processing the original picture to enable the width of the original picture to be smaller than or equal to W/K and/or the height of the original picture to be smaller than or equal to H to obtain a first loaded picture;
sending the N multiplied by K first loaded pictures to the live broadcast client, and loading the first loaded pictures to the operation interface;
after browsing a first loaded picture in a 1 st picture line, a live client sends a first continuous browsing request to a live server, or after browsing the first loaded picture in an Nth picture line, the live client sends a second continuous browsing request, the live server processes NxK +1 to Nx (K +1) original pictures to obtain a second loaded picture, the live server sends the second loaded picture to the live client, and the second loaded picture replaces the first loaded picture in the 1 st picture line, or the second loaded picture replaces the first loaded picture in the Nth picture line.
Optionally, processing the original picture includes:
the original picture comprises an edge area and a central area, wherein the edge area surrounds the central area, whether invalid pixels exist in the edge area is judged, and if the invalid pixels exist in the edge area, the edge area is cut off;
and if the edge area has no invalid pixel, compressing the length and the width of the original picture according to a proportion.
Optionally, the processing, by the live broadcast server, of the N × K +1 th through N × (K +1) th original pictures to obtain a second loaded picture, where the processing includes:
and if the width of the original picture is larger than W/K and/or the height of the original picture is larger than H, processing the original picture to enable the width of the original picture to be smaller than or equal to W/K and/or the height of the original picture to be smaller than or equal to H, and obtaining a second loaded picture.
Optionally, the method further comprises: and acquiring the size of the original picture, and taking the original picture as a first loading picture if the width of the original picture is less than or equal to W/K and the height of the original picture is less than or equal to H.
Optionally, the method further includes that the live client sends a third continuous browsing request to the live server after browsing a second loaded picture in a 1 st picture line, or sends a fourth continuous browsing request after browsing a second loaded picture in an nth picture line, the live server processes nth (K +1) +1 to nth (K +2) original pictures to obtain a third loaded picture, the live server sends the third loaded picture to the live client, and the third loaded picture replaces the second loaded picture in the 1 st picture line, or the third loaded picture replaces the second loaded picture in the nth picture line.
On the other hand, the invention also provides a live broadcast picture lazy loading system, which comprises a live broadcast client and a live broadcast server, wherein,
the live broadcast client comprises a request sending unit and a picture loading unit, wherein,
the request sending unit is used for sending a request for loading pictures to an operation interface to the live broadcast server, the operation interface comprises N picture lines, the width of each picture line is W, the height of each picture line is H, and K pictures are arranged in each picture line;
the picture loading unit is coupled with the live broadcast server and used for receiving the pictures sent by the live broadcast server and loading the pictures into the operation interface;
the live broadcast server comprises a communication module, a picture storage unit and a picture processing unit, wherein,
the communication module is used for communicating with the live broadcast client and receiving the request for loading the pictures to the operation interface;
the picture storage unit is respectively coupled with the communication module and the picture processing unit and comprises a plurality of original pictures;
the picture processing unit is respectively coupled with the picture storage unit and the communication module and is used for acquiring the size of the original picture, and if the width of the original picture is larger than W/K and/or the height of the original picture is larger than H, the original picture is processed to enable the width of the original picture to be smaller than or equal to W/K and/or the height of the original picture to be smaller than or equal to H, so that a first loaded picture is obtained;
the communication module is further used for sending the NxK first loaded pictures to the live broadcast client;
a picture loading unit of the live broadcast client receives the first loaded picture and loads the first loaded picture into the operation interface;
after browsing the first loaded picture of the 1 st picture line in the operation interface, the request sending unit sends a first continuous browsing request to the communication module, or after browsing the first loaded picture of the Nth picture line in the operation interface, the request sending unit sends a second continuous browsing request to the communication module;
the picture processing unit is also used for processing the NxK +1 original pictures to obtain second loaded pictures and then sending the second loaded pictures to the communication module;
the communication module is also used for sending the second loaded picture to a picture loading unit of the live broadcast client;
and replacing the first loaded picture in the 1 st picture line with a second loaded picture by the picture loading unit of the live broadcast client, or replacing the first loaded picture in the Nth picture line with the second loaded picture.
Optionally, the original picture comprises an edge region and a central region, the edge region surrounding the central region;
the image processing unit is used for judging whether the edge area has invalid pixels or not, and if the edge area has invalid pixels, cutting off the edge area; and if the edge area has no invalid pixel, compressing the length and the width of the original picture according to a proportion.
Optionally, the picture processing unit is further configured to obtain N × K +1 to N × (K +1) original pictures, and if the width of the original picture is greater than W/K and/or the height of the original picture is greater than H, process the original picture so that the width of the original picture is less than or equal to W/K and/or the height of the original picture is less than or equal to H, thereby obtaining a second loaded picture.
Optionally, the picture processing unit is further configured to: and acquiring the size of the original picture, and if the width of the original picture is less than or equal to W/K and the height of the original picture is less than or equal to H, sending the original picture to the live broadcast client.
Optionally, the request sending unit is further configured to send a third browsing continuation request to the communication module after browsing a second loaded picture in a 1 st picture line, or send a fourth browsing continuation request to the communication module after browsing a second loaded picture in an nth picture line, where the picture processing unit processes nth (K +1) +1 to nth (K +2) original pictures to obtain a third loaded picture, and the picture processing unit sends the third loaded picture to the picture loading unit, where the third loaded picture replaces the second loaded picture in the 1 st picture line, or the third loaded picture replaces the second loaded picture in the nth picture line.
Compared with the prior art, the live broadcast picture lazy loading method and the live broadcast picture lazy loading system provided by the invention at least realize the following beneficial effects:
the live broadcast client is opened in the lazy loading method for live broadcast pictures, the live broadcast client requests to add pictures to an operation interface, the live broadcast server receives the request of the live broadcast client, the live broadcast server obtains the size of an original picture, if the width of the original picture is larger than W/K and/or the height of the original picture is larger than H, the original picture is processed, the width of the original picture is smaller than or equal to W/K, and/or the height of the original picture is smaller than or equal to H, and a first loaded picture is obtained; sending the NxK first loaded pictures to a live broadcast client, and loading the first loaded pictures to an operation interface; after browsing a first loaded picture of a 1 st picture line, the live broadcast client sends a first continuous browsing request to the live broadcast server, or after browsing the first loaded picture of an Nth picture line, the live broadcast client sends a second continuous browsing request, the live broadcast server processes NxK +1 to NxK (K +1) original pictures to obtain a second loaded picture, the live broadcast server sends the second loaded picture to the live broadcast client, and the second loaded picture replaces the first loaded picture in the 1 st picture line, or the second loaded picture replaces the first loaded picture in the Nth picture line. The invention firstly processes N x K original pictures according to the size of an operation interface and the space occupied by each picture in the operation interface, so that the first loaded picture after the size processing of the N x K original pictures meets the picture size requirement of the operation interface, the live broadcast server only sends N x K first loaded pictures at this time, the data stream is reduced, after the first loaded picture of the 1 st picture line is browsed, the live broadcast client sends a first continuous browsing request to the live broadcast server, or after the first loaded picture of the Nth picture line is browsed, the live broadcast client sends a second continuous browsing request, the live broadcast server processes the Nx K +1 to Nx (K +1) original pictures to obtain a second loaded picture, the server sends the second loaded picture to the live broadcast client, and the second loaded picture replaces the first loaded picture in the 1 st picture line, or the second loaded picture replaces the first loaded picture in the Nth picture line, so that the second loaded picture can be loaded in the 1 st picture line or the Nth picture line, the lazy loading of the picture is realized, and the picture can be loaded on the premise of saving data streams.
Of course, it is not necessary for any product in which the present invention is practiced to achieve all of the above-described technical effects simultaneously.
Other features of the present invention and advantages thereof will become apparent from the following detailed description of exemplary embodiments thereof, which proceeds with reference to the accompanying drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description, serve to explain the principles of the invention.
FIG. 1 is a flow chart of a live-broadcast picture lazy loading method provided by the present invention;
FIG. 2 is a flow chart of another live-broadcast picture lazy loading method provided by the present invention;
FIG. 3 is a flow chart of another live-view picture lazy loading method provided by the present invention;
fig. 4 is a schematic structural diagram of a live-broadcast picture lazy loading system provided by the invention.
Detailed Description
Various exemplary embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be noted that: the relative arrangement of the components and steps, the numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present invention unless specifically stated otherwise.
The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses.
Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail but are intended to be part of the specification where appropriate.
In all examples shown and discussed herein, any particular value should be construed as merely illustrative, and not limiting. Thus, other examples of the exemplary embodiments may have different values.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.
With reference to fig. 1, fig. 1 is a flowchart of a live picture lazy loading method provided by the present invention, and the live picture lazy loading method shown in fig. 1 includes the following steps:
s1: the method comprises the steps that a live broadcast client requests to add pictures to an operation interface, the operation interface comprises N picture lines, the width of each picture line is W, the height of each picture line is H, and K pictures are arranged in each picture line;
in step S1, the size of the operation interface after the live client is opened is matched according to the size of the screen of the electronic device, and the number of pictures that can be displayed is fixed. The larger the screen of the electronic equipment is, the larger the operation interface is, the larger the number of picture lines in the operation interface is, the larger the number of pictures in each picture line is, the smaller the screen of the electronic equipment is, the smaller the operation interface is, the smaller the number of picture lines in the operation interface is, and the smaller the number of pictures in each picture line is.
S2: a live broadcast server receives a request of a live broadcast client, wherein the live broadcast server comprises a plurality of original pictures;
in step S2, the live broadcast server stores a plurality of original pictures, where the number of the original pictures may be infinite, and is not limited specifically here.
S3: acquiring the size of an original picture, and if the width of the original picture is larger than W/K and/or the height of the original picture is larger than H, processing the original picture to enable the width of the original picture to be smaller than or equal to W/K and/or the height of the original picture to be smaller than or equal to H to obtain a first loaded picture;
in the step S3, if the size of the original picture does not conform to the size of the picture that can be displayed in the operation page, and particularly the size of the original picture is larger than the size of the picture that can be displayed in the operation page, the original picture needs to be processed so that the width of the original picture is smaller than or equal to W/K and/or the height of the original picture is smaller than or equal to H, and thus the obtained first loaded picture conforms to the size requirement of the picture that needs to be displayed in the operation interface.
S4: sending the NxK first loaded pictures to a live broadcast client, and loading the first loaded pictures to an operation interface;
in the step S4, the nxk first loaded pictures processed in the step S3 are sent to the live broadcast client, the live broadcast client receives the nxk first loaded pictures and then loads the nxk first loaded pictures into the operation interface, and the live broadcast server only sends the nxk first loaded pictures this time, so that the data stream is reduced.
S5: after browsing a first loaded picture of a 1 st picture line, the live broadcast client sends a first continuous browsing request to the live broadcast server, or after browsing the first loaded picture of an Nth picture line, the live broadcast client sends a second continuous browsing request, the live broadcast server processes NxK +1 to NxK (K +1) original pictures to obtain a second loaded picture, the live broadcast server sends the second loaded picture to the live broadcast client, and the second loaded picture replaces the first loaded picture in the 1 st picture line, or the second loaded picture replaces the first loaded picture in the Nth picture line.
The first continuous browsing request in the invention means that when a user browses the first loaded picture, the user browses to the topmost part of the operation interface and still needs to continuously load the picture; similarly, the second continuous browsing request means that the user browses to the bottommost part of the operation interface when browsing the first loaded picture, and still needs to continuously load the picture.
In step S5, when the user browses each first loaded picture, if the live client sends a first browsing request to the live server after browsing the first loaded picture in the 1 st picture line, or sends a second browsing request after browsing the first loaded picture in the nth picture line, that is, when the user browses the first loaded picture to the topmost or bottommost portion of the operation interface, the live server processes more original pictures to obtain a second loaded picture, and the nxk +1 to nxx (K +1) second loaded pictures replace the first loaded picture in the 1 st picture line, or the nxk +1 to nxx (K +1) second loaded pictures replace the first loaded picture in the nth picture line, so that the second loaded picture can be loaded in the 1 st picture line or the nth picture line, the lazy loading of the pictures is realized, and the pictures can be loaded on the premise of saving data streams.
In some optional embodiments, processing the original picture comprises:
the original picture comprises an edge area and a central area, wherein the edge area surrounds the central area, whether invalid pixels exist in the edge area is judged, and if the invalid pixels exist in the edge area, the edge area is cut off;
and if the edge area has no invalid pixels, compressing the length and the width of the original picture according to the proportion.
Specifically, the invalid pixel mentioned here means that the original picture only has a background image and no portrait in the edge region, and the background image can be cut out, and the cutting out of the edge region does not affect the content to be displayed by the picture. However, if there is a portrait in the edge area and there are no invalid pixels, the original picture cannot be cropped, but the length and width of the original picture can be compressed proportionally, which will not affect the content of the picture to be displayed.
In some optional embodiments, the live broadcast server processes the nth × K +1 to nth × (K +1) original pictures to obtain a second loaded picture, including:
and if the width of the original picture is larger than W/K and/or the height of the original picture is larger than H, processing the original picture to enable the width of the original picture to be smaller than or equal to W/K and/or the height of the original picture to be smaller than or equal to H, and obtaining a second loaded picture.
It can be understood that the process of processing the original picture to obtain the second loaded picture is the same as the process of processing the original picture to obtain the first loaded picture, so as to make the second loaded picture after the original picture is processed meet the size requirement of the picture to be displayed in the operation interface.
In some optional embodiments, referring to fig. 2, fig. 2 is a flowchart of another live video lazy loading method provided by the present invention, and the live video lazy loading method of the present invention in fig. 2 further includes:
step S30: acquiring the size of an original picture, and taking the original picture as a first loading picture if the width of the original picture is less than or equal to W/K and the height of the original picture is less than or equal to H;
of course, when the size of the original picture is judged, if the width of the original picture is less than or equal to W/K and the height of the original picture is less than or equal to H, the size of the original picture is in accordance with the size requirement of the picture to be displayed in the operation interface, and the original picture does not need to be processed and can be directly sent to the live broadcast client.
In some optional embodiments, referring to fig. 3, fig. 3 is a flowchart of another live picture lazy loading method provided by the present invention, and the live picture lazy loading method in fig. 3 further includes step S6: after browsing the second loaded picture of the 1 st picture line, the live broadcast client sends a third continuous browsing request to the live broadcast server, or after browsing the second loaded picture of the nth picture line, the live broadcast client sends a fourth continuous browsing request, the live broadcast server processes the nth (K +1) +1 to nth (K +2) original pictures to obtain a third loaded picture, the live broadcast server sends the third loaded picture to the live broadcast client, and the third loaded picture replaces the second loaded picture in the 1 st picture line, or the third loaded picture replaces the second loaded picture in the nth picture line.
It can be understood that, in the embodiment, by adding a third continuous browsing request and a fourth continuous browsing request, the live broadcast server sends a processed third loaded picture meeting the picture size requirement in the operation interface to the live broadcast client, where the third loaded picture replaces a second loaded picture in a 1 st picture line, or the third loaded picture replaces a second loaded picture in an nth picture line, so that pictures can be loaded in the 1 st picture line or the nth picture line infinitely, and lazy loading of pictures is implemented.
Based on the same invention idea, the invention also provides a live broadcast picture lazy loading system, and referring to fig. 4, fig. 4 is a structural schematic diagram of the live broadcast picture lazy loading system provided by the invention, and the live broadcast picture lazy loading system in fig. 4 comprises a live broadcast client 1 and a live broadcast server 2.
The live client 1 comprises a request sending unit 101 and a picture loading unit 102, wherein,
the request sending unit 101 is configured to send a request for loading a picture to an operation interface to the live broadcast server 2, where the operation interface includes N picture lines, the width of each picture line is W, the height of each picture line is H, and K pictures are set in each picture line;
it can be understood that the size of the operation interface after the live client is opened is matched according to the screen size of the electronic device, and the number of pictures that can be displayed is certain. The larger the screen of the electronic equipment is, the larger the operation interface is, the larger the number of picture lines in the operation interface is, the larger the number of pictures in each picture line is, the smaller the screen of the electronic equipment is, the smaller the operation interface is, the smaller the number of picture lines in the operation interface is, and the smaller the number of pictures in each picture line is.
The picture loading unit 102 is coupled to the live broadcast server 2, and is configured to receive a picture sent by the live broadcast server 2 and load the picture into an operation interface;
the live server 2 comprises a communication module 201, a picture storage unit 202, and a picture processing unit 203, wherein,
the communication module 201 is used for communicating with the live broadcast client 1 and receiving a request for loading a picture to an operation interface;
the picture storage unit 202 is respectively coupled with the communication module 201 and the picture processing unit 203, and the picture storage unit 202 comprises a plurality of original pictures;
the picture processing unit 203 is coupled to the picture storage unit 202 and the communication module 201, and configured to obtain a size of the original picture, and if the width of the original picture is greater than W/K and/or the height of the original picture is greater than H, process the original picture so that the width of the original picture is less than or equal to W/K and/or the height of the original picture is less than or equal to H, so as to obtain a first loaded picture;
the communication module 201 is further configured to send the N × K first loaded pictures to the live broadcast client 1;
the picture loading unit 102 of the live client 1 receives the first loaded picture and loads the first loaded picture into the operation interface;
after browsing the first loaded picture of the 1 st picture line in the operation interface, the request sending unit 101 sends a first browsing continuation request to the communication module 201, or after browsing the first loaded picture of the nth picture line in the operation interface, the request sending unit 101 sends a second browsing continuation request to the communication module 201;
the picture processing unit 203 is further configured to process the nxk +1 th original picture to obtain a second loaded picture, and then send the second loaded picture to the communication module 201;
the communication module 201 is further configured to send the second loaded picture to the picture loading unit 102 of the live broadcast client 1;
the picture loading unit 102 of the live broadcast client 1 replaces the first loaded picture in the 1 st picture line with the second loaded picture, or replaces the first loaded picture in the nth picture line with the second loaded picture.
In some optional embodiments, the original picture includes an edge region and a central region, the edge region surrounding the central region;
the image processing unit 203 is configured to determine whether there are invalid pixels in the edge region, and if there are invalid pixels in the edge region, cut off the edge region; and if the edge area has no invalid pixels, compressing the length and the width of the original picture according to the proportion.
In some optional embodiments, the picture processing unit 203 is further configured to obtain N × K +1 to N × (K +1) original pictures, and if the width of an original picture is greater than W/K and/or the height of an original picture is greater than H, process the original picture so that the width of the original picture is less than or equal to W/K and/or the height of the original picture is less than or equal to H, so as to obtain a second loaded picture.
It can be understood that the process of processing the original picture to obtain the second loaded picture is the same as the process of processing the original picture to obtain the first loaded picture, so as to make the second loaded picture after the original picture is processed meet the size requirement of the picture to be displayed in the operation interface.
In some optional embodiments, the picture processing unit 203 is further configured to: and acquiring the size of the original picture, and if the width of the original picture is less than or equal to W/K and the height of the original picture is less than or equal to H, directly sending the original picture as a first loading picture to the live broadcast client 1.
When the size of the original picture is judged, if the width of the original picture is less than or equal to W/K and the height of the original picture is less than or equal to H, the size of the original picture is shown to meet the size requirement of the picture to be displayed in the operation interface, and the original picture does not need to be processed and can be directly sent to the live broadcast client.
In some optional embodiments, the request sending unit 101 is further configured to send a third browsing request to the communication module 201 after browsing a second loaded picture in a 1 st picture line, or send a fourth browsing request to the communication module 201 after browsing a second loaded picture in an nth picture line, the picture processing unit 203 processes nth (K +1) +1 to nth (K +2) original pictures to obtain a third loaded picture, the picture processing unit 203 sends the third loaded picture to the picture loading unit 102, and the third loaded picture replaces the second loaded picture in the 1 st picture line, or the third loaded picture replaces the second loaded picture in the nth picture line.
It can be understood that, in the embodiment, by adding a third continuous browsing request and a fourth continuous browsing request, the live broadcast server sends a processed third loaded picture meeting the picture size requirement in the operation interface to the live broadcast client, where the third loaded picture replaces a second loaded picture in a 1 st picture line, or the third loaded picture replaces a second loaded picture in an nth picture line, so that pictures can be loaded in the 1 st picture line or the nth picture line infinitely, and lazy loading of pictures is implemented.
By the embodiment, the live broadcast picture lazy loading method and the live broadcast picture lazy loading system at least have the following beneficial effects that:
the live broadcast client is opened in the lazy loading method for live broadcast pictures, the live broadcast client requests to add pictures to an operation interface, the live broadcast server receives the request of the live broadcast client, the live broadcast server obtains the size of an original picture, if the width of the original picture is larger than W/K and/or the height of the original picture is larger than H, the original picture is processed, the width of the original picture is smaller than or equal to W/K, and/or the height of the original picture is smaller than or equal to H, and a first loaded picture is obtained; sending the NxK first loaded pictures to a live broadcast client, and loading the first loaded pictures to an operation interface; after browsing a first loaded picture of a 1 st picture line, the live broadcast client sends a first continuous browsing request to the live broadcast server, or after browsing the first loaded picture of an Nth picture line, the live broadcast client sends a second continuous browsing request, the live broadcast server processes NxK +1 to NxK (K +1) original pictures to obtain a second loaded picture, the live broadcast server sends the second loaded picture to the live broadcast client, and the second loaded picture replaces the first loaded picture in the 1 st picture line, or the second loaded picture replaces the first loaded picture in the Nth picture line. The invention firstly processes N x K original pictures according to the size of an operation interface and the space occupied by each picture in the operation interface, so that the first loaded picture after the size processing of the N x K original pictures meets the picture size requirement of the operation interface, the live broadcast server only sends N x K first loaded pictures at this time, the data stream is reduced, after the first loaded picture of the 1 st picture line is browsed, the live broadcast client sends a first continuous browsing request to the live broadcast server, or after the first loaded picture of the Nth picture line is browsed, the live broadcast client sends a second continuous browsing request, the live broadcast server processes the Nx K +1 to Nx (K +1) original pictures to obtain a second loaded picture, the server sends the second loaded picture to the live broadcast client, and the second loaded picture replaces the first loaded picture in the 1 st picture line, or the second loaded picture replaces the first loaded picture in the Nth picture line, so that the second loaded picture can be loaded in the 1 st picture line or the Nth picture line, the lazy loading of the picture is realized, and the picture can be loaded on the premise of saving data streams.
Although some specific embodiments of the present invention have been described in detail by way of examples, it should be understood by those skilled in the art that the above examples are for illustrative purposes only and are not intended to limit the scope of the present invention. It will be appreciated by those skilled in the art that modifications may be made to the above embodiments without departing from the scope and spirit of the invention. The scope of the invention is defined by the appended claims.

Claims (10)

1. A live broadcast picture lazy loading method is characterized by comprising the following steps:
the method comprises the steps that a live broadcast client requests to add pictures to an operation interface, the operation interface comprises N picture lines, the width of each picture line is W, the height of each picture line is H, and K pictures are arranged in each picture line;
a live broadcast server receives a request of a live broadcast client, wherein the live broadcast server comprises a plurality of original pictures;
acquiring the size of the original picture, and if the width of the original picture is larger than W/K and/or the height of the original picture is larger than H, processing the original picture to enable the width of the original picture to be smaller than or equal to W/K and/or the height of the original picture to be smaller than or equal to H to obtain a first loaded picture;
sending the N multiplied by K first loaded pictures to the live broadcast client, and loading the first loaded pictures to the operation interface;
after browsing a first loaded picture in a 1 st picture line, a live client sends a first continuous browsing request to a live server, or after browsing the first loaded picture in an Nth picture line, the live client sends a second continuous browsing request, the live server processes NxK +1 to Nx (K +1) original pictures to obtain a second loaded picture, the live server sends the second loaded picture to the live client, and the second loaded picture replaces the first loaded picture in the 1 st picture line, or the second loaded picture replaces the first loaded picture in the Nth picture line.
2. The live-view picture lazy loading method according to claim 1, wherein processing said original picture comprises:
the original picture comprises an edge area and a central area, wherein the edge area surrounds the central area, whether invalid pixels exist in the edge area is judged, and if the invalid pixels exist in the edge area, the edge area is cut off;
and if the edge area has no invalid pixel, compressing the length and the width of the original picture according to a proportion.
3. The live-broadcast picture lazy loading method according to claim 1, wherein the live-broadcast server processes from nxk +1 to nxx (K +1) original pictures to obtain a second loaded picture, comprising:
and if the width of the original picture is larger than W/K and/or the height of the original picture is larger than H, processing the original picture to enable the width of the original picture to be smaller than or equal to W/K and/or the height of the original picture to be smaller than or equal to H, and obtaining a second loaded picture.
4. The live-view picture lazy loading method according to claim 1, further comprising:
and acquiring the size of the original picture, and taking the original picture as a first loading picture if the width of the original picture is less than or equal to W/K and the height of the original picture is less than or equal to H.
5. The live broadcast picture lazy loading method according to claim 1, further comprising sending a third browsing continuation request to a live broadcast server by the live broadcast client after browsing the second loaded picture in the 1 st picture line, or sending a fourth browsing continuation request by the live broadcast client after browsing the second loaded picture in the nth picture line, wherein the live broadcast server processes from N × (K +1) +1 to N × (K +2) original pictures to obtain a third loaded picture, and the live broadcast server sends the third loaded picture to the live broadcast client, and the third loaded picture replaces the second loaded picture in the 1 st picture line, or the third loaded picture replaces the second loaded picture in the nth picture line.
6. A lazy loading system for live pictures is characterized by comprising a live client and a live server, wherein,
the live broadcast client comprises a request sending unit and a picture loading unit, wherein,
the request sending unit is used for sending a request for loading pictures to an operation interface to the live broadcast server, the operation interface comprises N picture lines, the width of each picture line is W, the height of each picture line is H, and K pictures are arranged in each picture line;
the picture loading unit is coupled with the live broadcast server and used for receiving the pictures sent by the live broadcast server and loading the pictures into the operation interface;
the live broadcast server comprises a communication module, a picture storage unit and a picture processing unit, wherein,
the communication module is used for communicating with the live broadcast client and receiving the request for loading the pictures to the operation interface;
the picture storage unit is respectively coupled with the communication module and the picture processing unit and comprises a plurality of original pictures;
the picture processing unit is respectively coupled with the picture storage unit and the communication module and is used for acquiring the size of the original picture, and if the width of the original picture is larger than W/K and/or the height of the original picture is larger than H, the original picture is processed to enable the width of the original picture to be smaller than or equal to W/K and/or the height of the original picture to be smaller than or equal to H, so that a first loaded picture is obtained;
the communication module is further used for sending the NxK first loaded pictures to the live broadcast client;
a picture loading unit of the live broadcast client receives the first loaded picture and loads the first loaded picture into the operation interface;
after browsing the first loaded picture of the 1 st picture line in the operation interface, the request sending unit sends a first continuous browsing request to the communication module, or after browsing the first loaded picture of the Nth picture line in the operation interface, the request sending unit sends a second continuous browsing request to the communication module;
the picture processing unit is also used for processing the NxK +1 original pictures to obtain second loaded pictures and then sending the second loaded pictures to the communication module;
the communication module is also used for sending the second loaded picture to a picture loading unit of the live broadcast client;
and replacing the first loaded picture in the 1 st picture line with a second loaded picture by the picture loading unit of the live broadcast client, or replacing the first loaded picture in the Nth picture line with the second loaded picture.
7. The live picture lazy loading system according to claim 6, characterized in that the original picture comprises an edge zone and a central zone, the edge zone surrounding the central zone;
the image processing unit is used for judging whether the edge area has invalid pixels or not, and if the edge area has invalid pixels, cutting off the edge area; and if the edge area has no invalid pixel, compressing the length and the width of the original picture according to a proportion.
8. The live-view picture lazy loading system according to claim 6, wherein the picture processing unit is further configured to obtain N × K +1 to N × (K +1) original pictures, and if the width of the original picture is greater than W/K and/or the height of the original picture is greater than H, process the original picture so that the width of the original picture is less than or equal to W/K and/or the height of the original picture is less than or equal to H, thereby obtaining a second loaded picture.
9. The live-view picture lazy loading system according to claim 6, wherein said picture processing unit is further configured to: and acquiring the size of the original picture, and if the width of the original picture is less than or equal to W/K and the height of the original picture is less than or equal to H, sending the original picture to the live broadcast client.
10. The live-view image lazy loading system according to claim 6, wherein the request sending unit is further configured to send a third browsing request to the communication module after browsing a second loaded image in a 1 st image line, or send a fourth browsing request to the communication module after browsing the second loaded image in an nth image line, wherein the image processing unit processes N × (K +1) +1 to N × (K +2) original images to obtain a third loaded image, and the image processing unit sends the third loaded image to the image loading unit, and the third loaded image replaces the second loaded image in the 1 st image line, or the third loaded image replaces the second loaded image in the nth image line.
CN202111081450.4A 2021-09-15 2021-09-15 Live broadcast picture lazy loading method and system Pending CN113794723A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111081450.4A CN113794723A (en) 2021-09-15 2021-09-15 Live broadcast picture lazy loading method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111081450.4A CN113794723A (en) 2021-09-15 2021-09-15 Live broadcast picture lazy loading method and system

Publications (1)

Publication Number Publication Date
CN113794723A true CN113794723A (en) 2021-12-14

Family

ID=78878469

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111081450.4A Pending CN113794723A (en) 2021-09-15 2021-09-15 Live broadcast picture lazy loading method and system

Country Status (1)

Country Link
CN (1) CN113794723A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160078010A1 (en) * 2013-04-15 2016-03-17 Beijing Qihoo Technology Company Limited Device And Method For Presenting Pictures
CN107066545A (en) * 2017-03-17 2017-08-18 北京潘达互娱科技有限公司 A kind of page loading method and device
CN107577757A (en) * 2017-08-31 2018-01-12 武汉斗鱼网络科技有限公司 Page waterfall stream layout optimization method, storage medium, electronic equipment and system
CN111125575A (en) * 2018-10-31 2020-05-08 北京国双科技有限公司 Webpage data processing method and device
CN111767492A (en) * 2020-06-30 2020-10-13 中国平安财产保险股份有限公司 Picture loading method and device, computer equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160078010A1 (en) * 2013-04-15 2016-03-17 Beijing Qihoo Technology Company Limited Device And Method For Presenting Pictures
CN107066545A (en) * 2017-03-17 2017-08-18 北京潘达互娱科技有限公司 A kind of page loading method and device
CN107577757A (en) * 2017-08-31 2018-01-12 武汉斗鱼网络科技有限公司 Page waterfall stream layout optimization method, storage medium, electronic equipment and system
CN111125575A (en) * 2018-10-31 2020-05-08 北京国双科技有限公司 Webpage data processing method and device
CN111767492A (en) * 2020-06-30 2020-10-13 中国平安财产保险股份有限公司 Picture loading method and device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
KR101813196B1 (en) Method, device, program, and recording medium for video communication
CN102946418B (en) A kind of terminal equipment, a kind of picture provide system and a kind of picture transmission method
CN110392306B (en) Data processing method and equipment
CN106503272B (en) Browsing device net page display methods and device
CN1929538A (en) Image capturing and displaying method and system
CN101493813B (en) Video search system based on content
US9671996B2 (en) Mirror display system and mirror display method
CN106982388B (en) Picture display method and device
CN103647916A (en) Picture storage method and apparatus thereof
CN111405339B (en) Split screen display method, electronic equipment and storage medium
CN105100868A (en) Method and device for displaying picture and thumbnail lists
CN103442288A (en) Method, device and system for processing of trans-equipment data contents
US7835596B2 (en) Componentized application sharing
CN112752107B (en) Webpage picture preprocessing method, system, storage medium and computer equipment
US7936936B2 (en) Method of visualizing a large still picture on a small-size display
US20100049787A1 (en) Method of an internet service, system and data server therefor
CN113794723A (en) Live broadcast picture lazy loading method and system
EP2680128A1 (en) Method for providing reading service, content provision server and system
US8965870B2 (en) Method and apparatus for exchanging media service queries
CN107105338A (en) The method and terminal asked for display image, video and response to network
US20120133826A1 (en) Image Processor and Image Processing Method
CN114567813A (en) Image quality improving method and device, playing equipment and computer readable storage medium
CN113766255A (en) Video stream merging method and device, electronic equipment and computer medium
US9219948B2 (en) Method and system for compression and decompression for handling web content
JP2014232922A (en) Image communication apparatus, program, and method

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20211214