CN110119452A - A kind of page multi-medium data deriving method and device - Google Patents

A kind of page multi-medium data deriving method and device Download PDF

Info

Publication number
CN110119452A
CN110119452A CN201810095377.8A CN201810095377A CN110119452A CN 110119452 A CN110119452 A CN 110119452A CN 201810095377 A CN201810095377 A CN 201810095377A CN 110119452 A CN110119452 A CN 110119452A
Authority
CN
China
Prior art keywords
multimedia
data
coding data
worker thread
render object
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810095377.8A
Other languages
Chinese (zh)
Inventor
刘晓钟
苗辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guizhou Baishan Cloud Polytron Technologies Inc
Original Assignee
Guizhou Baishan Cloud Polytron Technologies Inc
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 Guizhou Baishan Cloud Polytron Technologies Inc filed Critical Guizhou Baishan Cloud Polytron Technologies Inc
Priority to CN201810095377.8A priority Critical patent/CN110119452A/en
Publication of CN110119452A publication Critical patent/CN110119452A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/258Data format conversion from or to a database
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/40Information retrieval; Database structures therefor; File system structures therefor of multimedia data, e.g. slideshows comprising image and additional audio data
    • G06F16/44Browsing; Visualisation therefor

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a kind of page multi-medium data deriving method and device, the method includes: the multimedia render object obtained in the page;Obtain the multimedia coding data of each multimedia render object;Using multimedia coding data described in multiple worker thread parallel processings, multimedia coding data are converted into multimedia file;The multimedia file obtained in the multiple worker thread is sent to main thread, multimedia file integration is carried out by the main thread.The present invention handles the biggish data processing work of calculation amount by the parallel progress of work, the execution of multiple JavaScript scripts is realized in the same time, the processing pressure of browser main thread is shared in terms of operating system, can quickly export multi-medium data in browser end while guaranteeing the normal operation of browser end.

Description

