WO2018223793A1 - 一种传输网页图片的方法、装置和系统 - Google Patents

一种传输网页图片的方法、装置和系统 Download PDF

Info

Publication number
WO2018223793A1
WO2018223793A1 PCT/CN2018/085505 CN2018085505W WO2018223793A1 WO 2018223793 A1 WO2018223793 A1 WO 2018223793A1 CN 2018085505 W CN2018085505 W CN 2018085505W WO 2018223793 A1 WO2018223793 A1 WO 2018223793A1
Authority
WO
WIPO (PCT)
Prior art keywords
webpage
image
images
server
compressed
Prior art date
Application number
PCT/CN2018/085505
Other languages
English (en)
French (fr)
Inventor
韩山骏
Original Assignee
腾讯科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Publication of WO2018223793A1 publication Critical patent/WO2018223793A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T9/00Image coding
    • G06T9/004Predictors, e.g. intraframe, interframe coding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T9/00Image coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/177Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a group of pictures [GOP]

Definitions

  • the present application relates to the field of electronic technologies, and in particular, to a method, device, and system for transmitting webpage pictures.
  • a browser is a more common application.
  • the user can browse various webpages through the browser. Specifically, when the user wants to browse a webpage, the user can trigger the terminal to send a request for obtaining the webpage to the server. After receiving the acquisition request, the server can send the webpage to the terminal.
  • the webpage information after receiving the webpage information, the terminal can display it for the user to browse.
  • webpages often contain more images (which can be called webpage images).
  • the server often compresses the same part of each webpage image according to the image data of each webpage image (for example, webpages).
  • the first 10 pixels of the picture have the same pixel value, and the 10 pixels can be compressed into one pixel).
  • the server may send each compressed webpage image to the terminal.
  • the amount of data of each compressed webpage image is generally large, and the number of terminals that send the webpage acquisition request is often large, thereby causing serious waste of server traffic.
  • the embodiment of the present invention provides a method, an apparatus, and a system for transmitting a webpage picture, which can solve the problem that the traffic of the server existing in the related art is seriously wasted.
  • the technical solution is as follows:
  • a method of transmitting a web page image comprising:
  • the webpage image is compressed as a video image frame to obtain a compressed webpage image
  • the compressed webpage image is sent to the terminal.
  • a method for transmitting a webpage image is provided, the method being applied to a terminal, and the method includes:
  • Each web page image is displayed in the target web page in the order in which the web pages are arranged.
  • a server comprising:
  • An obtaining module configured to obtain a plurality of webpage images included in the target webpage
  • a sorting module configured to sort the plurality of webpage images to obtain an arrangement order of the webpages of each webpage
  • a compression module configured to compress each of the webpage images as a video image frame according to an arrangement order of each webpage image and a correlation between the images, to obtain a compressed webpage image
  • a sending module configured to send the compressed webpage image to the terminal when receiving an acquisition request for the target webpage sent by the terminal.
  • a terminal comprising:
  • a sending module configured to send a request for obtaining a target webpage to the server
  • a receiving module configured to receive a compressed webpage image sent by the server
  • a decompression module configured to decompress the compressed webpage image as a video image frame according to the correlation between the pictures of the webpage image, to obtain each webpage image
  • a display module configured to display each webpage image in the target webpage according to an arrangement order of each webpage image.
  • a server including a processor and a memory, the memory storing at least one instruction, the instruction being loaded by the processor and executed to implement the method for transmitting a webpage picture described above .
  • a terminal comprising a processor and a memory, the memory storing at least one instruction, the instruction being loaded by the processor and executed to implement the method for transmitting a webpage picture as described above .
  • a computer readable storage medium having stored therein at least one instruction loaded by a processor and executed to implement the method of transmitting a web page picture as described above.
  • a system for transmitting a web page picture comprising a server and a terminal, wherein: the server, such as the server described above; the terminal, such as the terminal described above.
  • the server when compressing a plurality of webpage images included in the target webpage, uses the plurality of webpage images as video image frames, and compresses the same part included in the multiple images according to the correlation between the images. Not only compressing the same part of each picture, but also reducing the total amount of data of multiple webpage images. Further, when the server sends the compressed webpage image to the terminal, the data amount of the webpage image sent will be It is relatively small, thus preventing traffic waste.
  • FIG. 1 is a schematic diagram of a system framework provided by an embodiment of the present application.
  • FIG. 2 is a flowchart of a method for transmitting a webpage picture according to an embodiment of the present application
  • FIG. 3 is a schematic diagram of a target webpage according to an embodiment of the present application.
  • FIG. 4 is a flowchart of a method for transmitting a webpage picture according to an embodiment of the present application
  • FIG. 5 is a schematic diagram of a system framework provided by an embodiment of the present application.
  • FIG. 6 is a schematic diagram of a display sequence provided by an embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of a server provided by an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of a server according to an embodiment of the present application.
  • FIG. 9 is a schematic structural diagram of a terminal according to an embodiment of the present disclosure.
  • FIG. 10 is a schematic structural diagram of a server according to an embodiment of the present disclosure.
  • FIG. 11 is a schematic structural diagram of a terminal provided by an embodiment of the present application.
  • the embodiment of the present application provides a method for transmitting a webpage image.
  • the method can be implemented by the terminal 101 and the server 102.
  • the system framework of the method is shown in FIG. 1.
  • the terminal 101 may be any terminal having a function of displaying a webpage.
  • it may be a personal computer with a browser installed or a mobile terminal such as a mobile phone or a tablet.
  • the server 102 may be a background server that displays a webpage function, such as a background server of a browser, or a server that provides webpage information, such as a web server of a certain website.
  • the terminal 101 may be provided with a processor, a transceiver and a display.
  • the processor may be used for performing related processing of decompression, the transceiver may be used for receiving and transmitting data, the display may be used for displaying information such as a target webpage, and the display may be liquid crystal.
  • the display can also be a touch screen display.
  • a memory may also be provided, which may be used to store data that is needed and generated by the terminal 101 during the processing described below.
  • the server 102 may be provided with a processor, a transceiver and a memory.
  • the processor may be used for compressing webpage pictures, the transceiver may be used for receiving and transmitting data, and the memory may be used for storing the server 102 and the following processes. Generated data.
  • the server when compressing a webpage image included in a webpage, the server compresses each webpage image separately, that is, for each webpage image, the server may compress the same part in the webpage image, for example, If the pixel values of the first 10 pixels of the webpage image are the same, the 10 pixel points can be compressed into one pixel.
  • the compressed webpage image After receiving the acquisition request for the webpage sent by the terminal, the compressed webpage image may be sent to the terminal.
  • the data volume of the compressed webpage image is still relatively large, and the number of terminals that send the webpage acquisition request is often large, thereby causing serious waste of server traffic.
  • the server when the server compresses the webpage image, the server compresses the plurality of webpage images comprehensively, and compresses the same part included in the multiple images, and specifically adopts intraframe compression-interframe compression.
  • the algorithm compresses a plurality of pictures, for example, the first frame of the webpage and the second frame of the webpage have a large correlation, that is, the same image area is included, and the intraframe compression-interframe compression algorithm provided by the embodiment of the present application is used.
  • the same image area in the second frame webpage image and the first frame webpage image may be compressed, that is, the compressed second frame webpage image only includes the first frame image. Difference information.
  • the server sends the compressed webpage image to the terminal, the data volume of the sent webpage image is It is relatively small, thus preventing traffic waste.
  • I frame intra-coded frame
  • the I frame is a reference frame of the P frame and the B frame (the quality directly affects the quality of the subsequent frames in the same frame group);
  • the I frame is the base frame (first frame) within the frame group, and there is only one I frame in a group;
  • the amount of information occupied by the I frame is relatively large.
  • P frame forward predictive coding frame
  • P frames are reference frames with I frames.
  • the compressed data corresponding to the P frame needs to be superimposed with the data of the I frame to obtain a complete P frame picture.
  • a P frame is an encoded frame separated by 1 to 2 frames after the I frame;
  • the P frame belongs to the forward-predicted inter-frame coding, and it only refers to the I frame or P frame closest to it before;
  • the P frame may be a reference frame of a P frame behind it, or may be a reference frame of a B frame before and after it;
  • B-frame bidirectionally predictive interpolated coded frame
  • B-frame prediction and reconstruction B-frames use the preceding I or P frame and the following P-frame as reference frames, considering both the previously encoded frames in the frame group and the time between the subsequent encoded frames in the frame group. Redundant information to compress the encoded picture of the amount of transmitted data, also known as bi-predictive frames.
  • the B frame is predicted by the previous I or P frame and the following P frame;
  • the B frame has the highest compression ratio compared to the I frame and the P frame.
  • Step 201 The server acquires multiple webpage images included in the target webpage.
  • the target webpage may be any webpage pre-stored in the server.
  • the compression trigger event may be preset in the server, where the compression trigger event may be used to trigger the server to compress the webpage image included in the target webpage, and the compression triggering event may be the acquisition of the target webpage sent by the terminal.
  • the request may also be a preset compression period (specifically, the preset compression period may be reached, and the webpage image included in the target webpage is not compressed), or the target webpage may be generated.
  • the server detects that a compression trigger event occurs, the server can obtain various webpage images included in the target webpage.
  • the webpage image obtained by the server may not be the original webpage image, but the compressed webpage image.
  • the server may also perform the following processing: according to the compression format of multiple webpage images, each webpage image The decompression process is performed to obtain the original webpage image corresponding to each webpage image.
  • the webpage image obtained by the server is a compressed webpage image.
  • the server may adopt a compression format of the webpage image for each webpage image.
  • the corresponding decompression algorithm decompresses the webpage image to obtain the original webpage image corresponding to each webpage image, that is, determines the pixel value of each pixel of each webpage image.
  • Step 202 The server sorts the plurality of webpage images to obtain an arrangement order of each webpage image.
  • the server may sort the multiple webpage images according to a preset sorting manner, and obtain the order of the webpage images. For example, the server can randomly sort multiple web pages.
  • the order of the arrangement of each webpage image is the order of the original webpage image corresponding to each webpage image. That is to say, in this case, after the server obtains multiple webpage images, the server may sort the plurality of webpage images, and may use the obtained order of each webpage image as the original webpage image corresponding to each webpage image. Order.
  • the server may also sort multiple original webpage images, that is, after the server obtains the original webpage image corresponding to each webpage image, the server may directly sort the multiple original webpage images, and obtain the order of each original webpage image.
  • the server may sort the multiple webpage images according to the display position of each webpage image in the target webpage.
  • the processing of step 202 may be as follows: determining that each webpage image in the multiple webpage images is in the The display position in the target webpage; according to the display position of each webpage image in the target webpage, the plurality of webpage images are sorted, and the order of the images of each webpage is obtained.
  • the display location of each image in the target webpage may also be determined, where the display location may be a relative display position of the webpage image in the target webpage, or Is the display order in the target web page, or the absolute display position in the target web page (for example, may be the pixel point position in the target web page).
  • the server may sort the multiple webpage images according to the display position of each webpage image in the target webpage, and obtain the order of the images of each webpage.
  • the specific processing process of sorting the multiple webpage images may be as follows: according to the display position of each webpage image in the target webpage, according to the target page The display position is from top to bottom and left to right, and the plurality of webpage images are sorted to obtain the order of the images of each webpage.
  • the server determines the display position of each webpage image in the target webpage
  • the webpage image of the location above the target webpage may be arranged, and then the display position is arranged.
  • the image of the webpage below the landing page may be arranged in a left-to-right order when there is a webpage image in a different position in the left and right directions of the target webpage.
  • the target webpage includes four webpage images a, b, c, and d, and the display position of the four webpage images in the target webpage is as shown in FIG. 3, and the order in which the server arranges the multiple webpage images may be sequentially Is a, d, c, b.
  • the server may sort the plurality of webpage images according to the correlation between the plurality of webpage images.
  • the processing of step 202 may be as follows: in the plurality of webpage images, determining that the correlation between the images is greater than the pre- Set the webpage image combination of the relevance threshold; sort the image combination of each webpage to obtain the order of the images of each webpage.
  • a preset correlation threshold may be pre-stored in the server. After obtaining the plurality of webpage images included in the target webpage, the server may determine the correlation between the webpage images, and obtain a webpage image combination whose correlation between the images is greater than a preset relevance threshold. For example, the server may analyze each webpage image and determine at least one webpage image including the same image area as a webpage image combination.
  • the webpage image combination can be sorted (for example, the webpage image combination can be randomly sorted), and the order of each webpage image is obtained, wherein for each webpage image combination, the server can Randomly sorting the webpage images in the webpage image combination, or, for each webpage image combination, the server may sort the webpage images in the webpage image combination according to the display order of each webpage image of the webpage image combination. Or, for each webpage image combination, the server may sort the webpage images in the webpage image combination in descending order of resolution.
  • the server may further determine whether the plurality of webpage images meet the preset compression condition.
  • the processing of step 202 may be as follows: if the plurality of webpage images meet the preset compression condition, Sorting a plurality of webpage images to obtain an arrangement order of each webpage image, and the preset compression condition is: at least one webpage image combination exists in the plurality of webpage images, wherein each webpage image combination includes the same webpage image The picture area, and the size of the same picture area reaches the preset size threshold.
  • the preset compression condition may be a condition for determining whether a plurality of webpage images need to be compressed.
  • the server may pre-store the compression condition to determine whether to perform subsequent compression processing when acquiring a plurality of webpage images included in the target webpage. Specifically, after obtaining the plurality of webpage images included in the target webpage, the server may determine whether the plurality of webpage images meet the preset compression condition. For example, determining the relevance of each webpage image according to each pixel value of each webpage image. That is, it can be determined whether each webpage image contains the same image area, and the size of the same image area can be determined (that is, the number of identical pixel values included in the plurality of webpage images can be determined). If it is determined that the plurality of webpage images meet the preset compression condition, the server may perform subsequent operations, that is, the plurality of webpage images may be sorted, and the order of the images of each webpage is obtained.
  • the server may be determined whether the plurality of webpage images include the same image area, and if the same image area is included, it may be determined that at least one webpage image combination exists in the plurality of webpage images (where The image area corresponding to the different webpage image combinations is different. Further, the size of the same image area included in each webpage image in each webpage image combination may be further determined. If there is at least one webpage image combination corresponding to the same image area, the size is greater than or The processing may be performed by the server to sort the plurality of webpage images, where the size of the image area may be the number of pixels included in the image area.
  • the server may not perform the above-described processing of sorting the plurality of webpage images.
  • the plurality of webpage images included in the target webpage are a, b, c, d, and e, and a and b include the same image area, and the same image area included reaches a preset size threshold.
  • a and b are a combination of webpage images contained in multiple webpage images, and the server can sort a, b, c, d, and e.
  • a and b include the same picture area, and the same picture area included reaches a preset size threshold, and d and e also include the same picture area, and the same picture area included reaches a preset size threshold.
  • a and b are a combination of webpage images included in a plurality of webpage images
  • d and e are combinations of another webpage image included in a plurality of webpage images
  • the server can be a, b, c, d, e sort.
  • a and b include the same picture area, and the same picture area included reaches a preset size threshold, and d and e also include the same picture area, and the same picture area included does not reach the preset size threshold.
  • a and b are a combination of webpage images included in a plurality of webpage images
  • the server can sort a, b, c, d, and e.
  • the compression algorithm of the scheme when used to compress multiple webpage images, the data volume of multiple webpage images can be better reduced. Therefore, firstly, multiple webpages are used. The correlation of the pictures is judged, and when the plurality of webpage images satisfy certain conditions, the processing in the scheme is performed, so that the processing in the scheme can be avoided even if the plurality of webpage images do not satisfy the condition. , causing waste of server resources.
  • Step 203 The server compresses each webpage image as a video image frame according to the arrangement order of each webpage image and the correlation between the images, to obtain a compressed webpage image.
  • the server may compress the sorted webpage images as video image frames based on the order of the webpage images and the correlation between the webpages to obtain a compressed webpage.
  • the picture, in which the compression of the webpage image may be implemented by an intraframe compression-interframe compression algorithm, that is, the compression of the webpage image may be implemented by the H265 algorithm or the H264 algorithm for compressing the video image frame.
  • the server may group the multiple webpages by using the correlation of each group of the webpages, and correspondingly, the specific processing of the foregoing step 203 may be as follows: multiple webpages according to the order of each webpage image The pictures are grouped; according to the correlation between the pictures of each group of webpage pictures, the same picture area is included between the webpage images to be compressed, and the compressed webpage image is obtained.
  • the webpage compression may be performed by the intraframe compression-interframe compression algorithm. Specifically, first, a plurality of webpage images are grouped according to the order of arrangement of each webpage image to obtain each frame group. Then, for each frame group, the server may determine the type of each web page picture. For example, the first frame web page image in the frame group may be determined as an I frame, and other web page images in the frame group may be determined as a P frame or B. Frames (specifically P frames or B frames are determined by the correlation between web pages). Finally, the server can compress each webpage image according to the type of each webpage image to obtain a compressed webpage image.
  • the I frame, the P frame, or the B frame are of three types, and the corresponding compression modes are different.
  • the compression method is intraframe compression.
  • When compressing a webpage image of the type P frame you can refer to the webpage image of the previous frame (that is, the webpage image of the type I frame), that is, the same image part of the P frame webpage image and the I frame can be compressed, and compressed.
  • the data only includes the difference information between the P frame web page image and the I frame web page image.
  • step 203 determining the original webpage image corresponding to the multiple webpage images, correspondingly, the processing of step 203 may be as follows: according to the order of arrangement of each webpage image and the correlation between the webpages, each webpage image is The corresponding original webpage image is compressed as a video image frame to obtain a compressed webpage image.
  • the server may compress each webpage image according to the order of each webpage image and the correlation between the webpages.
  • the original webpage image is compressed, that is, the original webpage image corresponding to each webpage image is compressed as a video image frame, and the compressed webpage image is obtained, that is, compressed data corresponding to multiple webpage images is obtained, and the server can compress all the compressed data.
  • the storage into a file corresponds to obtaining video stream data corresponding to a plurality of video image frames.
  • the embodiment of the present application further provides a processing flow for a terminal to acquire a target webpage to a server, as shown in FIG. 4, and the processing flow shown in FIG. 4 is described in detail below with reference to specific implementation manners, and the content may be as follows. :
  • Step 401 The terminal sends an acquisition request for the target webpage to the server.
  • a browser can be installed in the terminal, and the user can browse a webpage (which can be called a target webpage) through a browser. Specifically, the user may trigger the terminal to send a request for acquiring the target webpage to the server, as shown in FIG. 5.
  • Step 402 When receiving the acquisition request for the target webpage sent by the terminal, the server sends the compressed webpage image to the terminal.
  • the server may receive the acquisition request of the target webpage sent by the terminal. After receiving the request for obtaining the target webpage, the server may obtain the webpage information corresponding to the target webpage, that is, the compressed webpage image corresponding to the plurality of webpage images included in the target webpage, and the plurality of webpage images included in the target webpage. Other webpage information, in addition, may send the compressed webpage image and other webpage information except the plurality of webpage images included in the target webpage to the terminal.
  • Step 403 The terminal receives the compressed webpage image sent by the server.
  • the terminal may receive the compressed webpage image sent by the server and the target webpage includes multiple Other web page information beyond the web page image.
  • Step 404 The terminal decompresses the compressed webpage image as a video image frame according to the correlation between the images of the webpage image, and obtains each webpage image.
  • the terminal may display the webpage information. Specifically, after receiving the compressed webpage image, the terminal may determine the correlation between the images of the webpage image, and further, may be based on the correlation between the images of the webpage image (specifically, according to the intraframe compression-interframe decompression algorithm) Decompressing the compressed webpage image as a video image frame to obtain each webpage image, wherein the terminal can adopt ffmpeg supporting intraframe compression-interframe decompression algorithm (where ffmpeg is a set can be used for recording Decompress the compressed web page image by converting the digital audio, video, and open source computer program that converts it into a stream.
  • the terminal may determine the correlation between the images of the webpage image, and further, may be based on the correlation between the images of the webpage image (specifically, according to the intraframe compression-interframe decompression algorithm) Decompressing the compressed webpage image as a video image frame to obtain each webpage image, wherein the terminal can adopt ffmpeg supporting intraframe compression-interframe decompression algorithm (where
  • the decompression order of each compressed webpage image is related to the type of the webpage image.
  • one of the frame groups includes 15 frames of webpage pictures, and the type corresponding to each frame of the webpage, the corresponding decompression order and display order (ie, the order of arrangement) may be as shown in FIG. 6.
  • Step 405 The terminal displays each webpage image in the target webpage according to the arrangement order of each webpage image.
  • each webpage image can be displayed in the target webpage.
  • the terminal may display each webpage image in the target webpage according to the display order of each webpage image.
  • the compressed webpage image may be arranged according to the display order corresponding to each webpage image, so that when the terminal displays the webpage image corresponding to a certain label in the target webpage, According to the order of the tags in the target webpage, corresponding webpage images of corresponding order are displayed for display.
  • the server when compressing a plurality of webpage images included in the target webpage, uses the plurality of webpage images as video image frames, and compresses the same part included in the multiple images according to the correlation between the images. Not only compressing the same part of each picture, but also reducing the total amount of data of multiple webpage images. Further, when the server sends the compressed webpage image to the terminal, the data amount of the webpage image sent will be It is relatively small, thus preventing traffic waste.
  • the compressed data of the plurality of webpage images is small, when the terminal receives the plurality of compressed webpage images, the required traffic is correspondingly less, thereby saving the traffic of the terminal.
  • the compressed data of the webpage image is small, and the speed of the compressed webpage image can be accelerated by the terminal, thereby improving the loading speed of the terminal.
  • the embodiment of the present application further provides a server.
  • the server includes:
  • the obtaining module 710 is configured to obtain a plurality of webpage images included in the target webpage
  • a sorting module 720 configured to sort the plurality of webpage images to obtain an arrangement order of the webpages of each webpage
  • the compression module 730 is configured to compress each of the webpage images as a video image frame according to an arrangement order of each webpage image and a correlation between the images, to obtain a compressed webpage image;
  • the sending module 740 is configured to send the compressed webpage image to the terminal when receiving an acquisition request for the target webpage sent by the terminal.
  • the server further includes:
  • the decompression module 750 is configured to perform decompression processing on each webpage image according to a compression format of the plurality of webpage images, to obtain an original webpage image corresponding to each webpage image;
  • the compression module 730 is configured to:
  • the original webpage image corresponding to each webpage image is compressed as a video image frame according to the order of the image of each webpage and the correlation between the images, and the compressed webpage image is obtained.
  • the sorting module 720 is configured to:
  • the sorting module 720 is configured to:
  • the sorting module 720 is configured to:
  • the plurality of webpage images meet the preset compression condition, the plurality of webpage images are sorted to obtain an arrangement order of the webpage images.
  • the preset compression condition is that at least one webpage image combination exists in the plurality of webpage images, wherein each webpage image combination includes webpage images that include the same image area, and the size of the same image area reaches the pre-predetermined Set the size threshold.
  • the compression module 730 is configured to:
  • the same image area is included in the webpage image to be compressed, and the compressed webpage image is obtained.
  • the sorting module 720 is configured to:
  • the foregoing obtaining module 710, the sorting module 720, the compressing module 730, the sending module 740, and the decompressing module 750 may be implemented by a processor, or the processor may be implemented by using a memory, or the processor may execute a program instruction in the memory. to realise.
  • the embodiment of the present application further provides a terminal.
  • the terminal includes:
  • the sending module 910 is configured to send an acquisition request for the target webpage to the server;
  • the receiving module 920 is configured to receive the compressed webpage image sent by the server;
  • the decompression module 930 is configured to decompress the compressed webpage image as a video image frame according to the correlation between the pictures of the webpage image, to obtain each webpage image;
  • the display module 940 is configured to display each webpage image in the target webpage according to an arrangement order of each webpage image.
  • the foregoing sending module 910, the receiving module 920, the decompressing module 930, and the display module 940 may be implemented by a processor, or the processor may be implemented by using a memory, or the processor may execute a program instruction in the memory.
  • the server when compressing a plurality of webpage images included in the target webpage, uses the plurality of webpage images as video image frames, and compresses the same part included in the multiple images according to the correlation between the images. Not only compressing the same part of each picture, but also reducing the total amount of data of multiple webpage images. Further, when the server sends the compressed webpage image to the terminal, the data amount of the webpage image sent will be It is relatively small, thus preventing traffic waste.
  • the device for transmitting a webpage image provided by the foregoing embodiment is only illustrated by dividing the foregoing functional modules when transmitting a webpage image.
  • the foregoing function may be allocated by different functional modules according to requirements. Completion, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
  • the device for transmitting a webpage image provided by the foregoing embodiment is the same as the method for transmitting the webpage image. The specific implementation process is described in detail in the method embodiment, and details are not described herein again.
  • the embodiment of the present application further provides a system for transmitting a webpage picture, the system includes a server and a terminal, wherein the server may be the server shown in FIG. 7 and FIG. 8, and the terminal may be the FIG. Terminal shown;
  • the server is configured to obtain a plurality of webpage images included in the target webpage, and sort the plurality of webpage images to obtain an arrangement order of the webpages according to the arrangement order of each webpage image and between the images.
  • the webpage image is compressed as a video image frame to obtain a compressed webpage image; and when the acquisition request of the target webpage sent by the terminal is received, the compressed webpage is sent to the terminal. image;
  • the terminal is configured to send a request for acquiring a target webpage to the server, receive a compressed webpage image sent by the server, and use the compressed webpage image as a video image frame according to the correlation between the images of the webpage image. Performing a decompression process to obtain each webpage image; displaying each webpage image in the target webpage according to the arrangement order of each webpage image.
  • the server when compressing a plurality of webpage images included in the target webpage, uses the plurality of webpage images as video image frames, and compresses the same part included in the multiple images according to the correlation between the images. Not only compressing the same part of each picture, but also reducing the total amount of data of multiple webpage images. Further, when the server sends the compressed webpage image to the terminal, the data amount of the webpage image sent will be It is relatively small, thus preventing traffic waste.
  • FIG. 10 is a schematic structural diagram of a server according to an embodiment of the present application.
  • the server 1900 can vary considerably depending on configuration or performance, and can include one or more central processing units (CPUs) 1922 (eg, one or more processors) and memory 1932, one or one The above storage medium 1942 or storage medium 1930 of data 1944 (eg, one or one storage device in Shanghai).
  • the memory 1932 and the storage medium 1930 may be short-term storage or persistent storage.
  • the program stored on storage medium 1930 may include one or more modules (not shown), each of which may include a series of instruction operations in the server.
  • central processor 1922 can be configured to communicate with storage medium 1930, which performs a series of instruction operations in storage medium 1930.
  • Server 1900 may also include one or more power sources 1926, one or more wired or wireless network interfaces 1950, one or more input and output interfaces 1958, one or more keyboards 1956, and/or one or more operating systems 1941.
  • power sources 1926 For example, Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
  • Server 1900 can include a memory, and one or more programs, wherein one or more programs are stored in the memory and configured to execute, by one or more processors, the one or more programs, including the server, to execute the transmission of the web page The instructions for the picture.
  • non-transitory computer readable storage medium comprising instructions, such as a memory comprising instructions executable by a processor of a server to perform the method of transmitting a web page picture as described above.
  • the non-transitory computer readable storage medium may be a ROM (Read-Only Memory), a RAM (Random-Access Memory), or a CD-ROM (Compact Disc Read-Only Memory, CD-ROM, tape, floppy disk and optical data storage devices.
  • the server when compressing a plurality of webpage images included in the target webpage, uses the plurality of webpage images as video image frames, and compresses the same part included in the multiple images according to the correlation between the images. Not only compressing the same part of each picture, but also reducing the total amount of data of multiple webpage images. Further, when the server sends the compressed webpage image to the terminal, the data amount of the webpage image sent will be It is relatively small, thus preventing traffic waste.
  • FIG. 11 is a schematic structural diagram of a terminal with a touch-sensitive surface according to an embodiment of the present application.
  • the terminal may be used to implement the method for verifying code verification provided in the foregoing embodiment. Specifically:
  • the terminal 1100 may include an RF (Radio Frequency) circuit 110, a memory 120 including one or more computer readable storage media, an input unit 130, a display unit 140, a sensor 150, an audio circuit 160, and a WiFi (wireless fidelity, wireless).
  • the fidelity module 170 includes a processor 180 having one or more processing cores, and a power supply 190 and the like. It will be understood by those skilled in the art that the terminal structure shown in FIG. 11 does not constitute a limitation to the terminal, and may include more or less components than those illustrated, or a combination of certain components, or different component arrangements. among them:
  • the RF circuit 110 can be used for transmitting and receiving information or during a call, and receiving and transmitting signals. Specifically, after receiving downlink information of the base station, the downlink information is processed by one or more processors 180. In addition, the data related to the uplink is sent to the base station. .
  • the RF circuit 110 includes, but is not limited to, an antenna, at least one amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, an LNA (Low Noise Amplifier). , duplexer, etc.
  • RF circuitry 110 can also communicate with the network and other devices via wireless communication.
  • the wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System of Mobile communication), GPRS (General Packet Radio Service), CDMA (Code Division Multiple Access). , Code Division Multiple Access), WCDMA (Wideband Code Division Multiple Access), LTE (Long Term Evolution), e-mail, SMS (Short Messaging Service), and the like.
  • GSM Global System of Mobile communication
  • GPRS General Packet Radio Service
  • CDMA Code Division Multiple Access
  • WCDMA Wideband Code Division Multiple Access
  • LTE Long Term Evolution
  • e-mail Short Messaging Service
  • the memory 120 can be used to store software programs and modules, and the processor 180 executes various functional applications and data processing by running software programs and modules stored in the memory 120.
  • the memory 120 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may be stored according to The data created by the use of the terminal 1100 (such as audio data, phone book, etc.) and the like.
  • memory 120 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, memory 120 may also include a memory controller to provide access to memory 120 by processor 180 and input unit 130.
  • the input unit 130 can be configured to receive input numeric or character information and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function controls.
  • input unit 130 can include touch-sensitive surface 131 as well as other input devices 132.
  • Touch-sensitive surface 131 also referred to as a touch display or trackpad, can collect touch operations on or near the user (such as a user using a finger, stylus, etc., on any suitable object or accessory on touch-sensitive surface 131 or The operation near the touch-sensitive surface 131) and driving the corresponding connecting device according to a preset program.
  • the touch-sensitive surface 131 can include two portions of a touch detection device and a touch controller.
  • the touch detection device detects the touch orientation of the user, and detects a signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts the touch information into contact coordinates, and sends the touch information.
  • the processor 180 is provided and can receive commands from the processor 180 and execute them.
  • the touch-sensitive surface 131 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves.
  • the input unit 130 can also include other input devices 132.
  • other input devices 132 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), trackballs, mice, joysticks, and the like.
  • the display unit 140 can be used to display information entered by the user or information provided to the user and various graphical user interfaces of the terminal 1100, which can be composed of graphics, text, icons, video, and any combination thereof.
  • the display unit 140 may include a display panel 141.
  • the display panel 141 may be configured in the form of an LCD (Liquid Crystal Display), an OLED (Organic Light-Emitting Diode), or the like.
  • the touch-sensitive surface 131 may cover the display panel 141, and when the touch-sensitive surface 131 detects a touch operation thereon or nearby, it is transmitted to the processor 180 to determine the type of the touch event, and then the processor 180 according to the touch event The type provides a corresponding visual output on display panel 141.
  • touch-sensitive surface 131 and display panel 141 are implemented as two separate components to implement input and input functions, in some embodiments, touch-sensitive surface 131 can be integrated with display panel 141 for input. And output function.
  • Terminal 1100 can also include at least one type of sensor 150, such as a light sensor, motion sensor, and other sensors.
  • the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 141 according to the brightness of the ambient light, and the proximity sensor may close the display panel 141 when the terminal 1100 moves to the ear. / or backlight.
  • the gravity acceleration sensor can detect the magnitude of acceleration in all directions (usually three axes). When it is stationary, it can detect the magnitude and direction of gravity.
  • the gesture of the mobile phone such as horizontal and vertical screen switching, related Game, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for the terminal 1,100 can also be configured with gyroscopes, barometers, hygrometers, thermometers, infrared sensors and other sensors, here Let me repeat.
  • Audio circuit 160, speaker 161, and microphone 162 provide an audio interface between the user and terminal 1100.
  • the audio circuit 160 can transmit the converted electrical data of the received audio data to the speaker 161 for conversion to the sound signal output by the speaker 161; on the other hand, the microphone 162 converts the collected sound signal into an electrical signal by the audio circuit 160. After receiving, it is converted into audio data, and then processed by the audio data output processor 180, transmitted to the terminal, for example, via the RF circuit 110, or outputted to the memory 120 for further processing.
  • the audio circuit 160 may also include an earbud jack to provide communication of the peripheral earphones with the terminal 1100.
  • WiFi is a short-range wireless transmission technology
  • the terminal 1100 can help users to send and receive emails, browse web pages, and access streaming media through the WiFi module 170, which provides wireless broadband Internet access for users.
  • FIG. 11 shows the WiFi module 170, it can be understood that it does not belong to the essential configuration of the terminal 1100, and may be omitted as needed within the scope of not changing the essence of the invention.
  • the processor 180 is a control center of the terminal 1100 that connects various portions of the entire handset with various interfaces and lines, by running or executing software programs and/or modules stored in the memory 120, and recalling data stored in the memory 120, The various functions and processing data of the terminal 1100 are performed to perform overall monitoring of the mobile phone.
  • the processor 180 may include one or more processing cores; preferably, the processor 180 may integrate an application processor and a modem processor, where the application processor mainly processes an operating system, a user interface, an application, and the like.
  • the modem processor primarily handles wireless communications. It can be understood that the above modem processor may not be integrated into the processor 180.
  • the terminal 1100 also includes a power supply 190 (such as a battery) for powering various components.
  • the power supply can be logically coupled to the processor 180 through a power management system to manage functions such as charging, discharging, and power management through the power management system.
  • Power supply 190 may also include any one or more of a DC or AC power source, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
  • the terminal 1100 may further include a camera, a Bluetooth module, and the like, and details are not described herein again.
  • the display unit of the terminal 1100 is a touch screen display
  • the terminal 1100 further includes a memory, and one or more programs, wherein one or more programs are stored in the memory and configured to be one or one
  • the above processor executes the one or more programs including instructions for the terminal to perform a method of transmitting a web page picture.
  • non-transitory computer readable storage medium comprising instructions, such as a memory comprising instructions executable by a processor of a terminal to perform the method of transmitting a web page picture as described above.
  • the non-transitory computer readable storage medium may be a ROM, a RAM, a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, or the like.
  • the server when compressing a plurality of webpage images included in the target webpage, uses the plurality of webpage images as video image frames, and compresses the same part included in the multiple images according to the correlation between the images. Not only compressing the same part of each picture, but also reducing the total amount of data of multiple webpage images. Further, when the server sends the compressed webpage image to the terminal, the data amount of the webpage image sent will be It is relatively small, thus preventing traffic waste.
  • a person skilled in the art may understand that all or part of the steps of implementing the above embodiments may be completed by hardware, or may be instructed by a program to execute related hardware, and the program may be stored in a computer readable storage medium.
  • the storage medium mentioned may be a read only memory, a magnetic disk or an optical disk or the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本申请实施例公开了一种传输网页图片的方法、装置和系统,属于电子技术领域。所述方法包括:获取目标网页中包含的多个网页图片;对所述多个网页图片进行排序,得到所述每个网页图片的排列顺序;根据每个网页图片的排列顺序及图片间的相关性,将所述每个网页图片作为视频图像帧进行压缩处理,得到压缩后的网页图片;当接收到终端发送的对目标网页的获取请求时,向所述终端发送所述压缩后的网页图片。采用本申请,可以防止流量浪费。

Description

一种传输网页图片的方法、装置和系统
本申请要求于2017年6月6日提交中国国家知识产权局、申请号为201710418619.8、发明名称为“一种传输网页图片的方法、装置和系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及电子技术领域,特别涉及一种传输网页图片的方法、装置和系统。
背景技术
随着电子技术的发展,各种各样的终端得到了广泛的应用,相应的,终端上的应用程序的种类越来越多、功能越来越丰富。浏览器即是一种比较常用的应用程序。用户可以通过浏览器浏览各种网页,具体的,用户想要浏览某网页时,可以通过操作,触发终端向服务器发送对该网页的获取请求,服务器接收到获取请求后,可以向终端发送该网页的网页信息,终端接收到网页信息后,可以对其进行显示以供用户进行浏览。
目前,网页中往往包含有较多的图片(可称为网页图片),为了节约流量,服务器往往会根据每个网页图片的图片数据,对每个网页图片中相同的部分进行压缩(比如,网页图片的前10个像素点的像素值相同,则可以将这10个像素点压缩为一个像素点)。此种情况下,服务器接收到终端发送的获取请求后,可以向终端发送每个压缩后的网页图片。
在实现本申请的过程中,发明人发现相关技术至少存在以下问题:
基于上述服务器压缩网页图片的处理方式,每张压缩后的网页图片的数据量一般还是比较大,往往发送对网页的获取请求的终端的数量较多,从而,导致服务器的流量浪费严重。
发明内容
本申请实施例提供了一种传输网页图片的方法、装置和系统,可以解决相关技术中存在的服务器的流量浪费严重的问题。所述技术方案如下:
一方面,提供了一种传输网页图片的方法,所述方法应用于服务器,所述 方法包括:
获取目标网页中包含的多个网页图片;
对所述多个网页图片进行排序,得到所述每个网页图片的排列顺序;
根据每个网页图片的排列顺序及图片间的相关性,将所述每个网页图片作为视频图像帧进行压缩处理,得到压缩后的网页图片;
当接收到终端发送的对目标网页的获取请求时,向所述终端发送所述压缩后的网页图片。
一方面,提供了一种传输网页图片的方法,所述方法应用于终端,所述方法包括:
向服务器发送对目标网页的获取请求;
接收所述服务器发送的压缩后的网页图片;
根据网页图片的图片间的相关性,将所述压缩后的网页图片作为视频图像帧进行解压缩处理,得到每个网页图片;
按照每个网页图片的排列顺序在所述目标网页中显示每个网页图片。
一方面,提供了一种服务器,所述服务器包括:
获取模块,用于获取目标网页中包含的多个网页图片;
排序模块,用于对所述多个网页图片进行排序,得到所述每个网页图片的排列顺序;
压缩模块,用于根据每个网页图片的排列顺序及图片间的相关性,将所述每个网页图片作为视频图像帧进行压缩处理,得到压缩后的网页图片;
发送模块,用于当接收到终端发送的对目标网页的获取请求时,向所述终端发送所述压缩后的网页图片。
一方面,提供了一种终端,所述终端包括:
发送模块,用于向服务器发送对目标网页的获取请求;
接收模块,用于接收所述服务器发送的压缩后的网页图片;
解压缩模块,用于根据网页图片的图片间的相关性,将所述压缩后的网页图片作为视频图像帧进行解压缩处理,得到每个网页图片;
显示模块,用于按照每个网页图片的排列顺序在所述目标网页中显示每个网页图片。
一方面,提供了一种服务器,所述服务器包括处理器和存储器,所述存储器中存储有至少一条指令,所述指令由所述处理器加载并执行以实现上述所述 的传输网页图片的方法。
一方面,提供了一种终端,所述终端包括处理器和存储器,所述存储器中存储有至少一条指令,所述指令由所述处理器加载并执行以实现上述所述的传输网页图片的方法。
一方面,提供了一种计算机可读存储介质,所述存储介质中存储有至少一条指令,所述指令由处理器加载并执行以实现上述所述的传输网页图片的方法。
一方面,提供了一种传输网页图片的系统,所述系统包括服务器和终端,其中:所述服务器,如上述所述的服务器;所述终端,如上述所述的终端。
本申请实施例提供的技术方案带来的有益效果是:
本申请实施例中,服务器在对目标网页中包含的多个网页图片进行压缩时,将多个网页图片作为视频图像帧,根据图片间的相关性,对多个图片中包含的相同部分进行压缩,不只是对每个图片中的相同部分进行压缩,从而,可以减少多个网页图片的总数据量,进而,服务器在向终端发送压缩后的网页图片时,发送的网页图片的数据量即会比较小,从而,可以防止流量浪费。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本申请实施例提供的一种系统框架示意图;
图2是本申请实施例提供的一种传输网页图片的方法流程图;
图3是本申请实施例提供的一种目标网页的示意图;
图4是本申请实施例提供的一种传输网页图片的方法流程图;
图5是本申请实施例提供的一种系统框架示意图;
图6是本申请实施例提供的一种显示顺序的示意图;
图7是本申请实施例提供的一种服务器结构示意图;
图8是本申请实施例提供的一种服务器结构示意图;
图9是本申请实施例提供的一种终端结构示意图;
图10是本申请实施例提供的一种服务器结构示意图;
图11是本申请实施例提供的一种终端结构示意图。
具体实施方式
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。
本申请实施例提供了一种传输网页图片的方法,该方法可以由终端101和服务器102共同实现,实现该方法的系统框架图如图1所示。其中,终端101可以是具有显示网页功能的任意终端,比如,可以是安装有浏览器的个人电脑或者手机、平板电脑等移动终端。服务器102可以是显示网页功能的后台服务器,比如是浏览器的后台服务器,也可以是提供网页信息的服务器,比如是某网站的网站服务器。
终端101中可以设置有处理器、收发器和显示器,处理器可以用于进行解压缩的相关处理,收发器可以用于接收和发送数据,显示器可以用于显示目标网页等信息,显示器可以是液晶显示器,也可以是触摸屏显示器。还可以设置有存储器,存储器可以用于存储下述处理过程中终端101需要和产生的数据。服务器102中可以设置有处理器、收发器和存储器,处理器可以用于对网页图片进行压缩处理,收发器可以用于接收和发送数据,存储器可以用于存储下述处理过程中服务器102需要和产生的数据。
相关技术中,服务器在对网页中包含的网页图片进行压缩时,往往对每个网页图片分别进行压缩,即对于每个网页图片,服务器可以对该网页图片中的相同的部分进行压缩,例如,网页图片的前10个像素点的像素值相同,则可以将这10个像素点压缩为一个像素点。每当接收到终端发送的对网页的获取请求后,可以向终端发送压缩后的网页图片。对于每个网页图片单独进行压缩,往往压缩后的网页图片的数据量还是比较大,往往发送对网页的获取请求的终端的数量较多,从而,导致服务器的流量浪费严重。
本申请实施例提供的方案中,服务器在对网页图片进行压缩时,会综合对多个网页图片进行压缩,对多个图片中包含的相同部分进行压缩,具体可采用帧内压缩-帧间压缩算法对多个图片进行压缩,例如,第一帧网页图片与第二帧网页图片具有很大的相关性,即包含相同的图片区域,采用本申请实施例提供的帧内压缩-帧间压缩算法,对第二帧网页图片进行压缩时,可以将第二帧 网页图片中与第一帧网页图片中的相同图片区域压缩掉,即压缩后的第二帧网页图片只包含与第一帧图片的差异信息。这样,将多个网页图片中相同的图片区域压缩掉后,可以减少多个网页图片的总数据量,进而,服务器在向终端发送压缩后的网页图片时,发送的网页图片的数据量即会比较小,从而,可以防止流量浪费。
为了便于对本申请实施例的理解,在详细介绍本申请实施例提供的方法之前,下面首先介绍本申请实施例涉及的基本概念。
一.I帧:帧内编码帧
I帧特点:
1.它是一个全帧压缩编码帧。它将全帧图片信息进行JPEG(Joint Photographic Experts Group,联合图片专家小组)压缩编码及传输;
2.解码时仅用I帧的数据就可重构完整图片;
3.I帧是P帧和B帧的参考帧(其质量直接影响到同帧组中以后各帧的质量);
4.I帧是帧组内的基础帧(第一帧),在一组中只有一个I帧;
5.I帧所占数据的信息量比较大。
二.P帧:前向预测编码帧
P帧的预测与重构:P帧是以I帧为参考帧。在对P帧进行解压缩时,需要将P帧对应的压缩数据与I帧的数据叠加,得到完整的P帧图片。
P帧特点:
1.P帧是I帧后面相隔1~2帧的编码帧;
2.解码时必须将I帧中的预测值与预测误差求和后才能重构完整的P帧图片;
3.P帧属于前向预测的帧间编码,它只参考前面最靠近它的I帧或P帧;
4.P帧可以是其后面P帧的参考帧,也可以是其前后的B帧的参考帧;
5.由于是差值传送,P帧的压缩比较高。
三.B帧:双向预测内插编码帧
B帧的预测与重构:B帧以前面的I或P帧和后面的P帧为参考帧,既考虑与帧组内前面已编码帧,也顾及帧组内后面已编码帧之间的时间冗余信息来压缩传输数据量的编码图片,也叫双向预测帧。
B帧特点
1.B帧是由前面的I或P帧和后面的P帧来进行预测的;
2.B帧相对比I帧和P帧压缩比最高。
下面将结合具体实施方式,对图2所示的服务器对网页图片进行压缩的处理流程进行详细的说明,内容可以如下:
步骤201,服务器获取目标网页中包含的多个网页图片。
其中,目标网页可以是服务器中预先存储的任一网页。
在实施中,服务器中可以预先设置有压缩触发事件,其中,压缩触发事件可以用于触发服务器对目标网页包含的网页图片进行压缩处理,压缩触发事件可以是接收到终端发送的对目标网页的获取请求,也可以是达到预设的压缩周期(具体可以是达到预设的压缩周期,且目标网页包含的网页图片未被压缩过),也可以是生成目标网页。当服务器检测到压缩触发事件发生时,服务器可以获取目标网页中包含的各个网页图片。
可选的,服务器获取到的网页图片可能不是原始网页图片,而是压缩过的网页图片,针对此种情况,服务器还可以进行如下处理:根据多个网页图片的压缩格式,对每个网页图片进行解压缩处理,得到每个网页图片对应的原始网页图片。
在实施中,针对服务器获取到的网页图片是压缩过的网页图片的情况,服务器获取到目标网页中的多个网页图片后,对于每个网页图片,服务器可以采用与该网页图片的压缩格式相对应的解压缩算法,对该网页图片进行解压缩处理,得到每个网页图片对应的原始网页图片,即确定每个网页图片的每个像素点的像素值。
步骤202,服务器对多个网页图片进行排序,得到每个网页图片的排列顺序。
在实施中,服务器获取到目标网页中包含的多个网页图片后,可以按照预设的排序方式,对多个网页图片进行排序,得到每个网页图片的排列顺序。例如,服务器可以随机对多个网页进行排序。另外,针对上述确定网页图片对应的原始网页图片的情况,每个网页图片的排列顺序即是每个网页图片对应的原始网页图片的排列顺序。也就是说,此种情况下,服务器获取到多个网页图片后,可以对多个网页图片进行排序,并可以将得到的每个网页图片的排列顺序 作为每个网页图片对应的原始网页图片的排列顺序。另外,服务器也可以对多个原始网页图片进行排序,即服务器得到每个网页图片对应的原始网页图片后,可以直接对多个原始网页图片进行排序,得到每个原始网页图片的排列顺序。
可选的,服务器可以按照每个网页图片在目标网页中的显示位置,对多个网页图片进行排序,相应的,步骤202的处理过程可以如下:确定多个网页图片中的每个网页图片在目标网页中的显示位置;根据每个网页图片在目标网页中的显示位置,对多个网页图片进行排序,得到每个网页图片的排列顺序。
在实施中,服务器获取到目标网页中包含的多个网页图片后,还可以确定每个图片在目标网页中的显示位置,其中,显示位置可以是网页图片在目标网页中的相对显示位置、或者是在目标网页中的显示顺序、或者是在目标网页中的绝对显示位置(比如,可以是在目标网页中的像素点位置)。获取到每个网页图片在目标网页中的显示位置后,服务器可以按照每个网页图片在目标网页中的显示位置,对多个网页图片进行排序,得到每个网页图片的排列顺序。
可选的,基于每个网页图片在目标网页中的显示位置,对多个网页图片进行排序的具体处理过程可以如下:根据每个网页图片在目标网页中的显示位置,按照在目标页面中的显示位置由上到下、由左到右的顺序,对多个网页图片进行排序,得到每个网页图片的排列顺序。
在实施中,服务器确定出每个网页图片在目标网页中的显示位置后,在对多个网页图片进行排序时,首先可以排列显示位置在目标网页的上方位置的网页图片,再排列显示位置在目标网页的下方位置的网页图片,当目标网页的上下方向中的某个位置,在左右不同位置均有网页图片时,可以按照由左到右的顺序排列。例如,目标网页中包含a、b、c、d四个网页图片,且这个四个网页图片的在目标网页中的显示位置如图3所示,则服务器对多个网页图片排列的顺序依次可以是a、d、c、b。
可选的,服务器可以按照多个网页图片间的相关性,对多个网页图片进行排序,相应的,步骤202的处理过程可以如下:在多个网页图片中,确定图片间的相关性大于预设相关性阈值的各网页图片组合;对各网页图片组合进行排序,得到每个网页图片的排列顺序。
在实施中,服务器中可以预先存储有预设相关性阈值。服务器获取到目标网页中包含的多个网页图片后,可以确定网页图片之间的相关性,得到图片间 的相关性大于预设相关性阈值的各网页图片组合。例如,服务器可以对每个网页图片进行分析,将包含相同图片区域的至少一个网页图片,确定为一个网页图片组合。确定出各网页图片组合后,可以对各网页图片组合进行排序(比如,可以随机对各网页图片组合进行排序),得到每个网页图片的排列顺序,其中,对于每个网页图片组合,服务器可以随机对该网页图片组合内的各网页图片进行排序,或者,对于每个网页图片组合,服务器可以按照网页图片组合的每个网页图片的显示顺序,对该网页图片组合内的各网页图片进行排序,又或者,对于每个网页图片组合,服务器可以按照分辨率由大到小的顺序,对网页图片组合内的各网页图片进行排序。
可选的,获取到多个网页图片后,服务器可以进一步判断多个网页图片是否满足预设压缩条件,相应的,步骤202的处理过程可以如下:如果多个网页图片满足预设压缩条件,则对多个网页图片进行排序,得到每个网页图片的排列顺序,预设压缩条件为:多个网页图片中存在至少一个网页图片组合,其中,每个网页图片组合包含的网页图片之间包含相同的图片区域,且相同的图片区域的尺寸达到预设尺寸阈值。
其中,预设压缩条件可以是用于判断多个网页图片是否需要被压缩的条件。
在实施中,服务器中可以预先存储有压缩条件,以便获取到目标网页中包含的多个网页图片时,判断是否需要进行后续的压缩处理。具体的,服务器获取到目标网页中包含的多个网页图片后,可以判断多个网页图片是否满足预设压缩条件,例如,可以根据每个网页图片的各个像素值,确定各个网页图片的相关性,即可以判断各个网页图片是否包含相同的图片区域,并可以确定相同的图片区域的尺寸(即可以确定多个网页图片中包含的相同的像素值的数目)。如果确定出多个网页图片满足预设压缩条件,则服务器可以进行后续操作,即可以对多个网页图片进行排序,得到每个网页图片的排列顺序。
具体的,服务器获取到多个网页图片后,可以判断多个网页图片之间是否包含相同的图片区域,如果包含相同的图片区域,则可以确定多个网页图片中存在至少一个网页图片组合(其中,不同网页图片组合对应的图片区域不同),进而,可以进一步判断每个网页图片组合中各网页图片包含的相同图片区域的尺寸,如果存在至少一个网页图片组合对应的相同图片区域的尺寸大于或等于预设尺寸阈值(预设尺寸阈值可以是技术人员预先设置的数值),则服务器可 以对多个网页图片进行排序的处理,其中,图片区域的尺寸可以是图片区域包含的像素点的数目。如果多个网页图片中不存在满足上述条件的网页图片组合,则服务器可以不进行上述对多个网页图片进行排序的处理。例如,目标网页中包含的多个网页图片分别为a、b、c、d、e,a和b包含相同的图片区域,且包含的相同的图片区域达到预设尺寸阈值,则此种情况下,a和b即是多个网页图片中包含的一个网页图片组合,服务器可以对a、b、c、d、e进行排序。又例如,a和b包含相同的图片区域,且包含的相同的图片区域达到预设尺寸阈值,以及d和e也包含相同的图片区域,且包含的相同的图片区域达到预设尺寸阈值,此种情况下,a和b即是多个网页图片中包含的一个网页图片组合、d和e即是多个网页图片中包含的另一个网页图片组合,服务器可以对a、b、c、d、e进行排序。又例如,a和b包含相同的图片区域,且包含的相同的图片区域达到预设尺寸阈值,以及d和e也包含相同的图片区域,且包含的相同的图片区域未达到预设尺寸阈值,此种情况下,a和b即是多个网页图片中包含的一个网页图片组合,服务器可以对a、b、c、d、e进行排序。
由于在多个网页图片具有相关性的情况下,采用本方案中的压缩算法对多个网页图片进行压缩处理时,才能更好的减少多个网页图片的数据量,因此,首先对多个网页图片的相关性进行判断,在多个网页图片满足一定条件的情况下,再进行本方案中的处理,这样,可以避免在多个网页图片不满足条件的情况下,还进行本方案中的处理,造成服务器资源的浪费。
步骤203,服务器根据每个网页图片的排列顺序及图片间的相关性,将每个网页图片作为视频图像帧进行压缩处理,得到压缩后的网页图片。
在实施中,对多个网页图片排序后,服务器可以基于每个网页图片的排列顺序及图片间的相关性,将排序后的多个网页图片作为视频图像帧进行压缩处理,得到压缩后的网页图片,其中,具体可以通过帧内压缩-帧间压缩算法来实现对网页图像的压缩,即可以通过用于对视频图像帧进行压缩处理的H265算法或H264算法来实现对网页图像的压缩。
可选的,服务器可以对多个网页图片进行分组,基于每组网页图片的相关性进行压缩,相应的,上述步骤203的具体处理过程可以如下:根据每个网页图片的排列顺序将多个网页图片进行分组;根据每组网页图片的图片间的相关性,将网页图片之间包含相同的图片区域进行压缩,得到压缩后的网页图片。
在实施中,服务器得到每个网页图片的排列顺序后,可以通过帧内压缩- 帧间压缩算法,对多个网页图片进行压缩。具体的,首先根据每个网页图片的排列顺序将多个网页图片进行分组,得到每个帧组。然后,对于每个帧组,服务器可以确定每个网页图片的类型,比如,可以将帧组内的第一帧网页图片确定为I帧,将帧组内的其他网页图片确定为P帧或者B帧(具体为P帧还是B帧是由网页图片之间的相关性决定的)。最后,服务器可以根据每个网页图片的类型,对每个网页图片进行压缩,得到压缩后的网页图片。其中,I帧、P帧或者B帧是三种类型,其对应的压缩方式不同,对类型为I帧的网页图片进行压缩时,可以只对本帧网页图片中的冗余信息进行压缩(即此种压缩方式为帧内压缩)。对类型为P帧的网页图片进行压缩时,可以参考前一帧网页图片(即类型为I帧的网页图片),即可以将P帧网页图片中与I帧相同的图片部分压缩掉,压缩后的数据只包括P帧网页图片与I帧网页图片的差异信息。对类型为B帧的网页图片进行压缩时,可以参考前后两帧的网页图片,压缩后的数据只包括与前后两帧网页图片的差异信息,其中,P帧和B帧对应的压缩方式为帧间压缩。
可选的,针对上述确定多个网页图片对应的原始网页图片的情况,相应的,步骤203的处理过程可以如下:根据每个网页图片的排列顺序及图片间的相关性,将每个网页图片对应的原始网页图片作为视频图像帧进行压缩处理,得到压缩后的网页图片。
在实施中,服务器得到每个网页图片对应的原始网页图片后,在根据每个网页图片的排列顺序及图片间的相关性,对各个网页图片进行压缩时,服务器可以对每个网页图片对应的原始网页图片进行压缩,即可以将每个网页图片对应的原始网页图片作为视频图像帧进行压缩处理,得到压缩后的网页图片,即得到多个网页图片对应的压缩数据,服务器可以将所有压缩数据存储成文件,即相当于得到了多个视频图像帧对应的视频流数据。
另外,本申请实施例还提供了一种终端向服务器获取目标网页的处理流程,如图4所示,下面将结合具体实施方式,对图4所示的处理流程进行详细的说明,内容可以如下:
步骤401,终端向服务器发送对目标网页的获取请求。
在实施中,终端中可以安装有浏览器,用户可以通过浏览器浏览某网页(可称为目标网页)。具体的,用户可以通过操作,触发终端向服务器发送对目标 网页的获取请求,如图5所示。
步骤402,当接收到终端发送的对目标网页的获取请求时,服务器向终端发送压缩后的网页图片。
在实施中,终端向服务器发送对目标网页的获取请求后,服务器可以接收终端发送的对目标网页的获取请求。接收到对目标网页的获取请求后,服务器可以获取目标网页对应的网页信息,即可以获取目标网页中包含的多个网页图片对应的压缩后的网页图片,以及目标网页包含的除多个网页图片之外的其他网页信息,进而,可以向终端发送压缩后的网页图片以及目标网页包含的除多个网页图片之外的其他网页信息。
步骤403,终端接收服务器发送的压缩后的网页图片。
在实施中,服务器向终端发送压缩后的网页图片以及目标网页包含的除多个网页图片之外的其他网页信息后,终端可以接收服务器发送的压缩后的网页图片以及目标网页包含的除多个网页图片之外的其他网页信息。
步骤404,终端根据网页图片的图片间的相关性,将压缩后的网页图片作为视频图像帧进行解压缩处理,得到每个网页图片。
在实施中,终端接收到除多个网页图片之外的其他网页信息后,可以对其进行显示。具体的,终端接收到压缩后的网页图片后,可以确定网页图片的图片间的相关性,进而,可以基于网页图片的图片间的相关性(具体可以根据帧内压缩-帧间解压缩算法),将压缩后的网页图片作为视频图像帧进行解压缩处理,得到每个网页图片,其中,终端可以采用支持帧内压缩-帧间解压缩算法的ffmpeg(其中,ffmpeg是一套可以用来记录、转换数字音频、视频,并能将其转化为流的开源计算机程序)对压缩后的网页图片进行解压缩。其中,对每个压缩后的网页图片的解压缩顺序与网页图片的类型有关。例如,其中的一个帧组包含15帧网页图片,每帧网页图片对应的类型,相应的解压缩顺序、显示顺序(即排列顺序)可以如图6所示。
步骤405,终端按照每个网页图片的排列顺序在目标网页中显示每个网页图片。
在实施中,终端得到每个网页图片后,可以在目标网页中显示每个网页图片。其中,终端可以根据每个网页图片的显示顺序,在目标网页中显示每个网页图片。具体的,服务器向终端发送压缩后的网页图片时,压缩后的网页图片可以按照每个网页图片对应的显示顺序进行排列,这样,终端在显示目标网页 中的某个标签对应的网页图片时,可以根据该标签在目标网页中的顺序,对应的获取相应顺序的网页图片进行显示。
本申请实施例中,服务器在对目标网页中包含的多个网页图片进行压缩时,将多个网页图片作为视频图像帧,根据图片间的相关性,对多个图片中包含的相同部分进行压缩,不只是对每个图片中的相同部分进行压缩,从而,可以减少多个网页图片的总数据量,进而,服务器在向终端发送压缩后的网页图片时,发送的网页图片的数据量即会比较小,从而,可以防止流量浪费。
另外,由于压缩后的多个网页图片的数据量较小,终端在接收多个压缩后的网页图片时,所需要的流量相应的也会较少,从而,可以节约终端的流量。压缩后的网页图片的数据量小,也可以加快终端获取压缩后的网页图片的速度,从而,可以提高终端的加载速度。
基于相同的技术构思,本申请实施例还提供了一种服务器,如图7所示,该服务器包括:
获取模块710,用于获取目标网页中包含的多个网页图片;
排序模块720,用于对所述多个网页图片进行排序,得到所述每个网页图片的排列顺序;
压缩模块730,用于根据每个网页图片的排列顺序及图片间的相关性,将所述每个网页图片作为视频图像帧进行压缩处理,得到压缩后的网页图片;
发送模块740,用于当接收到终端发送的对目标网页的获取请求时,向所述终端发送所述压缩后的网页图片。
可选的,如图8所示,所述服务器还包括:
解压缩模块750,用于根据所述多个网页图片的压缩格式,对所述每个网页图片进行解压缩处理,得到所述每个网页图片对应的原始网页图片;
所述压缩模块730,用于:
根据每个网页图片的排列顺序及图片间的相关性,将所述每个网页图片对应的原始网页图片作为视频图像帧进行压缩处理,得到压缩后的网页图片。
可选的,排序模块720,用于:
确定所述多个网页图片中的每个网页图片在所述目标网页中的显示位置;
根据所述每个网页图片在所述目标网页中的显示位置,对所述多个网页图片进行排序,得到所述每个网页图片的排列顺序。
可选的,排序模块720,用于:
根据所述每个网页图片在所述目标网页中的显示位置,按照在所述目标页面中的显示位置由上到下、由左到右的顺序,对所述多个网页图片进行排序,得到所述每个网页图片的排列顺序。
可选的,排序模块720,用于:
如果所述多个网页图片满足预设压缩条件,则对所述多个网页图片进行排序,得到所述每个网页图片的排列顺序。
所述预设压缩条件为:所述多个网页图片中存在至少一个网页图片组合,其中,每个网页图片组合包含的网页图片之间包含相同的图片区域,且相同的图片区域的尺寸达到预设尺寸阈值。
可选的,压缩模块730,用于:
根据每个网页图片的排列顺序将所述多个网页图片进行分组;
根据每组网页图片的图片间的相关性,将网页图片之间包含相同的图片区域进行压缩,得到压缩后的网页图片。
可选的,排序模块720,用于:
在多个网页图片中,确定图片间的相关性大于预设相关性阈值的各网页图片组合;
对所述各网页图片组合进行排序,得到所述每个网页图片的排列顺序。
需要说明的是,上述获取模块710、排序模块720、压缩模块730、发送模块740、解压缩模块750可以由处理器实现,或者处理器配合存储器来实现,或者,处理器执行存储器中的程序指令来实现。
基于相同的技术构思,本申请实施例还提供了一种终端,如图9所示,所述终端包括:
发送模块910,用于向服务器发送对目标网页的获取请求;
接收模块920,用于接收所述服务器发送的压缩后的网页图片;
解压缩模块930,用于根据网页图片的图片间的相关性,将所述压缩后的网页图片作为视频图像帧进行解压缩处理,得到每个网页图片;
显示模块940,用于按照每个网页图片的排列顺序在所述目标网页中显示每个网页图片。
需要说明的是,上述发送模块910、接收模块920、解压缩模块930、显示 模块940可以由处理器实现,或者处理器配合存储器来实现,或者,处理器执行存储器中的程序指令来实现。
本申请实施例中,服务器在对目标网页中包含的多个网页图片进行压缩时,将多个网页图片作为视频图像帧,根据图片间的相关性,对多个图片中包含的相同部分进行压缩,不只是对每个图片中的相同部分进行压缩,从而,可以减少多个网页图片的总数据量,进而,服务器在向终端发送压缩后的网页图片时,发送的网页图片的数据量即会比较小,从而,可以防止流量浪费。
需要说明的是:上述实施例提供的传输网页图片的装置在传输网页图片时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将设备的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的传输网页图片的装置与传输网页图片的方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。
基于相同的技术构思,本申请实施例还提供了一种传输网页图片的系统,该系统包括服务器和终端,其中,该服务器可以是图7和图8所示的服务器,终端可以是图9所示的终端;
所述服务器,用于获取目标网页中包含的多个网页图片;对所述多个网页图片进行排序,得到所述每个网页图片的排列顺序;根据每个网页图片的排列顺序及图片间的相关性,将所述每个网页图片作为视频图像帧进行压缩处理,得到压缩后的网页图片;当接收到终端发送的对目标网页的获取请求时,向所述终端发送所述压缩后的网页图片;
所述终端,用于向服务器发送对目标网页的获取请求;接收所述服务器发送的压缩后的网页图片;根据网页图片的图片间的相关性,将所述压缩后的网页图片作为视频图像帧进行解压缩处理,得到每个网页图片;按照每个网页图片的排列顺序在所述目标网页中显示每个网页图片。
本申请实施例中,服务器在对目标网页中包含的多个网页图片进行压缩时,将多个网页图片作为视频图像帧,根据图片间的相关性,对多个图片中包含的相同部分进行压缩,不只是对每个图片中的相同部分进行压缩,从而,可以减少多个网页图片的总数据量,进而,服务器在向终端发送压缩后的网页图片时,发送的网页图片的数据量即会比较小,从而,可以防止流量浪费。
图10是本申请实施例提供的服务器的结构示意图。该服务器1900可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上中央处理器(central processing units,CPU)1922(例如,一个或一个以上处理器)和存储器1932,一个或一个以上存储应用程序1942或数据1944的存储介质1930(例如一个或一个以上海量存储设备)。其中,存储器1932和存储介质1930可以是短暂存储或持久存储。存储在存储介质1930的程序可以包括一个或一个以上模块(图示没标出),每个模块可以包括对服务器中的一系列指令操作。更进一步地,中央处理器1922可以设置为与存储介质1930通信,在服务器1900上执行存储介质1930中的一系列指令操作。
服务器1900还可以包括一个或一个以上电源1926,一个或一个以上有线或无线网络接口1950,一个或一个以上输入输出接口1958,一个或一个以上键盘1956,和/或,一个或一个以上操作系统1941,例如Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM等等。
服务器1900可以包括有存储器,以及一个或者一个以上的程序,其中一个或者一个以上程序存储于存储器中,且经配置以由一个或者一个以上处理器执行所述一个或者一个以上程序包含服务器执行传输网页图片的指令。
在示例性实施例中,还提供了一种包括指令的非临时性计算机可读存储介质,例如包括指令的存储器,上述指令可由服务器的处理器执行以完成上述传输网页图片的方法。例如,所述非临时性计算机可读存储介质可以是ROM(Read-Only Memory,只读存储器)、RAM(Random-Access Memory,随机存取存储器)、CD-ROM(Compact Disc Read-Only Memory,光盘只读存储器)、磁带、软盘和光数据存储设备等。
本申请实施例中,服务器在对目标网页中包含的多个网页图片进行压缩时,将多个网页图片作为视频图像帧,根据图片间的相关性,对多个图片中包含的相同部分进行压缩,不只是对每个图片中的相同部分进行压缩,从而,可以减少多个网页图片的总数据量,进而,服务器在向终端发送压缩后的网页图片时,发送的网页图片的数据量即会比较小,从而,可以防止流量浪费。
请参考图11,其示出了本申请实施例所涉及的具有触敏表面的终端结构示意图,该终端可以用于实施上述实施例中提供的进行验证码验证的方法。具体 来讲:
终端1100可以包括RF(Radio Frequency,射频)电路110、包括有一个或一个以上计算机可读存储介质的存储器120、输入单元130、显示单元140、传感器150、音频电路160、WiFi(wireless fidelity,无线保真)模块170、包括有一个或者一个以上处理核心的处理器180、以及电源190等部件。本领域技术人员可以理解,图11中示出的终端结构并不构成对终端的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。其中:
RF电路110可用于收发信息或通话过程中,信号的接收和发送,特别地,将基站的下行信息接收后,交由一个或者一个以上处理器180处理;另外,将涉及上行的数据发送给基站。通常,RF电路110包括但不限于天线、至少一个放大器、调谐器、一个或多个振荡器、用户身份模块(SIM)卡、收发信机、耦合器、LNA(Low Noise Amplifier,低噪声放大器)、双工器等。此外,RF电路110还可以通过无线通信与网络和其他设备通信。所述无线通信可以使用任一通信标准或协议,包括但不限于GSM(Global System of Mobile communication,全球移动通讯系统)、GPRS(General Packet Radio Service,通用分组无线服务)、CDMA(Code Division Multiple Access,码分多址)、WCDMA(Wideband Code Division Multiple Access,宽带码分多址)、LTE(Long Term Evolution,长期演进)、电子邮件、SMS(Short Messaging Service,短消息服务)等。
存储器120可用于存储软件程序以及模块,处理器180通过运行存储在存储器120的软件程序以及模块,从而执行各种功能应用以及数据处理。存储器120可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据终端1100的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器120可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。相应地,存储器120还可以包括存储器控制器,以提供处理器180和输入单元130对存储器120的访问。
输入单元130可用于接收输入的数字或字符信息,以及产生与用户设置以及功能控制有关的键盘、鼠标、操作杆、光学或者轨迹球信号输入。具体地,输入单元130可包括触敏表面131以及其他输入设备132。触敏表面131,也 称为触摸显示屏或者触控板,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触敏表面131上或在触敏表面131附近的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触敏表面131可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器180,并能接收处理器180发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触敏表面131。除了触敏表面131,输入单元130还可以包括其他输入设备132。具体地,其他输入设备132可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。
显示单元140可用于显示由用户输入的信息或提供给用户的信息以及终端1100的各种图形用户接口,这些图形用户接口可以由图形、文本、图标、视频和其任意组合来构成。显示单元140可包括显示面板141,可选的,可以采用LCD(Liquid Crystal Display,液晶显示器)、OLED(Organic Light-Emitting Diode,有机发光二极管)等形式来配置显示面板141。进一步的,触敏表面131可覆盖显示面板141,当触敏表面131检测到在其上或附近的触摸操作后,传送给处理器180以确定触摸事件的类型,随后处理器180根据触摸事件的类型在显示面板141上提供相应的视觉输出。虽然在图11中,触敏表面131与显示面板141是作为两个独立的部件来实现输入和输入功能,但是在某些实施例中,可以将触敏表面131与显示面板141集成而实现输入和输出功能。
终端1100还可包括至少一种传感器150,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板141的亮度,接近传感器可在终端1100移动到耳边时,关闭显示面板141和/或背光。作为运动传感器的一种,重力加速度传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;至于终端1100还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。
音频电路160、扬声器161,传声器162可提供用户与终端1100之间的音 频接口。音频电路160可将接收到的音频数据转换后的电信号,传输到扬声器161,由扬声器161转换为声音信号输出;另一方面,传声器162将收集的声音信号转换为电信号,由音频电路160接收后转换为音频数据,再将音频数据输出处理器180处理后,经RF电路110以发送给比如另一终端,或者将音频数据输出至存储器120以便进一步处理。音频电路160还可能包括耳塞插孔,以提供外设耳机与终端1100的通信。
WiFi属于短距离无线传输技术,终端1100通过WiFi模块170可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图11示出了WiFi模块170,但是可以理解的是,其并不属于终端1100的必须构成,完全可以根据需要在不改变发明的本质的范围内而省略。
处理器180是终端1100的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在存储器120内的软件程序和/或模块,以及调用存储在存储器120内的数据,执行终端1100的各种功能和处理数据,从而对手机进行整体监控。可选的,处理器180可包括一个或多个处理核心;优选的,处理器180可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器180中。
终端1100还包括给各个部件供电的电源190(比如电池),优选的,电源可以通过电源管理系统与处理器180逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。电源190还可以包括一个或一个以上的直流或交流电源、再充电系统、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。
尽管未示出,终端1100还可以包括摄像头、蓝牙模块等,在此不再赘述。具体在本实施例中,终端1100的显示单元是触摸屏显示器,终端1100还包括有存储器,以及一个或者一个以上的程序,其中一个或者一个以上程序存储于存储器中,且经配置以由一个或者一个以上处理器执行述一个或者一个以上程序包含终端执行传输网页图片的方法的指令。
在示例性实施例中,还提供了一种包括指令的非临时性计算机可读存储介质,例如包括指令的存储器,上述指令可由终端的处理器执行以完成上述传输网页图片的方法。例如,所述非临时性计算机可读存储介质可以是ROM、RAM、 CD-ROM、磁带、软盘和光数据存储设备等。
本申请实施例中,服务器在对目标网页中包含的多个网页图片进行压缩时,将多个网页图片作为视频图像帧,根据图片间的相关性,对多个图片中包含的相同部分进行压缩,不只是对每个图片中的相同部分进行压缩,从而,可以减少多个网页图片的总数据量,进而,服务器在向终端发送压缩后的网页图片时,发送的网页图片的数据量即会比较小,从而,可以防止流量浪费。
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。
以上所述仅为本申请的一个实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。

Claims (15)

  1. 一种传输网页图片的方法,其特征在于,所述方法应用于服务器,所述方法包括:
    获取目标网页中包含的多个网页图片;
    对所述多个网页图片进行排序,得到所述每个网页图片的排列顺序;
    根据每个网页图片的排列顺序及图片间的相关性,将所述每个网页图片作为视频图像帧进行压缩处理,得到压缩后的网页图片;
    当接收到终端发送的对目标网页的获取请求时,向所述终端发送所述压缩后的网页图片。
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    根据所述多个网页图片的压缩格式,对所述每个网页图片进行解压缩处理,得到所述每个网页图片对应的原始网页图片;
    所述根据每个网页图片的排列顺序及图片间的相关性,将所述每个网页图片作为视频图像帧进行压缩处理,得到压缩后的网页图片,包括:
    根据每个网页图片的排列顺序及图片间的相关性,将所述每个网页图片对应的原始网页图片作为视频图像帧进行压缩处理,得到压缩后的网页图片。
  3. 根据权利要求1所述的方法,其特征在于,所述对所述多个网页图片进行排序,得到所述每个网页图片的排列顺序,包括:
    确定所述多个网页图片中的每个网页图片在所述目标网页中的显示位置;
    根据所述每个网页图片在所述目标网页中的显示位置,对所述多个网页图片进行排序,得到所述每个网页图片的排列顺序。
  4. 根据权利要求3所述的方法,其特征在于,所述根据所述每个网页图片在所述目标网页中的显示位置,对所述多个网页图片进行排序,得到所述每个网页图片的排列顺序,包括:
    根据所述每个网页图片在所述目标网页中的显示位置,按照在所述目标页面中的显示位置由上到下、由左到右的顺序,对所述多个网页图片进行排序,得到所述每个网页图片的排列顺序。
  5. 根据权利要求1-4任意一项所述的方法,其特征在于,所述对所述多个网页图片进行排序,包括:
    如果所述多个网页图片满足预设压缩条件,则对所述多个网页图片进行排序;
    所述预设压缩条件为:所述多个网页图片中存在至少一个网页图片组合,其中,每个网页图片组合包含的网页图片之间包含相同的图片区域,且相同的图片区域的尺寸达到预设尺寸阈值。
  6. 根据权利要求5所述的方法,其特征在于,所述根据每个网页图片的排列顺序及图片间的相关性,将所述每个网页图片作为视频图像帧进行压缩处理,得到压缩后的网页图片,包括:
    根据每个网页图片的排列顺序将所述多个网页图片进行分组;
    根据每组网页图片的图片间的相关性,将网页图片之间包含相同的图片区域进行压缩,得到压缩后的网页图片。
  7. 根据权利要求1所述的方法,其特征在于,所述对所述多个网页图片进行排序,得到所述每个网页图片的排列顺序,包括:
    在多个网页图片中,确定图片间的相关性大于预设相关性阈值的各网页图片组合;
    对所述各网页图片组合进行排序,得到所述每个网页图片的排列顺序。
  8. 一种传输网页图片的方法,其特征在于,所述方法应用于终端,所述方法包括:
    向服务器发送对目标网页的获取请求;
    接收所述服务器发送的压缩后的网页图片;
    根据网页图片的图片间的相关性,将所述压缩后的网页图片作为视频图像帧进行解压缩处理,得到每个网页图片;
    按照每个网页图片的排列顺序在所述目标网页中显示每个网页图片。
  9. 一种服务器,其特征在于,所述服务器包括:
    获取模块,用于获取目标网页中包含的多个网页图片;
    排序模块,用于对所述多个网页图片进行排序,得到所述每个网页图片的排列顺序;
    压缩模块,用于根据每个网页图片的排列顺序及图片间的相关性,将所述每个网页图片作为视频图像帧进行压缩处理,得到压缩后的网页图片;
    发送模块,用于当接收到终端发送的对目标网页的获取请求时,向所述终端发送所述压缩后的网页图片。
  10. 根据权利要求9所述的服务器,其特征在于,所述排序模块,用于:
    确定所述多个网页图片中的每个网页图片在所述目标网页中的显示位置;
    根据所述每个网页图片在所述目标网页中的显示位置,对所述多个网页图片进行排序,得到所述每个网页图片的排列顺序。
  11. 一种终端,其特征在于,所述终端包括:
    发送模块,用于向服务器发送对目标网页的获取请求;
    接收模块,用于接收所述服务器发送的压缩后的网页图片;
    解压缩模块,用于根据网页图片的图片间的相关性,将所述压缩后的网页图片作为视频图像帧进行解压缩处理,得到每个网页图片;
    显示模块,用于按照每个网页图片的排列顺序在所述目标网页中显示每个网页图片。
  12. 一种服务器,其特征在于,所述服务器包括处理器和存储器,所述存储器中存储有至少一条指令,所述指令由所述处理器加载并执行以实现如权利要求1至7任一所述的传输网页图片的方法。
  13. 一种终端,其特征在于,所述终端包括处理器和存储器,所述存储器中存储有至少一条指令,所述指令由所述处理器加载并执行以实现如权利要求8所述的传输网页图片的方法。
  14. 一种计算机可读存储介质,其特征在于,所述存储介质中存储有至少一条指令,所述指令由处理器加载并执行以实现如权利要求1-8任一所述的传输 网页图片的方法。
  15. 一种传输网页图片的系统,其特征在于,所述系统包括服务器和终端,其中:
    所述服务器,如所述权利要求9-10中任一权利要求所述的服务器;
    所述终端,如所述权利要求11中所述的终端。
PCT/CN2018/085505 2017-06-06 2018-05-03 一种传输网页图片的方法、装置和系统 WO2018223793A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710418619.8 2017-06-06
CN201710418619.8A CN109003313B (zh) 2017-06-06 2017-06-06 一种传输网页图片的方法、装置和系统

Publications (1)

Publication Number Publication Date
WO2018223793A1 true WO2018223793A1 (zh) 2018-12-13

Family

ID=64566054

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/085505 WO2018223793A1 (zh) 2017-06-06 2018-05-03 一种传输网页图片的方法、装置和系统

Country Status (2)

Country Link
CN (1) CN109003313B (zh)
WO (1) WO2018223793A1 (zh)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040175047A1 (en) * 2003-03-07 2004-09-09 Michael Gormish Communication of compressed digital images
CN101668254A (zh) * 2008-09-02 2010-03-10 杨明极 移动终端通过网络浏览连续相关图片的方法
CN102938792A (zh) * 2012-11-26 2013-02-20 北京奇虎科技有限公司 向计算终端提供图片数据的方法及服务器

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102541863B (zh) * 2010-12-14 2015-08-05 联芯科技有限公司 一种应用于移动终端的网页压缩方法
CN102737067B (zh) * 2011-04-15 2015-05-13 阿里巴巴集团控股有限公司 输出网页的方法和系统
CN104063424B (zh) * 2014-05-30 2018-02-02 小米科技有限责任公司 网页图片的展现方法和展现装置
CN105528798B (zh) * 2014-09-29 2019-10-08 优视科技有限公司 图片压缩方法及装置
US9414081B1 (en) * 2014-11-04 2016-08-09 Sprint Communications Company L.P. Adaptation of digital image transcoding based on estimated mean opinion scores of digital images
US9456195B1 (en) * 2015-10-08 2016-09-27 Dual Aperture International Co. Ltd. Application programming interface for multi-aperture imaging systems

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040175047A1 (en) * 2003-03-07 2004-09-09 Michael Gormish Communication of compressed digital images
CN101668254A (zh) * 2008-09-02 2010-03-10 杨明极 移动终端通过网络浏览连续相关图片的方法
CN102938792A (zh) * 2012-11-26 2013-02-20 北京奇虎科技有限公司 向计算终端提供图片数据的方法及服务器

Also Published As

Publication number Publication date
CN109003313A (zh) 2018-12-14
CN109003313B (zh) 2021-09-03

Similar Documents

Publication Publication Date Title
US10986332B2 (en) Prediction mode selection method, video encoding device, and storage medium
CN111544886B (zh) 一种画面显示的方法以及相关装置
CN107454416B (zh) 视频流发送方法和装置
WO2018036352A1 (zh) 视频数据的编解码方法、装置、系统及存储介质
CN106792120B (zh) 视频画面的显示方法、装置和终端
CN105243638B (zh) 一种上传图像的方法和装置
CN106507204B (zh) 一种视频倒放方法和装置
US11297328B2 (en) Video coding method, device, device and storage medium
WO2019101043A1 (zh) 图像处理方法、终端、计算机存储介质及计算机程序
WO2018006841A1 (zh) 二维码信息传输方法、装置以及设备
CN108337533B (zh) 视频压缩方法和装置
CN112433690B (zh) 数据处理方法、终端及计算机可读存储介质
WO2019076250A1 (zh) 推送消息的管理方法及相关产品
CN105992001A (zh) 一种对图片进行量化处理的方法及装置
CN113612957B (zh) 通话方法以及相关设备
CN116939212A (zh) 视频处理方法、装置、计算机可读存储介质及计算机设备
WO2018223793A1 (zh) 一种传输网页图片的方法、装置和系统
CN111372127B (zh) 一种数据传输方法和相关装置
CN115776593A (zh) 一种视频内容的处理方法以及相关装置
CN112887776A (zh) 一种降低音频延时的方法、设备及计算机可读存储介质
WO2017092264A1 (zh) 一种数据处理方法及其终端
CN111966271B (zh) 屏幕全景截图方法、装置、终端设备和存储介质
CN110213593B (zh) 一种运动矢量的确定方法、编码压缩方法和相关装置
CN116156232A (zh) 一种视频内容的播放方法以及相关装置
CN117520224A (zh) 计算机数据处理架构及其数据处理方法

Legal Events

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

Ref document number: 18813052

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18813052

Country of ref document: EP

Kind code of ref document: A1