Movatterモバイル変換


[0]ホーム

URL:


CN112035774A - Network page generation method and device, computer equipment and readable storage medium - Google Patents

Network page generation method and device, computer equipment and readable storage medium
Download PDF

Info

Publication number
CN112035774A
CN112035774ACN202010904482.9ACN202010904482ACN112035774ACN 112035774 ACN112035774 ACN 112035774ACN 202010904482 ACN202010904482 ACN 202010904482ACN 112035774 ACN112035774 ACN 112035774A
Authority
CN
China
Prior art keywords
information
image
picture
template
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010904482.9A
Other languages
Chinese (zh)
Inventor
章亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Pingan Payment Technology Service Co Ltd
Original Assignee
Pingan Payment Technology Service 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 Pingan Payment Technology Service Co LtdfiledCriticalPingan Payment Technology Service Co Ltd
Priority to CN202010904482.9ApriorityCriticalpatent/CN112035774A/en
Publication of CN112035774ApublicationCriticalpatent/CN112035774A/en
Pendinglegal-statusCriticalCurrent

Links

Images

Classifications

Landscapes

Abstract

Translated fromChinese

本发明涉及人工智能,公开了一种网络页面生成方法、装置、计算机设备及可读存储介质,包括:获取待处理信息,提取与待处理信息对应的模板,并将该模板设为目标模板;提取待处理信息中的文案信息和原始图片,将文案信息录入文案堆栈中,及将原始图片录入图像堆栈中;获取修改信息,根据修改信息对图像堆栈中的原始图片进行透明化处理裁剪、和/或裁剪、和/或尺寸修改,获得目标图片并将其保存在图像堆栈中;提取文案堆栈中的文案信息和图像堆栈中的目标图片,将文案信息写入目标模板的文案部分,及将图片载入目标模板的图像部分获得网络页面。本发明提高了网络页面生成效率,解决了用户无法通过修改网络页面中图像的获得其需要的展示效果的问题。

Figure 202010904482

The invention relates to artificial intelligence, and discloses a network page generation method, device, computer equipment and readable storage medium, comprising: acquiring information to be processed, extracting a template corresponding to the information to be processed, and setting the template as a target template; Extract the copy information and the original image in the information to be processed, enter the copy information into the copy stack, and enter the original image into the image stack; obtain modification information, perform transparent processing and cropping on the original image in the image stack according to the modification information, and / or cropping, and/or size modification, obtaining the target image and saving it in the image stack; extracting the copy information in the copy stack and the target image in the image stack, writing the copy information into the copy part of the target template, and adding The image is loaded into the image portion of the target template to obtain the web page. The invention improves the generation efficiency of the web page, and solves the problem that the user cannot obtain the desired display effect by modifying the images in the web page.

Figure 202010904482

Description