A kind of page multi-medium data deriving method and device
Technical field
The present invention relates to Internet technical field more particularly to a kind of page multi-medium data deriving methods and device.
Background technique
As the demand that enterprise analyzes data increases, the demand of data visualization is consequently increased.Data on platform Visualization is not able to satisfy most of data visualization demand, also needs to export all data in some scenes and standby Part.For example each chart on the page is exported into printing, each chart data is exported as into Excel format and is carried out in other data Analysis.Traditional deriving method includes following two:
One, it gives the export process of chart to server-side and executes, after the completion of being exported by server, derived content is packaged It is downloaded afterwards for user.
Two, another mode is exactly directly to carry out export by browser end to operate.
Although can realize that data export in first way by way of multithreading, need to rely on service End, scalability is poor, and network request cost caused by server-side is bigger.
It is slower using rate derived from JavaScript single thread mode when browser end exports in the second way, very To there is the case where browser crash.
The second way is exemplified below: needing to show the weather condition in multiple and different areas when page presentation, needs Use nearly 300 charts while being rendered into browser end, at this time using chart rendering be Canvas or SVG by the way of It is rendered, needs to export all these charts when being visualized and printed to local, this when needs to institute There is chart to be converted, be converted into the picture of PNG format, then carries out the compressed package that compression is packaged into a zip format, finally It is supplied to user.The processing of whole flow process is all completed by main thread, is needed largely calculating and read-write operation, is be easy to cause clear Look at device Caton the case where, or even the case where cause browser crash.
Browser JavaScript single thread bring bottleneck problem how is solved, how quickly to be exported in browser end more Media data is the technical issues that need to address.
Summary of the invention
In order to solve the above-mentioned technical problems, the present invention provides a kind of page multi-medium data deriving method and devices.
Page data deriving method provided by the invention, comprising:
Obtain the multimedia render object in the page;
Obtain the multimedia coding data of each multimedia render object;
Using multimedia coding data described in multiple worker thread parallel processings, multimedia coding data are converted into more matchmakers Body file;
The multimedia file obtained in the multiple worker thread is sent to main thread, is carried out by the main thread more Media file integration.
Above-mentioned page data deriving method also has the following characteristics that
After the multimedia coding data for obtaining each multimedia render object, the method also includes: to the multimedia The multimedia coding data of render object are grouped;
Multimedia coding data described in the multiple worker thread parallel processings of the use include: to use multiple worker threads simultaneously Row handles the multimedia coding data in the grouping.
Above-mentioned page data deriving method also has the following characteristics that
The multimedia coding data to the multimedia render object, which are grouped, includes:
The multimedia coding data of the multimedia render object are divided into multiple groupings by the quantity for determining worker thread, The quantity of grouping is identical as the quantity of the worker thread.
Above-mentioned page data deriving method also has the following characteristics that
It is described the multimedia file obtained in the multiple worker thread is sent to main thread to include:
The multimedia file obtained in the multiple worker thread is sent to main thread by way of sending message.
Above-mentioned page data deriving method also has the following characteristics that
The multimedia coding data for obtaining each multimedia render object include:
Multimedia data type in transfer function is set;The transfer function is used for multimedia render object to multimedia Coded data uniform resource identifier;
The transfer function is called, the corresponding multimedia coding data unified resource mark of the multimedia render object is obtained Know symbol.
Page data guiding device provided by the invention, comprising:
Module is obtained to picture, for obtaining the multimedia render object in the page;
Data acquisition module, for obtaining the multimedia coding data of each multimedia render object;
Worker thread processing module will be more for using multimedia coding data described in multiple worker thread parallel processings Media coding data are converted to multimedia file, and multimedia file is sent to main thread processing module;
Main thread processing module, for carrying out multimedia file integration.
Above-mentioned page data guiding device also has the following characteristics that
Described device further includes grouping module, is divided for the multimedia coding data to the multimedia render object Group;
The worker thread processing module, for using more matchmakers described in multiple worker thread parallel processings using following methods Body coded data: the multimedia coding data in grouping described in multiple worker thread parallel processings are used.
Above-mentioned page data guiding device also has the following characteristics that
The grouping module, be also used for following methods to the multimedia coding data of the multimedia render object into Row grouping: determining the quantity of worker thread, the multimedia coding data of the multimedia render object be divided into multiple groupings, point The quantity of group is identical as the quantity of the worker thread.
Above-mentioned page data guiding device also has the following characteristics that
The worker thread processing module is also used for following methods for multimedia file and is sent to main thread processing mould Block: the multimedia file obtained in the multiple worker thread is sent to main thread by way of sending message.
Above-mentioned page data guiding device also has the following characteristics that
The data acquisition module, for obtaining the multimedia coding number of each multimedia render object using following methods According to: multimedia data type in setting transfer function;The transfer function is used for multimedia render object to multimedia coding Data uniform resource identifier;The transfer function is called, the corresponding multimedia coding number of the multimedia render object is obtained According to uniform resource identifier.
The present invention handles the biggish data processing work of calculation amount by the parallel progress of work, realizes in the same time The execution of multiple JavaScript scripts, shares the processing pressure of browser main thread in terms of operating system, and main thread is only born It blames from worker thread and receives the data and integration that processing is completed, can quickly export multi-medium data in browser end while guarantee The normal operation of browser end.
Detailed description of the invention
The attached drawing for constituting a part of the invention is used to provide further understanding of the present invention, schematic reality of the invention It applies example and its explanation is used to explain the present invention, do not constitute improper limitations of the present invention.In the accompanying drawings:
Fig. 1 is the flow chart of page multi-medium data deriving method in embodiment;
Fig. 2 is the structure chart of page multi-medium data guiding device in embodiment.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is A part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art Every other embodiment obtained without making creative work, shall fall within the protection scope of the present invention.It needs Illustrate, in the absence of conflict, the features in the embodiments and the embodiments of the present application can mutual any combination.
As shown in Figure 1, page data deriving method in embodiment, comprising:
Step 101, the multimedia render object in the page is obtained;
Step 102, the multimedia coding data of each multimedia render object are obtained;
Step 103, using multiple worker thread parallel processing multimedia coded datas, multimedia coding data are converted to Multimedia file;
Step 104, the multimedia file obtained in multiple worker threads is sent to main thread, is carried out by main thread more Media file integration.
The present invention handles the biggish data processing work of calculation amount by the parallel progress of work, realizes in the same time The execution of multiple JavaScript scripts, shares the processing pressure of browser main thread in terms of operating system, and main thread is only born It blames from worker thread and receives the data and integration that processing is completed, can quickly export multi-medium data in browser end while guarantee The normal operation of browser end.
Wherein,
It includes: more in setting transfer function that the multimedia coding data of each multimedia render object are obtained in step 102 Media data type;This transfer function is used for multimedia render object to multimedia coding data uniform resource identifier;It adjusts With this transfer function, the corresponding multimedia coding data uniform resource identifier of multimedia render object is obtained.
Multi-medium data includes image data, audio data, video data etc. in this method.By taking image data as an example, adjust It is HTMLCanvasElement.toDataURL () with transfer function, for obtaining the data URI comprising image data.It can With the type for the type parameter setting picture being arranged in this function, such as it is the types such as PNG, JPG that the type of picture, which can be set,.
After step 102 obtains the multimedia coding data of each multimedia render object, the method further include: to multimedia The multimedia coding data of render object are grouped.It is encoded in step 103 using multiple worker thread parallel processing multimedias Data include: using the multimedia coding data in multiple worker thread parallel processings grouping.Wherein, to multimedia render object Multimedia coding data be grouped the quantity for comprising determining that worker thread, by the multimedia coding of multimedia render object Data are divided into multiple groupings, and the quantity of grouping and the quantity of worker thread are identical.By the multimedia coding of multimedia render object Data can be grouped when being grouped by strategy, can be grouped by preset strategy, according to particular number (such as with referring to Fixed number purpose mode) it is distributed equally, or be distributed equally according to file size.The feelings of negligible amounts under normal conditions Condition directly basis, which specifies number, averagely, if quantity is more, need according to file entirety size and known client The critical value size that can be handled is grouped.
Main thread notice WebKit creates worker thread in step 103, and WebKit records the script text of worker thread task Part, creation worker thread call transfer function to obtain multimedia file in worker thread.
It includes: to be disappeared by sending that the multimedia file obtained in multiple worker threads, which is sent to main thread, in step 104 The multimedia file obtained in multiple worker threads is sent to main thread by the mode of breath.
In this method, reads and writes and export in browser end realization mass data, it is possible to reduce the consumption of server-side, for height Concurrent scene easily can discharge service end pressure by the above-mentioned function of the browser of user.This method can browse Device end is independently realized, customization demand is independently done, without considering the coupled problem of browser end and server end.This method is being answered Still higher processing speed can be kept when to concurrent scene.
As shown in Fig. 2, page data guiding device in embodiment, comprising:
Module is obtained to picture, for obtaining the multimedia render object in the page;
Data acquisition module, for obtaining the multimedia coding data of each multimedia render object;
Worker thread processing module will be more for using multimedia coding data described in multiple worker thread parallel processings Media coding data are converted to multimedia file, and multimedia file is sent to main thread processing module;
Main thread processing module, for carrying out multimedia file integration.
Wherein,
Data acquisition module, for obtaining the multimedia coding data of each multimedia render object using following methods: Multimedia data type in transfer function is set;The transfer function is used for multimedia render object to multimedia coding data Uniform resource identifier;The transfer function is called, the corresponding multimedia coding data system of the multimedia render object is obtained One resource identifier.
This device further includes grouping module, is divided for the multimedia coding data to the multimedia render object Group.The worker thread processing module, for being compiled using following methods using multimedia described in multiple worker thread parallel processings Code data: the multimedia coding data in grouping described in multiple worker thread parallel processings are used.
This grouping module is also used for following methods and carries out to the multimedia coding data of the multimedia render object Grouping: determining the quantity of worker thread, the multimedia coding data of the multimedia render object be divided into multiple groupings, The quantity of grouping is identical as the quantity of the worker thread.
Worker thread processing module is also used for following methods for multimedia file and is sent to main thread processing module: The multimedia file obtained in the multiple worker thread is sent to main thread by way of sending message.
Descriptions above can combine implementation individually or in various ways, and these variants all exist Within protection scope of the present invention.
Those of ordinary skill in the art will appreciate that all or part of the steps in the above method can be instructed by program Related hardware is completed, and described program can store in computer readable storage medium, such as read-only memory, disk or CD Deng.Optionally, one or more integrated circuits also can be used to realize, accordingly in all or part of the steps of above-described embodiment Ground, each module/unit in above-described embodiment can take the form of hardware realization, can also use the shape of software function module Formula is realized.The present invention is not limited to the combinations of the hardware and software of any particular form.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that including the article of a series of elements or equipment not only includes those elements, but also including not having There is the other element being expressly recited, or further includes for this article or the intrinsic element of equipment.Do not limiting more In the case where system, the element that is limited by sentence " including ... ", it is not excluded that in the article or equipment for including the element There is also other identical elements.
The above examples are only used to illustrate the technical scheme of the present invention and are not limiting, reference only to preferred embodiment to this hair It is bright to be described in detail.Those skilled in the art should understand that can modify to technical solution of the present invention Or equivalent replacement should all cover in claim model of the invention without departing from the spirit and scope of the technical solution of the present invention In enclosing.

