WO2016034089A1 - Procédé et appareil de restitution d'image, terminal mobile et support de stockage lisible par machine - Google Patents

Procédé et appareil de restitution d'image, terminal mobile et support de stockage lisible par machine Download PDF

Info

Publication number
WO2016034089A1
WO2016034089A1 PCT/CN2015/088566 CN2015088566W WO2016034089A1 WO 2016034089 A1 WO2016034089 A1 WO 2016034089A1 CN 2015088566 W CN2015088566 W CN 2015088566W WO 2016034089 A1 WO2016034089 A1 WO 2016034089A1
Authority
WO
WIPO (PCT)
Prior art keywords
picture
decoding
rendering
thread
image
Prior art date
Application number
PCT/CN2015/088566
Other languages
English (en)
Chinese (zh)
Inventor
成国凯
Original Assignee
优视科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 优视科技有限公司 filed Critical 优视科技有限公司
Publication of WO2016034089A1 publication Critical patent/WO2016034089A1/fr

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs

Definitions

  • the present invention relates to the field of mobile communication technologies, and in particular, to a picture rendering method and apparatus, a mobile terminal, and a machine readable storage medium.
  • the web page contains many web page elements, such as images, text, and videos.
  • Chrome, Android comes with a browser and third-party browsers (such as UC browser) and other browser rendering work can be done in two ways, one is done in the main thread, one is done in the rendering thread. There are two ways to do this in a similar way when rendering a web page.
  • page rendering if the image that needs to be rendered is not decoded, the image needs to be decoded first, and then the image is rendered after the decoding is completed, and then the next page element can be processed.
  • Image decoding is a time consuming task during web page rendering. Especially for web pages with multiple or large images, image decoding time-consuming is the most important factor affecting the rendering efficiency of web pages, and also the main factor affecting the overall performance of the browser. If the page image is too large or the page image is too large, the page rendering speed will be slow and the page rendering efficiency will be low.
  • the main thread or the rendering thread performs large-image rendering or multi-image webpage rendering, since the main thread or the rendering thread is performing image decoding, and cannot perform other tasks, the main thread or the rendering thread's webpage rendering efficiency is low, and even blocking occurs. There is a phenomenon of stagnation.
  • the user performs screen operations, such as screening or clicking on the control of the webpage, because the main thread or the rendering thread is performing image decoding, but cannot Other tasks are performed and the browser is also stuck.
  • an object of the present invention is to provide a picture rendering method and apparatus, a mobile terminal, and a non-transitory machine readable storage medium, which can speed up the rendering speed of webpage rendering and effectively avoid the jamming phenomenon when browsing a webpage. .
  • a picture rendering method including:
  • the picture rendering method may further include: constructing a picture decoding thread pool including one or more decoding threads;
  • the picture decoding task of the picture is created, the picture is decoded by an available decoding thread in the picture decoding thread pool.
  • the picture rendering method may further include: adding the picture decoding task to a picture decoding queue, where the decoding thread decodes the picture according to a picture decoding queue.
  • the step of the thread responsible for rendering acquiring the information of the picture may include: the thread responsible for rendering obtaining the position and size information that the picture needs to be rendered from the picture mapping table.
  • the step of rendering, by the thread responsible for rendering, the decoded picture of the decoding thread according to the acquired picture information may include: the thread responsible for rendering renders the decoding thread after decoding according to the position and size information that needs to be rendered by the picture obtained from the picture mapping table. picture of.
  • the picture rendering method may further include: when detecting that the picture is not in the preset range of the visible area, deleting the picture decoding task corresponding to the picture in the picture decoding queue and/or in the picture mapping table Delete the information of the picture.
  • the picture rendering method may further include: buffering picture decoding data of the picture that has been decoded;
  • the picture decoding data of the picture in the cache that is within the preset threshold range of the visible area is reserved.
  • a picture rendering apparatus including: a thread unit responsible for rendering, a decoding thread unit,
  • the thread unit responsible for rendering is configured to detect that the picture to be rendered is an undecoded picture when the webpage is rendered, and then create a picture decoding task of the picture for the decoding thread unit to perform the picture according to the picture decoding task of the picture. Decoding, acquiring information of the picture, and rendering the decoded picture of the decoding thread according to the acquired picture information;
  • the decoding thread unit is configured to decode the picture according to a picture decoding task of a picture.
  • the thread unit responsible for rendering may include:
  • a detecting module configured to detect, when rendering a webpage, that the image to be rendered is an undecoded image
  • a task creation module configured to create a picture decoding task of the picture
  • An information acquiring module configured to acquire information about the picture
  • a rendering module configured to render a picture that has been decoded according to the picture information acquired by the information acquiring module
  • the decoding thread unit includes:
  • the decoding module is configured to decode the picture according to the picture decoding task of the picture.
  • the thread unit responsible for rendering may further include: a thread pool building module, configured to construct a picture decoding thread pool including at least one decoding thread.
  • a thread pool building module configured to construct a picture decoding thread pool including at least one decoding thread.
  • the thread unit responsible for rendering may further include: a task management module, configured to add the picture decoding task to a picture decoding queue, where the decoding module of the decoding thread unit decodes the picture according to the picture decoding queue. .
  • a task management module configured to add the picture decoding task to a picture decoding queue, where the decoding module of the decoding thread unit decodes the picture according to the picture decoding queue.
  • the image rendering device may further include:
  • a user behavior detection module configured to detect whether a user operation behavior causes a change in a visible area of the webpage
  • Check module for checking when the user behavior detection module detects the user operation Check whether the picture in the picture decoding queue is out of the preset threshold range of the visible area;
  • a first deleting module configured to: when the checking module detects that the picture is not in the preset threshold range of the visible area, deleting the picture decoding task corresponding to the picture in the picture decoding queue and deleting the picture in the picture mapping table The location and size information of the rendering.
  • the picture rendering apparatus may further include: a buffering module, configured to buffer picture decoding data of the picture that has been decoded;
  • a second deletion module configured to: clear image decoding data of the image that has been decoded in the cache module, where the second deletion module keeps the determination in the cache module when the image decoding data in the cache module is cleared
  • the picture of the picture within the threshold range decodes the data.
  • a mobile terminal including a memory and a picture rendering device, the picture rendering device acquiring picture data from a memory for rendering a picture,
  • the picture rendering device includes a thread unit responsible for rendering, a decoding thread unit,
  • the thread unit responsible for rendering is responsive to detecting that the picture to be rendered is an undecoded picture when rendering the webpage, and creating a picture decoding task of the picture for the decoding thread unit to decode the picture according to the picture decoding task of the picture, Obtaining the information of the picture, and rendering the decoded picture of the decoding thread according to the obtained picture information;
  • the decoding thread unit decodes the picture according to a picture decoding task of the picture.
  • a non-transitory machine readable storage medium having stored thereon executable code that, when executed by a processor, causes the processor to perform the following steps :
  • a computing device the calculation The device includes a processor and a non-transitory machine readable storage medium.
  • the non-transitory machine readable storage medium stores executable code thereon.
  • the processor is caused to perform the method described above.
  • the thread responsible for rendering records the information of the picture when the undecoded picture is detected when the web page element is rendered, and then creates a picture decoding for the picture.
  • the task is for the decoding thread to decode the picture according to the picture decoding task of the picture; finally, the thread responsible for rendering renders the picture decoded by the decoding thread according to the acquired picture information.
  • the thread responsible for rendering can decode the decoding task to the decoding thread when the undecoded picture is detected, so that the thread responsible for rendering can perform the rendering of the next page element.
  • This method separates the image decoding work from the thread responsible for rendering, frees the pressure of the thread responsible for rendering, speeds up the rendering speed of the web page rendering, and effectively avoids the jamming phenomenon when browsing the webpage.
  • Figure 1 shows a flow chart of one embodiment of a picture rendering method in accordance with the present invention
  • FIG. 2 is a detailed flow chart showing another embodiment of the picture rendering method of the present invention.
  • Figure 3 is a block diagram showing the structure of a first embodiment of the picture rendering apparatus of the present invention.
  • Figure 4 is a block diagram showing the structure of the second embodiment of the picture rendering apparatus of the present invention.
  • Figure 5 is a block diagram showing the structure of a third embodiment of the picture decoding apparatus of the present invention.
  • Figure 6 is a block diagram showing the structure of a fourth embodiment of the picture decoding apparatus of the present invention.
  • FIG. 7 is a system structural diagram of an embodiment of a mobile terminal according to the present invention.
  • the thread responsible for rendering records the information of the picture when the undecoded picture is detected when the web page element is rendered, and then the picture is
  • the picture decoding task is created for the decoding thread to decode the picture according to the picture decoding task of the picture; finally, the thread responsible for rendering renders the picture decoded by the decoding thread according to the acquired picture information.
  • the thread responsible for rendering can decode the decoding task to the decoding thread when the undecoded picture is detected, and the thread responsible for rendering can perform the rendering of the next page element.
  • the work of decoding the image is separated from the thread responsible for rendering, releasing the pressure of the thread responsible for rendering, speeding up the rendering rendering speed of the webpage, and effectively avoiding the jamming phenomenon when browsing the webpage.
  • the rendering display of the webpage element is completed in the rendering thread.
  • the following embodiment of the present invention illustrates the rendering of the rendering thread by the rendering thread, that is, the thread responsible for rendering specifies the rendering thread.
  • the rendering display of the webpage elements may also be performed in the main thread, and the execution principle is similar to the rendering thread, and will not be described here.
  • Figure 1 shows a flow chart of one embodiment of a picture rendering method in accordance with the present invention.
  • step S100 the thread responsible for rendering detects that the picture to be rendered is an undecoded picture when rendering the webpage.
  • the picture decoding task of the picture is then created for the decoding thread to decode the picture according to the picture decoding task of the picture.
  • the usual browser process for displaying a webpage is generally as follows: first, the obtained webpage source code is parsed, and then the DOM tree of the webpage is generated according to the parsing result, and then the webpage is typeset according to the DOM tree of the webpage. After the typography is completed, the web page is rendered and displayed.
  • the parsing of the source code of the webpage, the typography of the webpage and the rendering of the webpage are performed asynchronously, that is, the webpage is not required to be parsed after the parsing of the source code of the entire webpage, and it is not necessary to complete the layout of all the webpage elements. Then render the webpage elements.
  • the parsing of the source code of the web page, the layout of the web page, and the rendering of the web page are performed in different threads.
  • there is also a synchronous execution situation that is, after the parsing of the source code of a webpage, the webpage elements involved in the source code are typeset, and then these elements are rendered and displayed. In this case, the source code of the webpage is parsed.
  • the layout of webpage elements, the rendering of webpage elements are all executed in the main thread.
  • step S101 the thread responsible for rendering acquires information of the picture.
  • the image information herein includes the position and size information of the image to be rendered recorded in the image mapping table.
  • the location and size information here is determined when the picture element is typeset.
  • step S102 the thread responsible for rendering renders the decoded picture of the decoding thread according to the acquired picture information.
  • the rendering thread renders the decoded picture of the decoding thread according to the obtained position and size information of the picture to be rendered.
  • Fig. 2 shows a detailed flow chart of another embodiment of the picture rendering method of the present invention.
  • step S200 the rendering thread detects that the picture to be rendered is an undecoded picture when rendering the webpage.
  • the web page contains many web page elements, including images, text, and videos.
  • the rendering thread When the browser renders the webpage, the rendering thread renders the webpage elements one by one according to the structure of the layout tree of each webpage in the rendering process.
  • the information of each webpage element is recorded in a locally cached file.
  • the rendering thread goes to the corresponding file to obtain the information of the current element to perform rendering of the webpage element.
  • the browser parses the source code of the webpage, it parses the address of the image resource server that obtains the image, and the browser obtains the image data from the resource server according to the address, and then stores the image data in the local cache.
  • the image data obtained by the image resource server cannot be directly rendered by the rendering thread without being decoded. Because the display must be decoded before rendering, the rendering thread must first detect the type of the page element before rendering the page element. If it is a picture, it is necessary to detect whether the picture is an undecoded picture.
  • S210 After detecting that the picture needs to be decoded, executing S210, creating a picture decoding task of the picture. After the picture decoding task is created, the picture decoding task is added to the picture decoding queue (S220). Then, S230 may be performed to determine whether the picture decoding thread pool has been constructed.
  • the thread in the picture decoding thread pool is used to perform the picture decoding task.
  • the wake-up decoding thread will be notified immediately to decode the picture.
  • all the threads in the thread pool are in the suspended state. In the actual implementation, only one thread is generated in the picture decoding thread pool, but when the picture decoding task is many, the image decoding thread can be quickly expanded to join the thread pool.
  • the picture decoding task queue selects a picture decoding task to be added to the decoding thread pool (S240).
  • steps S230 and S231 may not be performed here.
  • the decoding thread is notified to decode the picture (S260).
  • the decoding thread pool wakes up the available decoding threads first, and then the pictures are decoded by the available decoding threads.
  • steps S250 and S251 may not be performed here.
  • the rendering thread continues the rendering of the next webpage element, and the rendering action of the image is not performed yet.
  • the decoding thread After the decoding is completed, the decoding thread notifies the rendering thread to perform rendering of the picture (S270).
  • the rendering thread Before the rendering of the image, the rendering thread first executes S280 to acquire information of the image.
  • the picture information here includes location and size information that the picture needs to be rendered. This step is actually the location and size information that the rendering thread needs to render from the image mapping table.
  • the location and size information that the image needs to be rendered is calculated when the webpage is typeset.
  • the thread responsible for the webpage layout parses the image to obtain the image size, and then calculates the image to be rendered according to the webpage layout needs.
  • the position displayed and the size that needs to be rendered needs to be rendered.
  • the size of the parsed image is not necessarily the same as the size of the rendered image, because the browser will combine many factors, such as the size of the display, the size of the web page, and other factors to scale the image. Therefore, the size of the image obtained from the resource server is 100*100 pixels, and the size of the rendered display needs to be 50*50 after the typographic calculation.
  • the thread responsible for the layout completes the preliminary analysis of the image, and then calculates the position of the image to be rendered and the size of the image to be rendered according to the layout of the webpage.
  • the position where the image is to be rendered and the size information to be rendered are transmitted to the rendering thread, and the rendering thread records the information in the image mapping table after receiving the information of the image.
  • the key value of the picture map is the picture object pointer, and the value is the superimposed value of all the rectangular areas that have appeared in the web page of the picture to be drawn.
  • the location of the image recorded in the image map to be rendered in the web page includes the historical location and the most recent location, ie all locations where the image may exist in the webpage. Since most of the current webpages are dynamic webpages, many of the images in the webpage are constantly changing in position, shape, and the like. Therefore, in different time periods, the position of the picture in the web page is likely to be different.
  • the position of the image rendering display recorded in the image mapping table is the position where the image is superimposed and recorded every time the webpage is rendered. At the same time, since there may be multiple identical pictures in the same web page, and the original data of the picture is actually only one copy, only one picture needs to be decoded, but after the decoding is completed, the picture may need to be rendered in multiple areas of the page. Therefore, in this embodiment, all positions where the recorded picture has appeared are superimposed in the picture mapping table, that is, the historical position and the latest position are included.
  • S290 is executed, and the image that has been decoded is rendered according to the position and size information that the image needs to be rendered.
  • the thread responsible for rendering when the thread responsible for rendering detects an undecoded picture when rendering a webpage element, the information of the picture is recorded, and then a picture decoding task is created for the picture for the decoding thread to decode the picture according to the picture. Decoding the picture; finally, the thread responsible for rendering renders the picture decoded by the decoding thread according to the acquired picture information. Since the present invention uses a separate decoding thread for picture decoding, the thread responsible for rendering can decode the decoding task to the decoding thread when the undecoded picture is detected, and the thread responsible for rendering can perform the rendering of the next page element. . Separating the image decoding work from the thread responsible for rendering, releasing the pressure of the thread responsible for rendering, speeding up the rendering speed of the web page rendering, can have Effectively avoids the stuttering that occurs when browsing the web.
  • the picture decoding process when a user operation is detected, such as a user scrolling a web page, or opening a new web page, etc. This may cause the viewable area of the web page to change. For this reason, in the preferred embodiment, when the visible area of the webpage changes, it is detected whether the picture in the picture decoding task is out of the preset threshold range of the visible area, and if so, the picture decoding task corresponding to the picture is performed. And the picture information recorded in the corresponding picture mapping table is deleted. After the processing of the above steps, the picture currently being decoded can be guaranteed, and the picture in the visible area, rather than the visible area, will not be wasted by the CPU to decode it.
  • the browser caches the picture decoding data of the picture that has been decoded.
  • the image decoding data buffer is performed to minimize the picture decoding time.
  • the image data after decoding is completed in the cache and the cache is cleared when the cache threshold is exceeded.
  • the image buffer pool space is not enough. Therefore, the browser will continuously clean up the image cache, and the decoding thread will continue to decode the image. This will cause the picture decoding data to exist in the previous instant, and the picture can be drawn, and then the picture decoded data is cleared because the buffer is full.
  • this embodiment will decode the picture using another decoding thread. Before the decoding is completed, the picture will not be rendered, so the user will not see the picture in the process. After the picture is decoded, the picture is rendered and displayed, which will cause the picture to appear blinking.
  • the picture decoding data of the picture in the cache that is determined to be within the preset threshold range of the visible area is retained. That is to say, before the picture decoding data in the cache is cleared, it is also detected whether the picture to be deleted exists in the visible preset threshold area, and if so, the picture decoding data of the picture is not available regardless of whether the cache is full or not. Deleted in the cache. This effectively avoids the problem of page flickering when web browsing is performed.
  • the visible area preset threshold range in the preferred embodiment may be the same as the visible area preset threshold range described in the previous embodiment. That can be the current screen
  • the range of the area being displayed by the screen may also be a preset threshold area range outside the currently displayed range, for example, a screen range of the current page or a multi-screen page range.
  • Fig. 3 is a block diagram showing the structure of a first embodiment of the picture rendering apparatus of the present invention.
  • the picture decoding apparatus of this embodiment includes: a thread unit 10 responsible for rendering, and a decoding thread unit 20.
  • the thread unit 10 responsible for rendering detects that the picture to be rendered is an undecoded picture when the web page is rendered, and creates a picture decoding task of the picture for the decoding thread unit 20 to perform the picture according to the picture decoding task of the picture. Decoding, acquiring information of the picture, and rendering the decoded picture of the decoding thread according to the acquired picture information.
  • the decoding thread unit 20 decodes the picture according to a picture decoding task of the picture.
  • Fig. 4 is a block diagram showing the structure of a second embodiment of the picture rendering apparatus of the present invention.
  • the thread unit 10 responsible for rendering of the picture rendering apparatus of this embodiment includes: a detection module 400, a task creation module 401, a task management module 402, a first determination module 403, a task selection module 404, and a thread.
  • the decoding thread unit 20 includes a decoding module 407.
  • the detecting module 400 is configured to detect that the picture to be rendered is an undecoded picture when the rendering thread renders the webpage.
  • the rendering thread renders the webpage elements one by one according to the structure of the layout tree during the rendering process.
  • the information of each element may be recorded in a locally cached file.
  • the rendering thread goes to the corresponding file to obtain the information of the current element to perform rendering of the webpage element.
  • the picture data of the picture is obtained by the browser according to the address corresponding to the picture parsed by the source code of the webpage, and is stored in the local cache after being acquired by the image resource server.
  • the rendering thread obtained from the image resource server cannot render the rendering directly without decoding.
  • the decoding process must be performed before the rendering display is performed, so the rendering thread first detects the type of the webpage element by the detecting module 400 before rendering the webpage element. If it is a picture, it is necessary to detect whether the picture is an undecoded picture.
  • the task creation module 401 creates a picture decoding task of the picture.
  • the task management module 402 adds the picture decoding task to the picture decoding queue.
  • the first judging module 403 may be set to determine whether the picture decoding thread pool has been constructed.
  • task selection module 404 selects a picture decoding task from the picture decoding task queue to join the decoding thread pool.
  • the thread pool construction module 405 constructs a picture decode thread pool containing one or more decode threads.
  • the first judging module 403 and the thread pool creating module 405 may not be provided in the thread unit 10 responsible for rendering.
  • the second determining module 406 determines whether there is a decoding thread available in the decoding thread pool.
  • the decoding module 407 decodes the picture.
  • the decoding thread pool needs to wake up the available decoding thread first, and then decode the picture by the decoding module 407 of the available decoding thread.
  • the decoding thread creation module 408 creates a decoding thread or waits for the decoding thread to complete the decoding task, and then the decoding module 407 decodes the picture.
  • the second judging module 406 and the decoding thread creating module 408 may not be provided in the thread unit 10 responsible for rendering.
  • the rendering module 411 continues the rendering operation of the next webpage element, and does not perform the rendering action of the image.
  • the communication module 409 After the decoding is completed, the communication module 409 notifies the rendering thread to perform rendering of the picture.
  • the information of the picture is acquired by the information acquisition module 410 before the picture is rendered.
  • the picture information here includes location and size information that the picture needs to be rendered.
  • the information obtaining module 410 actually obtains the position and size information that the picture needs to be rendered from the picture mapping table.
  • the location and size information that the image needs to be rendered is calculated when the webpage is typeset.
  • the thread responsible for the webpage layout parses the image to obtain the image size, and then calculates the image to be rendered according to the webpage layout needs.
  • the position displayed and the size that needs to be rendered It should be noted that the size of the parsed image is not necessarily the same as the size of the rendered image, because the browser will combine many factors, such as the size of the display, the size of the web page, and other factors to scale the image. Therefore, the size of the image obtained from the resource server is 100*100 pixels, and the size of the rendered display needs to be 50*50 after the typographic calculation.
  • the thread responsible for the layout completes the preliminary analysis of the image, and then calculates the position to be rendered and the size of the image to be rendered according to the layout of the webpage, and then transfers the position of the image to be rendered and the size information to be rendered to the rendering thread.
  • the rendering thread receives the information of the image, it records the information in the image mapping table.
  • the key value of the picture map is the picture object pointer, and the value is the superimposed value of all the rectangular areas that have appeared in the web page of the picture to be drawn.
  • the position of the image recorded in this image map in the web page to be rendered and displayed includes the historical location and the latest location, that is, all the locations where the image may exist in the webpage. Since most of the current web pages are dynamic web pages, the images are likely to be constantly changing in position, shape, and the like. Therefore, in different time periods, the position of the picture in the web page is likely to be different.
  • the position of the image rendering display recorded in the image mapping table is the position where the image is superimposed and recorded every time the webpage is rendered. At the same time, since there may be multiple identical pictures in the same web page, and the original data of the picture is actually only one copy, only one picture needs to be decoded, but after the decoding is completed, the picture may need to be rendered in multiple areas of the page. Therefore, this embodiment requires a picture mapping table. Superimposes all the positions where the picture has appeared, including the historical position and the latest position.
  • the rendering module 411 of the rendering thread renders the image that has been decoded according to the position and size information that needs to be rendered. Rendering.
  • a picture decoding task is created for the picture for the decoding thread unit to decode the picture according to the picture decoding task of the picture.
  • the thread unit responsible for rendering acquires the information of the picture, and finally renders the picture decoded by the decoding thread unit according to the recorded picture information.
  • the decoding work is separated from the thread unit responsible for rendering, and the decoding thread performs decoding of the picture.
  • the rendering thread or the main thread responsible for rendering can perform the next task, separate the work of decoding the image, release the pressure of the main thread or the rendering thread, and speed up the rendering rendering speed of the webpage. Effectively avoid the stuttering phenomenon when browsing the web.
  • Fig. 5 is a block diagram showing the structure of a third embodiment of the picture decoding apparatus of the present invention.
  • the user behavior detecting module 500, the checking module 501, and the first deleting module 502 are included in the picture decoding process.
  • the user behavior detection module 500 is configured to detect whether the user operation behavior causes a change in the visible area of the webpage.
  • the user operation behavior here includes operations such as the user scrolling the webpage or opening a new webpage. Because the visible area of the webpage will be constantly changing.
  • the checking module 501 checks whether the picture in the picture decoding queue is out of the preset threshold range of the visible area. If yes, the first deletion module 502 deletes the picture decoding task corresponding to the picture in the picture decoding queue and the position and size information that needs to be rendered in the picture mapping table to delete the picture. After the processing of the above steps, the picture currently being decoded can be guaranteed to be visible. Images within the region, not the visible region, will not be wasted CPU time to decode them.
  • Fig. 6 is a block diagram showing the configuration of a fourth embodiment of the picture decoding apparatus of the present invention.
  • the picture rendering apparatus of the present invention includes, in addition to the module of the embodiment shown in FIG. 4, a cache module 600, a second deletion module 601, and Visual range detection module 602.
  • the buffer module 600 buffers the picture decoding data of the picture that has been decoded.
  • the image decoding data buffer is performed to minimize the picture decoding time.
  • the second deletion module 601 clears the picture decoding data of the picture that has been decoded in the buffer module 600.
  • the second deletion module 601 continuously clears the picture cache, and at the same time, the decoding module 407 continuously decodes the picture. This will cause the picture decoding data to exist in the previous instant, and the picture can be drawn, and then the picture decoded data is cleared because the buffer is full.
  • the present embodiment decodes the picture using the decoding module 407 of another thread.
  • the rendering module 411 Before the decoding is completed, the rendering module 411 will not render the image, so the user will not see the image in the process. After the image decoding is completed, the image is rendered and displayed by the rendering module 411, which will cause the page to appear continuously. Flashing problem.
  • the second deletion module 601 when the second deletion module 601 performs picture decoding data cache cleaning, the picture decoding data of the picture in the cache that is within the preset threshold range of the visible area is not cleared. That is to say, before the picture decoding data in the cache is cleared, the visible range detecting module 602 also detects whether the picture to be deleted exists in the visible preset threshold area, and if so, whether the picture is full or not, the picture is The picture decoding data is not deleted from the cache. This effectively avoids the problem of flashing pictures on the page.
  • the visible area preset threshold range in the preferred embodiment may be the same as the visible area preset threshold range described in the previous embodiment. That is, it can be the range of the area where the current screen is being displayed, or it can be the preset outside the currently displayed range.
  • the threshold area range for example, may be a one-page page range after the current page, or a multi-screen page range.
  • FIG. 7 is a system structural diagram of an embodiment of a mobile terminal according to the present invention.
  • the mobile terminal of the present invention includes a browser engine, a rendering engine, a network, a JS interpreter, and a memory.
  • the user interface includes an address bar, a back/forward button, a bookmark directory, and the like, that is, other parts that the user sees in addition to the main window for displaying the page requested by the user.
  • the browser engine is used to query and manipulate the interface of the rendering engine.
  • the rendering engine is used to display the content of the webpage requested by the user. For example, if the requested content is html, it is responsible for parsing the html and css, and displaying the parsed result. That is responsible for web page parsing, typesetting, rendering and rendering web content to the screen.
  • the network is used to complete the network call. For example, if the webpage parsed by the rendering engine has an http request, the web server is requested to obtain the corresponding webpage resource, such as a picture or a video, according to the http request. It is then rendered for rendering by the rendering engine.
  • the network has a platform-independent interface that works on different platforms.
  • the JS interpreter is used to interpret the execution JS code.
  • the JS code is the rendering engine that parses the web page and finds that there is JS code, and then the JS interpreter executes the JS code.
  • the memory includes permanent memory and a cache.
  • the mobile terminal's browser needs to store various data like cookies on the hard disk.
  • HTML5 defines web database technology and is a lightweight and complete client storage technology.
  • the image rendering device of the rendering engine takes image data from the memory for rendering the image.
  • the rendering engine comprises a picture rendering device.
  • the picture rendering device includes a thread unit 10 and a decoding thread unit 20 responsible for rendering.
  • the thread unit 10 responsible for rendering detects that the picture to be rendered is an undecoded picture when the web page is rendered, and then creates a picture decoding task of the picture for the decoding thread unit 20 to decode the picture according to the picture decoding task of the picture;
  • the thread unit 10 responsible for rendering acquires the information of the picture.
  • the thread unit 10 responsible for rendering renders and decodes according to the acquired picture information.
  • the decoded picture by the thread unit 20 is the decoded picture by the thread unit 20.
  • FIG. 7 is merely an architectural diagram of a mobile terminal including the picture rendering apparatus of the present invention, and there are many variants of the architecture, or modules including other similar functions. As long as the picture rendering apparatus of the present invention including the present invention is considered to be a modification of the mobile terminal protected by the present invention.
  • modules and algorithm steps of the various examples described in connection with the embodiments disclosed herein can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the solution. A person skilled in the art can use different methods for implementing the described functions for each particular application, but such implementation should not be considered to be beyond the scope of the present invention.
  • the disclosed systems, devices, and methods may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the modules is only a logical function division.
  • there may be another division manner for example, multiple modules or components may be combined or Can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or module, and may be electrical, mechanical or otherwise.
  • the modules described as separate components may or may not be physically separated.
  • the components displayed as modules may or may not be physical modules, that is, may be located in one place, or may be distributed to multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist physically separately, or may be two or two. More than one module is integrated in one module.
  • the functions, if implemented in the form of software functional modules and sold or used as separate products, may be stored in a machine readable storage medium.
  • the technical solution of the present invention which is essential or contributes to the prior art, or a part of the technical solution, may be embodied in the form of a software product, which is stored in a storage medium, including
  • the instructions are used to cause a computing device (which may be a personal computer, a server, a mobile terminal such as a cell phone, or a network device, etc.) or a processor to perform all or part of the steps of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .
  • the above technical concept of the present invention can be embodied as a non-transitory machine readable storage medium having executable code stored thereon.
  • the processor When the executable code is executed by the processor, the processor is caused to perform the method described above.
  • the above technical concept of the present invention can also be embodied as a computing device including a processor and a non-transitory machine readable storage medium.
  • the non-transitory machine readable storage medium stores executable code thereon.
  • the processor is caused to perform the method described above.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