Network page generation method and device, computer equipment and readable storage medium
Technical Field
The invention relates to the technical field of artificial intelligence image detection, in particular to a network page generation method and device, computer equipment and a readable storage medium.
Background
The main electricity merchant platform products are constantly updated, activities are increasingly popularized, commodity activity pictures are basically drawn manually, time and labor are consumed in manual drawing, and required network pages cannot be generated quickly and efficiently, so that part of e-commerce platforms generate the required network pages in a mode of inputting information into preset templates.
However, the inventor has realized that the template for generating the web page currently provided only has a document input box and an image input box, so that the document information needs to be manually entered into the document input box, and meanwhile, the picture in the image input box cannot be modified, so that the process of generating the web page is not only inefficient and laborious, but also the user cannot obtain the required display effect by modifying the image in the web page.
Disclosure of Invention
The invention aims to provide a network page generation method, a network page generation device, computer equipment and a readable storage medium, which are used for solving the problems that the process of generating a network page is not efficient and labor-consuming, and a user cannot obtain the required display effect by modifying images in the network page in the prior art.
In order to achieve the above object, the present invention provides a method for generating a web page, including:
acquiring information to be processed, extracting a template corresponding to the information to be processed from a preset database, and setting the template as a target template;
extracting the file information and the original picture in the information to be processed, inputting the file information into a preset file stack, and inputting the original picture into a preset image stack;
acquiring modification information, performing transparent processing cutting and/or size modification on an original picture in the image stack according to the modification information to obtain a target picture, and storing the target picture in the image stack;
and extracting the pattern information in the pattern stack and the target picture in the image stack, writing the pattern information into the pattern part of the target template, and loading the picture into the image part of the target template to obtain the network page.
In the above scheme, before the information to be processed is acquired, the method includes:
a database is created for holding templates, wherein the templates are stored in the database in a key-value pair storage form.
In the above scheme, the step of obtaining the information to be processed includes:
sending a bullet frame to be processed to a user side, wherein the bullet frame to be processed is used for recording information to be processed written by the user side;
and receiving the information to be processed, which is input and sent in the bullet frame to be processed by the user side.
In the above scheme, the step of extracting the template corresponding to the information to be processed from the preset database includes:
extracting target information in the information to be processed, wherein the target information is information reflecting the type of the information to be processed;
and identifying template information consistent with the target information from a database, and extracting a template corresponding to the template information, wherein the template information reflects the type of the template.
In the above scheme, the step of obtaining modification information, and performing transparency processing clipping, and/or size modification on the original picture in the image stack according to the modification information to obtain a target picture includes:
judging whether the modification information has transparentization information;
if the transparent information exists, carrying out transparency processing on the original pictures in the image stack according to the transparency information to obtain transparent pictures and storing the transparent pictures in the image stack;
if the transparent information does not exist or the transparent picture is obtained, judging whether the modification information has cutting information;
if the transparent pictures or the original pictures in the image stack have the cutting information, cutting the transparent pictures or the original pictures in the image stack according to the cutting information to obtain the cut pictures and storing the cut pictures in the image stack;
if the modified information does not have the cutting information or the cutting picture is obtained, judging whether the modified information has size information;
if the size information exists, modifying the size of the transparentized picture, or cutting the picture or the original picture in the image stack according to the size information to obtain a target picture;
and if the picture does not have the size information, setting the transparentized picture, the cut picture or the original picture as a target picture.
In the above scheme, the transparentizing process is a picture processing operation of changing RGB of a pixel into an RGBA four-channel color attribute by an opencv algorithm to set the transparency of an original picture;
the cropping information is a selected area formed on the original picture;
cutting the transparent picture or the original picture in the image stack according to the cutting information to obtain a cut picture and storing the cut picture in the image stack, wherein the cutting comprises the following steps:
and cutting the original picture according to cutting information by an opencv algorithm to form a cut picture, wherein the cutting information comprises starting point information, a selected length and a selected width, the starting point coordinates are coordinates of vertexes in the selected area, the selected length is the length size of the selected area, and the selected width is the width size of the selected area.
In the above solution, the step of writing the document information into the document part of the target template includes:
identifying metadata in the file information, and extracting file contents corresponding to the metadata;
identifying a file label matched with the metadata in the file part, and writing the file content into a text box corresponding to the file label;
after the picture is loaded into the image part of the target template to obtain a network page, the method further comprises the following steps:
and uploading the network page to a block chain.
In order to achieve the above object, the present invention further provides a web page generating device, including:
the template extraction module is used for acquiring information to be processed, extracting a template corresponding to the information to be processed from a preset database, and setting the template as a target template;
the file and picture management module is used for extracting file information and original pictures in the information to be processed, inputting the file information into a preset file stack, and inputting the original pictures into a preset image stack;
the image processing module is used for acquiring modification information, performing transparent processing cutting and/or size modification on an original image in the image stack according to the modification information to obtain a target image, and storing the target image in the image stack;
and the page generation module is used for extracting the file information in the file stack and the target picture in the image stack, writing the file information into the file part of the target template, and loading the picture into the image part of the target template to obtain the network page.
To achieve the above object, the present invention further provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor of the computer device implements the steps of the above network page generation method when executing the computer program.
In order to achieve the above object, the present invention further provides a computer-readable storage medium, in which a computer program is stored, and the computer program stored in the computer-readable storage medium, when executed by a processor, implements the steps of the above web page generation method.
The network page generating method, the device, the computer equipment and the readable storage medium provided by the invention can be used for acquiring the template corresponding to the information to be processed from the database so as to facilitate a user to quickly acquire the required target template for generating the network page, improve the network page generating efficiency, obtain the target picture by extracting the file information and the original picture in the processing information and respectively inputting the file information and the original picture into the file stack and the image stack so as to separately store the file information and the original picture so as to respectively manage the file information and the original picture information, obtain the target picture by performing transparence processing, cutting and size modification on the original picture and store the target picture in the image stack, and load the target picture in the image stack into the image part of the target template by directly acquiring the file information from the file stack and writing the file information into the file part of the target template to realize the technical effect of quickly generating the network page, therefore, the method and the device solve the problems that how to generate the network page efficiently and quickly and how to solve the problem that the user cannot obtain the required display effect by modifying the image in the network page.
Drawings
FIG. 1 is a flowchart of a first embodiment of a method for generating a web page according to the present invention;
FIG. 2 is a schematic diagram of an environment application of a network page generation method according to a second embodiment of the network page generation method of the present invention;
fig. 3 is a flowchart of a specific method of a network page generation method in a second embodiment of the network page generation method of the present invention;
fig. 4 is a flowchart of extracting a template corresponding to the information to be processed from a preset database in the second embodiment of the network page generation method of the present invention;
fig. 5 is a flowchart of obtaining modification information, and performing transparent processing clipping, and/or size modification on an original picture in the image stack according to the modification information to obtain a target picture in the second embodiment of the network page generation method according to the present invention;
FIG. 6 is a flowchart of writing the document information into the document part of the target template according to the second embodiment of the web page generation method of the present invention;
FIG. 7 is a schematic diagram of a program module of a third embodiment of a web page generation apparatus according to the present invention;
fig. 8 is a schematic diagram of a hardware structure of a computer device according to a fourth embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. 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 following examples are now provided:
the first embodiment is as follows:
referring to fig. 1, a method for generating a web page according to the embodiment includes:
s102: acquiring information to be processed, extracting a template corresponding to the information to be processed from a preset database, and setting the template as a target template.
S103: and extracting the file information and the original picture in the information to be processed, inputting the file information into a preset file stack, and inputting the original picture into a preset image stack.
S104: and acquiring modification information, performing transparent processing cutting and/or size modification on the original picture in the image stack according to the modification information to obtain a target picture, and storing the target picture in the image stack.
S105: and extracting the pattern information in the pattern stack and the target picture in the image stack, writing the pattern information into the pattern part of the target template, and loading the picture into the image part of the target template to obtain the network page.
In an exemplary embodiment, a template corresponding to information to be processed is obtained from a database according to the information to be processed generated according to the requirements of a user, so that the user can quickly obtain a target template required by the user for generating a network page, the network page generation efficiency is improved, and how to quickly generate the network page is solved, thereby avoiding the problem of huge design workload caused by the fact that a great amount of designers need to repeatedly design the network page in the prior art.
The method extracts the file information and the original pictures in the processing information and respectively records the file information and the original pictures into the file stack and the image stack to separately store the file information and the original pictures so as to respectively manage the file information and the original picture information, thereby solving the problems of how to efficiently process the file information and the original pictures and accurately load the file information and the original pictures into the designated part of the target template.
And performing transparency processing, cutting and size modification on the original picture according to the modification information to obtain a target picture, and storing the target picture in the image stack, so that the problems of ensuring the transparency of the image uploaded to the target template, ensuring the position of the picture uploaded to the target template and ensuring that the size of the picture uploaded to the target template can meet the requirements of a user are solved.
And loading the target picture in the image stack into the image part of the target template to realize the technical effect of quickly generating the network page by directly obtaining the file information from the file stack and writing the file information into the file part of the target template.
Therefore, the method and the device solve the problems that how to generate the network page efficiently and quickly and how to solve the problem that the user cannot obtain the required display effect by modifying the images in the network page.
Example two:
the embodiment is a specific application scenario of the first embodiment, and the method provided by the present invention can be more clearly and specifically explained through the embodiment.
The method provided in this embodiment will be specifically described below by taking as an example, in a server running a network page generation method, extracting a target template corresponding to the information to be processed, inputting the document information into a document stack, inputting an original picture into an image stack, performing transparent processing cutting, and/or size modification on the original picture according to modification information to obtain a target picture, writing the document information into a document part of the target template, and loading the picture into an image part of the target template to obtain a network page. It should be noted that the present embodiment is only exemplary, and does not limit the protection scope of the embodiments of the present invention.
Fig. 2 schematically shows an environment application diagram of the web page generation method according to the second embodiment of the present application.
In an exemplary embodiment, theserver 2 in which the network page generation method is located is connected to the user terminal 4 through thenetwork 3; theserver 2 may provide services through one ormore networks 3, which networks 3 may include various network devices, such as routers, switches, multiplexers, hubs, modems, bridges, repeaters, firewalls, proxy devices, and/or the like. Thenetwork 3 may include physical links, such as coaxial cable links, twisted pair cable links, fiber optic links, combinations thereof, and/or the like. Thenetwork 3 may include wireless links, such as cellular links, satellite links, Wi-Fi links, and/or the like; the user terminal 4 may be a computer device such as a smart phone, a tablet computer, a notebook computer, and a desktop computer.
Fig. 3 is a flowchart of a specific method of a web page generation method according to an embodiment of the present invention, where the method specifically includes steps S201 to S205.
S201: a database is created for holding templates, wherein the templates are stored in the database in a key-value pair storage form.
In order to enable a user to directly input in the template to quickly generate the network page, the template is set and stored in the database in a key value pair storage mode, so that the template can be repeatedly used, and the efficiency of producing the network page is greatly improved.
In this embodiment, the template is used as a key value, the template information of the template is used as a primary key, and the primary key and the key value are corresponded to form the key value pair; wherein the template information reflects a type of the template.
S202: acquiring information to be processed, extracting a template corresponding to the information to be processed from a preset database, and setting the template as a target template.
In order to quickly generate a network page and avoid the problem that in the prior art, a great amount of design workload is caused by the fact that designers need to repeatedly design the network page, the template corresponding to the information to be processed is obtained from a database according to the information to be processed generated according to the requirements of users, so that the users can quickly obtain the required target template for generating the network page.
In this embodiment, the step of acquiring the information to be processed includes:
sending a bullet frame to be processed to a user side, wherein the bullet frame to be processed is used for recording information to be processed written by the user side;
and receiving the information to be processed, which is input and sent in the bullet frame to be processed by the user side.
In a preferred embodiment, referring to fig. 4, the step of extracting the template corresponding to the information to be processed from the preset database includes:
s202-1: extracting target information in the information to be processed, wherein the target information is information reflecting the type of the information to be processed, such as: promotional events, consumer coupons or bulletin messages, and the like.
S202-2: identifying template information consistent with the target information from a database, and extracting a template corresponding to the template information, wherein the template information reflects the type of the template, such as: promotional events, consumer coupons or bulletin messages, and the like.
S203: and extracting the file information and the original picture in the information to be processed, inputting the file information into a preset file stack, and inputting the original picture into a preset image stack.
The method is convenient for processing the file information and the original picture, and simultaneously, the file information and the original picture are conveniently and accurately loaded to the specified part of the target template; the step extracts the file information and the original pictures in the processing information and respectively inputs the file information and the original pictures into the file stack and the image stack, so that the file information and the original pictures are separately stored, and the file information and the original picture information are respectively managed.
S204: and acquiring modification information, performing transparency processing, and/or clipping, and/or size modification on the original picture in the image stack according to the modification information to obtain a target picture, and storing the target picture in the image stack.
In order to ensure that the transparency of the image uploaded to the target template, the position of the picture uploaded to the target template and the size of the picture uploaded to the target template can meet the requirements of a user, the step is to perform transparentization processing, cutting and size modification on the original picture according to modification information to obtain a target picture and store the target picture in the image stack.
In a preferred embodiment, referring to fig. 5, the step of obtaining modification information, and performing transparency processing clipping, and/or size modification on the original picture in the image stack according to the modification information to obtain a target picture includes:
s204-1: and judging whether the modification information has transparentization information.
S204-2: and if the transparent information exists, carrying out transparency processing on the original pictures in the image stack according to the transparency information to obtain transparent pictures and storing the transparent pictures in the image stack.
In order to realize the PNG format transparent original picture synthesis, the step of performing transparency processing on the original picture to enable the original picture to have the transparency attribute, wherein the transparency processing is a picture processing operation of changing RGB of pixels into RGBA four-channel color attribute through an opencv algorithm to set the transparency of the original picture.
It should be noted that, in a computer RGB color mode, three channels RGB are superimposed to each other to obtain various colors, but because there is transparency, a color four channel is RGBA, a represents an a' alpha channel and is generally used as an opaque parameter, so in this application, each pixel in an original picture is converted into a pixel set by an opencv algorithm, and by setting a color attribute of each pixel in the pixel set, it is realized that an alpha channel is added to the RGB channel of each pixel on the original picture to realize color transparency of the pixel; among them, the alpha channel is generally used as the opacity parameter. If a pixel has an alpha channel value of 0%, it is completely transparent (i.e., invisible), and a value of 100% means a completely opaque pixel (a conventional digital image). A value between 0% and 100% allows the pixel to be displayed through the background, as though it were through glass (translucency), which effect is simply binary transparency (transparent or opaque) does not. It facilitates digital synthesis. The alpha channel values may be expressed in percentage, integer, or real numbers from 0 to 1 as with the RGB parameters.
The OpenCV algorithm is a cross-platform computer vision library issued based on BSD license (open source), and can run on Linux, Windows, Android, and Mac OS operating systems. The method is light and efficient, is composed of a series of C functions and a small number of C + + classes, provides interfaces of languages such as Python, Ruby, MATLAB and the like, and realizes a plurality of general algorithms in the aspects of image processing and computer vision.
Therefore, the OpenCV algorithm is used for carrying out the transparentizing treatment on the original picture so as to avoid the problem that the expected effect cannot be achieved by synthesizing the original picture based on java because java can set the transparent part of the original picture to be black by default.
S204-3: and if the transparent information is not available or the transparent picture is obtained, judging whether the modification information contains cutting information.
S204-4: and if the transparent pictures or the original pictures in the image stack have the cutting information, cutting the transparent pictures or the original pictures in the image stack according to the cutting information to obtain the cut pictures and storing the cut pictures in the image stack.
The original picture can be partially displayed for realizing the generation of the image part of the network page so as to meet the requirement of a user on displaying a certain part of the original picture; in this step, the cropping information is a selected area displayed on an original picture, and the selected area on the original picture is cropped by an opencv algorithm to obtain a cropped picture, wherein the cropping information includes start point information, a selected length and a selected width, the start point coordinates are coordinates of a vertex in the selected area, the selected length is a length size of the selected area, and the selected width is a width size of the selected area.
In this embodiment, the clipping information is a rectangular draw frame clicked and pulled by a mouse, an area of the rectangular draw frame defined on an original picture is the selected area, the starting point information is coordinates of a vertex at the upper left corner of the selected frame, the selected length is the length of the rectangular draw frame, and the selected width is the width of the rectangular draw frame.
Illustratively, the length and width of the original picture are 360 × 480, but the content required by the design is only in the designated area of the original picture, and then the clipping information is formed by clicking and pulling the rectangular drawing frame with a mouse, for example: the start point information is (10,10), and the selected length: 200, selected width: 100.
in this embodiment, the selected area on the original picture is intercepted by the submat algorithm of opencv to obtain a cropped picture, for example: with the start point information as (10,10), the selected length: 200, selected width: the cutting information of 100 is cut off from the corresponding area on the original picture to obtain the cut picture.
S204-5: if the modified information does not have the cutting information or the cutting picture is obtained, judging whether the modified information has size information;
s204-6: and if the size information exists, modifying the size of the transparentized picture, or cutting the picture or the original picture in the image stack according to the size information to obtain a target picture.
In order to ensure that the pictures in the image stack can be adapted to the size of the image part of the target template, the size of the pictures in the image stack is adjusted through a resize algorithm in the opencv algorithm, and compared with a traditional java scaling function, the scaling function provided by the resize algorithm in the opencv algorithm used in the application has better fidelity reduction degree.
S204-7: and if the picture does not have the size information, setting the transparentized picture, the cut picture or the original picture as a target picture.
S205: and extracting the pattern information in the pattern stack and the target picture in the image stack, writing the pattern information into the pattern part of the target template, and loading the target picture into the image part of the target template to obtain the network page.
In order to realize the technical effect of quickly generating the network page, the file information is directly obtained from the file stack and written into the file part of the target template, the target picture in the image stack is loaded into the image part of the target template, and finally the network page is obtained.
In a preferred embodiment, referring to fig. 6, the step of writing the document information into the document part of the target template includes:
s205-1: and identifying metadata in the file information, and extracting file contents corresponding to the metadata.
Illustratively, the obtained documentation information is shown in the following table:
activity nameChina celebrating Kuanghuan shopping festival
Price of activity99-999 yuan
Duration of activity2019/9/30-2019/10/10
Wherein, the 'activity name', 'activity price', 'activity period' are metadata of the file information; "the festival of happy country shopping", "99-999 yuan", "2019/9/30-2019/10/10" are the corresponding paperwork contents of the metadata, respectively.
S205-2: and identifying the file label matched with the metadata in the file part, and writing the file content into a text box corresponding to the file label.
Exemplarily, the following steps are carried out: the pattern label of the pattern part in the template comprises: "activity name", "activity price", "activity duration"; writing the case content of 'national celebration and binghuan shopping festival' into the text box corresponding to the 'activity name' in the case part, writing the case content of '99-999' into the text box corresponding to the 'activity price' in the case part, and writing the case content of '2019/9/30-2019/10/10' into the text box corresponding to the 'activity period' in the case part.
Preferably, after the image is loaded into the image portion of the target template to obtain a web page, the method further includes:
and uploading the network page to a block chain.
It should be noted that the corresponding digest information is obtained based on the web page, and specifically, the digest information is obtained by hashing the web page, for example, by using the sha256s algorithm. Uploading summary information to the blockchain can ensure the safety and the fair transparency of the user. The user equipment can download the summary information from the blockchain so as to verify whether the network page is tampered. The blockchain referred to in this example is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm, and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
Example three:
referring to fig. 7, a web page generating apparatus 1 of the present embodiment includes:
the template extraction module 12 is configured to acquire information to be processed, extract a template corresponding to the information to be processed from a preset database, and set the template as a target template;
the document and picture management module 13 is configured to extract document information and an original picture in the information to be processed, enter the document information into a preset document stack, and enter the original picture into a preset image stack;
the picture processing module 14 is configured to obtain modification information, perform transparency processing clipping and/or size modification on an original picture in the image stack according to the modification information to obtain a target picture, and store the target picture in the image stack;
and the page generating module 15 is configured to extract the document information in the document stack and the target picture in the image stack, write the document information into the document part of the target template, and load the picture into the image part of the target template to obtain the network page.
Optionally, the network page generating apparatus 1 further includes:
a creating module 11, configured to create a database for storing templates, where the templates are stored in the database in a key-value pair storage form.
The technical scheme is applied to the technical field of artificial intelligence image detection, and a template corresponding to the information to be processed is extracted from a database and is set as a target template; extracting the file information and the original picture in the information to be processed, inputting the file information into a preset file stack, and inputting the original picture into a preset image stack; performing image processing operations such as transparentization processing cutting, and/or size modification on the original image in the image stack according to the modification information to obtain a target image, storing the target image in the image stack, and realizing region extraction on the designated region of the original image according to the cutting information to obtain the target image; and writing the pattern information into the pattern part of the target template by extracting the pattern information in the pattern stack and the target picture in the image stack, and loading the picture into the image part of the target template to obtain the network page.
Example four:
in order to achieve the above object, the present invention further provides a computer device 5, where components of the network page generating apparatus 1 according to the third embodiment may be dispersed in different computer devices, and the computer device 5 may be a smart phone, a tablet computer, a notebook computer, a desktop computer, a rack server, a blade server, a tower server, or a rack server (including an independent server or a server cluster formed by multiple application servers) that executes a program, and the like. The computer device of the embodiment at least includes but is not limited to: a memory 51, a processor 52, which may be communicatively coupled to each other via a system bus, as shown in FIG. 8. It should be noted that fig. 8 only shows a computer device with components, but it should be understood that not all of the shown components are required to be implemented, and more or fewer components may be implemented instead.
In this embodiment, the memory 51 (i.e., a readable storage medium) includes a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. In some embodiments, the memory 51 may be an internal storage unit of the computer device, such as a hard disk or a memory of the computer device. In other embodiments, the memory 51 may be an external storage device of a computer device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), or the like, provided on the computer device. Of course, the memory 51 may also include both internal and external storage devices of the computer device. In this embodiment, the memory 51 is generally used for storing an operating system and various application software installed in the computer device, for example, the program code of the web page generating apparatus in the third embodiment. Further, the memory 51 may also be used to temporarily store various types of data that have been output or are to be output.
Processor 52 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 52 is typically used to control the overall operation of the computer device. In this embodiment, the processor 52 is configured to run a program code stored in the memory 51 or process data, for example, run a network page generation apparatus, so as to implement the network page generation methods of the first embodiment and the second embodiment.
Example five:
to achieve the above objects, the present invention also provides a computer readable storage medium, such as a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, a server, an App application store, etc., on which a computer program is stored, which when executed by a processor 52, implements corresponding functions. The computer-readable storage medium of this embodiment is used for storing a web page generation apparatus, and when executed by the processor 52, implements the web page generation method of the first embodiment and the second embodiment.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