Claims (10)

1. a kind of page data deriving method, comprising:
Obtain the multimedia render object in the page;
Obtain the multimedia coding data of each multimedia render object;
Using multimedia coding data described in multiple worker thread parallel processings, multimedia coding data are converted into multimedia text Part;
The multimedia file obtained in the multiple worker thread is sent to main thread, multimedia is carried out by the main thread Integrating documents.
2. page data deriving method as described in claim 1, which is characterized in that
After the multimedia coding data for obtaining each multimedia render object, the method also includes: the multimedia is rendered The multimedia coding data of picture are grouped;
Multimedia coding data described in the multiple worker thread parallel processings of the use include: to be located parallel using multiple worker threads Manage the multimedia coding data in the grouping.
3. page data deriving method as claimed in claim 2, which is characterized in that
The multimedia coding data to the multimedia render object, which are grouped, includes:
The multimedia coding data of the multimedia render object are divided into multiple groupings by the quantity for determining worker thread, grouping Quantity it is identical as the quantity of the worker thread.
4. page data deriving method as described in claim 1, which is characterized in that
It is described the multimedia file obtained in the multiple worker thread is sent to main thread to include:
The multimedia file obtained in the multiple worker thread is sent to main thread by way of sending message.
5. page data deriving method as described in claim 1, which is characterized in that
The multimedia coding data for obtaining each multimedia render object include:
Multimedia data type in transfer function is set;The transfer function is used for multimedia render object to multimedia coding Data uniform resource identifier;
The transfer function is called, the corresponding multimedia coding data uniform resource identifier of the multimedia render object is obtained Symbol.
6. a kind of page data guiding device, comprising:
Module is obtained to picture, for obtaining the multimedia render object in the page;
Data acquisition module, for obtaining the multimedia coding data of each multimedia render object;
Worker thread processing module, for using multimedia coding data described in multiple worker thread parallel processings, by multimedia Coded data is converted to multimedia file, and multimedia file is sent to main thread processing module;
Main thread processing module, for carrying out multimedia file integration.
7. page data guiding device as claimed in claim 6, which is characterized in that
Described device further includes grouping module, is grouped for the multimedia coding data to the multimedia render object;
The worker thread processing module, for being compiled using following methods using multimedia described in multiple worker thread parallel processings Code data: the multimedia coding data in grouping described in multiple worker thread parallel processings are used.
8. page data guiding device as claimed in claim 7, which is characterized in that
The grouping module is also used for following methods and divides the multimedia coding data of the multimedia render object Group: determining the quantity of worker thread, and the multimedia coding data of the multimedia render object are divided into multiple groupings, grouping Quantity is identical as the quantity of the worker thread.
9. page data guiding device as claimed in claim 6, which is characterized in that
The worker thread processing module is also used for following methods for multimedia file and is sent to main thread processing module: The multimedia file obtained in the multiple worker thread is sent to main thread by way of sending message.
10. page data guiding device as claimed in claim 6, which is characterized in that
The data acquisition module, for obtaining the multimedia coding data of each multimedia render object using following methods: Multimedia data type in transfer function is set;The transfer function is used for multimedia render object to multimedia coding data Uniform resource identifier;The transfer function is called, the corresponding multimedia coding data system of the multimedia render object is obtained One resource identifier.
CN201810095377.8A 2018-01-31 2018-01-31 A kind of page multi-medium data deriving method and device Pending CN110119452A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810095377.8A CN110119452A (en) 2018-01-31 2018-01-31 A kind of page multi-medium data deriving method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810095377.8A CN110119452A (en) 2018-01-31 2018-01-31 A kind of page multi-medium data deriving method and device

