CN108415705B - Webpage generation method and device, storage medium and equipment - Google Patents

Webpage generation method and device, storage medium and equipment Download PDF

Info

Publication number
CN108415705B
CN108415705B CN201810205117.1A CN201810205117A CN108415705B CN 108415705 B CN108415705 B CN 108415705B CN 201810205117 A CN201810205117 A CN 201810205117A CN 108415705 B CN108415705 B CN 108415705B
Authority
CN
China
Prior art keywords
module
view
information
webpage
visual
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
CN201810205117.1A
Other languages
Chinese (zh)
Other versions
CN108415705A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201810205117.1A priority Critical patent/CN108415705B/en
Publication of CN108415705A publication Critical patent/CN108415705A/en
Application granted granted Critical
Publication of CN108415705B publication Critical patent/CN108415705B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/34Graphical or visual programming

Abstract

The application discloses a webpage generation method, a webpage generation device, a storage medium and equipment, and belongs to the technical field of computers. The method comprises the following steps: receiving a visual draft of a webpage sent by a client; identifying each view module in the visual draft by using a machine learning model to obtain module information of each view module; searching a module code corresponding to the identifier in the module information from a module code library; and generating a webpage according to the searched module code and the position information in the module information corresponding to the module code. The webpage processing method and device solve the problem that secondary processing needs to be carried out on the webpage, generation of the webpage is simplified, and therefore generation efficiency of the webpage is improved. In addition, the server can automatically identify the view module, so that a user does not need to manually select the view module, and the generation efficiency of the webpage can be improved.

Description