Translated fromChinese
1.一种网络页面生成方法,其特征在于,包括:1. a kind of web page generation method, is characterized in that, comprises:获取待处理信息,从预设数据库中提取与所述待处理信息对应的模板,并将该模板设为目标模板;Obtaining information to be processed, extracting a template corresponding to the information to be processed from a preset database, and setting the template as a target template;提取所述待处理信息中的文案信息和原始图片,将所述文案信息录入预设的文案堆栈中,及将所述原始图片录入预设的图像堆栈中;Extracting the copy information and the original image in the information to be processed, entering the copy information into a preset copy stack, and entering the original image into a preset image stack;获取修改信息,根据所述修改信息对所述图像堆栈中的原始图片进行透明化处理裁剪、和/或裁剪、和/或尺寸修改获得目标图片,并将其保存在所述图像堆栈中;Acquiring modification information, performing transparent processing, cropping, and/or cropping, and/or size modification on the original picture in the image stack according to the modification information to obtain a target picture, and saving it in the image stack;提取所述文案堆栈中的文案信息和所述图像堆栈中的目标图片,将所述文案信息写入所述目标模板的文案部分,及将所述图片载入所述目标模板的图像部分获得网络页面。Extract the copy information in the copy stack and the target image in the image stack, write the copy information into the copy part of the target template, and load the image into the image part of the target template to obtain a network page.2.根据权利要求1所述的网络页面生成方法,其特征在于,获取待处理信息之前,包括:2. The method for generating a web page according to claim 1, wherein before acquiring the information to be processed, the method comprises:创建用于保存模板的数据库,其中,所述模板以键值对存储形式储存在数据库中。Create a database for storing templates, wherein the templates are stored in the database as a key-value store.3.根据权利要求1所述的网络页面生成方法,其特征在于,获取待处理信息的步骤,包括:3. The method for generating a web page according to claim 1, wherein the step of obtaining the information to be processed comprises:向用户端发送待处理弹框,所述待处理弹框用于记载用户端写入的待处理信息;Sending a to-be-processed pop-up frame to the client, where the to-be-processed pop-up frame is used to record the pending information written by the client;接收所述用户端在所述待处理弹框中录入并发送的待处理信息。Receive the pending information entered and sent by the client in the pending popup box.4.根据权利要求1所述的网络页面生成方法,其特征在于,从预设数据库中提取与所述待处理信息对应的模板的步骤,包括:4. The method for generating a web page according to claim 1, wherein the step of extracting a template corresponding to the information to be processed from a preset database comprises:提取待处理信息中的目标信息,所述目标信息是反映待处理信息类型的信息;extracting target information in the information to be processed, where the target information is information reflecting the type of the information to be processed;从数据库中识别与所述目标信息一致的模板信息,提取所述模板信息对应的模板,其中,所述模板信息反映了模板的类型。The template information consistent with the target information is identified from the database, and the template corresponding to the template information is extracted, wherein the template information reflects the type of the template.5.根据权利要求1所述的网络页面生成方法,其特征在于,获取修改信息,根据所述修改信息对所述图像堆栈中的原始图片进行透明化处理裁剪、和/或裁剪、和/或尺寸修改获得目标图片的步骤,包括:5. The method for generating a web page according to claim 1 , wherein modification information is obtained, and according to the modification information, the original picture in the image stack is subjected to transparent processing, cropping, and/or cropping, and/or The steps for obtaining the target image by size modification include:判断所述修改信息中是否具有透明化信息;Judging whether the modification information has transparent information;若具有透明化信息,根据所述透明化信息对所述图像堆栈中的原始图片进行透明化处理,获得透明化图片并将其保存至所述图像堆栈中;If there is transparency information, perform transparency processing on the original picture in the image stack according to the transparency information, obtain the transparent image and save it in the image stack;若不具有透明化信息或获得了透明化图片,判断所述修改信息中是否具有裁剪信息;If there is no transparent information or a transparent image is obtained, determine whether the modification information has cropping information;若具有裁剪信息,则根据所述裁剪信息对所述图像堆栈中的透明化图片或原始图片进行裁剪,获得裁剪图片并将其保存至所述图像堆栈中;If there is cropping information, crop the transparent picture or the original picture in the image stack according to the cropping information, obtain the cropped picture and save it in the image stack;若不具有裁剪信息或获得了裁剪图片,判断所述修改信息中是否具有尺寸信息;If there is no cropping information or a cropped picture is obtained, determine whether the modification information has size information;若具有尺寸信息,则根据所述尺寸信息修改所述图像堆栈中的透明化图片、或裁剪图片或原始图片的尺寸获得目标图片;If there is size information, modify the transparent image in the image stack according to the size information, or the size of the cropped image or the original image to obtain the target image;若不具有尺寸信息,则将所述透明化图片、或裁剪图片或原始图片设为目标图片。If there is no size information, the transparentized picture, the cropped picture or the original picture is set as the target picture.6.根据权利要求5所述的网络页面生成方法,其特征在于,所述透明化处理是通过opencv算法,将像素的RGB变成RGBA四通道颜色属性,以对原始图片的透明度进行设置的图片处理操作;6. web page generation method according to claim 5, is characterized in that, described transparent processing is by opencv algorithm, the RGB of pixel is changed into RGBA four-channel color attribute, to the picture that the transparency of original picture is set processing operations;所述裁剪信息是在原始图片上形成的选定区域;The cropping information is a selected area formed on the original picture;根据所述裁剪信息对所述图像堆栈中的透明化图片或原始图片进行裁剪,获得裁剪图片并将其保存至所述图像堆栈中,包括:Crop the transparent picture or the original picture in the image stack according to the cropping information, obtain the cropped picture and save it in the image stack, including:通过opencv算法根据裁剪信息裁剪所述原始图片形成裁剪图片,所述裁剪信息包括起点信息、选定长度和选定宽度,所述起点坐标为选定区域中顶点的坐标,选定长度为选定区域的长度尺寸,选定宽度为选定区域的宽度尺寸。A cropped picture is formed by cropping the original picture according to cropping information by an opencv algorithm. The cropping information includes starting point information, a selected length and a selected width. The coordinates of the starting point are the coordinates of the vertices in the selected area, and the selected length is the selected length. The length dimension of the area, and the selected width is the width dimension of the selected area.7.根据权利要求1所述的网络页面生成方法,其特征在于,将所述文案信息写入所述目标模板的文案部分的步骤,包括:7. The method for generating a web page according to claim 1, wherein the step of writing the copy information into the copy part of the target template comprises:识别所述文案信息中的元数据,并提取所述元数据对应的文案内容;Identifying metadata in the copy information, and extracting the copy content corresponding to the metadata;识别所述文案部分中与所述元数据匹配的文案标签,将所述文案内容写入所述文案标签对应的文本框内;Identifying a copy tag in the copy part that matches the metadata, and writing the copy content into a text box corresponding to the copy tag;将所述图片载入所述目标模板的图像部分获得网络页面之后,还包括:After loading the image into the image part of the target template to obtain a web page, the method further includes:将所述网络页面上传至区块链中。Upload the web page to the blockchain.8.一种网络页面生成装置,其特征在于,包括:8. A device for generating a web page, comprising:模板提取模块,用于获取待处理信息,从预设数据库中提取与所述待处理信息对应的模板,并将该模板设为目标模板;a template extraction module, configured to obtain information to be processed, extract a template corresponding to the information to be processed from a preset database, and set the template as a target template;文案图片管理模块,用于提取所述待处理信息中的文案信息和原始图片,将所述文案信息录入预设的文案堆栈中,及将所述原始图片录入预设的图像堆栈中;A copywriting image management module, configured to extract copywriting information and original images in the information to be processed, enter the copywriting information into a preset copywriting stack, and enter the original image into a preset image stack;图片处理模块,用于获取修改信息,根据所述修改信息对所述图像堆栈中的原始图片进行透明化处理裁剪、和/或裁剪、和/或尺寸修改获得目标图片,并将其保存在所述图像堆栈中;The picture processing module is configured to obtain modification information, perform transparent processing, cropping, and/or cropping, and/or size modification on the original picture in the image stack according to the modification information to obtain the target picture, and save it in the in the image stack described above;页面生成模块,用于提取所述文案堆栈中的文案信息和所述图像堆栈中的目标图片,将所述文案信息写入所述目标模板的文案部分,及将所述图片载入所述目标模板的图像部分获得网络页面。A page generation module, configured to extract the copy information in the copy stack and the target image in the image stack, write the copy information into the copy part of the target template, and load the image into the target The image part of the template gets the web page.9.一种计算机设备,其包括存储器、处理器以及存储在存储器上并可在处理器上运行的计算机程序,其特征在于,所述计算机设备的处理器执行所述计算机程序时实现权利要求1至7任一项所述网络页面生成方法的步骤。9. A computer device comprising a memory, a processor and a computer program stored in the memory and running on the processor, wherein the processor of the computer device implements claim 1 when executing the computer program Steps of any one of to 7 of the method for generating a web page.10.一种计算机可读存储介质,所述可读存储介质上存储有计算机程序,其特征在于,所述可读存储介质存储的所述计算机程序被处理器执行时实现权利要求1至7任一项所述网络页面生成方法的步骤。10. A computer-readable storage medium on which a computer program is stored, characterized in that, when the computer program stored in the readable storage medium is executed by a processor, any one of claims 1 to 7 is implemented. A step of the method for generating a web page.
CN202010904482.9A2020-09-012020-09-01Network page generation method and device, computer equipment and readable storage mediumPendingCN112035774A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202010904482.9ACN112035774A (en)2020-09-012020-09-01Network page generation method and device, computer equipment and readable storage medium

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202010904482.9ACN112035774A (en)2020-09-012020-09-01Network page generation method and device, computer equipment and readable storage medium