Publications (1)

Publication Number Publication Date
CN110119452A true CN110119452A (en) 2019-08-13

Family

ID=67519136

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810095377.8A Pending CN110119452A (en) 2018-01-31 2018-01-31 A kind of page multi-medium data deriving method and device

Country Status (1)

Country Link
CN (1) CN110119452A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030023630A1 (en) * 2001-07-26 2003-01-30 Barmettler James W. Printing a well-defined subset of an HTML page
CN104461412A (en) * 2014-12-30 2015-03-25 广州视源电子科技股份有限公司 Web page designated area printing method and system
CN106649716A (en) * 2016-12-21 2017-05-10 北京致远互联软件股份有限公司 Multithread-based online file format conversion method and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030023630A1 (en) * 2001-07-26 2003-01-30 Barmettler James W. Printing a well-defined subset of an HTML page
CN104461412A (en) * 2014-12-30 2015-03-25 广州视源电子科技股份有限公司 Web page designated area printing method and system
CN106649716A (en) * 2016-12-21 2017-05-10 北京致远互联软件股份有限公司 Multithread-based online file format conversion method and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
佚名: "An example of Python Picture Downloader", 《HTTPS://GITHUB.COM/SVENAUGUSTUS/PICDOWNLOADER-EXAMPLE/BLOB/MASTER/PICDOWNLOADER.PY》 *