L'invention concerne un procédé et un appareil de restitution d'images, un terminal mobile et un support de stockage lisible par machine. Dans le procédé, une tâche élémentaire responsable de la restitution détecte qu'une image à restituer est une image non décodée lorsque la tâche élémentaire responsable de la restitution restitue une page web, la tâche élémentaire responsable de la restitution crée une tâche de décodage d'image de l'image de façon à permettre à une tâche élémentaire de décodage de décoder l'image conformément à la tâche de décodage d'image de l'image (S100) ; la tâche élémentaire responsable de la restitution acquiert des informations de l'image (S101) ; et la tâche élémentaire responsable de la restitution restitue l'image décodée par la tâche élémentaire de décodage conformément aux informations acquises de l'image (S102). Selon le procédé, du fait qu'une tâche élémentaire de décodage séparée est utilisée pour le décodage d'image, une tâche élémentaire responsable de la restitution peut délivrer la tâche de décodage à la tâche élémentaire de décodage en vue du décodage lorsque la tâche élémentaire responsable de la restitution détecte une image non décodée, et la tâche élémentaire responsable de la restitution peut effectuer le travail de restitution d'un élément de page web suivant. Par conséquent, le travail de décodage d'image est séparé de la tâche élémentaire responsable de la restitution, la charge sur la tâche élémentaire responsable de la restitution est réduite, la vitesse de restitution de page web est augmentée, et le phénomène de figeage de trame généré pendant la navigation dans une page web peut être efficacement évité.
PCT/CN2015/088566 2014-09-03 2015-08-31 Procédé et appareil de restitution d'image, terminal mobile et support de stockage lisible par machine WO2016034089A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410446924.4A CN105389159A (zh) 2014-09-03 2014-09-03 图片渲染方法、装置和移动终端
CN201410446924.4 2014-09-03