Publications (1)

Publication NumberPublication Date
CN112035774Atrue CN112035774A (en)2020-12-04

Family

ID=73590839

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202010904482.9APendingCN112035774A (en)2020-09-012020-09-01Network page generation method and device, computer equipment and readable storage medium

Country Status (1)

CountryLink
CN (1)CN112035774A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN115002097A (en)*2022-04-252022-09-02青岛海尔科技有限公司 Application image display method and device, storage medium and electronic device
WO2023284792A1 (en)*2021-07-142023-01-19清华大学Lens calibration method and apparatus for scanning light field imaging system

Citations (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN110910475A (en)*2019-10-162020-03-24浙江大搜车软件技术有限公司Picture editing method and device, computer equipment and storage medium
CN111243061A (en)*2020-01-212020-06-05苏宁云计算有限公司 A method, device and system for generating a commodity picture
CN111324761A (en)*2020-02-252020-06-23平安科技(深圳)有限公司Image annotation management method, device, computer system and readable storage medium name

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN110910475A (en)*2019-10-162020-03-24浙江大搜车软件技术有限公司Picture editing method and device, computer equipment and storage medium
CN111243061A (en)*2020-01-212020-06-05苏宁云计算有限公司 A method, device and system for generating a commodity picture
CN111324761A (en)*2020-02-252020-06-23平安科技(深圳)有限公司Image annotation management method, device, computer system and readable storage medium name

Cited By (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
WO2023284792A1 (en)*2021-07-142023-01-19清华大学Lens calibration method and apparatus for scanning light field imaging system
CN115002097A (en)*2022-04-252022-09-02青岛海尔科技有限公司 Application image display method and device, storage medium and electronic device

Similar Documents

PublicationPublication DateTitle
CN109801347B (en)Method, device, equipment and medium for generating editable image template
US11507727B2 (en)Font rendering method and apparatus, and computer-readable storage medium
CN112035111A (en) Page editing method, system, computer device, and computer-readable storage medium
WO2022057471A1 (en)Bill identification method, system, computer device, and computer-readable storage medium
CN111553131B (en)PSD file analysis method, device, equipment and readable storage medium
WO2021174786A1 (en)Training sample production method and apparatus, computer device, and readable storage medium
CN111768461A (en) An image generation method based on electronic price tag
CN113409411A (en)Rendering method and device of graphical interface, electronic equipment and storage medium
CN112395834A (en)Brain graph generation method, device and equipment based on picture input and storage medium
CN112035774A (en)Network page generation method and device, computer equipment and readable storage medium
CN114998464A (en)Electronic certificate generation method and device
CN111752565A (en) An interface generation method, apparatus, computer device and readable storage medium
CN115328588A (en)Method and system for rendering OFD (office file) based on browser front end
CN105404683A (en)Format file processing method and apparatus
CN110708423A (en)Message content display method and device and storage medium
CN113449502A (en)Document generation method and system based on dynamic data
CN117032666A (en)Page editing method and device based on editor, terminal equipment and storage medium
CN106155508B (en)Information processing method and client
CN112001159A (en)Document generation method and device, electronic equipment and storage medium
CN108053459B (en) Signature file synthesis method, application server and computer-readable storage medium
CN114724170A (en)BOM generation method and device, electronic equipment and storage medium
CN114898015A (en)Image generation method and device, electronic equipment and storage medium
CN114546306A (en)Data processing method, device, equipment, medium and program product applied to report form printing
US20140198109A1 (en)Method and system for preserving a graphics file
CN111079399A (en)Image-text data processing method and device, computer equipment and storage medium

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
RJ01Rejection of invention patent application after publication

Application publication date:20201204

RJ01Rejection of invention patent application after publication

[8]ページ先頭

©2009-2025 Movatter.jp