Similar Documents

Publication Publication Date Title
EP2256735B1 (en) Rendering in a multi-user video editing system
CN107766359B (en) Method and device for converting page content into picture and computing equipment
US8122059B2 (en) Cache system and method for generating uncached objects from cached and stored object components
CN101201832B (en) Method and system for optimizing web page image
CN106991134A (en) A kind of large data cloud storage method stored based on object
CN104252444B (en) A kind of composition method, module and the system of magazine application
NL1033929C1 (en) Parallel user session streaming method, involves assembling data stream per session by applying encoded fragments that are suitable for assembling video data in predefined format and for application in images, to video data
CN104243923B (en) A kind of method and system of picture processing and preview picture
CN111881651A (en) Method for converting UOT streaming document into OFD format document
Scully et al. glTF Streaming from 3D Repo to X3DOM
CN116962756A (en) Method, device, equipment and storage medium for processing immersion medium
EP1451722A2 (en) Schema, syntactic analysis method and method of generating a bit stream based on a schema
CN105447016B (en) A kind of fast search of component and the method for reuse
CN110119452A (en) A kind of page multi-medium data deriving method and device
US9113198B2 (en) Computer-implemented method, computer program product and embedded system for displaying overlaid data on an image based on string frequency
CN104410868A (en) Methods for rapid aggregation and reading of multiple files of shared-file system
CN112714338A (en) Video transmission method, video playing method, video transmission device, video playing device, computer equipment and storage medium
CN103853849B (en) Method for establishing and drawing high-compression reflowable file
US20190095418A1 (en) Processing of 3d printing files
WO2013181756A1 (en) System and method for generating and disseminating digital video
CN109918605A (en) A method of the generation dynamic picture based on content distributing network
CN111581402A (en) Method and system for generating content test material, electronic equipment and storage medium
CN106506241B (en) Display method and system of topological view
CN116636225A (en) Information processing apparatus and method
CN107092622A (en) The methods of exhibiting and device of a kind of comment information

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190813