CN114066710A - Image generation method and system of occupation map - Google Patents
Image generation method and system of occupation map Download PDFInfo
- Publication number
- CN114066710A CN114066710A CN202210045892.1A CN202210045892A CN114066710A CN 114066710 A CN114066710 A CN 114066710A CN 202210045892 A CN202210045892 A CN 202210045892A CN 114066710 A CN114066710 A CN 114066710A
- Authority
- CN
- China
- Prior art keywords
- image
- image resource
- task
- parameter data
- resource
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T1/00—General purpose image data processing
- G06T1/0021—Image watermarking
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/955—Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T1/00—General purpose image data processing
- G06T1/20—Processor architectures; Processor configuration, e.g. pipelining
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- General Engineering & Computer Science (AREA)
- Image Processing (AREA)
Abstract
The invention relates to a method and a system for generating an image occupying a bitmap. The method comprises the steps of creating an image resource generation task and a corresponding task ID by using a placeholder device; generating image resources according to parameter data input by a user in an image resource generation task; the parameter data includes: the method comprises the steps of obtaining the length and width pixels of image resources, the background color value of the image resources, the text content of the image resources, the color value of the text content of the image resources, the watermark map URL of the image resources, a file binary stream, the position of the watermark map of the image resources and the size of the watermark map of the image resources; generating an image resource link according to the task ID of the image resource generation task, the parameter data input by the user and the corresponding image resource; and acquiring the corresponding image resource according to the image resource link. The invention can avoid repeatedly generating image resources and improve the loading speed.
Description
Technical Field
The invention relates to the technical field of computers, in particular to a method and a system for generating an image occupying a bitmap.
Background
With the popularization of information technology, a wide variety of websites and app applications are currently filled on the internet, and there are a lot of image resources to be loaded in the applications. However, when the user loads the application for the first time or the network of the user is delayed, a problem of slow loading of a large amount of image resources occurs in the application, so that the browsing experience of the user is poor. Therefore, most of applications in the market replace the image resources which are not loaded completely by using a mode of occupying a bitmap, so that a user can expect the loaded image resources in advance. The occupation maps commonly used at present have the following two schemes:
(1) loading locally known size image assets in an application
In the application construction process, a set of low-quality images with known sizes are preprocessed for image resources at various positions of a page and stored to the local of an application, and the images are repeatedly referenced in the application. According to the technology, the image resources are generated locally in the application in advance, and the reference is carried out in the application page, so that the user can expect the loaded image resources before the page image resources are loaded. But this approach requires that the low quality pictures be processed and stored locally uniformly for different sizes of image resources in all pages in the application. Therefore, the above techniques are full of a lot of repeated work, and directly affect the development progress of the application.
(2) Loading in an application image resources generated by a device occupying a bitmap
By means of the existing or self-developed placeholder map device on the network, image resources corresponding to parameter data are generated according to different parameters, and image resource links are introduced into the application, so that the image resources of the placeholder map device can be loaded in advance before the image resources of the application page are loaded. By means of the image synthesis technology, the corresponding parameter data image resources are generated according to the image parameter data transmitted by the user on the links, and the work that an application developer repeatedly generates the image resources in the process of construction is avoided. But this approach requires repeated references in the code to the links that generate the image parameter data. The placeholder map device always needs to generate images according to the repeatability of the request parameter data, and the situation that the loading of image resources is slow is easily caused, and the placeholder map device inevitably returns to the initial problem.
Disclosure of Invention
The invention aims to provide a method and a system for generating an image occupying bitmap, which can avoid repeated generation of image resources and improve the loading speed.
In order to achieve the purpose, the invention provides the following scheme:
an image generation method occupying a bitmap, comprising:
creating an image resource generation task and a corresponding task ID by using a placeholder device;
generating image resources according to parameter data input by a user in an image resource generation task; the parameter data includes: the method comprises the steps of obtaining the length and width pixels of image resources, the background color value of the image resources, the text content of the image resources, the color value of the text content of the image resources, the watermark map URL of the image resources, a file binary stream, the position of the watermark map of the image resources and the size of the watermark map of the image resources;
generating an image resource link according to the task ID of the image resource generation task, the parameter data input by the user and the corresponding image resource;
and acquiring the corresponding image resource according to the image resource link.
Optionally, the creating an image resource generation task and a corresponding task ID by using a placeholder device previously further includes:
searching according to the parameter data input by the user, and if the image resource generation task does not have corresponding parameter data, creating the image resource generation task; and if the corresponding parameter data exists in the image resource generation task, acquiring the image resource generation task.
Optionally, the generating an image resource according to parameter data input by a user in the image resource generation task further includes:
and verifying the parameter data input by the user in a regular mode.
Optionally, the generating an image resource according to parameter data input by a user in the image resource generation task specifically includes:
judging whether the parameter data input by the user has an image resource watermark URL or not; if the image resource watermark pattern exists, acquiring binary stream data corresponding to the URL of the image resource watermark pattern, and generating an image stream according to the binary stream data; if the binary stream does not exist, acquiring a file binary stream, and generating an image stream according to the file binary stream;
determining the coordinate of the watermark in the generated image stream according to the position of the image resource watermark image, the size of the image resource watermark image and the size of the generated image resource;
and linearly mixing the image stream and the coordinates of the watermark in the generated image resource to generate the image resource.
Optionally, the generating an image resource link according to the task ID of the image resource generation task, the parameter data input by the user, and the corresponding image resource further includes:
and storing the task ID of the image resource generation task, the parameter data input by the user, the corresponding image resource and the corresponding image resource link.
An image generation system occupying a bitmap, comprising:
the task creating unit is used for creating an image resource generating task and a corresponding task ID by using the placeholder device;
an image synthesis unit for generating an image resource from parameter data input by a user in an image resource generation task; the parameter data includes: the method comprises the steps of obtaining the length and width pixels of image resources, the background color value of the image resources, the text content of the image resources, the color value of the text content of the image resources, the watermark map URL of the image resources, a file binary stream, the position of the watermark map of the image resources and the size of the watermark map of the image resources;
the image resource link generating unit is used for generating an image resource link according to the task ID of the image resource generating task, the parameter data input by the user and the corresponding image resource;
and the data reference unit is used for acquiring the corresponding image resource according to the image resource link.
Optionally, the method further comprises:
the data searching unit is used for searching according to the parameter data input by the user, and if the image resource generating task does not have corresponding parameter data, the image resource generating task is created; and if the corresponding parameter data exists in the image resource generation task, acquiring the image resource generation task.
Optionally, the method further comprises:
and the parameter data checking unit is used for checking the parameter data input by the user in a regular mode.
Optionally, the method further comprises:
and the data storage unit is used for storing the task ID of the image resource generation task, the parameter data input by the user, the corresponding image resource and the corresponding image resource link.
According to the specific embodiment provided by the invention, the invention discloses the following technical effects:
according to the image generation method and system occupying the bitmap, provided by the invention, a user can modify and adjust the parameter data of the image resource according to the created image resource generation task, and the image resource characteristics returned by the unique link are changed persistently in the response result of the unique link. The problem of repeated generation of image resources is substantially solved. And in the process of quoting, the image resources are not repeatedly generated any more, but the synthesized image resources are preferentially searched from a memory, a database and a local disk through image resource links and previewed after response.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed to be used in 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 it is obvious for those skilled in the art to obtain other drawings without inventive exercise.
FIG. 1 is a schematic flow chart of an image generation method of a occupation map according to the present invention;
fig. 2 is a schematic structural diagram of an image generation system of a placeholder map provided in the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The invention aims to provide a method and a system for generating an image occupying bitmap, which can avoid repeated generation of image resources and improve the loading speed.
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
Fig. 1 is a schematic flow chart of an image generation method of a occupation bitmap provided by the present invention, and as shown in fig. 1, the image generation method of the occupation bitmap provided by the present invention includes:
s101, creating an image resource generation task and a corresponding task ID by using a placeholder device;
before S101, the method further includes:
searching according to the parameter data input by the user, and if the image resource generation task does not have corresponding parameter data, creating the image resource generation task; and if the corresponding parameter data exists in the image resource generation task, acquiring the image resource generation task.
S102, generating image resources according to parameter data input by a user in an image resource generation task; the parameter data includes, but is not limited to: the method comprises the steps of obtaining the length and width pixels of image resources, the background color value of the image resources, the text content of the image resources, the color value of the text content of the image resources, the watermark map URL of the image resources, a file binary stream, the position of the watermark map of the image resources and the size of the watermark map of the image resources;
in order to verify whether the parameter data input by the user meets the parameter data specification, before performing the real-time feedback S102, the method further includes:
and verifying the parameter data input by the user in a regular mode.
S102 specifically comprises the following steps:
judging whether the parameter data input by the user has an image resource watermark URL or not; if the image resource watermark pattern exists, acquiring binary stream data corresponding to the URL of the image resource watermark pattern, and generating an image stream according to the binary stream data; if the binary stream does not exist, acquiring a file binary stream, and generating an image stream according to the file binary stream;
determining the coordinate of the watermark in the generated image stream according to the position of the image resource watermark image, the size of the image resource watermark image and the size of the generated image resource;
and linearly mixing the image stream and the coordinates of the watermark in the generated image resource to generate the image resource.
S103, generating an image resource link according to the task ID of the image resource generation task, the parameter data input by the user and the corresponding image resource;
after S103, further comprising:
and storing the task ID of the image resource generation task, the parameter data input by the user, the corresponding image resource and the corresponding image resource link. I.e., to local disks, databases, and memory.
And S104, acquiring the corresponding image resource according to the image resource link.
In the process of page reference, whether the generated image resource link exists in the memory, the local disk and the database of the server where the placeholder map device is located or not is sequentially searched, and if the resources are inquired, the image resources are returned to the requester.
The user can modify and adjust the parameter data of the image resources according to the created image resource generating task, and persistently change the image resource characteristics returned by the unique link in the response result of the unique link. The problem of repeated generation of image resources is substantially solved.
Fig. 2 is a schematic structural diagram of an image generation system of a placeholder map provided by the present invention, and as shown in fig. 2, the image generation system of the placeholder map provided by the present invention includes:
a task creating unit 201, configured to create an image resource generation task and a corresponding task ID by using a placeholder device;
an image composition unit 202 for generating an image resource from parameter data input by a user in an image resource generation task; the parameter data includes: the method comprises the steps of obtaining the length and width pixels of image resources, the background color value of the image resources, the text content of the image resources, the color value of the text content of the image resources, the watermark map URL of the image resources, a file binary stream, the position of the watermark map of the image resources and the size of the watermark map of the image resources;
an image resource link generating unit 203, configured to generate an image resource link according to the task ID of the image resource generation task, the parameter data input by the user, and the corresponding image resource;
and the data reference unit 204 is configured to obtain a corresponding image resource according to the image resource link.
The invention provides an image generation system occupying bitmap, which further comprises:
the data searching unit is used for searching according to the parameter data input by the user, and if the image resource generating task does not have corresponding parameter data, the image resource generating task is created; and if the corresponding parameter data exists in the image resource generation task, acquiring the image resource generation task.
The invention provides an image generation system occupying bitmap, which further comprises:
and the parameter data checking unit is used for checking the parameter data input by the user in a regular mode.
The invention provides an image generation system occupying bitmap, which further comprises:
and the data storage unit is used for storing the task ID of the image resource generation task, the parameter data input by the user, the corresponding image resource and the corresponding image resource link.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. For the system disclosed by the embodiment, the description is relatively simple because the system corresponds to the method disclosed by the embodiment, and the relevant points can be referred to the method part for description.
The principles and embodiments of the present invention have been described herein using specific examples, which are provided only to help understand the method and the core concept of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, the specific embodiments and the application range may be changed. In view of the above, the present disclosure should not be construed as limiting the invention.
Claims (9)
1. An image generation method occupying a bitmap, comprising:
creating an image resource generation task and a corresponding task ID by using a placeholder device;
generating image resources according to parameter data input by a user in an image resource generation task; the parameter data includes: the method comprises the steps of obtaining the length and width pixels of image resources, the background color value of the image resources, the text content of the image resources, the color value of the text content of the image resources, the watermark map URL of the image resources, a file binary stream, the position of the watermark map of the image resources and the size of the watermark map of the image resources;
generating an image resource link according to the task ID of the image resource generation task, the parameter data input by the user and the corresponding image resource;
and acquiring the corresponding image resource according to the image resource link.
2. The method of claim 1, wherein creating the image resource generation task and the corresponding task ID with the placeholder device further comprises:
searching according to the parameter data input by the user, and if the image resource generation task does not have corresponding parameter data, creating the image resource generation task; and if the corresponding parameter data exists in the image resource generation task, acquiring the image resource generation task.
3. The method for generating an image occupying map according to claim 1, wherein the generating an image resource according to the parameter data input by the user in the task of generating an image resource further comprises:
and verifying the parameter data input by the user in a regular mode.
4. The method for generating an image occupying map according to claim 1, wherein the generating an image resource according to parameter data input by a user in an image resource generation task specifically includes:
judging whether the parameter data input by the user has an image resource watermark URL or not; if the image resource watermark pattern exists, acquiring binary stream data corresponding to the URL of the image resource watermark pattern, and generating an image stream according to the binary stream data; if the binary stream does not exist, acquiring a file binary stream, and generating an image stream according to the file binary stream;
determining the coordinate of the watermark in the generated image stream according to the position of the image resource watermark image, the size of the image resource watermark image and the size of the generated image resource;
and linearly mixing the image stream and the coordinates of the watermark in the generated image resource to generate the image resource.
5. The method for generating an image occupying bitmap according to claim 1, wherein the generating of the image resource link according to the task ID of the image resource generation task, the parameter data input by the user, and the corresponding image resource further comprises:
and storing the task ID of the image resource generation task, the parameter data input by the user, the corresponding image resource and the corresponding image resource link.
6. An image generation system occupying a bitmap, comprising:
the task creating unit is used for creating an image resource generating task and a corresponding task ID by using the placeholder device;
an image synthesis unit for generating an image resource from parameter data input by a user in an image resource generation task; the parameter data includes: the method comprises the steps of obtaining the length and width pixels of image resources, the background color value of the image resources, the text content of the image resources, the color value of the text content of the image resources, the watermark map URL of the image resources, a file binary stream, the position of the watermark map of the image resources and the size of the watermark map of the image resources;
the image resource link generating unit is used for generating an image resource link according to the task ID of the image resource generating task, the parameter data input by the user and the corresponding image resource;
and the data reference unit is used for acquiring the corresponding image resource according to the image resource link.
7. The image generation system of a occupation map according to claim 6, further comprising:
the data searching unit is used for searching according to the parameter data input by the user, and if the image resource generating task does not have corresponding parameter data, the image resource generating task is created; and if the corresponding parameter data exists in the image resource generation task, acquiring the image resource generation task.
8. The image generation system of a occupation map according to claim 6, further comprising:
and the parameter data checking unit is used for checking the parameter data input by the user in a regular mode.
9. The image generation system of a occupation map according to claim 6, further comprising:
and the data storage unit is used for storing the task ID of the image resource generation task, the parameter data input by the user, the corresponding image resource and the corresponding image resource link.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210045892.1A CN114066710A (en) | 2022-01-17 | 2022-01-17 | Image generation method and system of occupation map |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210045892.1A CN114066710A (en) | 2022-01-17 | 2022-01-17 | Image generation method and system of occupation map |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114066710A true CN114066710A (en) | 2022-02-18 |
Family
ID=80230914
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210045892.1A Pending CN114066710A (en) | 2022-01-17 | 2022-01-17 | Image generation method and system of occupation map |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114066710A (en) |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103092615A (en) * | 2013-01-09 | 2013-05-08 | 北京小米科技有限责任公司 | Task preview method and device |
CN104281995A (en) * | 2014-10-28 | 2015-01-14 | 新华瑞德(北京)网络科技有限公司 | Method and device for adding watermark to picture |
CN106651992A (en) * | 2016-11-18 | 2017-05-10 | 武汉斗鱼网络科技有限公司 | Method and system for optimizing Android resource picture |
CN107197353A (en) * | 2017-05-24 | 2017-09-22 | 环球智达科技(北京)有限公司 | The processing method of the occupy-place figure of interface images |
CN110807162A (en) * | 2018-07-20 | 2020-02-18 | 北京京东尚科信息技术有限公司 | Method and device for loading occupation bitmap |
CN110990014A (en) * | 2019-12-12 | 2020-04-10 | 深圳市卡牛科技有限公司 | Method and device for generating page code of skeleton screen, server and storage medium |
CN111669615A (en) * | 2020-05-13 | 2020-09-15 | 北京奇艺世纪科技有限公司 | Video stream processing method and device |
CN111698237A (en) * | 2020-06-05 | 2020-09-22 | 浙江华途信息安全技术股份有限公司 | Method and system for adding watermark to WEB page |
CN112417339A (en) * | 2020-12-02 | 2021-02-26 | 北京齐尔布莱特科技有限公司 | Page loading method and device, computing equipment and readable storage medium |
CN113342434A (en) * | 2021-05-24 | 2021-09-03 | 上海万物新生环保科技集团有限公司 | Visualization method and device for display occupation of display object |
-
2022
- 2022-01-17 CN CN202210045892.1A patent/CN114066710A/en active Pending
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103092615A (en) * | 2013-01-09 | 2013-05-08 | 北京小米科技有限责任公司 | Task preview method and device |
CN104281995A (en) * | 2014-10-28 | 2015-01-14 | 新华瑞德(北京)网络科技有限公司 | Method and device for adding watermark to picture |
CN106651992A (en) * | 2016-11-18 | 2017-05-10 | 武汉斗鱼网络科技有限公司 | Method and system for optimizing Android resource picture |
CN107197353A (en) * | 2017-05-24 | 2017-09-22 | 环球智达科技(北京)有限公司 | The processing method of the occupy-place figure of interface images |
CN110807162A (en) * | 2018-07-20 | 2020-02-18 | 北京京东尚科信息技术有限公司 | Method and device for loading occupation bitmap |
CN110990014A (en) * | 2019-12-12 | 2020-04-10 | 深圳市卡牛科技有限公司 | Method and device for generating page code of skeleton screen, server and storage medium |
CN111669615A (en) * | 2020-05-13 | 2020-09-15 | 北京奇艺世纪科技有限公司 | Video stream processing method and device |
CN111698237A (en) * | 2020-06-05 | 2020-09-22 | 浙江华途信息安全技术股份有限公司 | Method and system for adding watermark to WEB page |
CN112417339A (en) * | 2020-12-02 | 2021-02-26 | 北京齐尔布莱特科技有限公司 | Page loading method and device, computing equipment and readable storage medium |
CN113342434A (en) * | 2021-05-24 | 2021-09-03 | 上海万物新生环保科技集团有限公司 | Visualization method and device for display occupation of display object |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9507480B1 (en) | Interface optimization application | |
CN106155673B (en) | Method, device, server and user equipment for realizing page content editor | |
JP4913777B2 (en) | Web page distribution system | |
CN1398377A (en) | System and method for delivering and rendering scalable web pages | |
CN107766532A (en) | A kind of front end Node.js automates positive static method | |
US20050262425A1 (en) | Method and system for Java Gantt/Bar chart rendering | |
CN105447096A (en) | Web page generation method and apparatus | |
US8516041B1 (en) | Pre-fetching asynchronously requested content | |
CN110516186A (en) | Page skeleton automatic generating method, equipment, storage medium and device | |
CN102547450B (en) | Delayed image decoding | |
CN106033361A (en) | Method and device for showing application page, and method and device for updating application page data | |
CN110765284A (en) | Method, system, computing device and storage medium for generating presentation | |
CN109976827B (en) | Model loading method, server and terminal | |
US10417317B2 (en) | Web page profiler | |
CN104391868A (en) | Staticizing device and method for dynamic page | |
KR20150095658A (en) | Preserving layout of region of content during modification | |
CN106648821B (en) | Webpage optimization method and device | |
CN112307385A (en) | Webpage data loading and processing method and device, electronic equipment and storage medium | |
JP7248802B2 (en) | Rendering video with dynamic components | |
CN114066710A (en) | Image generation method and system of occupation map | |
US20140331117A1 (en) | Application-based dependency graph | |
CN105469437A (en) | Client-side Flash film manufacturing method, device and system | |
CN116110065A (en) | Method, device, computer equipment and storage medium for generating question card data | |
CN115658056A (en) | Front-end VUE code automatic generation method and system based on picture | |
CN115758016A (en) | Webpage content staticizing processing method and system |
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 |
Application publication date: 20220218 |
|
RJ01 | Rejection of invention patent application after publication |