WO2017211190A1 - 一种数据处理方法及装置 - Google Patents
一种数据处理方法及装置 Download PDFInfo
- Publication number
- WO2017211190A1 WO2017211190A1 PCT/CN2017/085652 CN2017085652W WO2017211190A1 WO 2017211190 A1 WO2017211190 A1 WO 2017211190A1 CN 2017085652 W CN2017085652 W CN 2017085652W WO 2017211190 A1 WO2017211190 A1 WO 2017211190A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- code
- picture
- sub
- webpage
- html
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/957—Browsing optimisation, e.g. caching or content distillation
- G06F16/9577—Optimising the visualization of content, e.g. distillation of HTML documents
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/955—Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/957—Browsing optimisation, e.g. caching or content distillation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/958—Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/12—Use of codes for handling textual entities
- G06F40/14—Tree-structured documents
- G06F40/143—Markup, e.g. Standard Generalized Markup Language [SGML] or Document Type Definition [DTD]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V30/00—Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
- G06V30/40—Document-oriented image-based pattern recognition
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Definitions
- the present application relates to the field of information technology, and in particular, to a data processing method and apparatus.
- terminals such as mobile phones, tablet computers, etc., hereinafter referred to as terminals.
- the terminal when a browser of a terminal is used for web browsing, if a picture exists in the webpage, the terminal needs to run the code of the webpage through the browser, and the image is loaded before the image is displayed in the webpage, that is, why Usually, when a user browses a webpage through a browser of a terminal, the text in the webpage is displayed first, and the reason why the image in the webpage needs to wait for a while to be displayed is actually in the time when the user waits for the image to be displayed.
- the browser of the terminal performs the loading operation of the image in the webpage, and when there is a large space occupied by the image in the webpage (that is, the image is large), the amount of data loaded by the browser is increased. The more time is required, and since a picture is a whole, the browser of the terminal can display the picture correspondingly after all the data of the picture is loaded.
- the terminal takes a long time to load a large picture, which may cause the user to mistakenly think that the webpage is loaded incorrectly and try to load the webpage multiple times, thereby causing an increase in network operation pressure and an increase in terminal operation pressure.
- the user's web browsing experience is reduced, and the user's willingness to browse the web is reduced.
- the picture in the webpage is divided into a plurality of sub-pictures occupying a small space, and each sub-picture is written into the code of the webpage, so that the browsing of the terminal is performed.
- the full image is not required to be loaded to display the content of the image, but how many sub-images are displayed, and how many sub-images correspond to the image content, that is, the webpage is browsed when the user browses the web using the terminal.
- the picture is partially displayed (that is, each sub-picture is displayed in the web page one after another), and since the sub-picture takes up a small space, the sub-picture is loaded faster, so that the user can see the picture very quickly.
- Part of the content ie, the content of the sub-picture
- the loading process of loading the image in the webpage of the terminal browser is like this: First, the web service The ⁇ img> tag of the HyperText Markup Language (html) of the webpage provided by the server records the loading address (for example, the server address) of the image, and when the browser of any terminal loads the html webpage code, And running the ⁇ img> tag, according to the image loading address recorded in the ⁇ img> tag, initiating a call request to the server corresponding to the image loading address, so that the server corresponding to the image loading address returns the corresponding data. (ie, the picture), and the browser renders the received image to the web page through the ⁇ img> tag, and finally causes the user to see the picture.
- html HyperText Markup Language
- each sub-picture in the webpage is usually stored in a Content Delivery Network (CDN), that is, each sub-picture can be separately stored in a different server. Therefore, the address of each sub-picture recorded in the ⁇ img> tag of the html code of the web page may be the address of a different server.
- CDN Content Delivery Network
- each call request is a communication channel establishment process, and the process of establishing a communication channel needs to consume a large amount of power resources of the terminal (that is, establishing a communication channel is a power-consuming operation, which may result in The power consumption is greatly increased.
- the terminal since the picture in the webpage is usually divided into multiple sub-pictures, the terminal needs to initiate a call request for each sub-picture when browsing the webpage, that is, establish A communication channel, and since each sub-picture can be stored in a different server, the terminal may also need to initiate a call request to multiple servers separately.
- the image loading method of the webpage in the prior art causes the power consumption of the terminal to increase sharply, resulting in a decrease in the usage time of the terminal, thereby affecting the usage efficiency of the terminal.
- An embodiment of the present application provides a data processing method, which is used to solve the problem in the prior art that after a picture is divided into multiple sub-pictures in a webpage, the terminal needs to send a call request for each sub-picture, resulting in an increase in power consumption of the terminal. A problem that affects the efficiency of terminal use.
- the embodiment of the present application provides another data processing method, which is used to solve the problem in the prior art, after the picture is divided into multiple sub-pictures in the webpage, the terminal needs to send a call request for each sub-picture, resulting in an increase in power consumption of the terminal. , affecting the efficiency of terminal use.
- An embodiment of the present application provides a data processing apparatus, which is used to solve the problem in the prior art that after a picture is divided into multiple sub-pictures in a webpage, the terminal needs to send a call request for each sub-picture, resulting in an increase in power consumption of the terminal. A problem that affects the efficiency of terminal use.
- the embodiment of the present application provides another data processing apparatus, which is used to solve the problem of cutting a picture in a webpage in the prior art. After being divided into multiple sub-pictures, the terminal needs to send a call request for each sub-picture, which causes the terminal to consume more power and affects the efficiency of the terminal.
- a data processing method comprising:
- html code includes a code corresponding to each sub-picture, and each sub-picture is obtained by dividing the picture
- a data processing method comprising:
- the sub-picture corresponding to the code is rendered into the web page by running the html code of the web page.
- a data processing device comprising:
- the receiving module receives a request for a webpage sent by the terminal, where the webpage includes a picture
- Determining an execution module determining a code of the hypertext markup language html of the webpage, wherein the html code includes a code corresponding to each sub-picture, and each sub-picture is obtained by dividing the picture;
- the sending module sends the html code to the terminal, so that after receiving the html, the terminal displays each sub-picture according to the code corresponding to each sub-picture included in the html code.
- a data processing device comprising:
- a sending module configured to send a request for a webpage to the server
- a receiving module which receives a hypertext markup language html code of the webpage returned by the server, where the webpage includes a picture, and the html code of the webpage carries a code corresponding to each of the sub-pictures obtained by segmenting the image ;
- a rendering module for each encoding, by running the html code of the webpage, rendering the sub-picture corresponding to the encoding into the webpage.
- each sub-picture can be converted into a sub-picture pair.
- the encoding should be performed, and each code is written into the html code of the webpage, so that after the terminal receives the webpage, the sub-picture corresponding to each encoding can be rendered into the webpage by running the html code of the webpage, without
- Each sub-picture sends a call request, so that the terminal does not need to establish a communication channel multiple times, so that when the terminal loads the picture in the webpage, that is, the user can quickly see part of the content of the picture, and prevents the user from repeatedly loading the webpage.
- the power consumption of the terminal is reduced, and the terminal use efficiency is improved.
- FIG. 1 is a data processing process according to an embodiment of the present application
- FIG. 2 is a schematic diagram of dividing a picture x into four sub-pictures according to an embodiment of the present application
- FIG. 3 is a flowchart of a data processing process according to an embodiment of the present application.
- FIG. 4 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present application.
- FIG. 5 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present application.
- FIG. 1 is a data processing process according to an embodiment of the present application, which specifically includes the following steps:
- S101 Receive a request for a webpage sent by the terminal.
- the webpage is usually written by the code of the HyperText Markup Language (html), and after receiving the request of the terminal for the webpage, the server may return the request to the terminal according to the request.
- the html code of the webpage so that the terminal displays the webpage after receiving the html code of the webpage.
- the server may receive a request for a webpage sent by the terminal.
- the data described in the application may be a picture pair.
- the data should be, and since the server receives the request for the webpage, the image can be a picture in the webpage, that is, a photo displayed in the webpage.
- the server may be a single device or a system composed of multiple devices. When the server is a system composed of multiple devices, receiving the device for the webpage request and storing the webpage includes The device of the picture may not be the same device.
- the webpage may include at least one picture.
- the present application only uses a picture in the webpage as an example for description.
- the server A of a certain website is used to receive the request of the terminal for the webpage and return the html code of the corresponding webpage according to the received request
- the webpage html code and the webpage included in each webpage may be saved in the server A.
- Each picture It is further assumed that the server A receives the request for the webpage a sent by the terminal.
- the following only stores the code of the webpage a in the server A, and the webpage a only includes the image x as an example for description.
- S102 Determine a code of the hypertext markup language html of the webpage.
- the server may determine the html code of the webpage corresponding to the request according to the request. So that the html code of the webpage can be sent to the terminal later.
- the server may process the image in the webpage, wherein
- the server is a system composed of a plurality of devices
- the html code of the webpage and the image in the webpage may be separately stored by different devices, and then the device in the webpage is stored by the device storing the image in the webpage.
- the processing is performed, and the description is followed by a server as an execution subject for convenience of description, that is, the server that receives the request for the webpage sent by the terminal stores both the html code of the webpage and the webpage included in the webpage. picture of.
- the image of the webpage can be displayed in the webpage without loading all the data of the entire image, and the server providing the webpage can be consistent with the prior art.
- the image in the web page is divided into several sub-images for subsequent operations.
- the server may further generate a code corresponding to each sub-picture according to each sub-picture, so that the code corresponding to each sub-picture may be subsequently written into the html code of the webpage. .
- the server for each sub-picture segmented by the picture in step S101, according to the sub-picture, the base64 encoding corresponding to the sub-picture is generated as the encoding corresponding to the sub-picture, and the sub-picture and the encoding are in one-to-one correspondence, that is, different pictures are converted by base64 encoding.
- the coding is different.
- the server After generating the encoding corresponding to each sub-picture, the server can write each encoding into the html code of the web page.
- the server may write each code into a script language (JavaScript, js) code carried by the html code of the webpage, that is, write the code corresponding to each sub-picture into the js code, and then carry the code.
- the js code is written into the html code of the webpage, so that after receiving the html code of the webpage, the terminal can use the js code carried in the html code of the webpage to match the sub-image corresponding to the sub-image.
- the image is rendered to a web page. Since the html code of the webpage generally displays the image through the image tag (ie, ⁇ img> tag) in the html code, the js code can also be used when the terminal runs the js code.
- Each code is written to the ⁇ img> tag in the html code of the web page, that is, the js code can be used to write the code to the ⁇ img> tag.
- the server writes each code into the js code and writes the js code into the html code of the webpage
- the html code of the webpage written in the js code can be re-created as the html of the webpage.
- the code can be sent to the terminal in a subsequent step.
- the server can store the html code of the webpage written in the js code, so that when the request for the webpage is received again, there is no need to perform the steps of dividing, encoding, and writing the code again. Reduce the operating pressure of the server.
- the server A may first divide the picture x into four sub-pictures according to the length of the long side of the picture x: sub-picture x1, sub-picture x2, sub-picture x3, and sub-picture X4, as shown in Figure 2.
- FIG. 2 is a schematic diagram of dividing a picture x into four sub-pictures according to an embodiment of the present application.
- the server A can generate the code corresponding to each sub-picture by the base64 encoding method.
- the correspondence between each sub-picture and the encoding is as shown in Table 1.
- Sub picture Sub-picture corresponding code Subpicture x1 Data:image/jpg;base64,/9j/4QMZRXhpZgAAAgAAAAL....1
- Sub-picture x4 Data:image/jpg;base64,/9j/4QMZRXhpZgAAAgAAAAL....4
- each sub-picture corresponds to one code one by one, and each code is different.
- the server A when the server A generates the code corresponding to each sub-picture, the server A can follow each sub-picture.
- the order is sub-picture x1, sub-picture x2, sub-picture x3 and sub-picture x4, so the code corresponding to each sub-picture of the server A is according to data:image/jpg;base64,/9j/4QMZRXhpZgAAAgAAAAL....1,data:image /jpg;base64,/9j/4QMZRXhpZgAAAgAAAAL....2,data:image/jpg;base64,/9j/4QMZRXhpZgAAAgAAAAL....3 and data:image/jpg;
- S103 Send the html code to the terminal, so that after receiving the html code, the terminal displays each sub-picture according to the code corresponding to each sub-picture included in the html code.
- the server is a server that provides the webpage
- the server when the server receives the request for the webpage sent by the terminal and determines the html code of the webpage, the html code of the webpage may be sent.
- the terminal After receiving the html code of the webpage, the terminal may display the webpage by running the html code of the webpage, wherein the terminal may run the html code of the webpage for the encoding corresponding to each sub-picture.
- the js code carried in the code writes the code into the corresponding ⁇ img> tag, and renders the sub-picture into the webpage through the ⁇ img> tag, and finally, the code corresponding to each sub-picture is rendered into the webpage.
- the terminal displays the complete picture.
- the terminal when the terminal sends a request for the webpage to the server, and the server sends the html code of the webpage to the terminal, the terminal actually establishes a communication channel with the server, and the communication channel uses The html code for transmitting the page.
- the terminal can write the code to the corresponding by running the js code.
- the terminal does not need to send the call request through the ⁇ img> tag, that is, there is no need to establish a communication channel. That is to say, the terminal does not need to establish a communication channel for obtaining each sub-picture, thereby reducing the number of call requests sent by the terminal, thus further reducing the power consumption of the terminal.
- the server A may send the html code of the webpage a to the terminal.
- the terminal may encode the code corresponding to each sub-picture carried in the html code of the webpage by using the js code in the html code written in the webpage.
- the code is written to the corresponding ⁇ img> tag and passed
- the ⁇ img> tag finally displays the sub-picture corresponding to the code in the terminal.
- the terminal By dividing the picture in the web page into several sub-pictures by using the data processing method as shown in FIG. 1 , by generating the code corresponding to each sub-picture and writing each code into the html code of the web page,
- the html code of the webpage may be sent to the terminal together with the code corresponding to each sub-picture, so that the terminal can be displayed after the data of the full picture is not required to be loaded.
- the terminal avoids the need to send a call request and establish a communication channel through the corresponding ⁇ img> tag in order to load each sub-picture, thereby reducing the power consumption of the terminal and avoiding the use of the terminal due to a large increase in power consumption. Less time, which affects the efficiency of the terminal.
- step S102 of the present application it is not limited to generate a code corresponding to each sub-picture only by the coding method of base64, and the server may convert each sub-picture into a corresponding code by using another coding method, as long as each The encoding corresponding to the sub-picture can be written into the js code, and the terminal can render each sub-picture into the webpage by using the js code carried in the html code of the webpage without establishing a communication channel, and what encoding is used.
- the method is not specifically limited in this application.
- the server may determine whether the size of the occupied space of the image reaches a preset threshold before segmenting the image in the webpage, and if yes, determine that the image is larger, and the terminal determines that the image is larger. It takes a long time to load the picture, and the picture needs to be divided into several sub-pictures. If not, it is determined that the picture is small, and the picture does not need to be divided, wherein the threshold can be set by the staff according to experience.
- the server may divide the picture into two sub-pictures according to the length of the long side of the picture, and divide the picture into several sub-pictures according to the length of the wide side of the picture.
- the picture can also be divided into several sub-pictures according to the preset amount of space (for example, if the preset space amount is 200 kb, the server can divide the picture into several sub-pictures whose size does not exceed 200 kb).
- the preset space amount for example, if the preset space amount is 200 kb, the server can divide the picture into several sub-pictures whose size does not exceed 200 kb.
- how to divide the picture in detail is not specifically limited. For convenience of description, the following description will be made by taking only a few sub-pictures in which the server divides the picture into two equal parts.
- step S102 of the present application when the server writes each code into the html code of the webpage, in order to enable the terminal to divide the html code of the webpage into the order of the sub-pictures according to the picture, Each sub-picture is loaded in sequence, and after the server divides the picture into sub-pictures, the server may also record the position of each sub-picture in the picture, and determine the order of the respective pictures, and sequentially follow the arrangement order. Writing the code corresponding to each sub-picture into the js code, so that when the subsequent terminal runs the js code, the terminal can be guaranteed Each sub-picture is displayed in the order of arrangement, and the position of each sub-picture displayed is still the position of each sub-picture in the picture.
- the server may also record the position of each sub-picture in the webpage, that is, the location of the picture in the webpage and the sub-pictures in the picture.
- the location determines the location of each sub-picture in the webpage, and writes the determined location of each sub-picture into the js code to further ensure that the position of each sub-picture displayed on the webpage is correct.
- the execution bodies of the steps of the method provided in the embodiment of the present application as shown in FIG. 1 may all be the same device, or the method may also be performed by different devices.
- the execution body of step S101 and step S102 may be device 1
- the execution body of step S103 may be device 2
- the execution body of step S101 may be device 1
- the execution body of step S102 and step S103 may be device 2 ;and many more.
- the embodiment of the present application further provides a data processing process performed by the terminal as shown in FIG. 3 .
- FIG. 3 is a data processing process according to an embodiment of the present application, which specifically includes the following steps:
- S201 Send a request for a webpage to the server.
- the terminal when a user browses a webpage through a terminal, the terminal needs to first send a request for the webpage to the server that provides the webpage, so that the server can receive the request after receiving the request. Determining the html code of the webpage according to the request, and sending the html code of the webpage to the terminal, the terminal may display the webpage according to the received html code of the webpage returned by the server.
- the terminal can send a request for the web page to the server.
- the terminal may be a mobile phone, a tablet computer, a notebook computer, etc., and the device has higher requirements for reducing power consumption when the device is operated by a power source (such as a battery of a mobile phone or a battery of a tablet computer). Therefore, the terminal mentioned in the present application defaults to a device that carries power by itself. Of course, the present application does not specifically limit this, that is, the terminal may also be a device that operates by providing power through an external power source.
- the terminal may send a request for the webpage and receive the returned html code of the webpage through a browser application installed in the terminal, or may be an application with a browser kernel installed in the terminal.
- Sending a request for the webpage and receiving the returned html code of the webpage, and specifically, the application of the terminal to receive the html code of the webpage, the application is not specifically limited, and the application in the terminal is simplified in the application for convenience of subsequent description. This part is directly described and described by the terminal receiving the html code of the webpage.
- S202 Receive a hypertext markup language html code of the webpage returned by the server.
- the terminal may receive the html code of the webpage returned by the server, and the terminal may subsequently run the html code of the webpage in the terminal.
- the webpage is displayed, wherein the webpage includes a picture, and the html code of the webpage may carry a code corresponding to each of the obtained sub-pictures that are segmented by the image.
- the html code of the webpage carries a js code
- the code corresponding to the plurality of sub-pictures is written in the js code
- each code may be a code corresponding to each sub-picture separated by one picture
- the code corresponding to the plurality of sub-pictures separated by the plurality of pictures may be encoded, that is, at least the code corresponding to the plurality of sub-pictures separated by one picture exists in the html of the web page.
- the picture identifier of the picture may be recorded in the js code and the picture is segmented by the picture.
- the corresponding correspondence of the codes corresponding to the respective sub-pictures that is, the correspondence corresponding to the sub-pictures segmented by the different pictures can be distinguished by the corresponding relationship recorded in the js code, as shown in Table 2.
- the corresponding relationship of the codes corresponding to the sub-pictures can be identified by the picture to determine which picture is segmented by each picture.
- the sub-pictures eg, sub-picture x1, sub-picture x2, and sub-picture x3 respectively segmented by only one picture (eg, picture x) in the html code of the webpage are respectively encoded as Be explained.
- the server A sends the html code of the webpage a to the mobile phone c, wherein the html code of the webpage a is written with a js code, and the js code carries the encoding corresponding to several sub-pictures as shown in Table 2. .
- the terminal may run the html code of the webpage to display the webpage in the terminal, and the html code of the webpage is run because it carries the js code.
- the html code of the webpage also runs the js code, so that for each encoding included in the js code, the terminal can render the sub-picture corresponding to the encoding into the webpage by running the js code.
- the terminal can create an ⁇ img> tag corresponding to the code by running the js code, and The code is written into the ⁇ img> tag, and then the sub-picture corresponding to the code is rendered into the web page through the ⁇ img> tag.
- each code may be sequentially written into the js code according to the arrangement order, so when the terminal runs the js code, the terminal may sequentially perform the above process according to the sequence of each code in the js code, that is, By running the js code, the terminal creates an ⁇ img> tag corresponding to the code, and writes the code into the corresponding ⁇ img> tag, and finally renders the sub-picture corresponding to the code through the ⁇ img> tag to After the webpage, the ⁇ img> tag corresponding to the next code is created according to the order of each code in the js code, and the sub-picture corresponding to the next code is rendered into the webpage until the js code All sub-pictures corresponding to the code are rendered to the web page, and at this time, the picture composed of each sub-picture is displayed in the terminal.
- the terminal may also write the position of the sub-picture in the ⁇ img> tag by running the js code, so that the terminal The sub-picture corresponding to the code is rendered to the correct position in the web page by the ⁇ img> tag.
- the mobile phone c can establish the data: image through the js code when the html code of the webpage a is run. /jpg;base64, /9j/4QMZRXhp....1 corresponding ⁇ img> tag, after the sub-picture x1 is rendered into the webpage a, then the sub-image x2 and the sub-picture x3 are sequentially created.
- the mobile phone c establishes a corresponding ⁇ img> tag, and the encoding corresponding to the sub-picture x1: data: image/jpg; Base64, /9j/4QMZRXhp....1 is written in the ⁇ img> tag.
- each sub-picture is actually sent to the terminal in an encoded form
- the terminal when the terminal loads each sub-picture of the webpage, the terminal only needs to render the code corresponding to each sub-picture into the webpage by using a js code. That is, without having to create a new communication channel for each sub-picture and without sending a call request to call the sub-picture, the power consumption of the terminal can be greatly reduced.
- the embodiment of the present application further provides a data processing apparatus, as shown in FIG. 4 .
- FIG. 4 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present application, including:
- the receiving module 301 is configured to receive a request for a webpage sent by the terminal, where the webpage includes a picture;
- Determining the execution module 302 determining a code of the hypertext markup language html of the webpage, where the html code includes a code corresponding to each sub-picture, and each sub-picture is obtained by dividing the picture;
- the sending module 303 is configured to send the html code to the terminal, so that after receiving the html, the terminal displays each sub-picture according to the code corresponding to each sub-picture included in the html code.
- the size of the occupied area is greater than the preset amount of space, and the determining execution module 302 divides the picture into a plurality of sub-pictures, wherein the occupied space of each sub-picture is not greater than the amount of space.
- the code corresponding to each sub-picture respectively includes a base64 code.
- the determining execution module 302 determines an encoding corresponding to each sub-picture obtained by the image segmentation, and writes each encoding into a script language code, where the script language code includes a JavaScript code, and the script language code is In the html code written in the web page, the html code written in the script language code is re-created as the html code of the web page.
- the determining execution module 302 determines the order of the sub-pictures according to the positional relationship of each sub-picture in the picture, and sequentially writes the code corresponding to each sub-picture into the script according to the arrangement order. In the language code.
- the data processing apparatus shown in FIG. 4 above may be located in one device or in a system composed of a plurality of devices.
- the embodiment of the present application further provides a data processing apparatus, as shown in FIG. 5.
- FIG. 5 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present application, including:
- a sending module 401 configured to send a request for a webpage to a server
- the receiving module 402 is configured to receive a hypertext markup language html code of the webpage returned by the server, where the webpage includes a picture, and the html code of the webpage carries a plurality of sub-pictures respectively corresponding to the picture segmentation. coding;
- the rendering module 403 for each encoding, renders the sub-picture corresponding to the encoding into the webpage by running the html code of the webpage.
- the hypertext markup language html code of the webpage carries a script language code, where the script language code carries a code corresponding to each of the plurality of sub-pictures segmented by the picture, and the script language code includes a JavaScript code. .
- the rendering module 403 the script language code carried by the html code of the webpage is executed, and the sub-picture corresponding to each code written by the script language code is sequentially rendered to the webpage by using the script language code. in.
- the rendering module 403 for each code, establishes a picture label corresponding to the code, writes the code into the created picture tag, and uses the picture tag to render the coded corresponding sub-picture to the In the web page.
- the device may be located in a terminal, and may be specifically located in a terminal such as a mobile phone, a tablet computer, a notebook computer, or a personal computer.
- a terminal such as a mobile phone, a tablet computer, a notebook computer, or a personal computer.
- embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
- computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
- These computer program instructions can also be stored in a particular computer capable of booting a computer or other programmable data processing device In a computer readable memory that operates in a computer readable memory, causing instructions stored in the computer readable memory to produce an article of manufacture comprising instruction means implemented in a block or in a flow or a flow diagram and/or block diagram of the flowchart The functions specified in the boxes.
- These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
- the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
- a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
- processors CPUs
- input/output interfaces network interfaces
- memory volatile and non-volatile memory
- the memory may include non-persistent memory, random access memory (RAM), and/or non-volatile memory in a computer readable medium, such as read only memory (ROM) or flash memory.
- RAM random access memory
- ROM read only memory
- Memory is an example of a computer readable medium.
- Computer readable media includes both permanent and non-persistent, removable and non-removable media.
- Information storage can be implemented by any method or technology.
- the information can be computer readable instructions, data structures, modules of programs, or other data.
- Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory. (ROM), electrically erasable programmable read only memory (EEPROM), flash memory or other memory technology, compact disk read only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, Magnetic tape cartridges, magnetic tape storage or other magnetic storage devices or any other non-transportable media can be used to store information that can be accessed by a computing device.
- computer readable media does not include temporary storage of computer readable media, such as modulated data signals and carrier waves.
- embodiments of the present application can be provided as a method, system, or computer program product.
- the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment in combination of software and hardware.
- the application can employ computer programs embodied on one or more computer usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) having computer usable program code embodied therein.
- the form of the product includes but not limited to disk storage, CD-ROM, optical storage, etc.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Artificial Intelligence (AREA)
- Software Systems (AREA)
- Health & Medical Sciences (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Multimedia (AREA)
- Information Transfer Between Computers (AREA)
Abstract
Description
子图片 | 子图片对应的编码 |
子图片x1 | data:image/jpg;base64,/9j/4QMZRXhpZgAAAgAAAAL....1 |
子图片x2 | data:image/jpg;base64,/9j/4QMZRXhpZgAAAgAAAAL....2 |
子图片x3 | data:image/jpg;base64,/9j/4QMZRXhpZgAAAgAAAAL....3 |
子图片x4 | data:image/jpg;base64,/9j/4QMZRXhpZgAAAgAAAAL....4 |
Claims (18)
- 一种数据处理方法,其特征在于,包括:接收终端发送的针对网页的请求,其中,所述网页中包含图片;确定所述网页的超文本标记语言html的代码,其中,所述html代码中包含每个子图片分别对应的编码,各子图片是将所述图片切分后得到的;向所述终端发送所述html代码,以使得所述终端在接收到所述html代码后,根据所述html代码中包含的各子图片对应的编码,显示各子图片。
- 如权利要求1所述的方法,其特征在于,所述图片的占用空间大于预设的空间量;将所述图片切分,具体包括:将所述图片切分为若干子图片,其中,每个子图片的占用空间均不大于所述空间量。
- 如权利要求1所述的方法,其特征在于,每个子图片分别对应的编码包括base64编码。
- 如权利要求1所述的方法,其特征在于,确定所述网页的超文本标记语言html的代码,具体包括:确定由所述图片切分得到的各子图片对应的编码;将各编码写入脚本语言代码中,其中,所述脚本语言代码包括JavaScript代码;将所述脚本语言代码写入所述网页的html代码中;将写入所述脚本语言代码的html代码重新作为所述网页的html代码。
- 如权利要求4所述的方法,其特征在于,将各编码写入脚本语言代码中,具体包括:根据各子图片在所述图片中的位置关系,确定所述各子图片的排列顺序;按照所述排列顺序,依次将与各子图片对应的编码写入所述脚本语言代码中。
- 一种数据处理方法,其特征在于,包括向服务器发送针对网页的请求;接收服务器返回的所述网页的超文本标记语言html代码,其中,所述网页中包含图片,所述网页的html代码中携带有由所述图片切分得到的若干子图片分别对应的编码;针对每一个编码,通过运行所述网页的html代码,将该编码对应的子图片渲染到所述网页中。
- 如权利要求6所述的方法,其特征在于,所述网页的html代码中携带有脚本语言代码,所述脚本语言代码中携带有由所述图片切分得到的若干子图片分别对应的编码;所述脚本语言代码包括JavaScript代码。
- 如权利要求7所述的方法,其特征在于,运行所述网页的html代码,将该编码对应的子图片渲染到所述网页中,具体包括:运行所述网页的html代码携带的所述脚本语言代码;通过所述脚本语言代码,将所述脚本语言代码写入的各编码分别对应的子图片依次渲染到所述网页中。
- 如权利要求8所述的方法,其特征在于,将所述脚本语言代码写入的各编码分别对应的子图片依次渲染到所述网页中,具体包括:针对每一个编码,建立与该编码对应的图片标签;将该编码写入建立的所述图片标签中;通过所述图片标签,将该编码对应的子图片渲染到所述网页中。
- 一种数据处理装置,其特征在于,包括:接收模块,接收终端发送的针对网页的请求,其中,所述网页中包含图片;确定执行模块,确定所述网页的超文本标记语言html的代码,其中,所述html代码中包含每个子图片分别对应的编码,各子图片是将所述图片切分后得到的;发送模块,向所述终端发送所述html代码,以使得所述终端在接收到所述html后,根据所述html代码中包含的各子图片对应的编码,显示各子图片。
- 如权利要求10所述的装置,其特征在于,所述图片的占用空间大于预设的空间量,所述确定执行模块,将所述图片切分为若干子图片,其中,每个子图片的占用空间均不大于所述空间量。
- 如权利要求10所述的装置,其特征在于,每个子图片分别对应的编码包括base64编码。
- 如权利要求10所述的装置,其特征在于,所述确定执行模块,确定由所述图片切分得到的各子图片对应的编码,将各编码写入脚本语言代码中,其中,所述脚本语言代码包括JavaScript代码,将所述脚本语言代码写入所述网页的html代码中,将写入所述脚本语言代码的html代码重新作为所述网页的html代码。
- 如权利要求13所述的装置,其特征在于,所述确定执行模块,根据各子图片在 所述图片中的位置关系,确定所述各子图片的排列顺序,按照所述排列顺序,依次将与各子图片对应的编码写入所述脚本语言代码中。
- 一种数据处理装置,其特征在于,包括:发送模块,用于向服务器发送针对网页的请求;接收模块,接收服务器返回的所述网页的超文本标记语言html代码,其中,所述网页包含图片,所述网页的html代码中携带有由所述图片切分得到的若干子图片分别对应的编码;渲染模块,针对每一个编码,通过运行所述网页的html代码,将该编码对应的子图片渲染到所述网页中。
- 如权利要求15所述的装置,其特征在于,所述网页的超文本标记语言html代码中携带有脚本语言代码,所述脚本语言代码中携带有由所述图片切分的到的若干子图片分别对应的编码,所述脚本语言代码包括JavaScript代码。
- 如权利要求16所述的装置,其特征在于,所述渲染模块,运行所述网页的html代码携带的所述脚本语言代码,通过所述脚本语言代码,将所述脚本语言代码写入的各编码分别对应的子图片依次渲染到所述网页中。
- 如权利要求17所述的装置,其特征在于,所述渲染模块,针对每一个编码,建立与该编码对应的图片标签,将该编码写入建立的所述图片标签中,通过所述图片标签,将该编码对应的子图片渲染到所述网页中。
Priority Applications (5)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018563863A JP6992012B2 (ja) | 2016-06-06 | 2017-05-24 | データ処理方法及びデバイス |
EP17809629.3A EP3467679B1 (en) | 2016-06-06 | 2017-05-24 | Data processing method and device |
KR1020197000292A KR102348766B1 (ko) | 2016-06-06 | 2017-05-24 | 데이터 처리 방법 및 장치 |
US16/210,534 US11250095B2 (en) | 2016-06-06 | 2018-12-05 | Processing image data of a webpage |
US16/722,844 US11232169B2 (en) | 2016-06-06 | 2019-12-20 | Processing image data of a webpage |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610394102.5 | 2016-06-06 | ||
CN201610394102.5A CN106886544A (zh) | 2016-06-06 | 2016-06-06 | 一种数据处理方法及装置 |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US16/210,534 Continuation US11250095B2 (en) | 2016-06-06 | 2018-12-05 | Processing image data of a webpage |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2017211190A1 true WO2017211190A1 (zh) | 2017-12-14 |
Family
ID=59176416
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2017/085652 WO2017211190A1 (zh) | 2016-06-06 | 2017-05-24 | 一种数据处理方法及装置 |
Country Status (7)
Country | Link |
---|---|
US (2) | US11250095B2 (zh) |
EP (1) | EP3467679B1 (zh) |
JP (1) | JP6992012B2 (zh) |
KR (1) | KR102348766B1 (zh) |
CN (1) | CN106886544A (zh) |
TW (1) | TW201743226A (zh) |
WO (1) | WO2017211190A1 (zh) |
Families Citing this family (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106886544A (zh) | 2016-06-06 | 2017-06-23 | 阿里巴巴集团控股有限公司 | 一种数据处理方法及装置 |
CN109388726A (zh) * | 2017-08-11 | 2019-02-26 | 车伯乐(北京)信息科技有限公司 | 一种图片显示方法、装置、设备及计算机可读介质 |
CN108959495B (zh) * | 2018-06-25 | 2019-12-06 | 百度在线网络技术(北京)有限公司 | H5网页的页面显示方法、装置、设备和计算机存储介质 |
CN110674622B (zh) * | 2018-07-03 | 2022-12-20 | 百度在线网络技术(北京)有限公司 | 可视化图表生成方法、系统、存储介质及电子设备 |
CN109298905A (zh) * | 2018-08-15 | 2019-02-01 | 深圳点猫科技有限公司 | 利用前端编程语言优化图片懒加载的方法以及电子设备 |
CN109241470A (zh) * | 2018-09-27 | 2019-01-18 | 北京小米移动软件有限公司 | 页面显示方法、装置及系统 |
CN109740087A (zh) * | 2018-11-23 | 2019-05-10 | 量子云未来(北京)信息科技有限公司 | 一种图片渲染方法、装置及系统 |
CN112860772B (zh) * | 2019-11-12 | 2023-05-26 | 武汉微品致远信息科技有限公司 | 静态文件代替服务存储信息类数据处理系统 |
CN113761257A (zh) * | 2020-09-08 | 2021-12-07 | 北京沃东天骏信息技术有限公司 | 一种图片解析方法和装置 |
US11983235B2 (en) | 2021-09-22 | 2024-05-14 | International Business Machines Corporation | Dynamic resource usage web browser |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102456136A (zh) * | 2010-10-29 | 2012-05-16 | 方正国际软件(北京)有限公司 | 一种图文切分方法及系统 |
CN103488447A (zh) * | 2012-06-12 | 2014-01-01 | 国基电子(上海)有限公司 | 画面组合显示控制系统及显示控制方法 |
CN103701756A (zh) * | 2012-09-27 | 2014-04-02 | 中国电信股份有限公司 | web表单数据的保护方法、装置及web服务器 |
Family Cites Families (24)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7240294B2 (en) | 2000-10-20 | 2007-07-03 | Desknet Inc. | Method of constructing a composite image |
JP3831342B2 (ja) | 2001-01-29 | 2006-10-11 | ディジトミ・カンパニー・リミテッド | オンライン出版物の画像提供方法 |
US7346856B2 (en) * | 2003-08-21 | 2008-03-18 | International Business Machines Corporation | Apparatus and method for distributing portions of large web images to fit smaller constrained viewing areas |
US7890858B1 (en) | 2005-10-11 | 2011-02-15 | Google Inc. | Transferring, processing and displaying multiple images using single transfer request |
WO2007067750A2 (en) | 2005-12-07 | 2007-06-14 | 3Dlabs Inc., Ltd. | Methods for manipulating web pages |
WO2009073831A1 (en) * | 2007-12-05 | 2009-06-11 | Onlive, Inc. | Video compression system and method for reducing the effects of packet loss over a communication channel |
US8356247B2 (en) * | 2008-12-16 | 2013-01-15 | Rich Media Worldwide, Llc | Content rendering control system and method |
US8549395B2 (en) * | 2009-12-16 | 2013-10-01 | Ca, Inc. | Method and system for transforming an integrated webpage |
CN102111515A (zh) * | 2009-12-24 | 2011-06-29 | 鸿富锦精密工业(深圳)有限公司 | 图片传送服务器及传送方法和网络终端及图片显示方法 |
WO2012101585A1 (en) * | 2011-01-28 | 2012-08-02 | Strangeloop Networks, Inc. | Prioritized image rendering based on position within a web page |
JP5542075B2 (ja) | 2011-03-01 | 2014-07-09 | 日本放送協会 | 認証サーバ、認証プログラムおよび認証システム |
US9928226B2 (en) * | 2012-03-20 | 2018-03-27 | Adobe Systems Incorporated | Local authoring and editing of cloud-based electronic content |
CN102819386B (zh) * | 2012-06-29 | 2016-05-25 | 北京奇虎科技有限公司 | 一种显示网页中图片的方法和装置 |
CN102819560B (zh) * | 2012-06-29 | 2018-09-04 | 北京奇虎科技有限公司 | 一种网页中图片的显示方法和装置 |
CN103514241B (zh) * | 2012-12-07 | 2017-09-05 | Tcl集团股份有限公司 | 图片加载方法及系统 |
JP2014164126A (ja) | 2013-02-25 | 2014-09-08 | Nippon Telegr & Teleph Corp <Ntt> | 音響信号分析方法、装置、及びプログラム |
CA2914204A1 (en) * | 2013-06-03 | 2014-12-11 | Miworld Technologies Inc. | System and method for image based interactions |
CN104281626B (zh) | 2013-07-12 | 2018-01-19 | 阿里巴巴集团控股有限公司 | 基于图片化处理的网页展示方法及网页展示装置 |
US9560160B1 (en) | 2014-01-17 | 2017-01-31 | Instar Logic, Inc. | Prioritization of the delivery of different portions of an image file |
CN104391890B (zh) * | 2014-11-10 | 2017-11-24 | 广东欧珀移动通信有限公司 | 图片加载方法及系统 |
JP5926826B2 (ja) | 2015-01-16 | 2016-05-25 | グリー株式会社 | アニメーション再生システム、端末装置、再生方法、及びプログラム |
CN104679570A (zh) * | 2015-03-24 | 2015-06-03 | 新余兴邦信息产业有限公司 | 图片的加载显示方法、设备和系统 |
CN106886544A (zh) | 2016-06-06 | 2017-06-23 | 阿里巴巴集团控股有限公司 | 一种数据处理方法及装置 |
US10565524B2 (en) | 2017-01-31 | 2020-02-18 | Hewlett Packard Enterprise Development Lp | Performing privacy-preserving multi-party analytics on horizontally partitioned local data |
-
2016
- 2016-06-06 CN CN201610394102.5A patent/CN106886544A/zh active Pending
-
2017
- 2017-04-13 TW TW106112406A patent/TW201743226A/zh unknown
- 2017-05-24 JP JP2018563863A patent/JP6992012B2/ja active Active
- 2017-05-24 WO PCT/CN2017/085652 patent/WO2017211190A1/zh unknown
- 2017-05-24 EP EP17809629.3A patent/EP3467679B1/en active Active
- 2017-05-24 KR KR1020197000292A patent/KR102348766B1/ko active IP Right Grant
-
2018
- 2018-12-05 US US16/210,534 patent/US11250095B2/en active Active
-
2019
- 2019-12-20 US US16/722,844 patent/US11232169B2/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102456136A (zh) * | 2010-10-29 | 2012-05-16 | 方正国际软件(北京)有限公司 | 一种图文切分方法及系统 |
CN103488447A (zh) * | 2012-06-12 | 2014-01-01 | 国基电子(上海)有限公司 | 画面组合显示控制系统及显示控制方法 |
CN103701756A (zh) * | 2012-09-27 | 2014-04-02 | 中国电信股份有限公司 | web表单数据的保护方法、装置及web服务器 |
Non-Patent Citations (1)
Title |
---|
See also references of EP3467679A4 * |
Also Published As
Publication number | Publication date |
---|---|
JP6992012B2 (ja) | 2022-01-13 |
TW201743226A (zh) | 2017-12-16 |
EP3467679B1 (en) | 2022-03-23 |
JP2019517700A (ja) | 2019-06-24 |
US11232169B2 (en) | 2022-01-25 |
KR20190015518A (ko) | 2019-02-13 |
EP3467679A4 (en) | 2019-05-01 |
US11250095B2 (en) | 2022-02-15 |
EP3467679A1 (en) | 2019-04-10 |
US20190108189A1 (en) | 2019-04-11 |
KR102348766B1 (ko) | 2022-01-06 |
CN106886544A (zh) | 2017-06-23 |
US20200125610A1 (en) | 2020-04-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2017211190A1 (zh) | 一种数据处理方法及装置 | |
US11907642B2 (en) | Enhanced links in curation and collaboration applications | |
JP6740373B2 (ja) | ページコンポーネント動的レイアウト | |
US10614155B2 (en) | Single page application authoring in a content management system | |
EP3428809A1 (en) | Service execution method and device | |
WO2022144016A1 (zh) | 应用程序控制方法、装置、电子设备和存储介质 | |
CN103530160A (zh) | 一种页面加载的方法和装置 | |
TW201528178A (zh) | 資訊展示的方法及裝置 | |
US20130036197A1 (en) | Method and system for a mobile local server | |
JP7399999B2 (ja) | 情報表示方法および装置 | |
CN112214250A (zh) | 一种应用程序组件的加载方法和装置 | |
CN110069247A (zh) | 一种应用程序的开发方法及装置、使用方法及装置 | |
CN110807162A (zh) | 加载占位图的方法和装置 | |
WO2023179327A1 (zh) | 页面回溯方法及其装置、介质和电子设备 | |
WO2016115979A1 (zh) | 图片上传方法及装置 | |
CN115421693A (zh) | 微前端架构的实现方法、装置、计算机设备和存储介质 | |
US20140164892A1 (en) | Consuming content incrementally | |
US8990265B1 (en) | Context-aware durability of file variants | |
US11748120B1 (en) | Server-based user interface rendering | |
CN116302036A (zh) | 基于微服务的业务参数管理方法、装置、设备及存储介质 | |
CN116932963A (zh) | 截图处理方法、装置、计算机设备及存储介质 | |
CN114640718A (zh) | 一种基于数据处理系统的数据处理方法及装置 | |
CN117331625A (zh) | 页面资源的加载方法、装置、计算机设备和存储介质 | |
CN116775336A (zh) | 计算任务处理方法、装置、服务器及可读存储介质 | |
CN113094607A (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: 17809629 Country of ref document: EP Kind code of ref document: A1 |
|
ENP | Entry into the national phase |
Ref document number: 2018563863 Country of ref document: JP Kind code of ref document: A |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
ENP | Entry into the national phase |
Ref document number: 20197000292 Country of ref document: KR Kind code of ref document: A |
|
ENP | Entry into the national phase |
Ref document number: 2017809629 Country of ref document: EP Effective date: 20190107 |