Publications (1)

Publication Number Publication Date
WO2016034089A1 true WO2016034089A1 (fr) 2016-03-10

Family

ID=55421468

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/088566 WO2016034089A1 (fr) 2014-09-03 2015-08-31 Procédé et appareil de restitution d'image, terminal mobile et support de stockage lisible par machine

Country Status (2)

Country Link
CN (1) CN105389159A (fr)
WO (1) WO2016034089A1 (fr)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108632540A (zh) * 2017-03-23 2018-10-09 北京小唱科技有限公司 视频处理方法和装置
CN109840195A (zh) * 2017-11-29 2019-06-04 腾讯科技(武汉)有限公司 网页性能分析方法、终端设备及计算机可读存储介质
CN111127296A (zh) * 2019-12-24 2020-05-08 北京恒泰实达科技股份有限公司 一种在大屏可视化系统中高效图片渲染方法
CN111243044A (zh) * 2020-01-06 2020-06-05 福建天泉教育科技有限公司 含图片网页的pdf转码方法、存储介质
CN115268720A (zh) * 2022-08-16 2022-11-01 北京尽微致广信息技术有限公司 一种页面渲染方法、装置、设备及可读存储介质

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107506176B (zh) * 2016-06-14 2019-07-12 华为技术有限公司 一种确定解码任务的方法和装置
CN106354512A (zh) * 2016-09-08 2017-01-25 广州华多网络科技有限公司 用户界面渲染方法及装置
CN109213607B (zh) * 2017-06-30 2021-07-23 武汉斗鱼网络科技有限公司 一种多线程渲染的方法和装置
CN108093293B (zh) * 2018-01-15 2021-01-22 北京奇艺世纪科技有限公司 一种视频渲染方法及系统
CN108549562A (zh) * 2018-03-16 2018-09-18 阿里巴巴集团控股有限公司 一种图像加载的方法及装置
CN111163345B (zh) * 2018-11-07 2021-11-26 杭州海康威视系统技术有限公司 一种图像渲染方法及装置
CN113506298A (zh) * 2021-09-10 2021-10-15 北京市商汤科技开发有限公司 图像检测与渲染方法及装置、设备、存储介质
CN114862999A (zh) * 2022-07-11 2022-08-05 杭州安恒信息技术股份有限公司 一种打点渲染方法、装置、设备及存储介质
CN116597062B (zh) * 2023-07-10 2024-02-09 北京麟卓信息科技有限公司 一种基于动态自适应解码的压缩纹理渲染优化方法

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6430591B1 (en) * 1997-05-30 2002-08-06 Microsoft Corporation System and method for rendering electronic images
CN102591853A (zh) * 2011-12-29 2012-07-18 优视科技有限公司 网页重排方法、网页重排装置以及移动终端
CN102789484A (zh) * 2012-06-28 2012-11-21 奇智软件(北京)有限公司 一种网页信息处理方法和装置
CN102831209A (zh) * 2012-08-13 2012-12-19 优视科技有限公司 网页浏览的渲染处理方法及装置和移动终端
CN102915375A (zh) * 2012-11-08 2013-02-06 山东大学 一种基于布局分区的网页加载方法
CN103678526A (zh) * 2013-11-29 2014-03-26 贝壳网际(北京)安全技术有限公司 浏览器解码图片的方法、装置和客户端

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101458824B (zh) * 2009-01-08 2011-06-15 浙江大学 一种基于web的全景图的光照渲染方法

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6430591B1 (en) * 1997-05-30 2002-08-06 Microsoft Corporation System and method for rendering electronic images
CN102591853A (zh) * 2011-12-29 2012-07-18 优视科技有限公司 网页重排方法、网页重排装置以及移动终端
CN102789484A (zh) * 2012-06-28 2012-11-21 奇智软件(北京)有限公司 一种网页信息处理方法和装置
CN102831209A (zh) * 2012-08-13 2012-12-19 优视科技有限公司 网页浏览的渲染处理方法及装置和移动终端
CN102915375A (zh) * 2012-11-08 2013-02-06 山东大学 一种基于布局分区的网页加载方法
CN103678526A (zh) * 2013-11-29 2014-03-26 贝壳网际(北京)安全技术有限公司 浏览器解码图片的方法、装置和客户端

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108632540A (zh) * 2017-03-23 2018-10-09 北京小唱科技有限公司 视频处理方法和装置
CN108632540B (zh) * 2017-03-23 2020-07-03 北京小唱科技有限公司 视频处理方法和装置
CN109840195A (zh) * 2017-11-29 2019-06-04 腾讯科技(武汉)有限公司 网页性能分析方法、终端设备及计算机可读存储介质
CN109840195B (zh) * 2017-11-29 2023-05-12 腾讯科技(武汉)有限公司 网页性能分析方法、终端设备及计算机可读存储介质
CN111127296A (zh) * 2019-12-24 2020-05-08 北京恒泰实达科技股份有限公司 一种在大屏可视化系统中高效图片渲染方法
CN111127296B (zh) * 2019-12-24 2023-05-26 北京恒泰实达科技股份有限公司 一种在大屏可视化系统中高效图片渲染方法
CN111243044A (zh) * 2020-01-06 2020-06-05 福建天泉教育科技有限公司 含图片网页的pdf转码方法、存储介质
CN115268720A (zh) * 2022-08-16 2022-11-01 北京尽微致广信息技术有限公司 一种页面渲染方法、装置、设备及可读存储介质
CN115268720B (zh) * 2022-08-16 2024-06-11 北京尽微致广信息技术有限公司 一种页面渲染方法、装置、设备及可读存储介质

