CN116955873B - Method for rapidly displaying massive dynamic planar vector data on browser - Google Patents

Method for rapidly displaying massive dynamic planar vector data on browser Download PDF

Info

Publication number
CN116955873B
CN116955873B CN202311196647.1A CN202311196647A CN116955873B CN 116955873 B CN116955873 B CN 116955873B CN 202311196647 A CN202311196647 A CN 202311196647A CN 116955873 B CN116955873 B CN 116955873B
Authority
CN
China
Prior art keywords
image
moving picture
original
frame
frame image
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.)
Active
Application number
CN202311196647.1A
Other languages
Chinese (zh)
Other versions
CN116955873A (en
Inventor
秦文汉
张峰
于凯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baixin Blueprint Technology Co ltd
Original Assignee
Beijing Baixin Blueprint Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baixin Blueprint Technology Co ltd filed Critical Beijing Baixin Blueprint Technology Co ltd
Priority to CN202311196647.1A priority Critical patent/CN116955873B/en
Publication of CN116955873A publication Critical patent/CN116955873A/en
Application granted granted Critical
Publication of CN116955873B publication Critical patent/CN116955873B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9574Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9577Optimising the visualization of content, e.g. distillation of HTML documents
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/0483Interaction with page-structured environments, e.g. book metaphor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04845Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range for image manipulation, e.g. dragging, rotation, expansion or change of colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/60Memory management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2203/00Indexing scheme relating to G06F3/00 - G06F3/048
    • G06F2203/048Indexing scheme relating to G06F3/048
    • G06F2203/04806Zoom, i.e. interaction techniques or interactors for controlling the zooming operation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Human Computer Interaction (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention relates to the field of displaying dynamic planar vector data in a browser, and particularly discloses a method for quickly displaying massive dynamic planar vector data in the browser, wherein the method sequentially performs key frame extraction, color adjustment and size cutting on an original moving picture by acquiring the requirement of a user for accessing the moving picture, obtains a preview moving picture, displays the preview moving picture in the browser, compresses the moving picture on the basis of keeping key information of the moving picture by combining the attribute of the preview moving picture, and reduces memory occupation so as to improve the response speed of clicking the moving picture by the user; and the original moving pictures are sequentially subjected to duplicate removal and resolution adjustment by acquiring the requirement of a user for viewing the details of the preview moving pictures, so as to obtain an refined moving picture, the moving pictures are compressed on the basis of ensuring the moving picture quality by combining the characteristics of the detail moving pictures, the file size is reduced, the response speed of the user for viewing the details of the moving pictures is improved, and the browsing experience of the user is improved and the performance of the webpage is improved.

Description

Method for rapidly displaying massive dynamic planar vector data on browser
Technical Field
The invention relates to the field of displaying dynamic planar vector data on a browser, in particular to a method for rapidly displaying massive dynamic planar vector data on the browser.
Background
Dynamic planar vector data refers to a vector data set that includes a plurality of planar graphic elements, has a time dimension, and can be dynamically changed with time.
A moving picture is a typical application of dynamic planar vector data, and usually occupies a relatively large memory space, wherein the memory occupation of the moving picture depends on the size, resolution, frame rate and complexity of each frame of image. A larger moving picture file requires longer time to download, which results in slower loading speed, while if the moving picture is too large, the browser may take more time to decode and render, thereby reducing the speed at which the moving picture is displayed on the browser.
Therefore, to increase the speed of displaying the moving picture file on the browser, optimization processing is required to be performed on the moving picture to reduce the file size and memory occupation of the moving picture.
The existing method for rapidly displaying the dynamic diagram on the browser has some defects: on the one hand, when the moving picture file is displayed in the browser, the existing method does not perform optimization processing on the moving picture file, so that the moving picture file has a large memory to influence the display speed of the moving picture file on the browser, or a single and rough processing mode is adopted for the moving picture, so that the compressing effect of the moving picture file is not obvious, and the display speed of the moving picture file on the browser cannot be substantially improved.
On the other hand, when the existing method processes the moving picture file, the moving picture is optimized mainly according to the attribute of the moving picture, and the viewing requirement of a user, the webpage requirement of a browser, the hardware configuration of a computer and the like are not considered, so that the scientificity and the reliability of the adjusting processing of the moving picture by the existing method are lower.
Disclosure of Invention
Aiming at the problems, the invention provides a method for rapidly displaying massive dynamic planar vector data on a browser, which comprises the following specific technical scheme: a method for rapidly displaying massive dynamic planar vector data on a browser comprises the following steps: step one, user access map requirement acquisition: and acquiring the requirement of the user for accessing the dynamic diagram through the webpage address containing the dynamic diagram accessed by the user on the browser interface.
Step two, downloading and storing an original diagram: according to the requirement of a user for accessing the moving picture, the browser sends an HTTP request to the server, the server searches and locates the requested moving picture file, sends the moving picture file back to the browser as an HTTP response, analyzes and downloads the moving picture file to obtain the moving picture file, marks the moving picture file as an original moving picture, and stores the moving picture file in a storage device of the computer.
Step three, obtaining and displaying a preview diagram: obtaining each frame image in the original moving picture, sequentially carrying out key frame extraction, color adjustment and size cutting on each frame image in the original moving picture to obtain each frame image after the thumbnail processing, further combining to obtain a preview moving picture, and displaying the preview moving picture on a browser.
Step four, the user checks the requirement judgment of the moving picture: and judging whether the user has a requirement for checking the detailed content of the preview moving picture or not by clicking the preview moving picture on a browser interface by the user, and executing the fifth step if the user has the requirement.
Fifthly, acquiring and displaying a fine modification diagram: and obtaining each frame image in the original moving picture, sequentially carrying out de-duplication and resolution adjustment on each frame image in the original moving picture to obtain each frame image after finishing treatment, further combining to obtain a finishing moving picture, and displaying the finishing moving picture on a browser.
On the basis of the above embodiment, the specific process of extracting the key frame from each frame image in the original image in the third step includes: and acquiring each frame image in the original image, and sequencing each frame image in the original image according to the sequence of the display time.
And obtaining each dynamic element and each static element of each frame image in the original image by using an image processing technology.
And comparing each dynamic element of each frame image in the original moving picture with each dynamic element of the next frame image adjacent to the dynamic element, and if the dynamic element of a certain frame image in the original moving picture is the same as the dynamic element of a certain dynamic element of the next frame image adjacent to the dynamic element, marking the dynamic element of the frame image in the original moving picture as a marked dynamic element of the frame image in the original moving picture, and counting to obtain each marked dynamic element of each frame image in the original moving picture.
And similarly, according to the analysis method of each marking dynamic element of each frame image in the original image, each marking static element of each frame image in the original image is obtained.
And establishing a reference coordinate system in each frame of image of the original image according to a preset principle.
Acquiring the outlines of the marked dynamic elements in the frame images in the original moving picture, selecting sampling points on the outlines of the marked dynamic elements in the frame images in the original moving picture according to a preset equidistant principle, and acquiring the sampling points on the outlines of the marked dynamic elements in the frame images in the original moving pictureIs recorded as the position coordinates of,/>Representing +.>Numbering of frame images>,/>Indicate->Number of dynamic element of individual tag,/->,/>Representing +.>Number of sample points>
Acquiring the position coordinates of each sampling point on the outline of each marking dynamic element in each frame image in the original image in the next frame image adjacent to the sampling point, and marking the position coordinates as
On the basis of the above embodiment, the specific process of extracting the key frame from each frame image in the original image in the third step further includes: by analysis of formulasObtaining dynamic elements of each frame image and the next frame image adjacent to each frame image in the original imageCoefficient of variation->Wherein->Representing the number of sampling points on the marked dynamic element profile, is->Representing a preset dynamic element position offset threshold.
Similarly, according to the analysis method of the dynamic element change coefficients of each frame image and the next frame image adjacent to each frame image in the original image, the static element change coefficients of each frame image and the next frame image adjacent to each frame image in the original image are obtained and recorded as
By analysis of formulasObtaining difference index of each frame image and adjacent next frame image in original image>Wherein->Weight factors respectively representing preset dynamic elements and static elements, < ->
On the basis of the above embodiment, the specific process of extracting the key frame from each frame image in the original image in the third step further includes: comparing the difference index of each frame image in the original moving picture with the difference index threshold value of the next frame image adjacent to the frame image, if the difference index of a certain frame image in the original moving picture and the next frame image adjacent to the frame image is larger than or equal to the difference index threshold value, marking the frame image in the original moving picture as a key image, and reserving the key image, otherwise marking the frame image in the original moving picture as a non-key image, deleting the non-key image, and counting to obtain each key frame in the original moving picture.
On the basis of the above embodiment, the specific process of performing color adjustment on each frame of image in the original image in the third step is: and (3) obtaining areas corresponding to the gray values in the key images in the original image by using an image processing technology, and marking the areas as the color areas of the key images in the original image.
Setting a gray value difference range of a color region according to a preset principle, comparing gray values of the color regions of each key image in the original image, classifying the two color regions in the key image in the original image into the same color region set if the gray value difference of the two color regions in the key image in the original image is in the set gray value difference range, and counting to obtain each color region set of each key image in the original image.
The gray values of the color areas in the color area sets in the key images in the original moving picture are obtained, average value calculation is carried out on the gray values of the color areas in the color area sets in the key images in the original moving picture, the reference gray values of the color area sets in the key images in the original moving picture are obtained, the gray values of the color areas in the color area sets in the key images in the original moving picture are set as the reference gray values corresponding to the color area sets, and then color adjustment is carried out on the key images in the original moving picture.
On the basis of the above embodiment, the specific process of performing the size clipping on each frame of image in the original image in the third step is as follows: and marking each key image after color adjustment in the original image as each image to be cut in the original image.
Extracting the reference size of the dynamic diagram display in the browser webpage stored in the database, marking the reference size as the first reference size of the image to be cut, and representing the reference size as
Acquiring the size of a computer display screen and taking the ruler of the computer display screenComparing the size with a preset suitable size of the moving picture display corresponding to the screen size range of each computer display, screening to obtain the suitable size of the moving picture display corresponding to the screen size of the computer display, marking the suitable size as a second reference size of the image to be cut, and representing the second reference size as
By analysis of formulasObtaining the reference size of the image to be cropped>Wherein->Weights respectively representing a first reference size and a second reference size of a preset image to be cut,/->A correction amount representing a preset reference size of the image to be cut.
And performing size cutting on each image to be cut in the original moving picture according to the reference size of the image to be cut.
And marking each image to be cut after size cutting in the original image as each frame image after the thumbnail processing, and combining each frame image after the thumbnail processing to obtain the preview image.
Based on the above embodiment, the specific process of the fourth step is: and acquiring the position and the clicking times of the user clicking the preview moving picture on the browser interface, comparing the position and the clicking times with the region and the clicking times of the preview moving picture when the preview moving picture detailed content is checked by the user, and if the position and the clicking times are matched with the region and the clicking times, the user has the requirement of checking the preview moving picture detailed content.
Based on the above embodiment, the specific process of de-duplicating each frame of image in the original image in the fifth step is: comparing the frame images in the original image to obtain repeated frame images in the original image, and removing the repeated frame images to obtain frame images after the repeated processing of the original image.
Comparing the elements in the frame images after the primary moving image one round of de-duplication processing to obtain repeated elements in the frame images after the primary moving image one round of de-duplication processing, and removing to obtain the frame images after the primary moving image two rounds of de-duplication processing.
On the basis of the above embodiment, the specific process of performing resolution adjustment on each frame of image in the original image in the fifth step is: and marking each frame image obtained by de-duplication in the original image as each image to be processed of the original image.
Obtaining the resolution of the original image, and recording the resolution as
Acquiring screen resolution of a computer, comparing the screen resolution of the computer with a preset suitable resolution of the dynamic diagram display corresponding to each computer screen resolution range, screening to obtain the suitable resolution of the dynamic diagram display corresponding to the computer screen resolution, and recording the suitable resolution as the suitable resolution of the dynamic diagram display
Acquiring the current network speed of the computer and recording the current network speed asAnd the file volume of the original map is obtained and recorded as +.>
By analysis of formulasObtaining a reference resolution of the image to be processed>Wherein->Reference score representing a preset image to be processedCorrection of resolution->Representing natural constant->Threshold value representing a preset computer speed, +.>Representing a preset file volume threshold.
And according to the reference resolution of the images to be processed, performing resolution adjustment on each image to be processed of the original image.
Recording each image to be processed after resolution adjustment in the original image as each frame image after finishing treatment, and combining each frame image after finishing treatment to obtain the finishing image.
Compared with the prior art, the method for rapidly displaying the massive dynamic planar vector data on the browser has the following beneficial effects: 1. the invention reduces the frame number of the dynamic diagram by extracting the key frame from the original dynamic diagram so as to reduce the memory occupation.
2. The invention reduces the color of the moving picture by performing color adjustment on the original moving picture so as to reduce the file size of the moving picture.
3. The invention reduces the file size of the original moving picture by carrying out size cutting on the original moving picture and removing the secondary parts such as edge blank and the like in the moving picture.
4. According to the method, the access diagram requirement of the user is acquired, the browser webpage requirement and the hardware configuration of the computer are considered, and the original diagram is sequentially subjected to multiple processes of key frame extraction, color adjustment and size cutting, so that the preview diagram is obtained, the compressing effect of the diagram file is improved, and the displaying speed of the preview diagram on the browser is further improved.
5. The invention reduces the frame number by de-duplicating the original diagram so as to reduce the diagram memory occupation.
6. The invention reduces the resolution by adjusting the resolution of the original moving picture so as to reduce the size of the moving picture file.
7. According to the method, the device and the system, the requirement of a user for checking the detailed content of the preview moving picture is acquired, the hardware configuration and the network environment of the computer are considered, and the original moving picture is subjected to multiple processes of duplicate removal and resolution adjustment in sequence, so that the finishing moving picture is obtained, the compressing effect of moving picture files is enhanced, and the displaying speed of the finishing moving picture on a browser is further accelerated.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed for the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of the method of the present invention.
FIG. 2 is a schematic diagram of an analytical model architecture according to the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1 and 2, the method for rapidly displaying massive dynamic planar vector data on a browser provided by the invention comprises the following steps: step one, user access map requirement acquisition: and acquiring the requirement of the user for accessing the dynamic diagram through the webpage address containing the dynamic diagram accessed by the user on the browser interface.
It should be noted that the Web page address is a unique identifier used to locate and access a particular Web page on the Web. The browser can send an HTTP request to the server by inputting a webpage address in an address bar of the browser by a user or clicking a link by the user, and the like, so that corresponding webpage content is obtained and displayed in the browser.
Step two, downloading and storing an original diagram: according to the requirement of a user for accessing the moving picture, the browser sends an HTTP request to the server, the server searches and locates the requested moving picture file, sends the moving picture file back to the browser as an HTTP response, analyzes and downloads the moving picture file to obtain the moving picture file, marks the moving picture file as an original moving picture, and stores the moving picture file in a storage device of the computer.
The specific process of the second step is as follows: the browser sends an HTTP request to the server according to the URL of the moving picture file accessed by the user, the server requests to acquire the moving picture resources, the server searches and locates the requested moving picture file after receiving the request of the browser and sends the moving picture file back to the browser as an HTTP response, the browser starts to receive and analyze response contents after receiving the HTTP response returned by the server, downloads the moving picture file and marks the moving picture file as an original moving picture, and after the original moving picture is downloaded, the browser decodes the original moving picture by using a decoder, converts the original moving picture into a format suitable for moving picture display, reads the contents of the original moving picture and stores the contents in a storage device of the computer.
It should be noted that the steps of the browser for downloading the original map are as follows: sending HTTP request, server response, receiving and analyzing response and downloading the map file.
In the browser, the HTTP request refers to a process in which the browser sends a request to the server to acquire a specific resource. HTTP is an application layer protocol for transmitting data over the Web. The browser sends the HTTP request to the server, waits for the response of the server, and after receiving the request, the server executes corresponding operation and generates a response according to the information in the request. Through the HTTP request, the browser can communicate with the server and acquire the required webpage content or resources.
It should be noted that, the format of the display of the moving picture includes, but is not limited to: GIF, APNG, MP4 and AVI, etc.
In one embodiment, the format of the graphical display is GIF.
It should be noted that, the computer storage device storing the moving picture file downloaded by the browser is a cache or a specified disk on the computer.
Step three, obtaining and displaying a preview diagram: obtaining each frame image in the original moving picture, sequentially carrying out key frame extraction, color adjustment and size cutting on each frame image in the original moving picture to obtain each frame image after the thumbnail processing, further combining to obtain a preview moving picture, and displaying the preview moving picture on a browser.
As a preferred solution, the specific process of extracting the key frame from each frame image in the original image in the third step includes: and acquiring each frame image in the original image, and sequencing each frame image in the original image according to the sequence of the display time.
And obtaining each dynamic element and each static element of each frame image in the original image by using an image processing technology.
And comparing each dynamic element of each frame image in the original moving picture with each dynamic element of the next frame image adjacent to the dynamic element, and if the dynamic element of a certain frame image in the original moving picture is the same as the dynamic element of a certain dynamic element of the next frame image adjacent to the dynamic element, marking the dynamic element of the frame image in the original moving picture as a marked dynamic element of the frame image in the original moving picture, and counting to obtain each marked dynamic element of each frame image in the original moving picture.
And similarly, according to the analysis method of each marking dynamic element of each frame image in the original image, each marking static element of each frame image in the original image is obtained.
And establishing a reference coordinate system in each frame of image of the original image according to a preset principle.
Acquiring the outline of each marking dynamic element in each frame image in the original image, selecting each sampling point on the outline of each marking dynamic element in each frame image in the original image according to a preset equidistant principle, acquiring the position coordinates of each sampling point on the outline of each marking dynamic element in each frame image in the original image, and marking the position coordinates as,/>Representing +.>Numbering of frame images>,/>Indicate->Number of dynamic element of individual tag,/->,/>Representing +.>Number of sample points>
Acquiring the position coordinates of each sampling point on the outline of each marking dynamic element in each frame image in the original image in the next frame image adjacent to the sampling point, and marking the position coordinates as
The dynamic elements of the image refer to moving elements in the image, such as moving figures, animals, vehicles and the like; static elements of an image refer to elements in the image that are static, such as static scenes, buildings, objects, and the like.
It should be noted that, the method for establishing the reference coordinate system in each frame image of the original image is the same, and the sizes of each frame image in the original image are the same.
In a specific embodiment, the method for establishing the reference coordinate system in each frame image of the original image comprises the following steps: and establishing a reference coordinate system by taking the central point of each frame of image in the original image as an origin.
In another embodiment, the reference coordinate system is established by taking the corner points of each frame of image in the original image as the origin.
As a preferred solution, the specific process of extracting the key frame from each frame of image in the original image in the third step further includes: by analysis of formulasObtaining dynamic element change coefficients of each frame image and the next frame image adjacent to each frame image in the original image ∈ ->Wherein->Representing the number of sampling points on the marked dynamic element profile, is->Representing a preset dynamic element position offset threshold.
Similarly, according to the analysis method of the dynamic element change coefficients of each frame image and the next frame image adjacent to each frame image in the original image, the static element change coefficients of each frame image and the next frame image adjacent to each frame image in the original image are obtained and recorded as
By analysis of formulasObtaining difference index of each frame image and adjacent next frame image in original image>Wherein->Weight factors respectively representing preset dynamic elements and static elements, < ->
As a preferred solution, the specific process of extracting the key frame from each frame of image in the original image in the third step further includes: comparing the difference index of each frame image in the original moving picture with the difference index threshold value of the next frame image adjacent to the frame image, if the difference index of a certain frame image in the original moving picture and the next frame image adjacent to the frame image is larger than or equal to the difference index threshold value, marking the frame image in the original moving picture as a key image, and reserving the key image, otherwise marking the frame image in the original moving picture as a non-key image, deleting the non-key image, and counting to obtain each key frame in the original moving picture.
As a preferable scheme, the specific process of performing color adjustment on each frame of image in the original image in the third step is as follows: and (3) obtaining areas corresponding to the gray values in the key images in the original image by using an image processing technology, and marking the areas as the color areas of the key images in the original image.
Setting a gray value difference range of a color region according to a preset principle, comparing gray values of the color regions of each key image in the original image, classifying the two color regions in the key image in the original image into the same color region set if the gray value difference of the two color regions in the key image in the original image is in the set gray value difference range, and counting to obtain each color region set of each key image in the original image.
The gray values of the color areas in the color area sets in the key images in the original moving picture are obtained, average value calculation is carried out on the gray values of the color areas in the color area sets in the key images in the original moving picture, the reference gray values of the color area sets in the key images in the original moving picture are obtained, the gray values of the color areas in the color area sets in the key images in the original moving picture are set as the reference gray values corresponding to the color area sets, and then color adjustment is carried out on the key images in the original moving picture.
It should be noted that, the gray value difference obtained by comparing the gray values of the color areas in the same color area set in pairs is within the set gray value difference range.
As a preferable scheme, the specific process of performing the size clipping on each frame of image in the original image in the third step is as follows: and marking each key image after color adjustment in the original image as each image to be cut in the original image.
Extracting the reference size of the dynamic diagram display in the browser webpage stored in the database, marking the reference size as the first reference size of the image to be cut, and representing the reference size as
The method comprises the steps of obtaining the size of a computer display screen, comparing the size of the computer display screen with a preset proper size of the dynamic diagram display corresponding to the size range of each computer display screen, screening to obtain the proper size of the dynamic diagram display corresponding to the size of the computer display screen, marking the proper size as a second reference size of an image to be cut, and representing the second reference size as the proper size of the image to be cut
By analysis of formulasObtaining the reference size of the image to be cropped>Wherein->Weights respectively representing a first reference size and a second reference size of a preset image to be cut,/->A correction amount representing a preset reference size of the image to be cut.
And performing size cutting on each image to be cut in the original moving picture according to the reference size of the image to be cut.
And marking each image to be cut after size cutting in the original image as each frame image after the thumbnail processing, and combining each frame image after the thumbnail processing to obtain the preview image.
It should be noted that, the reference size of the drawing display in the browser webpage represents the minimum size of the drawing that can be clearly displayed in the browser webpage.
It should be noted that, the proper size of the icon display corresponding to the size of the computer display screen represents the minimum size of the icon that can be clearly displayed on the computer display screen.
The reference size of the image to be cut includes a reference length and a reference width of the image to be cut, and when the reference size of the image to be cut is obtained, the reference length and the reference width of the image to be cut are calculated respectively.
It should be noted that, the specific analysis process in the third step further includes: the browser creates a moving picture object by using the image data of the preview moving picture, embeds the preview moving picture into the correct position of the webpage through the HTML mark, the CSS style and the layout algorithm, and further enables the preview moving picture to be displayed at the corresponding position of the browser webpage.
It should be noted that HTML markup, CSS style, and layout algorithms can be thought of as three steps in embedding a diagram into a web page, each involving different techniques and methods that cooperate together to ensure that the diagram is properly displayed at a specified location in the web page.
In this embodiment, the invention reduces the frame number of the original moving picture by extracting the key frame to reduce the memory occupation.
In this embodiment, the present invention reduces the color of the original image by performing color adjustment on the image to reduce the file size.
In this embodiment, the invention reduces the file size of the original image by sizing the original image to remove minor portions of the image such as edge margins.
In this embodiment, the method and the device acquire the access map requirements of the user, consider the web page requirements of the browser and the hardware configuration of the computer, and sequentially perform multiple processes of key frame extraction, color adjustment and size clipping on the original map to obtain the preview map, thereby improving the effect of map file compression and further accelerating the display speed of the preview map on the browser.
Step four, the user checks the requirement judgment of the moving picture: and judging whether the user has a requirement for checking the detailed content of the preview moving picture or not by clicking the preview moving picture on a browser interface by the user, and executing the fifth step if the user has the requirement.
As a preferable scheme, the specific process of the fourth step is as follows: and acquiring the position and the clicking times of the user clicking the preview moving picture on the browser interface, comparing the position and the clicking times with the region and the clicking times of the preview moving picture when the preview moving picture detailed content is checked by the user, and if the position and the clicking times are matched with the region and the clicking times, the user has the requirement of checking the preview moving picture detailed content.
Fifthly, acquiring and displaying a fine modification diagram: and obtaining each frame image in the original moving picture, sequentially carrying out de-duplication and resolution adjustment on each frame image in the original moving picture to obtain each frame image after finishing treatment, further combining to obtain a finishing moving picture, and displaying the finishing moving picture on a browser.
As a preferable scheme, the specific process of de-duplicating each frame of image in the original image in the fifth step is as follows: comparing the frame images in the original image to obtain repeated frame images in the original image, and removing the repeated frame images to obtain frame images after the repeated processing of the original image.
Comparing the elements in the frame images after the primary moving image one round of de-duplication processing to obtain repeated elements in the frame images after the primary moving image one round of de-duplication processing, and removing to obtain the frame images after the primary moving image two rounds of de-duplication processing.
It should be noted that, the deduplication processing on the original map includes one round of deduplication processing and two rounds of deduplication processing.
It should be noted that, the specific process of acquiring each frame of image repeated in the original image is as follows: comparing the images in the original image with each other, and if the similarity of two images in the original image is greater than or equal to a preset similarity threshold, the two images in the original image are repeated images of each other.
It should be noted that, the specific process of acquiring each repeated element in the image is as follows: and comparing the elements in the image with each other, and if the similarity of two elements in the image is greater than or equal to a preset similarity threshold value, mutually repeating the two elements in the image.
As a preferable scheme, the specific process of resolution adjustment for each frame of image in the original image in the fifth step is as follows: and marking each frame image obtained by de-duplication in the original image as each image to be processed of the original image.
Obtaining the resolution of the original image, and recording the resolution as
Acquiring screen resolution of a computer, comparing the screen resolution of the computer with a preset suitable resolution of the dynamic diagram display corresponding to each computer screen resolution range, screening to obtain the suitable resolution of the dynamic diagram display corresponding to the computer screen resolution, and recording the suitable resolution as the suitable resolution of the dynamic diagram display
Acquiring the current network speed of the computer and recording the current network speed asAnd the file volume of the original map is obtained and recorded as +.>
By analysis of formulasObtaining a reference resolution of the image to be processed>Wherein->Correction amount representing the reference resolution of the preset image to be processed, +.>Representing natural constant->Threshold value representing a preset computer speed, +.>Representing a preset file volume threshold.
And according to the reference resolution of the images to be processed, performing resolution adjustment on each image to be processed of the original image.
Recording each image to be processed after resolution adjustment in the original image as each frame image after finishing treatment, and combining each frame image after finishing treatment to obtain the finishing image.
It should be noted that, the suitable resolution of the display of the icon corresponding to the resolution of the computer screen represents the minimum resolution at which the icon can be clearly displayed on the screen of the computer display.
It should be noted that, the specific process of the fifth step further includes: the browser creates a moving picture object by using the image data of the finishing picture, embeds the finishing picture into the correct position of the webpage through the HTML mark, the CSS style and the layout algorithm, and further displays the finishing picture at the corresponding position of the browser webpage.
In this embodiment, the present invention reduces the frame number by de-duplicating the original map to reduce the map memory occupation.
In this embodiment, the invention reduces the resolution by performing resolution adjustment on the original map to reduce the map file size.
In the embodiment, the method and the device for displaying the content of the preview dynamic diagram sequentially perform multiple processes of de-duplication and resolution adjustment on the original dynamic diagram by acquiring the requirement of a user for checking the detailed content of the preview dynamic diagram and considering the hardware configuration and the network environment of the computer, so as to obtain the finish dynamic diagram, enhance the compressing effect of the dynamic diagram file and further accelerate the displaying speed of the finish dynamic diagram on a browser.
The foregoing is merely illustrative and explanatory of the principles of this invention, as various modifications and additions may be made to the specific embodiments described, or similar arrangements may be substituted by those skilled in the art, without departing from the principles of this invention or beyond the scope of this invention as defined in the claims.

Claims (6)

1. A method for rapidly displaying massive dynamic planar vector data on a browser is characterized by comprising the following steps:
step one, user access map requirement acquisition: acquiring the requirement of a user for accessing the dynamic diagram through the webpage address containing the dynamic diagram accessed by the user on the browser interface;
step two, downloading and storing an original diagram: according to the requirement of a user for accessing the moving picture, the browser sends an HTTP request to the server, the server searches and positions the requested moving picture file, sends the moving picture file back to the browser as an HTTP response, analyzes and downloads the moving picture file to obtain an original moving picture, and stores the original moving picture in a storage device of the computer;
step three, obtaining and displaying a preview diagram: acquiring each frame image in an original moving picture, sequentially carrying out key frame extraction, color adjustment and size cutting on each frame image in the original moving picture to obtain each frame image after the thumbnail processing, further combining to obtain a preview moving picture, and displaying the preview moving picture on a browser;
the specific process of extracting the key frame of each frame image in the original image in the step three comprises the following steps:
acquiring each frame image in the original image, and sequencing each frame image in the original image according to the sequence of the display time;
acquiring each dynamic element and each static element of each frame image in an original image by using an image processing technology;
comparing each dynamic element of each frame image in the original moving picture with each dynamic element of the next frame image adjacent to the dynamic element, if a certain dynamic element of a certain frame image in the original moving picture is the same as a certain dynamic element of the next frame image adjacent to the certain dynamic element, marking the dynamic element of the frame image in the original moving picture as a marked dynamic element of the frame image in the original moving picture, and counting to obtain each marked dynamic element of each frame image in the original moving picture;
similarly, according to the analysis method of each marking dynamic element of each frame image in the original image, each marking static element of each frame image in the original image is obtained;
establishing a reference coordinate system in each frame of image of the original image according to a preset principle;
acquiring the outline of each marking dynamic element in each frame image in the original image, selecting each sampling point on the outline of each marking dynamic element in each frame image in the original image according to a preset equidistant principle, acquiring the position coordinates of each sampling point on the outline of each marking dynamic element in each frame image in the original image, and marking the position coordinates as,/>Representing +.>Numbering of frame images>,/>Indicate->Number of dynamic element of individual tag,/->,/>Representing +.>Number of sample points>
Acquiring the position coordinates of each sampling point on the outline of each marking dynamic element in each frame image in the original image in the next frame image adjacent to the sampling point, and marking the position coordinates as;
The specific process of extracting the key frame from each frame image in the original image in the step three further comprises:
by analysis of formulasObtaining dynamic element change coefficients of each frame image and the next frame image adjacent to each frame image in the original image ∈ ->Wherein->Representing the number of sampling points on the marked dynamic element profile, is->Representing a preset dynamic element position offset threshold;
similarly, according to the analysis method of the dynamic element change coefficients of each frame image and the next frame image adjacent to each frame image in the original image, the static element change coefficients of each frame image and the next frame image adjacent to each frame image in the original image are obtained and recorded as
By analysis of formulasObtaining each frame image and the next adjacent frame image in the original imageDifference index ∈of frame image>Wherein->Weight factors respectively representing preset dynamic elements and static elements, < ->;
The specific process of extracting the key frame from each frame image in the original image in the step three further comprises:
comparing the difference index of each frame image in the original moving picture with the difference index threshold value of the next frame image adjacent to the frame image, if the difference index of a certain frame image in the original moving picture and the next frame image adjacent to the frame image is larger than or equal to the difference index threshold value, marking the frame image in the original moving picture as a key image, and reserving the key image, otherwise marking the frame image in the original moving picture as a non-key image, deleting the non-key image, and counting to obtain each key frame in the original moving picture;
step four, the user checks the requirement judgment of the moving picture: judging whether the user has a requirement for checking the detailed content of the preview image or not by clicking the preview image on a browser interface by the user, and executing the fifth step if the user has the requirement;
fifthly, acquiring and displaying a fine modification diagram: and obtaining each frame image in the original moving picture, sequentially carrying out de-duplication and resolution adjustment on each frame image in the original moving picture to obtain each frame image after finishing treatment, further combining to obtain a finishing moving picture, and displaying the finishing moving picture on a browser.
2. The method for quickly displaying massive dynamic planar vector data on a browser according to claim 1, wherein the method comprises the following steps: the specific process of performing color adjustment on each frame of image in the original image in the step three is as follows:
obtaining areas corresponding to gray values in each key image in the original image by using an image processing technology, and marking the areas as color areas of each key image in the original image;
setting a gray value difference range of a color region according to a preset principle, comparing gray values of the color regions of each key image in the original image, classifying the two color regions in the key image in the original image into the same color region set if the gray value difference of the two color regions in the key image in the original image is in the set gray value difference range, and counting to obtain each color region set of each key image in the original image;
the gray values of the color areas in the color area sets in the key images in the original moving picture are obtained, average value calculation is carried out on the gray values of the color areas in the color area sets in the key images in the original moving picture, the reference gray values of the color area sets in the key images in the original moving picture are obtained, the gray values of the color areas in the color area sets in the key images in the original moving picture are set as the reference gray values corresponding to the color area sets, and then color adjustment is carried out on the key images in the original moving picture.
3. The method for quickly displaying massive dynamic planar vector data on a browser according to claim 1, wherein the method comprises the following steps: in the third step, the specific process of performing size clipping on each frame of image in the original image is as follows:
marking each key image after color adjustment in the original image as each image to be cut in the original image;
extracting the reference size of the dynamic diagram display in the browser webpage stored in the database, marking the reference size as the first reference size of the image to be cut, and representing the reference size as
The method comprises the steps of obtaining the size of a computer display screen, comparing the size of the computer display screen with a preset suitable size of a moving picture display corresponding to the size range of each computer display screen, and screening to obtain a computer display screen size pairThe corresponding map shows the appropriate size, which is noted as the second reference size of the image to be cropped and is expressed as
By analysis of formulasObtaining the reference size of the image to be cropped>WhereinWeights respectively representing a first reference size and a second reference size of a preset image to be cut,/->A correction amount indicating a preset reference size of the image to be cut;
performing size cutting on each image to be cut in the original moving picture according to the reference size of the image to be cut;
and marking each image to be cut after size cutting in the original image as each frame image after the thumbnail processing, and combining each frame image after the thumbnail processing to obtain the preview image.
4. The method for quickly displaying massive dynamic planar vector data on a browser according to claim 1, wherein the method comprises the following steps: the specific process of the fourth step is as follows:
and acquiring the position and the clicking times of the user clicking the preview moving picture on the browser interface, comparing the position and the clicking times with the region and the clicking times of the preview moving picture when the preview moving picture detailed content is checked by the user, and if the position and the clicking times are matched with the region and the clicking times, the user has the requirement of checking the preview moving picture detailed content.
5. The method for quickly displaying massive dynamic planar vector data on a browser according to claim 1, wherein the method comprises the following steps: in the fifth step, the specific process of de-duplicating each frame of image in the original image is as follows:
comparing the frame images in the original image to obtain repeated frame images in the original image, and removing the repeated frame images to obtain frame images after the original image is subjected to a round of de-duplication treatment;
comparing the elements in the frame images after the primary moving image one round of de-duplication processing to obtain repeated elements in the frame images after the primary moving image one round of de-duplication processing, and removing to obtain the frame images after the primary moving image two rounds of de-duplication processing.
6. The method for quickly displaying massive dynamic planar vector data on a browser according to claim 1, wherein the method comprises the following steps: in the fifth step, the specific process of adjusting the resolution of each frame of image in the original image is as follows:
marking each frame image obtained by de-duplication in the original image as each image to be processed of the original image;
obtaining the resolution of the original image, and recording the resolution as
Acquiring screen resolution of a computer, comparing the screen resolution of the computer with a preset suitable resolution of the dynamic diagram display corresponding to each computer screen resolution range, screening to obtain the suitable resolution of the dynamic diagram display corresponding to the computer screen resolution, and recording the suitable resolution as the suitable resolution of the dynamic diagram display
Acquiring the current network speed of the computer and recording the current network speed asAnd the file volume of the original map is obtained and recorded as +.>
By analysis of formulasObtaining a reference resolution of the image to be processed>Wherein->Correction amount representing the reference resolution of the preset image to be processed, +.>Representing natural constant->Threshold value representing a preset computer speed, +.>Representing a preset file volume threshold;
according to the reference resolution of the images to be processed, performing resolution adjustment on each image to be processed of the original image;
recording each image to be processed after resolution adjustment in the original image as each frame image after finishing treatment, and combining each frame image after finishing treatment to obtain the finishing image.
CN202311196647.1A 2023-09-18 2023-09-18 Method for rapidly displaying massive dynamic planar vector data on browser Active CN116955873B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311196647.1A CN116955873B (en) 2023-09-18 2023-09-18 Method for rapidly displaying massive dynamic planar vector data on browser

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311196647.1A CN116955873B (en) 2023-09-18 2023-09-18 Method for rapidly displaying massive dynamic planar vector data on browser

Publications (2)

Publication Number Publication Date
CN116955873A CN116955873A (en) 2023-10-27
CN116955873B true CN116955873B (en) 2023-12-08

Family

ID=88456785

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311196647.1A Active CN116955873B (en) 2023-09-18 2023-09-18 Method for rapidly displaying massive dynamic planar vector data on browser

Country Status (1)

Country Link
CN (1) CN116955873B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102804735A (en) * 2011-03-17 2012-11-28 广州市动景计算机科技有限公司 Browser pre-fetching method and system thereof
US8887085B1 (en) * 2008-03-20 2014-11-11 Amazon Technologies, Inc. Dynamic content navigation
CN104205098A (en) * 2012-02-05 2014-12-10 苹果公司 Navigating among content items in a browser using an array mode
CN105426069A (en) * 2014-09-12 2016-03-23 三星电子株式会社 Method And Apparatus For Generating Preview Data
CN113923504A (en) * 2021-12-02 2022-01-11 阿里巴巴达摩院(杭州)科技有限公司 Video preview moving picture generation method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8887085B1 (en) * 2008-03-20 2014-11-11 Amazon Technologies, Inc. Dynamic content navigation
CN102804735A (en) * 2011-03-17 2012-11-28 广州市动景计算机科技有限公司 Browser pre-fetching method and system thereof
CN104205098A (en) * 2012-02-05 2014-12-10 苹果公司 Navigating among content items in a browser using an array mode
CN105426069A (en) * 2014-09-12 2016-03-23 三星电子株式会社 Method And Apparatus For Generating Preview Data
CN113923504A (en) * 2021-12-02 2022-01-11 阿里巴巴达摩院(杭州)科技有限公司 Video preview moving picture generation method and device

Also Published As

Publication number Publication date
CN116955873A (en) 2023-10-27

Similar Documents

Publication Publication Date Title
CN107958030B (en) Video cover recommendation model optimization method and device
CN109784181B (en) Picture watermark identification method, device, equipment and computer readable storage medium
US8200037B2 (en) Importance guided image transformation
US11681745B2 (en) Digital image presentation
CN111950056B (en) BIM display method and related equipment for building informatization model
JP6419969B2 (en) Method and apparatus for providing image presentation information
CN111182367A (en) Video generation method and device and computer system
CN110188216B (en) Photo live broadcasting system with character recognition and method thereof
CN110688524A (en) Video retrieval method and device, electronic equipment and storage medium
CN110149529A (en) Processing method, server and the storage medium of media information
CN111652142A (en) Topic segmentation method, device, equipment and medium based on deep learning
CN111062854A (en) Method, device, terminal and storage medium for detecting watermark
CN111741329B (en) Video processing method, device, equipment and storage medium
CN113033677A (en) Video classification method and device, electronic equipment and storage medium
CN113657370B (en) Character recognition method and related equipment thereof
CN116955873B (en) Method for rapidly displaying massive dynamic planar vector data on browser
JP2020502710A (en) Web page main image recognition method and apparatus
CN106557529B (en) Display method and device for jump page in page jump
CN111079624A (en) Method, device, electronic equipment and medium for collecting sample information
CN113905188B (en) Video stitching dynamic adjustment method, system, electronic device and storage medium
CN103425685A (en) Method and device for having access to paper media
US20190197986A1 (en) Methods for dynamically providing an image to be displayed
CN113657369B (en) Character recognition method and related equipment thereof
CN112487943B (en) Key frame de-duplication method and device and electronic equipment
US11468658B2 (en) Systems and methods for generating typographical images or videos

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
GR01 Patent grant
GR01 Patent grant