Webpage generation method and device, storage medium and equipment
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, a storage medium, and a device for generating a web page.
Background
The webpage is formed by splicing module codes of a plurality of view modules. The view module is a collection of UI (User Interface) components for implementing a function in a web page, and may be a navigation bar module, a shortcut entry module, an information module, a video module, a personal information module, and the like.
In the related art, some generated view modules in a fixed mode are stored in a client, and the client can display module information of each view module, where the module information includes a name and a color of the view module; selecting a view module according to an operation signal of a user, and sending module information of the selected view module to a server; and then the server acquires the module codes corresponding to all the module information, and generates a webpage according to all the module codes. Because each view module is fixed, if the generated webpage cannot meet the requirements of the user, the user needs to perform secondary processing on the webpage.
When the generated webpage is processed for the second time, the operation is more complicated, and the generation efficiency of the webpage is not high.
Disclosure of Invention
The embodiment of the application provides a webpage generation method, a webpage generation device, a storage medium and equipment, which are used for solving the problems that the operation is more complicated and the generation efficiency of a webpage is not high when the webpage is processed for the second time. The technical scheme is as follows:
in one aspect, a method for generating a web page is provided, where the method includes:
receiving a visual draft of a webpage sent by a client, wherein the visual draft is a static design drawing of a visual design of the webpage and comprises each view module in the webpage;
identifying each view module in the visual draft by using a machine learning model to obtain module information of each view module, wherein the module information comprises identification and position information of the view module, and the position information is used for indicating the position of the view module in the visual draft;
searching a module code corresponding to the identifier in the module information from a module code library;
and generating the webpage according to the searched module code and the position information in the module information corresponding to the module code.
In one aspect, a method for generating a web page is provided, where the method includes:
acquiring a visual draft of a webpage, wherein the visual draft is a static design drawing of a visual design of the webpage and comprises each view module in the webpage;
sending the visual draft to a server, wherein the server is used for identifying each view module in the visual draft by using a machine learning model to obtain module information of each view module, the module information comprises an identifier and position information of each view module, and the position information is used for indicating the position of each view module in the visual draft; searching a module code corresponding to the identifier in the module information from a module code library; and generating the webpage according to the searched module code and the position information in the module information corresponding to the module code.
In one aspect, an apparatus for generating a web page is provided, the apparatus including:
the system comprises a receiving module, a processing module and a display module, wherein the receiving module is used for receiving a visual draft of a webpage sent by a client, the visual draft is a static design drawing of a visual design of the webpage, and the visual draft comprises each view module in the webpage;
the recognition module is used for recognizing each view module in the visual draft by using a machine learning model to obtain module information of each view module, wherein the module information comprises identification and position information of the view module, and the position information is used for indicating the position of the view module in the visual draft;
the searching module is used for searching a module code corresponding to the identifier in the module information from a module code library;
and the generating module is used for generating the webpage according to the module code searched by the searching module and the position information in the module information corresponding to the module code.
In one aspect, an apparatus for generating a web page is provided, the apparatus including:
the system comprises an acquisition module, a display module and a display module, wherein the acquisition module is used for acquiring a visual draft of a webpage, the visual draft is a static design drawing of a visual design of the webpage, and the visual draft comprises each view module in the webpage;
a sending module, configured to send the visual draft obtained by the obtaining module to a server, where the server is configured to identify each view module in the visual draft by using a machine learning model to obtain module information of each view module, where the module information includes an identifier and position information of the view module, and the position information is used to indicate a position of the view module in the visual draft; searching a module code corresponding to the identifier in the module information from a module code library; and generating the webpage according to the searched module code and the position information in the module information corresponding to the module code.
In one aspect, there is provided a computer readable storage medium having stored therein at least one instruction, at least one program, a set of codes, or a set of instructions, which is loaded and executed by the processor to implement the web page generating method as described above.
In one aspect, there is provided a computer readable storage medium having stored therein at least one instruction, at least one program, a set of codes, or a set of instructions, which is loaded and executed by the processor to implement the web page generating method as described above.
In one aspect, a server is provided, which includes a processor and a memory, where at least one instruction is stored in the memory, and the instruction is loaded and executed by the processor to implement the web page generation method as described above.
In one aspect, a terminal is provided, where the terminal is installed with a client, and the terminal includes a processor and a memory, where the memory stores at least one instruction, and the instruction is loaded and executed by the processor to implement the webpage generating method as described above.
The technical scheme provided by the embodiment of the application has the beneficial effects that:
because the server automatically identifies each view module in the visual manuscript through the machine learning model, each view module in the webpage generated by the server is completely the same as the corresponding view module in the visual manuscript, the problem that secondary processing is needed to be carried out on the webpage is solved, the generation of the webpage is simplified, and the generation efficiency of the webpage is improved. In addition, the server can automatically identify the view module, so that a user does not need to manually select the view module, and the generation efficiency of the webpage can be improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic block diagram of a web page generation system according to some exemplary embodiments;
FIG. 2 is a flowchart of a method for generating a web page according to an embodiment of the present application;
FIG. 3 is a flowchart of a method for generating a web page according to another embodiment of the present application;
FIG. 4 is a schematic diagram of a visual rendition of a web page provided by another embodiment of the present application;
fig. 5A is a schematic diagram of an upload visual composition provided by another embodiment of the present application;
fig. 5B is a schematic diagram of a recognition visual manuscript provided in another embodiment of the present application;
FIG. 5C is a diagram illustrating display module information according to another embodiment of the present application;
FIG. 6 is a schematic diagram of a server architecture provided in another embodiment of the present application;
fig. 7A to 7C are views of a generation flow of a web page provided in another embodiment of the present application;
fig. 8 is a block diagram illustrating a structure of a web page generation apparatus according to an embodiment of the present application;
fig. 9 is a block diagram of a web page generation apparatus according to still another embodiment of the present application;
FIG. 10 is a block diagram of a server according to an embodiment of the present application;
fig. 11 is a block diagram of a terminal according to an embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
Please refer to fig. 1, which illustrates a schematic structural diagram of a web page generation system according to an embodiment of the present application. The web page generation system includes a terminal 110 and a server 120. The terminal 110 establishes a connection with the server 120 through a wired network or a wireless network.
The terminal 110 is a device having a data transceiving function, such as a smart phone, a tablet computer, a computer, an e-book reader, a music player, a wearable device, and the like. The terminal 110 has a client installed therein, and the client is capable of sending and receiving a web page data packet. For example, the client may be a browser or an instant messaging client embedded with webkit (browser kernel), such as a microblog client, a wechat client, a QQ client, a mailbox client, and the like.
The server 120 is a background server of the client, and may be a server or a server cluster formed by multiple servers or a cloud computing center.
Illustrated in fig. 1 is a diagram showing a smartphone 110, a computer 110, and a server 120.
In the related art, a user manually selects a view module to generate a webpage, the manual selection consumes more time, and the user may need to perform secondary processing on the generated webpage, which results in low webpage generation efficiency. In order to improve the generation efficiency of the web page, this embodiment provides a method for generating a web page, which automatically identifies view modules in a visual draft of the web page through a server, and splices module codes of the view modules into the web page, which is detailed in the embodiment shown in fig. 2 below.
Referring to fig. 2, a flowchart of a method for generating a web page according to an embodiment of the present application is shown. The webpage generating method comprises the following steps:
step 201, the client acquires a visual draft of the webpage.
The web page includes a plurality of view modules, which are collections of UI components in the web page that are used to implement a function. For example, the video module, the navigation bar module, the tab module, the comment list module, the information module, the shortcut entry module, the search box module, and the like, which are only exemplified by the view module in the embodiment, in actual implementation, the web page may further include other view modules, and the embodiment is not limited. One web page may include these view modules at the same time, or may include some view modules in these view modules, which is not limited in this embodiment.
The video module is used for realizing a video playing function in a webpage, and the UI component at this time can include a video playing tool, a video link, a thumbnail of a video, and the like. And when the user clicks the video module, video data is acquired according to the video link, and then the video data is played.
The navigation bar module is used for realizing the navigation function of the paging area in the webpage, and the UI component in the case may include a plurality of buttons, and each button is used for linking one paging area in the webpage.
The tab module is used for realizing a window jump function in a webpage, the UI component at the moment comprises a plurality of labels, and each label is used for linking windows with different option functions.
The comment list module is used for realizing a comment display function in a webpage, the UI component comprises a plurality of comments, and each comment comprises a user name, a user head portrait, comment content, comment time, the number of times that the comment is browsed, the number of times that the comment is praised and the like.
The information module is used for realizing an information display function in a webpage, the UI component comprises a plurality of pieces of news information, and each piece of news information comprises a name, content, an attached figure and the like.
The shortcut entry module is configured to implement a shortcut entry jumping function in a web page, where the UI component includes a plurality of shortcut entries, and each shortcut entry is configured to link a page or a program or a function in a program, which is not limited in this embodiment.
The search box module is used for realizing a search function in a webpage, and the UI component comprises a search box, and a user can input characters in the search box to acquire search contents related to the characters.
The visual draft is a static design drawing of the visual design, and colloquially, the visual draft of the web page is a graph displayed in the interface of the web page.
The client can display an uploading interface and receive the visual draft of the webpage uploaded by the user.
Step 202, the client sends the visual manuscript to the server.
In step 203, the server receives a visual draft of the webpage sent by the client.
In step 204, the server identifies each view module in the visual draft by using the machine learning model, and obtains module information of each view module, where the module information includes location information of an identifier of the view module, and the location information is used to indicate a location of the view module in the visual draft.
The machine learning model may be obtained by training an initial machine learning algorithm by the server, or may be obtained by training an initial machine learning algorithm by other devices, and the server acquires the machine learning model from other devices. When the machine learning model is obtained by server training, the training process of the machine learning model is described in detail in step 301.
The module information at least comprises an identifier and position information of the view module, wherein the identifier is used for identifying the view module and can be represented by the name of the view module and the like; the position information is used to indicate the position of the view module in the visual manuscript, and may be represented by the coordinates of the view module and the relative position of the view module with respect to other view modules. Assuming that the view module is a navigation bar module, identified by name representation, and the location information is represented by coordinates of four vertices of the view module, the module information may include: navigation bar, top left vertex (x)1,y1) Top right vertex (x)2,y2) Left lower vertex (x)3,y3) Lower right vertex (x)4,y4)。
Optionally, when the view module includes a plurality of elements, the module information may further include the number of elements in the view module, as described in step 307.
When the server identifies each view module in the visual draft by using the machine learning model, obtaining the module information of each view module means that when the server inputs the visual draft into the machine learning model, the machine learning model identifies each view module in the visual draft and outputs the module information of each view module, and then the server receives the module information of each view module.
In step 205, the server searches the module code corresponding to the identifier in the module information from the module code library.
The server stores a module code library, the module code library comprises a plurality of groups of mappings, and each group of mappings comprises a piece of module information and a module code of a view module corresponding to the identifier in the module information.
For each piece of module information, the server searches a section of module code corresponding to the module information in the module code library.
In step 206, the server generates a web page according to the found module code and the position information in the module information corresponding to the module code.
And the server reads the position of the corresponding view module in each module information, and splices each section of module code to the position of each module code to obtain the webpage.
It should be noted that the web page obtained at this time may be a web page to be published with complete content, or a web page that cannot be published due to incomplete content. Because the web page that cannot be published due to incomplete content is a web page that includes placeholders, and other placeholders in the web page, after the web page is obtained, data needs to be acquired from a data source, and the placeholders in the web page are replaced by the data, so that the web page to be published with complete content is obtained.
Wherein, the step 201-202 can be implemented separately as the client-side embodiment, and the step 203-206 can be implemented separately as the server-side embodiment.
In summary, according to the webpage generating method provided by the embodiment of the application, since the server automatically identifies each view module in the visual draft through the machine learning model, each view module in the webpage generated by the server is completely the same as the corresponding view module in the visual draft, the problem that secondary processing needs to be performed on the webpage is solved, the generation of the webpage is simplified, and therefore the generation efficiency of the webpage is improved. In addition, the server can automatically identify the view module, so that a user does not need to manually select the view module, and the generation efficiency of the webpage can be improved.
Please refer to fig. 3, which shows a flowchart of a method for generating a web page according to another embodiment of the present application. The webpage generating method comprises the following steps:
step 301, a server obtains n groups of training samples, trains a machine learning model by using the n groups of training samples, and each group of training samples includes a visual draft of a webpage and module information labeled to each view module in the visual draft.
In this embodiment, the server needs to collect the visual drafts of the web pages, and generates training samples according to the visual drafts. The visual manuscript may be obtained by drawing a webpage through a drawing tool, or may be obtained by encoding the webpage through an encoding tool, which is not limited in this embodiment.
When the visual manuscript is collected, the visual manuscript of the webpage can be manually collected by technicians, and the visual manuscript is input into a server; alternatively, the server may perform big data analysis to collect the visual manuscript, and the embodiment does not limit the collection method of the visual manuscript.
For each visual draft collected by the server, technicians can recognize each view module included in the visual draft according to experience, manually label the identification and position information of each view module in the visual draft, use the labeled identification and position information as the module information of the view module, and use the visual draft and the module information of all the view modules in the visual draft as a group of training samples. The explanation of the view module is detailed in step 201, and the explanation of the identification and position information of the view module is detailed in step 204.
Referring to FIG. 4, an example of a visual contribution for a web page is shown. The visual draft includes a navigation bar module 410 located at the leftmost side, a personal information module 420, a notice module 430, a shortcut entrance module 440 and a first information module 450 located in the middle in sequence from top to bottom, and a tab module 460 and a second information module 470 located at the right side in sequence from top to bottom.
After the training samples are obtained, the server may select a machine learning algorithm, train the machine learning algorithm by using n sets of training samples, and the machine learning algorithm obtained after the training is finished is the machine learning model in this embodiment. Wherein n is a positive integer, and the larger n is, the more accurate the machine learning model obtained by training is.
When the server does not obtain the machine learning model yet when executing the method of the embodiment, and the machine learning model is obtained by server training, step 301 is executed; when the server has obtained the machine learning model when executing the method of the present embodiment, step 301 is not executed and step 302 is executed.
Step 302, the client obtains a visual draft of the webpage.
Referring to fig. 5A, when the user clicks "+" in the display interface, the client provides a plurality of files for the user to select, and after the user selects one file, the client uses the file as the visual draft of the acquired web page.
Step 303, the client sends the visual manuscript to the server.
Referring to fig. 5B, after sending the visual manuscript to the server, the client displays a word "in smart recognition" in the display interface.
In step 304, the server receives the visual draft of the webpage sent by the client.
In step 305, the server identifies each view module in the visual draft by using the machine learning model, and obtains module information of each view module.
The server may include a machine learning model and a background, the server inputs the visual draft into the machine learning model after receiving the visual draft, the machine learning model feeds back the obtained module information to the background, the background acquires the module codes according to the module information, and finally, the module codes are spliced into a webpage, please refer to fig. 6. The process of obtaining module information by the machine learning model is described below.
The server utilizes a machine learning model to recognize that each view module in the visual manuscript comprises two parts, wherein one part is used for recognizing the position information, the identification and the number of elements in the view module of each view module; the other part is to identify the primary and secondary colors of the respective view modules, as described in detail below.
Firstly, the server identifies the position information and the first characteristics of each module to be identified in the visual manuscript by using a machine learning model, compares the first characteristics with each second characteristic in a module characteristic library by using the machine learning model for each first characteristic, and determines the module to be identified corresponding to the first characteristic as a view module corresponding to the second characteristic when the second characteristic which is the same as the first characteristic exists.
Wherein the module feature library comprises respective second features, and each second feature corresponds to a view module. For example, the second feature of the video module is a nine-grid pattern or a circle containing a triangle in the middle of a picture; the second characteristic of the navigation bar is that the navigation bar is positioned at the leftmost side and comprises a plurality of elements with the same size; the second characteristic of the tab is that the tab is positioned at the right side of the navigation bar module, positioned at the uppermost side and comprises a plurality of elements with the same size; the second characteristic of the comment list module is that the content comprises an avatar, a name and a comment text; the second characteristic of the information module is that the content includes characters, time and subject chart; the second characteristic of the shortcut entry module is that the content comprises images and titles; the second feature of the search box module is that there is a magnifying glass on the left side of the input box. In this embodiment, the second feature is only used as an example, and in actual implementation, the view module may also be represented by another second feature, which is not limited in this embodiment.
When the first characteristic of the module to be recognized identified by the machine learning model is the same as the second characteristic of a certain view module, the module to be recognized is indicated to be the view module, the identifier of the view module is read, the position information of the view module identified by the machine learning model is acquired, and the module information comprising the identifier and the position information is generated.
Referring to fig. 7A, a schematic diagram of a process of recognizing the identifiers, the position information, and the number of elements of each view module by the machine learning model and sending the recognition result to the background is shown.
Subsequently, the module features in the module feature library can be supplemented, so that the functions realized by the webpage are more and more abundant, the time of front-end development is saved, the labor is reduced, and the cost can be saved. In addition, the webpage generated by the embodiment can be applied to a plurality of application scenes such as games and the like, so that the product coverage rate is improved.
The server acquires an identification rule corresponding to the view module by using the machine learning model, wherein the identification rule is used for indicating whether to identify the number of elements in the view module, and when the identification rule indicates to identify the number of elements in the view module, the server identifies the number of elements in the view module by using the machine learning model according to the dividing line or the ground color at the position of the view module in the visual manuscript, adds the number of elements to the module information of the view module, and outputs the module information of the view module.
For example, if the personal information module does not include an element and the tab module includes a plurality of elements, an identification rule indicating that the number of elements in the view module is not identified may be set for the personal information module and an identification rule indicating that the number of elements in the view module is identified may be set for the tab module.
When the recognition rule indicates to recognize the number of elements in the view module, in one implementation, the machine learning model may read the number of segmentation lines at the location of the view module, setting the number of elements as the number of segmentation lines plus 1; in another implementation, the machine learning model may read the number of base colors at the location of the view module, setting the number of elements to the number of base colors. Of course, the machine learning model may also identify the number of elements in the view module in other ways, and this embodiment is not limited.
The machine learning model may also add the number of elements to the module information and output the module information, where the module information includes the identification, the location information, and the number of elements.
Secondly, the server identifies the primary color of each view module in the visual manuscript by using the machine learning model, calculates the auxiliary color according to the primary color of each view module by using the machine learning model for each view module, and outputs the primary color and the auxiliary color of each view module.
In the related art, m colors are provided in the server, and one color may be selected among the m colors as a color of the view module. However, the m colors cannot meet the user's requirement, when the m colors do not include the color required by the user, a new color needs to be added, and since each color is modulated by k primary colors, if a new color needs to be added, the k primary colors need to be readjusted, which is cumbersome to operate, and m and k are positive integers. In one implementation, m is 16 and k is 10.
In this embodiment, the machine learning model may identify the dominant color of the view module, and then calculate the auxiliary color according to the dominant color, thereby obtaining the color of the view module.
Referring to fig. 7B, a schematic diagram of a process of identifying the primary color and the secondary color of each view module and sending the identification result to the background is shown.
Referring to fig. 7C, a schematic diagram of a flow from uploading a visual drafts to generating a web page is shown.
After the server receives the module information output by the machine learning model, step 309 may be performed; or, in order to ensure the accuracy of the recognition result, the server may send the module information of each view module to the client. The client receives module information of each view module sent by the server; displaying each piece of module information, a confirmation control and a modification control; when the confirmation control is triggered to generate confirmation information, sending the confirmation information to the server; and when the modification control is triggered, generating modification information according to the received modification content, and sending the modification information to the server. When the server receives the confirmation information sent by the client, step 306 is executed; or, when the server receives the modification information sent by the client, the server modifies the corresponding view module in the module code library according to the modification information, and executes step 306, please refer to fig. 5C.
For example, if the view module identified by the server is not accurate, the user may generate modification information by clicking the name of the view module or inputting the name of the view module; or, if the number of elements in a certain view module identified by the server is not accurate, the user may generate modification information by inputting the correct number, and the like.
In fig. 5C, the recognition result further includes a page layout of a double-column layout, and the machine learning model may further recognize the page layout according to the segmentation line or the ground color in the visual manuscript, and the recognition process is the same as the process of the number of the recognition elements, which is not described herein again.
It should be noted that, since the page layout is used to indicate the position of the view module, and the position information in the module information may indicate the position of the view module, the page layout may not be identified here, and the position of the view module may be indicated by the position information.
In step 306, the server searches the module code corresponding to the identifier in the module information from the module code library.
The server stores a module code library, the module code library comprises a plurality of groups of mappings, and each group of mappings comprises a piece of module information and a module code of a view module corresponding to the identifier in the module information.
For each piece of module information, the server searches a section of module code corresponding to the module information in the module code library.
Step 307, for each view module, the server fills the primary color and the secondary color in the style library of the view module, and generates a webpage according to the module code, the style library corresponding to the module code, and the position information in the module information corresponding to the module code.
The style gallery is used to specify the display style of the view module. After the primary color and the secondary color of the view module are filled in the style library of the view module, the server can splice all modules into a webpage according to the position information in the corresponding module information according to the style library.
It should be noted that the web page obtained at this time may be a web page to be published with complete content, or a web page that cannot be published due to incomplete content. Since the webpage that cannot be published due to incomplete content is a webpage that includes placeholders, and other placeholders in the webpage, after generating the webpage, the server may send the webpage to the client to generate a webpage to be published with complete content, and then execute step 308 and step 310; or the server may generate the web page to be published according to the web page, and then step 311 is executed.
Step 308, the server sends the web page to the client.
Step 309, the client receives the web page sent by the server, generates a web page to be published according to the data source and the web page, and sends the web page to be published to the server.
The data source is used for providing data in the webpage to be published. The client can replace the placeholder in the webpage with the data in the data source to obtain the webpage to be published.
In step 310, the server receives the web page to be published sent by the client, tests the web page to be published, publishes the web page to be published after the test is passed, and ends the process.
And 311, the server generates a webpage to be issued according to the data source and the webpage, tests the webpage to be issued, and issues the webpage to be issued after the test is passed.
The server can test after generating the webpage to be published and publish the webpage to be published after the test is passed, so that the problem of low publishing efficiency caused by the fact that the client generates the webpage to be published can be solved, and the generation-publishing process can be opened in a one-stop mode.
Wherein, the steps 302, 303, 309 can be implemented separately as the embodiment of the client side, and the steps 301, 304, 308, 310, 311 can be implemented separately as the embodiment of the server side.
In summary, according to the webpage generating method provided by the embodiment of the application, since the server automatically identifies each view module in the visual draft through the machine learning model, each view module in the webpage generated by the server is completely the same as the corresponding view module in the visual draft, the problem that secondary processing needs to be performed on the webpage is solved, the generation of the webpage is simplified, and therefore the generation efficiency of the webpage is improved. In addition, the server can automatically identify the view module, so that a user does not need to manually select the view module, and the generation efficiency of the webpage can be improved.
The machine learning model can identify the dominant color of the view module, and the auxiliary color is calculated according to the dominant color, so that the color of the view module is obtained, a new color needs to be added when m colors cannot meet the requirements of a user, the k primary colors are required to be readjusted at the moment, the problem of complex operation is solved, and the color obtaining efficiency is improved.
The server can test after generating the webpage to be published and publish the webpage to be published after the test is passed, so that the problem of low publishing efficiency caused by the fact that the client generates the webpage to be published can be solved, and the generation-publishing process can be opened in a one-stop mode.
Referring to fig. 8, a block diagram of a web page generation apparatus according to an embodiment of the present application is shown. The webpage generating device comprises:
a receiving module 810, configured to implement the above steps 203 and 304 and the implicit receiving related functions in each step.
An identification module 820, configured to implement the above steps 204, 305 and the implicit identification function in each step.
A searching module 830, configured to implement the functions of the steps 205 and 306 and related searching implied in each step.
A generating module 840, configured to implement the functions of the foregoing steps 206 and 307 and the related generation implicit in each step.
Optionally, the identifying module 820 is further configured to implement the function of identifying the first feature in step 305, the function of identifying the number of elements in step 305, the function of identifying the primary color and the secondary color in step 305, and the implicit identification-related functions in each step.
Optionally, the web page generating apparatus further includes an output module, a first obtaining module, a sending module, a second obtaining module, a training module, a first processing module, and a second processing module.
The output module is used to implement the function of outputting module information in step 305 and the function of outputting related implicit in each step.
The first obtaining module is used to implement the function of obtaining the identification rule in step 305 and the implicit function related to obtaining in each step.
The sending module is used for realizing the function of sending the module information to the client and the implicit function related to sending in each step.
The searching module 830 is further configured to, when receiving the determination information sent by the client, implement the function related to searching implied in the step 306 and each step. Or, the searching module 830 is further configured to, after receiving the modification information sent by the client and modifying the corresponding view module in the module code library according to the modification information, implement the function related to searching implied in the step 306 and each step.
The second obtaining module is configured to implement the function of obtaining the training sample in step 301 and the implicit function related to obtaining in each step.
The training module is used to implement the function of training the machine learning model in step 301 and the implicit training-related functions in each step.
The first processing module is used for implementing the functions of testing and publishing the web page to be published in the above steps 308 and 310 and the functions related to testing and publishing implied in each step.
The second processing module is used for implementing the functions of testing and publishing the web page to be published in the above step 311 and the functions related to testing and publishing implied in each step.
In summary, according to the web page generation apparatus provided in the embodiment of the present application, since the server automatically identifies each view module in the visual draft through the machine learning model, each view module in the web page generated by the server is completely the same as the corresponding view module in the visual draft, thereby solving the problem that secondary processing is required to be performed on the web page, simplifying generation of the web page, and thus improving generation efficiency of the web page. In addition, the server can automatically identify the view module, so that a user does not need to manually select the view module, and the generation efficiency of the webpage can be improved.
The machine learning model can identify the dominant color of the view module, and the auxiliary color is calculated according to the dominant color, so that the color of the view module is obtained, a new color needs to be added when m colors cannot meet the requirements of a user, the k primary colors are required to be readjusted at the moment, the problem of complex operation is solved, and the color obtaining efficiency is improved.
The server can test after generating the webpage to be published and publish the webpage to be published after the test is passed, so that the problem of low publishing efficiency caused by the fact that the client generates the webpage to be published can be solved, and the generation-publishing process can be opened in a one-stop mode.
Referring to fig. 9, a block diagram of a web page generation apparatus according to an embodiment of the present application is shown. The webpage generating device comprises:
an obtaining module 910, configured to implement the functions of obtaining implicit in the above steps 201 and 302 and in each step.
A sending module 920, configured to implement the functions of the above steps 202 and 303 and implicit lookup in each step.
Optionally, the web page generating apparatus further includes a receiving module, a displaying module, and a generating module.
The receiving module is used to implement the function of receiving the web page in step 309, the function of receiving module information, and the implicit function related to receiving in each step.
The display module is used for realizing the functions of displaying module information, confirming the control and modifying the control in the steps and the implicit related display function in each step.
The generating module is used for implementing the function of generating the web page to be published in the step 309 and the implicit function related to generation in each step.
In summary, according to the web page generation apparatus provided in the embodiment of the present application, since the server automatically identifies each view module in the visual draft through the machine learning model, each view module in the web page generated by the server is completely the same as the corresponding view module in the visual draft, thereby solving the problem that secondary processing is required to be performed on the web page, simplifying generation of the web page, and thus improving generation efficiency of the web page. In addition, the server can automatically identify the view module, so that a user does not need to manually select the view module, and the generation efficiency of the webpage can be improved.
Referring to fig. 10, a schematic structural diagram of a server according to an embodiment of the present application is shown. The server 1000 includes a Central Processing Unit (CPU)1001, a system memory 1004 including a Random Access Memory (RAM)1002 and a Read Only Memory (ROM)1003, and a system bus 1005 connecting the system memory 1004 and the central processing unit 1001. The server 1000 also includes a basic input/output system (I/O system) 1006, which facilitates the transfer of information between devices within the computer, and a mass storage device 1007, which stores an operating system 1013, application programs 1014, and other program modules 1015.
The basic input/output system 1006 includes a display 1008 for displaying information and an input device 1009, such as a mouse, keyboard, etc., for user input of information. Wherein a display 1008 and an input device 1007 are both connected to the central processing unit 1001 through an input-output controller 1010 connected to the system bus 1005. The basic input/output system 1006 may also include an input/output controller 1010 for receiving and processing input from a number of other devices, such as a keyboard, mouse, or electronic stylus. Similarly, the input-output controller 1010 also provides output to a display screen, a printer, or other type of output device.
The mass storage device 1007 is connected to the central processing unit 1001 through a mass storage controller (not shown) connected to the system bus 1005. The mass storage device 1009 and its associated computer-readable media provide non-volatile storage for the server 1000. That is, the mass storage device 1009 may include a computer-readable medium (not shown), such as a hard disk or CD-ROM drive.
Without loss of generality, computer readable media may comprise computer storage media and communication media. Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes RAM, ROM, EPROM, EEPROM, flash memory or other solid state memory technology, CD-ROM, DVD, or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices. Of course, those skilled in the art will appreciate that computer storage media is not limited to the foregoing. The system memory 1004 and mass storage device 1007 described above may be collectively referred to as memory.
According to various embodiments of the present application, the server 1000 may also operate as a remote computer connected to a network through a network, such as the Internet. That is, the server 1000 may be connected to the network 1012 through a network interface unit 1011 connected to the system bus 1005, or the network interface unit 1011 may be used to connect to another type of network or a remote computer system (not shown).
The memory further includes one or more programs, the one or more programs are stored in the memory, and the one or more programs are used for executing the web page generation method provided by the above embodiment.
Fig. 11 shows a block diagram of a terminal 1100 according to an exemplary embodiment of the present application. The terminal 1100 may be a portable mobile terminal such as: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, motion video Experts compression standard Audio Layer 3), an MP4 player (Moving Picture Experts Group Audio Layer IV, motion video Experts compression standard Audio Layer 4), a notebook computer, or a desktop computer. Terminal 1100 may also be referred to by other names such as user equipment, portable terminal, laptop terminal, desktop terminal, and so forth.
In general, terminal 1100 includes: a processor 1101 and a memory 1102.
Processor 1101 may include one or more processing cores, such as a 4-core processor, an 8-core processor, or the like. The processor 1101 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 1101 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 1101 may be integrated with a GPU (Graphics Processing Unit) that is responsible for rendering and drawing the content that the display screen needs to display. In some embodiments, the processor 1101 may further include an AI (Artificial Intelligence) processor for processing computing operations related to machine learning.
Memory 1102 may include one or more computer-readable storage media, which may be non-transitory. Memory 1102 can also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 1102 is used to store at least one instruction for execution by processor 1101 to implement the web page generation method provided by method embodiments herein.
In some embodiments, the terminal 1100 may further include: a peripheral interface 1103 and at least one peripheral. The processor 1101, memory 1102 and peripheral interface 1103 may be connected by a bus or signal lines. Various peripheral devices may be connected to the peripheral interface 1103 by buses, signal lines, or circuit boards. Specifically, the peripheral device includes: at least one of radio frequency circuitry 1104, touch display screen 1105, camera 1106, audio circuitry 1107, positioning component 1108, and power supply 1109.
The peripheral interface 1103 may be used to connect at least one peripheral associated with I/O (Input/Output) to the processor 1101 and the memory 1102. In some embodiments, the processor 1101, memory 1102, and peripheral interface 1103 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 1101, the memory 1102 and the peripheral device interface 1103 may be implemented on separate chips or circuit boards, which is not limited by this embodiment.
The Radio Frequency circuit 1104 is used to receive and transmit RF (Radio Frequency) signals, also called electromagnetic signals. The radio frequency circuit 1104 communicates with communication networks and other communication devices via electromagnetic signals. The radio frequency circuit 1104 converts an electric signal into an electromagnetic signal to transmit, or converts a received electromagnetic signal into an electric signal. Optionally, the radio frequency circuit 1104 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so forth. The radio frequency circuit 1104 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: the world wide web, metropolitan area networks, intranets, generations of mobile communication networks (2G, 3G, 4G, and 5G), Wireless local area networks, and/or WiFi (Wireless Fidelity) networks. In some embodiments, the rf circuit 1104 may further include NFC (Near Field Communication) related circuits, which are not limited in this application.
The display screen 1105 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display screen 1105 is a touch display screen, the display screen 1105 also has the ability to capture touch signals on or over the surface of the display screen 1105. The touch signal may be input to the processor 1101 as a control signal for processing. At this point, the display screen 1105 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, display 1105 may be one, providing the front panel of terminal 1100; in other embodiments, the display screens 1105 can be at least two, respectively disposed on different surfaces of the terminal 1100 or in a folded design; in still other embodiments, display 1105 can be a flexible display disposed on a curved surface or on a folded surface of terminal 1100. Even further, the display screen 1105 may be arranged in a non-rectangular irregular pattern, i.e., a shaped screen. The Display screen 1105 may be made of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), and the like.
Camera assembly 1106 is used to capture images or video. Optionally, camera assembly 1106 includes a front camera and a rear camera. Generally, a front camera is disposed at a front panel of the terminal, and a rear camera is disposed at a rear surface of the terminal. In some embodiments, the number of the rear cameras is at least two, and each rear camera is any one of a main camera, a depth-of-field camera, a wide-angle camera and a telephoto camera, so that the main camera and the depth-of-field camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize panoramic shooting and VR (Virtual Reality) shooting functions or other fusion shooting functions. In some embodiments, camera assembly 1106 may also include a flash. The flash lamp can be a monochrome temperature flash lamp or a bicolor temperature flash lamp. The double-color-temperature flash lamp is a combination of a warm-light flash lamp and a cold-light flash lamp, and can be used for light compensation at different color temperatures.
The audio circuitry 1107 may include a microphone and a speaker. The microphone is used for collecting sound waves of a user and the environment, converting the sound waves into electric signals, and inputting the electric signals to the processor 1101 for processing or inputting the electric signals to the radio frequency circuit 1104 to achieve voice communication. For stereo capture or noise reduction purposes, multiple microphones may be provided, each at a different location of terminal 1100. The microphone may also be an array microphone or an omni-directional pick-up microphone. The speaker is used to convert electrical signals from the processor 1101 or the radio frequency circuit 1104 into sound waves. The loudspeaker can be a traditional film loudspeaker or a piezoelectric ceramic loudspeaker. When the speaker is a piezoelectric ceramic speaker, the speaker can be used for purposes such as converting an electric signal into a sound wave audible to a human being, or converting an electric signal into a sound wave inaudible to a human being to measure a distance. In some embodiments, the audio circuitry 1107 may also include a headphone jack.
Positioning component 1108 is used to locate the current geographic position of terminal 1100 for purposes of navigation or LBS (Location Based Service). The Positioning component 1108 may be a Positioning component based on the Global Positioning System (GPS) in the united states, the beidou System in china, or the galileo System in russia.
Power supply 1109 is configured to provide power to various components within terminal 1100. The power supply 1109 may be alternating current, direct current, disposable or rechargeable. When the power supply 1109 includes a rechargeable battery, the rechargeable battery may be a wired rechargeable battery or a wireless rechargeable battery. The wired rechargeable battery is a battery charged through a wired line, and the wireless rechargeable battery is a battery charged through a wireless coil. The rechargeable battery may also be used to support fast charge technology.
In some embodiments, terminal 1100 can also include one or more sensors 1110. The one or more sensors 1110 include, but are not limited to: acceleration sensor 1111, gyro sensor 1112, pressure sensor 1113, fingerprint sensor 1114, optical sensor 1115, and proximity sensor 1116.
Acceleration sensor 1111 may detect acceleration levels in three coordinate axes of a coordinate system established with terminal 1100. For example, the acceleration sensor 1111 may be configured to detect components of the gravitational acceleration in three coordinate axes. The processor 1101 may control the touch display screen 1105 to display a user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 1111. The acceleration sensor 1111 may also be used for acquisition of motion data of a game or a user.
The gyro sensor 1112 may detect a body direction and a rotation angle of the terminal 1100, and the gyro sensor 1112 may cooperate with the acceleration sensor 1111 to acquire a 3D motion of the user with respect to the terminal 1100. From the data collected by gyroscope sensor 1112, processor 1101 may implement the following functions: motion sensing (such as changing the UI according to a user's tilting operation), image stabilization at the time of photographing, game control, and inertial navigation.
Pressure sensor 1113 may be disposed on a side bezel of terminal 1100 and/or on an underlying layer of touch display screen 1105. When the pressure sensor 1113 is disposed on the side frame of the terminal 1100, the holding signal of the terminal 1100 from the user can be detected, and the processor 1101 performs left-right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 1113. When the pressure sensor 1113 is disposed at the lower layer of the touch display screen 1105, the processor 1101 controls the operability control on the UI interface according to the pressure operation of the user on the touch display screen 1105. The operability control comprises at least one of a button control, a scroll bar control, an icon control and a menu control.
The fingerprint sensor 1114 is configured to collect a fingerprint of the user, and the processor 1101 identifies the user according to the fingerprint collected by the fingerprint sensor 1114, or the fingerprint sensor 1114 identifies the user according to the collected fingerprint. Upon recognizing that the user's identity is a trusted identity, the user is authorized by the processor 1101 to perform relevant sensitive operations including unlocking the screen, viewing encrypted information, downloading software, paying for and changing settings, etc. Fingerprint sensor 1114 may be disposed on the front, back, or side of terminal 1100. When a physical button or vendor Logo is provided on the terminal 1100, the fingerprint sensor 1114 may be integrated with the physical button or vendor Logo.
Optical sensor 1115 is used to collect ambient light intensity. In one embodiment, the processor 1101 may control the display brightness of the touch display screen 1105 based on the ambient light intensity collected by the optical sensor 1115. Specifically, when the ambient light intensity is high, the display brightness of the touch display screen 1105 is increased; when the ambient light intensity is low, the display brightness of the touch display screen 1105 is turned down. In another embodiment, processor 1101 may also dynamically adjust the shooting parameters of camera assembly 1106 based on the ambient light intensity collected by optical sensor 1115.
Proximity sensor 1116, also referred to as a distance sensor, is typically disposed on a front panel of terminal 1100. Proximity sensor 1116 is used to capture the distance between the user and the front face of terminal 1100. In one embodiment, the touch display screen 1105 is controlled by the processor 1101 to switch from a bright screen state to a dark screen state when the proximity sensor 1116 detects that the distance between the user and the front face of the terminal 1100 is gradually decreasing; when the proximity sensor 1116 detects that the distance between the user and the front face of the terminal 1100 becomes gradually larger, the touch display screen 1105 is controlled by the processor 1101 to switch from a breath-screen state to a bright-screen state.
Those skilled in the art will appreciate that the configuration shown in fig. 11 does not constitute a limitation of terminal 1100, and may include more or fewer components than those shown, or may combine certain components, or may employ a different arrangement of components.
One embodiment of the present application provides a computer-readable storage medium having at least one instruction, at least one program, set, or set of instructions stored therein, which is loaded and executed by the processor to implement the web page generation method as described above.
One embodiment of the present application provides a server, which includes a processor and a memory, where the memory stores at least one instruction, and the instruction is loaded and executed by the processor to implement the web page generation method as described above.
An embodiment of the present application provides a terminal, where the terminal is installed with a client, and the terminal includes a processor and a memory, where the memory stores at least one instruction, and the instruction is loaded and executed by the processor to implement the web page generation method as described above.
It should be noted that: in the web page generation apparatus provided in the above embodiment, only the division of the above functional modules is taken as an example to illustrate when generating the web page, and in practical applications, the functions may be distributed by different functional modules as needed, that is, the internal structure of the web page generation apparatus may be divided into different functional modules to complete all or part of the functions described above. In addition, the web page generation apparatus and the web page generation method provided by the above embodiments belong to the same concept, and specific implementation processes thereof are described in the method embodiments in detail and are not described herein again.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is not intended to limit the present application, and any modifications, equivalents, improvements, etc. made within the spirit and principle of the present application should be included in the scope of the present application.

Claims (13)

1. A method for generating a web page, the method comprising:
receiving a visual draft of a webpage sent by a client, wherein the visual draft is a static design drawing of a visual design of the webpage and comprises various view modules in the webpage, and the view modules are a collection of UI components for realizing one function in the webpage;
identifying each view module in the visual draft by using a machine learning model to obtain module information of each view module, wherein the module information comprises an identifier of the view module, position information and the number of elements in the view module, the position information is used for indicating the position of the view module in the visual draft, and the number of the elements is obtained by identifying the machine learning model according to a dividing line or a background color at the position of the view module in the visual draft;
identifying the primary color of each view module in the visual manuscript by using the machine learning model, calculating an auxiliary color according to the primary color of each view module by using the machine learning model for each view module, and outputting the primary color and the auxiliary color of each view module;
searching a module code corresponding to the identifier in the module information from a module code library;
for each view module, filling the primary color and the auxiliary color in a style library of the view module, and generating the webpage according to the searched module code, the style library corresponding to the module code and the position information in the module information corresponding to the module code;
identifying each view module in the visual manuscript by using a machine learning model to obtain module information of each view module, wherein the identifying comprises: identifying the position information and the first characteristics of each module to be identified in the visual manuscript by using the machine learning model; for each first feature, comparing the first feature with each second feature in a module feature library by using the machine learning model, and when a second feature identical to the first feature exists, determining a module to be identified corresponding to the first feature as the view module corresponding to the second feature, so as to obtain module information including position information and identification of the view module; wherein the module feature library includes each of the second features, and the second features correspond to a view module.
2. The method of claim 1, further comprising:
acquiring an identification rule corresponding to the view module by using the machine learning model, wherein the identification rule is used for indicating whether to identify the number of elements in the view module;
when the identification rule is used for indicating the identification of the number of elements in the view module, identifying the number of elements in the view module according to the segmentation line or the ground color at the position of the view module in the visual manuscript by using the machine learning model, and adding the number of elements into the module information of the view module.
3. The method of claim 1,
before searching the module code corresponding to the identifier in the module information from the module code library, the method further includes: sending the module information of each view module to the client;
the searching module codes corresponding to the identifiers in the module information from the module code library comprises: and when receiving the confirmation information sent by the client, searching the module code corresponding to the identifier in the module information from the module code library.
4. The method of claim 3, wherein the searching for the module code view module corresponding to the identifier in the module information from the module code library comprises:
and when modification information sent by the client is received, modifying the corresponding view module in the module code library according to the modification information, and searching the module code corresponding to the identifier in the module information from the module code library.
5. The method of claim 1, further comprising, prior to said identifying each of said view modules in said visual drafts using a machine learning model:
acquiring n groups of training samples, wherein the training samples comprise a visual draft of a webpage and module information labeled to each view module in the visual draft, and n is a positive integer;
training the machine learning model using the n sets of training samples.
6. The method according to any one of claims 1 to 5, wherein after the generating the webpage according to the found module code and the location information in the module information corresponding to the module code, the method further comprises:
sending the webpage to the client, receiving a webpage to be published sent by the client, testing the webpage to be published, and publishing the webpage to be published after the test is passed, wherein the webpage to be published is generated by the client according to a data source and the webpage; alternatively, the first and second electrodes may be,
and generating a webpage to be issued according to the data source and the webpage, testing the webpage to be issued, and issuing the webpage to be issued after the test is passed.
7. A method for generating a web page, the method comprising:
the method comprises the steps of obtaining a visual draft of a webpage, wherein the visual draft is a static design drawing of a visual design of the webpage and comprises various view modules in the webpage, and the view modules are a collection of UI components used for realizing one function in the webpage;
sending the visual draft to a server, wherein the server is used for identifying each view module in the visual draft by using a machine learning model to obtain module information of each view module, the module information comprises an identifier of the view module, position information and the number of elements in the view module, the position information is used for indicating the position of the view module in the visual draft, and the number of the elements is identified by the machine learning model according to a segmentation line or a background color at the position of the view module in the visual draft; identifying the primary color of each view module in the visual manuscript by using the machine learning model, calculating an auxiliary color according to the primary color of each view module by using the machine learning model for each view module, and outputting the primary color and the auxiliary color of each view module; searching a module code corresponding to the identifier in the module information from a module code library; for each view module, filling the primary color and the auxiliary color in a style library of the view module, and generating the webpage according to the searched module code, the style library corresponding to the module code and the position information in the module information corresponding to the module code;
wherein the identifying, by the machine learning model, each view module in the visual draft to obtain module information of each view module includes: identifying the position information and the first characteristics of each module to be identified in the visual manuscript by using the machine learning model; for each first feature, comparing the first feature with each second feature in a module feature library by using the machine learning model, and when a second feature identical to the first feature exists, determining a module to be identified corresponding to the first feature as the view module corresponding to the second feature, so as to obtain module information including position information and identification of the view module; wherein the module feature library includes each of the second features, and the second features correspond to a view module.
8. The method of claim 7, further comprising, after said sending the visual drafts to a server:
receiving module information of each view module sent by the server;
displaying the module information and a confirmation control;
and when the confirmation control is triggered to generate confirmation information, sending the confirmation information to the server.
9. The method according to claim 8, further comprising, after the receiving module information of each view module sent by the server:
displaying a modification control;
and when the modification control is triggered, generating modification information according to the received modification content, and sending the modification information to the server.
10. An apparatus for generating a web page, the apparatus comprising:
the system comprises a receiving module, a processing module and a display module, wherein the receiving module is used for receiving a visual draft of a webpage sent by a client, the visual draft is a static design drawing of a visual design of the webpage, the visual draft comprises various view modules in the webpage, and the view modules are a collection of UI components for realizing one function in the webpage;
the recognition module is used for recognizing each view module in the visual draft by using a machine learning model to obtain module information of each view module, wherein the module information comprises an identifier of the view module, position information and the number of elements in the view module, the position information is used for indicating the position of the view module in the visual draft, and the number of the elements is obtained by the machine learning model according to a segmentation line or ground color at the position of the view module in the visual draft; the machine learning model is further used for identifying the primary color of each view module in the visual manuscript, for each view module, calculating an auxiliary color according to the primary color of the view module by using the machine learning model, and outputting the primary color and the auxiliary color of the view module;
the searching module is used for searching a module code corresponding to the identifier in the module information from a module code library;
the generating module is used for filling the primary color and the auxiliary color in a style library of the view module for each view module, and generating the webpage according to the module code searched by the searching module, the style library corresponding to the module code and the position information in the module information corresponding to the module code;
identifying each view module in the visual manuscript by using a machine learning model to obtain module information of each view module, wherein the identifying comprises: identifying the position information and the first characteristics of each module to be identified in the visual manuscript by using the machine learning model; for each first feature, comparing the first feature with each second feature in a module feature library by using the machine learning model, and when a second feature identical to the first feature exists, determining a module to be identified corresponding to the first feature as the view module corresponding to the second feature, so as to obtain module information including position information and identification of the view module; wherein the module feature library includes each of the second features, and the second features correspond to a view module.
11. An apparatus for generating a web page, the apparatus comprising:
the system comprises an acquisition module, a display module and a display module, wherein the acquisition module is used for acquiring a visual draft of a webpage, the visual draft is a static design drawing of the visual design of the webpage, the visual draft comprises various view modules in the webpage, and the view modules are a collection of UI components for realizing one function in the webpage;
a sending module, configured to send the visual draft obtained by the obtaining module to a server, where the server is configured to identify each view module in the visual draft by using a machine learning model to obtain module information of each view module, where the module information includes an identifier of the view module, position information, and a number of elements in the view module, the position information is used to indicate a position of the view module in the visual draft, and the number of elements is identified by the machine learning model according to a segmentation line or a background color at the position of the view module in the visual draft; identifying the primary color of each view module in the visual manuscript by using the machine learning model, calculating an auxiliary color according to the primary color of each view module by using the machine learning model for each view module, and outputting the primary color and the auxiliary color of each view module; searching a module code corresponding to the identifier in the module information from a module code library; for each view module, filling the primary color and the auxiliary color in a style library of the view module, and generating the webpage according to the searched module code, the style library corresponding to the module code and the position information in the module information corresponding to the module code;
wherein the identifying, by the machine learning model, each view module in the visual draft to obtain module information of each view module includes: identifying the position information and the first characteristics of each module to be identified in the visual manuscript by using the machine learning model; for each first feature, comparing the first feature with each second feature in a module feature library by using the machine learning model, and when a second feature identical to the first feature exists, determining a module to be identified corresponding to the first feature as the view module corresponding to the second feature, so as to obtain module information including position information and identification of the view module; wherein the module feature library includes each of the second features, and the second features correspond to a view module.
12. A computer readable storage medium having stored therein at least one instruction, at least one program, a set of codes, or a set of instructions, which is loaded and executed by a processor to implement the method of generating a web page according to any one of claims 1 to 6 or according to any one of claims 7 to 9.
13. A web page generating device, characterized in that the web page generating device comprises a processor and a memory, wherein at least one instruction is stored in the memory, and the instruction is loaded and executed by the processor to implement the web page generating method according to any one of claims 1 to 6 or any one of claims 7 to 9.
CN201810205117.1A 2018-03-13 2018-03-13 Webpage generation method and device, storage medium and equipment Active CN108415705B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810205117.1A CN108415705B (en) 2018-03-13 2018-03-13 Webpage generation method and device, storage medium and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810205117.1A CN108415705B (en) 2018-03-13 2018-03-13 Webpage generation method and device, storage medium and equipment

Publications (2)

Publication Number Publication Date
CN108415705A CN108415705A (en) 2018-08-17
CN108415705B true CN108415705B (en) 2021-04-09

Family

ID=63131074

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810205117.1A Active CN108415705B (en) 2018-03-13 2018-03-13 Webpage generation method and device, storage medium and equipment

Country Status (1)

Country Link
CN (1) CN108415705B (en)

Families Citing this family (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109408058B (en) * 2018-10-31 2022-02-22 北京影谱科技股份有限公司 Front-end auxiliary development method and device based on machine learning
CN109656552B (en) * 2018-11-01 2022-02-15 中交第二航务工程局有限公司 Method for automatically converting design drawing into webpage based on box model
CN111258551A (en) * 2018-11-30 2020-06-09 中国移动通信集团浙江有限公司 Code generation method and device
CN109783094A (en) * 2018-12-15 2019-05-21 深圳壹账通智能科技有限公司 Front end page generation method, device, computer equipment and storage medium
CN109766089B (en) * 2018-12-15 2023-05-30 平安科技(深圳)有限公司 Code generation method and device based on dynamic diagram, electronic equipment and storage medium
CN109710523B (en) * 2018-12-18 2023-04-07 平安科技(深圳)有限公司 Visual draft test case generation method and device, storage medium and electronic equipment
CN110032365A (en) * 2019-04-19 2019-07-19 广东小天才科技有限公司 A kind of the codelookup method, apparatus and terminal device of Sketch graphic file
CN111831279B (en) * 2019-04-22 2022-05-31 华为技术有限公司 Interface code generation method and device
CN110069309B (en) * 2019-04-23 2021-02-12 广州方硅信息技术有限公司 Page configuration method, system and client
CN110321126B (en) * 2019-07-08 2020-09-29 北京三快在线科技有限公司 Method and device for generating page code
CN112749364B (en) * 2020-02-28 2023-09-15 腾讯科技(深圳)有限公司 Webpage generation method, device, equipment and storage medium based on artificial intelligence
CN111538482A (en) * 2020-03-18 2020-08-14 中国平安人寿保险股份有限公司 Webpage making method and device, computer equipment and storage medium
CN113296767A (en) * 2020-04-07 2021-08-24 阿里巴巴集团控股有限公司 UI component generation method and device and user interface processing method and device
CN112558973A (en) * 2020-12-25 2021-03-26 青岛海尔科技有限公司 Front-end page generation method and device, storage medium and electronic device
CN114217782B (en) * 2022-02-22 2022-05-27 深圳市明源云科技有限公司 Method, device, equipment and medium for automatically generating interactive page
CN115221448A (en) * 2022-08-01 2022-10-21 北京美迪康信息咨询有限公司 Webpage configuration method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105930159A (en) * 2016-04-20 2016-09-07 中山大学 Image-based interface code generation method and system
CN106155686A (en) * 2016-06-30 2016-11-23 华为技术有限公司 Interface creating method, device and system
CN107402747A (en) * 2016-05-20 2017-11-28 中国科学院声学研究所 A kind of five application page dynamic creation method for supporting multiple terminals type
CN108304243A (en) * 2018-02-06 2018-07-20 中国平安人寿保险股份有限公司 Interface creating method, device, computer equipment and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105373938A (en) * 2014-08-27 2016-03-02 阿里巴巴集团控股有限公司 Method for identifying commodity in video image and displaying information, device and system
US10756991B2 (en) * 2015-09-17 2020-08-25 Salesforce.Com, Inc. Simplified entity engagement automation

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105930159A (en) * 2016-04-20 2016-09-07 中山大学 Image-based interface code generation method and system
CN107402747A (en) * 2016-05-20 2017-11-28 中国科学院声学研究所 A kind of five application page dynamic creation method for supporting multiple terminals type
CN106155686A (en) * 2016-06-30 2016-11-23 华为技术有限公司 Interface creating method, device and system
CN108304243A (en) * 2018-02-06 2018-07-20 中国平安人寿保险股份有限公司 Interface creating method, device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN108415705A (en) 2018-08-17

Similar Documents

Publication Publication Date Title
CN108415705B (en) Webpage generation method and device, storage medium and equipment
CN107885533B (en) Method and device for managing component codes
CN110413837B (en) Video recommendation method and device
CN111104980B (en) Method, device, equipment and storage medium for determining classification result
CN111026992A (en) Multimedia resource preview method, device, terminal, server and storage medium
CN112230914A (en) Method and device for producing small program, terminal and storage medium
CN111159604A (en) Picture resource loading method and device
CN112052354A (en) Video recommendation method, video display method and device and computer equipment
CN112257006A (en) Page information configuration method, device, equipment and computer readable storage medium
CN113747199A (en) Video editing method, video editing apparatus, electronic device, storage medium, and program product
CN111325220A (en) Image generation method, device, equipment and storage medium
CN111083554A (en) Method and device for displaying live gift
CN113609358A (en) Content sharing method and device, electronic equipment and storage medium
CN112053360A (en) Image segmentation method and device, computer equipment and storage medium
CN112069350A (en) Song recommendation method, device, equipment and computer storage medium
CN110990728A (en) Method, device and equipment for managing point of interest information and storage medium
CN110889060A (en) Webpage display method and device, computer equipment and storage medium
CN114125531B (en) Video preview method, device, terminal and storage medium
CN113467663B (en) Interface configuration method, device, computer equipment and medium
CN114817709A (en) Sorting method, device, equipment and computer readable storage medium
CN113918252A (en) Interface display method and device, computer equipment and storage medium
CN111294320B (en) Data conversion method and device
CN113301422A (en) Method, terminal and storage medium for acquiring video cover
CN113051485A (en) Group searching method, device, terminal and storage medium
CN113076452A (en) Application classification method, device, equipment and computer readable storage medium

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