Also Published As

Publication number Publication date
CN105389159A (zh) 2016-03-09

Similar Documents

Publication Publication Date Title
WO2016034089A1 (fr) Procédé et appareil de restitution d'image, terminal mobile et support de stockage lisible par machine
CN106570098B (zh) 页面刷新的方法及装置
WO2019042329A1 (fr) Procédé et appareil de rendu d'interface utilisateur
EP2805258B1 (fr) Contenu de paramètre fictif à faible résolution destiné aux documents de navigation
US8812988B2 (en) Dynamic icons associated with remote content
US9195772B2 (en) Delayed image decoding
CN103034729B (zh) 网页绘制系统和方法
EP2924590A1 (fr) Procédé et appareil de rendu de page
WO2014206072A1 (fr) Procédé et système de prévisualisation de page web
US20140222947A1 (en) Method and apparatus for browsings webpages, and storage medium
US20150331836A9 (en) Graceful degradation of level-of-detail in document rendering
CN104834637B (zh) 网页图片展示方法及装置
CN107040584B (zh) 客户端下载图片的方法及装置
US9679075B1 (en) Efficient delivery of animated image files
CN110737532B (zh) 一种Android电视浏览器内存优化的方法
US20180373403A1 (en) Client device, control method, and storage medium
CN111209422A (zh) 图像显示方法、装置、电子设备及存储介质
CN111915705A (zh) 图片可视化编辑方法、装置、设备和介质
US20150135136A1 (en) Information processing apparatus, information processing method, and storage medium
CN112149039A (zh) 一种提升前端网页加载速度的方法
WO2011077550A1 (fr) Dispositif de relais d'écran
US10886948B2 (en) Method for determining a decoding task and apparatus
JP4691071B2 (ja) ページアクション起動装置、ページアクション起動制御方法、および、ページアクション起動制御プログラム
CN107506119B (zh) 一种图片显示方法、装置、设备和存储介质
KR101345726B1 (ko) 웹페이지 캡쳐 화면 인쇄 방법

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: 15838096

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: 15838096

Country of ref document: EP

Kind code of ref document: A1