CN116225416A - Webpage code creation method, device, equipment and storage medium - Google Patents

Webpage code creation method, device, equipment and storage medium Download PDF

Info

Publication number
CN116225416A
CN116225416A CN202310386713.5A CN202310386713A CN116225416A CN 116225416 A CN116225416 A CN 116225416A CN 202310386713 A CN202310386713 A CN 202310386713A CN 116225416 A CN116225416 A CN 116225416A
Authority
CN
China
Prior art keywords
component
code
type
identification
webpage
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
CN202310386713.5A
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.)
Kangjian Information Technology Shenzhen Co Ltd
Original Assignee
Kangjian Information 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 Kangjian Information Technology Shenzhen Co Ltd filed Critical Kangjian Information Technology Shenzhen Co Ltd
Priority to CN202310386713.5A priority Critical patent/CN116225416A/en
Publication of CN116225416A publication Critical patent/CN116225416A/en
Pending legal-status Critical Current

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/34Graphical or visual programming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/36Software reuse
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding
    • G06F8/447Target code generation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/18Extraction of features or characteristics of the image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/19Recognition using electronic means
    • G06V30/191Design or setup of recognition systems or techniques; Extraction of features in feature space; Clustering techniques; Blind source separation
    • G06V30/19173Classification techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/40Document-oriented image-based pattern recognition
    • G06V30/42Document-oriented image-based pattern recognition based on the type of document
    • G06V30/422Technical drawings; Geographical maps
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention relates to the development auxiliary field technology, and discloses a webpage code creation method which can be used in the electronic commerce field, comprising the following steps: receiving a visual manuscript of a webpage to be created and a webpage code type; separating the layers in the visual manuscript; identifying components in each layer to obtain the identification type and the component contour coordinates of each component in the layer; searching a component code corresponding to the identification type of each component from a pre-constructed component code library to obtain an initial component code of the component; converting an initial component code of the component into a target webpage code type according to the component outline coordinates to obtain a target component code of the component; and combining all the target component codes to obtain the webpage codes of the webpage to be created. The invention also relates to a blockchain technique, wherein the target component code can be stored in a blockchain node. The invention also provides a device, equipment and medium for creating the webpage code. The invention can improve the efficiency of creating the webpage codes.

Description

Webpage code creation method, device, equipment and storage medium
Technical Field
The present invention relates to development assistance technologies, and in particular, to a method and apparatus for creating a web page code, an electronic device, and a storage medium.
Background
With the development of the internet, the network becomes an important way for information transmission, and many related enterprises of electronic commerce need to create web pages to realize the transmission propaganda of commodities, and before the web pages are created, the web page codes are created according to the visual manuscripts of the web pages to be created so as to realize the creation of the web pages.
However, in the existing webpage code creation method, a user needs to wait for a visual draft drawing person to provide information of components in the visual draft, and when the component information is absent, code writing cannot be performed, so that the efficiency of webpage code creation is low.
Disclosure of Invention
The invention provides a webpage code creation method, a webpage code creation device, electronic equipment and a storage medium, and mainly aims to improve the efficiency of webpage code creation.
Receiving a visual manuscript of a webpage to be created and a webpage code type;
performing layer separation on the visual manuscript to separate all layers in the visual manuscript;
identifying components in each layer by utilizing a pre-constructed component identification model to obtain the identification type and the component contour coordinates of each component in the layer;
searching a component code corresponding to the identification type of each component from a pre-constructed component code library to obtain an initial component code of the component;
converting the initial component code of the component into the target webpage code type according to the component outline coordinates to obtain a target component code of the component;
and combining all the target component codes to obtain the webpage codes of the webpage to be created.
Optionally, the identifying the components in each layer by using the pre-constructed component identification model to obtain the identification type and the component contour coordinates of each component in the layer includes:
identifying component contour coordinates of components in the layer, and cutting an area surrounded by the component contour coordinates in the layer to obtain a component picture;
the component image is convolved and pooled by utilizing the component identification model to obtain a component feature matrix;
performing feature compression on the component feature matrix by using a feature compression network comprising a plurality of full-connection layers to obtain feature values of different preset component identification types;
calculating the recognition probability of each component recognition type by using a preset classification function based on the characteristic value;
and screening all the component identification types by using a preset identification probability threshold value to obtain the identification types.
Optionally, the screening all the component identification types by using a preset identification probability threshold value to obtain an identification type includes:
determining a component identification type with the identification probability larger than the identification probability threshold as an initial identification type;
and determining the initial recognition type with the largest recognition probability as the recognition type.
Optionally, the searching the component code corresponding to the identification type of each component from the pre-constructed component code library to obtain the initial component code of the component includes:
extracting a component type corresponding to each component code in the component code library;
determining the same component type as the identification type as a target component type;
and inquiring the component code corresponding to the target component type in the component code library to obtain the initial component code.
Optionally, the searching the component code corresponding to the identification type of each component from the pre-constructed component code library to obtain the initial component code of the component includes:
extracting a component type corresponding to each component code in the component code library;
converting the component type into a component type vector;
converting the identification type into an identification type vector;
calculating the similarity of the component type vector and the identification type vector to obtain component similarity;
and screening all the component codes according to the component similarity to obtain the initial component code.
Optionally, the converting the initial component code into the target webpage code type according to the component outline coordinate to obtain a target component code includes:
replacing the position parameters in the initial component codes corresponding to the components with the component contour coordinates corresponding to the components to obtain the universal component codes of the components;
and converting the general component code of the component into a target webpage code type to obtain the target component code of the component.
In order to solve the above problems, the present invention also provides a web code creation apparatus, the apparatus comprising:
the layer separation module is used for receiving the visual manuscript of the webpage to be created and the type of the webpage code; performing layer separation on the visual manuscript to separate all layers in the visual manuscript;
the component identification module is used for identifying the components in each layer by utilizing a pre-constructed component identification model to obtain the identification type and the component contour coordinates of each component in the layer;
the code creation module is used for searching the component code corresponding to the identification type of each component from the pre-constructed component code library to obtain the initial component code of the component; converting the initial component code of the component into the target webpage code type according to the component outline coordinates to obtain a target component code of the component; and combining all the target component codes to obtain the webpage codes of the webpage to be created.
Optionally, the searching the component code corresponding to the identification type of each component from the pre-constructed component code library to obtain the initial component code of the component includes:
extracting a component type corresponding to each component code in the component code library;
converting the component type into a component type vector;
converting the identification type into an identification type vector;
calculating the similarity of the component type vector and the identification type vector to obtain component similarity;
and screening all the component codes according to the component similarity to obtain the initial component code.
In order to solve the above-mentioned problems, the present invention also provides an electronic apparatus including:
a memory storing at least one computer program; a kind of electronic device with high-pressure air-conditioning system
And a processor executing the computer program stored in the memory to implement the above-described web page code creation method.
In order to solve the above-described problems, the present invention also provides a computer-readable storage medium having stored therein at least one computer program that is executed by a processor in an electronic device to implement the above-described web page code creation method.
The embodiment of the invention carries out layer separation on the visual manuscript so as to separate all layers in the visual manuscript; identifying components in each layer by utilizing a pre-constructed component identification model to obtain the identification type and the component contour coordinates of each component in the layer; searching a component code corresponding to the identification type of each component from a pre-constructed component code library to obtain an initial component code of the component; converting the initial component code of the component into the target webpage code type according to the component outline coordinates to obtain a target component code of the component; the method, the device, the electronic equipment and the readable storage medium for creating the webpage codes can directly identify the information of the components in the visual manuscript, do not need to wait for the provision of visual manuscript drawing personnel, automatically match and screen the codes of the assembly components, do not need to write the codes manually, and improve the efficiency of creating the webpage codes.
Drawings
FIG. 1 is a flowchart illustrating a method for creating a web page code according to an embodiment of the present invention;
FIG. 2 is a schematic block diagram of a device for creating a web page code according to an embodiment of the present invention;
fig. 3 is a schematic diagram of an internal structure of an electronic device for implementing a method for creating a web page code according to an embodiment of the present invention;
the achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
The embodiment of the invention provides a webpage code creation method. The execution subject of the webpage code creation method includes, but is not limited to, at least one of a server, a terminal, and the like, which can be configured to execute the method provided by the embodiment of the application. In other words, the web code creation method may be performed by software or hardware installed in a terminal device or a server device, and the software may be a blockchain platform. The service end includes but is not limited to: the server can be an independent server, or can be a cloud server for providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDNs), basic cloud computing services such as big data and artificial intelligent platforms, and the like.
Referring to fig. 1, which is a schematic flow chart of a method for creating a web page code according to an embodiment of the present invention, in an embodiment of the present invention, the method for creating a web page code includes the following steps:
s1, receiving a visual manuscript of a webpage to be created and a webpage code type;
the visual manuscript in the embodiment of the invention is the visual manuscript of the commodity propaganda webpage in the electronic commerce field created by using drawing software such as Photoshop or CorelDRAW and the like of the webpage to be created, the type of the webpage code is the programming language type for ensuring that the webpage to be created is integrated into the webpage code running in the set system environment, and the embodiment of the invention does not limit the type of the webpage code.
S2, carrying out layer separation on the visual manuscript so as to separate all layers in the visual manuscript;
in the embodiment of the invention, in order to fully acquire the component information of each layer in the visual manuscript, the components in the visual manuscript are better identified, so that the visual manuscript is subjected to layer separation to separate all layers in the visual manuscript, and optionally, the layers of the visual manuscript can be separated by using drawing software such as Photoshop or CorelDRAW.
S3, identifying the components in each layer by utilizing a pre-constructed component identification model, and obtaining the identification type and the component contour coordinates of each component in the layer;
the component recognition model in the embodiment of the invention is a deep learning model, can be a convolutional neural network model and the like, and is not limited in type.
Specifically, in the embodiment of the present invention, the identifying the components in each layer by using the pre-constructed component identification model to obtain the identification type and the component contour coordinates of each component in the layer includes:
identifying component contour coordinates of components in the layer, and cutting an area surrounded by the component contour coordinates in the layer to obtain a component picture;
convolving and pooling the component pictures by utilizing a feature extraction network in the component identification model to obtain a component feature matrix;
performing feature compression on the component feature matrix by utilizing a feature compression network comprising a plurality of full-connection layers in the component recognition model to obtain feature values of different preset component recognition types;
calculating the recognition probability of each component recognition type by using a preset classification function based on the characteristic value;
and screening all the component identification types by using a preset identification probability threshold value to obtain the identification types.
The component identification model is obtained by connecting a characteristic extraction network and a characteristic compression network in series, wherein the characteristic extraction network comprises a plurality of convolution layers and pooling layers, the layers are connected in series, and the types and the connection sequence of the convolution layers and the pooling layers are not limited; the characteristic compression network is formed by connecting multiple layers of fully-connected networks in series, wherein the number of input nodes of the first layer of fully-connected network is greater than the number of output nodes of the last layer of fully-connected network, and the number of output nodes of the last layer of fully-connected network is equal to the number of preset component identification types; the classification function may be a softmax function.
Specifically, in the embodiment of the present invention, the component contour coordinates of the component in the layer may be identified by using a pre-constructed segmentation model, and an area surrounded by the component contour coordinates in the layer may be cut to obtain a component picture.
Further, in the embodiment of the invention, all the component identification types are screened by using a preset identification probability threshold value to obtain the identification types;
determining a component identification type with the identification probability larger than the identification probability threshold as an initial identification type;
and determining the initial recognition type with the largest recognition probability as the recognition type.
S4, searching a component code corresponding to the identification type of each component from a pre-constructed component code library to obtain an initial component code of the component;
the component code library in the embodiment of the invention is component codes written for DSL (Domain Specific Language ) containing different component types, so as to facilitate the conversion of the component language into the target language of the application.
Further, in the embodiment of the present invention, searching for a component code corresponding to an identification type of each component from a pre-constructed component code library to obtain an initial component code of the component, including:
extracting a component type corresponding to each component code in the component code library;
determining the same component type as the identification type as a target component type;
and inquiring the component code corresponding to the target component type in the component code library to obtain the initial component code.
In order to prevent the situation that the description difference causes no matching, in the embodiment of the present invention, semantic matching may also be performed, where searching, from a pre-built component code library, a component code corresponding to an identification type of each component, to obtain an initial component code of the component includes:
extracting a component type corresponding to each component code in the component code library;
converting the component type into a component type vector;
converting the identification type into an identification type vector;
calculating the similarity of the component type vector and the identification type vector to obtain the component similarity;
and screening all the component codes according to the component similarity to obtain initial component codes.
In another embodiment of the present invention, searching a component code corresponding to an identification type of each component from a pre-constructed component code library to obtain an initial component code of the component includes:
extracting a component type corresponding to each component code in the component code library;
judging whether the component code library has the same component type as the identification type;
when the component code library has the same component type as the identification type;
determining the same component type as the identification type as a target component type;
inquiring a component code corresponding to the target component type in the component code library to obtain the initial component code;
when the component code library does not exist the component type which is the same as the identification type;
converting the component type into a component type vector;
converting the identification type into an identification type vector;
calculating the similarity of the component type vector and the identification type vector to obtain the component similarity;
and screening all the component codes according to the component similarity to obtain initial component codes.
Specifically, in the embodiment of the present invention, the screening all the component codes according to the component similarity to obtain an initial component code includes:
determining the component similarity larger than a preset similarity threshold as the target component similarity;
determining a component type vector corresponding to the target component similarity as a target identification type vector;
determining the component type corresponding to the target recognition type vector as a target component type;
and inquiring the component code corresponding to the target component type in the component code library to obtain the initial component code.
In detail, the converting the component type into the component type vector in the embodiment of the invention includes:
converting each character in the component type into a character vector;
combining all the character vectors according to the sequence of the corresponding characters in the component types to obtain a component type matrix;
and carrying out dimension compression on the component type matrix to obtain the component type vector.
In the embodiment of the invention, the character can be converted into the character vector by using methods such as onehot algorithm or model, and further, the character vector is used as a column of a matrix to be combined to obtain a component type matrix, and dimensional compression is performed by using methods such as a multi-layer perceptron or convolution.
S5, converting the initial component code of the component into the target webpage code type according to the component outline coordinates to obtain a target component code of the component;
in the embodiment of the invention, the initial component code is the universal code of the component and the response adjustment is needed according to the position of the component, so that in the embodiment of the invention, the initial component code is converted into the target webpage code type according to the contour coordinates of the component to obtain the target component code.
Specifically, in the embodiment of the present invention, the converting the initial component code into the target web page code type according to the component outline coordinate to obtain the target component code includes:
replacing the position parameters in the initial component codes corresponding to the components with the component contour coordinates corresponding to the components to obtain the universal component codes of the components;
and converting the general component code of the component into a target webpage code type to obtain the target component code of the component.
Specifically, in the embodiment of the present invention, a preset web adaptation layer may be used to convert the initial component code into the target web page code type.
In another embodiment of the present invention, the object component code may be stored in a blockchain node, and the high throughput characteristic of the blockchain node is utilized to improve the data access efficiency.
S6, combining all the target component codes to obtain the webpage codes of the webpage to be created.
In the embodiment of the invention, all the target codes are packaged into a preset blank webpage code development frame to obtain the webpage code of the webpage to be created.
Further, in the embodiment of the present invention, after all the target component codes are combined to obtain the web page code of the web page to be created, the method further includes:
and sending the webpage codes to terminal equipment or preset terminal equipment of a developer to be created the webpage.
The terminal equipment in the embodiment of the invention can be intelligent terminals such as mobile phones, computers and tablets.
As shown in fig. 2, a functional block diagram of the web page code creation apparatus of the present invention is shown.
The web page code creation apparatus 100 of the present invention may be installed in an electronic device. Depending on the implemented functions, the web page code creation means may comprise a layer separation module 101, a component identification module 102, a code creation module 103, which may also be referred to as a unit, refers to a series of computer program segments capable of being executed by a processor of an electronic device and of performing a fixed function, which are stored in a memory of the electronic device.
In the present embodiment, the functions concerning the respective modules/units are as follows:
the layer separation module 101 is configured to receive a visual manuscript of a webpage to be created and a webpage code type; performing layer separation on the visual manuscript to separate all layers in the visual manuscript;
the component recognition module 102 is configured to recognize components in each layer by using a pre-constructed component recognition model, so as to obtain a recognition type and a component contour coordinate of each component in the layer;
the code creating module 103 is configured to search a pre-built component code library for a component code corresponding to an identification type of each component, to obtain an initial component code of the component; converting the initial component code of the component into the target webpage code type according to the component outline coordinates to obtain a target component code of the component; and combining all the target component codes to obtain the webpage codes of the webpage to be created.
In detail, each module in the web page code creation apparatus 100 in the embodiment of the present invention adopts the same technical means as the web page code creation method described in fig. 1 and can produce the same technical effects when in use, and will not be described herein.
Fig. 3 is a schematic structural diagram of an electronic device for implementing the method for creating web page codes according to the present invention.
The electronic device may comprise a processor 10, a memory 11, a communication bus 12 and a communication interface 13, and may further comprise a computer program, such as a web code creation program, stored in the memory 11 and executable on the processor 10.
The memory 11 includes at least one type of readable storage medium, including flash memory, a mobile hard disk, a multimedia card, a card memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, etc. The memory 11 may in some embodiments be an internal storage unit of the electronic device, such as a mobile hard disk of the electronic device. The memory 11 may in other embodiments also be an external storage device of the electronic device, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the electronic device. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device. The memory 11 may be used not only for storing application software installed in an electronic device and various types of data, such as a code of a web code creation program, etc., but also for temporarily storing data that has been output or is to be output.
The processor 10 may be comprised of integrated circuits in some embodiments, for example, a single packaged integrated circuit, or may be comprised of multiple integrated circuits packaged with the same or different functions, including one or more central processing units (Central Processing Unit, CPU), microprocessors, digital processing chips, graphics processors, combinations of various control chips, and the like. The processor 10 is a Control Unit (Control Unit) of the electronic device, connects various components of the entire electronic device using various interfaces and lines, and executes various functions of the electronic device and processes data by running or executing programs or modules (e.g., web code creation programs, etc.) stored in the memory 11, and calling data stored in the memory 11.
The communication bus 12 may be a peripheral component interconnect standard (PerIPheral Component Interconnect, PCI) bus, or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, among others. The bus may be classified as an address bus, a data bus, a control bus, etc. The communication bus 12 is arranged to enable a connection communication between the memory 11 and at least one processor 10 etc. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
Fig. 3 shows only an electronic device with components, and it will be understood by those skilled in the art that the structure shown in fig. 3 is not limiting of the electronic device and may include fewer or more components than shown, or may combine certain components, or a different arrangement of components.
For example, although not shown, the electronic device may further include a power source (such as a battery) for supplying power to the respective components, and preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that functions of charge management, discharge management, power consumption management, and the like are implemented through the power management device. The power supply may also include one or more of any of a direct current or alternating current power supply, recharging device, power failure classification circuit, power converter or inverter, power status indicator, etc. The electronic device may further include various sensors, bluetooth modules, wi-Fi modules, etc., which are not described herein.
Optionally, the communication interface 13 may comprise a wired interface and/or a wireless interface (e.g., WI-FI interface, bluetooth interface, etc.), typically used to establish a communication connection between the electronic device and other electronic devices.
Optionally, the communication interface 13 may further comprise a user interface, which may be a Display, an input unit, such as a Keyboard (Keyboard), or a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch, or the like. The display may also be referred to as a display screen or display unit, as appropriate, for displaying information processed in the electronic device and for displaying a visual user interface.
It should be understood that the embodiments described are for illustrative purposes only and are not limited to this configuration in the scope of the patent application.
The web code creation program stored in the memory 11 in the electronic device is a combination of a plurality of computer programs, which when run in the processor 10, can implement:
receiving a visual manuscript of a webpage to be created and a webpage code type;
performing layer separation on the visual manuscript to separate all layers in the visual manuscript;
identifying components in each layer by utilizing a pre-constructed component identification model to obtain the identification type and the component contour coordinates of each component in the layer;
searching a component code corresponding to the identification type of each component from a pre-constructed component code library to obtain an initial component code of the component;
converting the initial component code of the component into the target webpage code type according to the component outline coordinates to obtain a target component code of the component;
and combining all the target component codes to obtain the webpage codes of the webpage to be created.
In particular, the specific implementation method of the processor 10 on the computer program may refer to the description of the relevant steps in the corresponding embodiment of fig. 1, which is not repeated herein.
Further, the electronic device integrated modules/units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. The computer readable medium may be non-volatile or volatile. The computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM).
Embodiments of the present invention may also provide a computer readable storage medium storing a computer program which, when executed by a processor of an electronic device, may implement:
receiving a visual manuscript of a webpage to be created and a webpage code type;
performing layer separation on the visual manuscript to separate all layers in the visual manuscript;
identifying components in each layer by utilizing a pre-constructed component identification model to obtain the identification type and the component contour coordinates of each component in the layer;
searching a component code corresponding to the identification type of each component from a pre-constructed component code library to obtain an initial component code of the component;
converting the initial component code of the component into the target webpage code type according to the component outline coordinates to obtain a target component code of the component;
and combining all the target component codes to obtain the webpage codes of the webpage to be created.
Further, the computer-usable storage medium may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created from the use of blockchain nodes, and the like.
In the several embodiments provided in the present invention, it should be understood that the disclosed apparatus, device and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical function division, and there may be other manners of division when actually implemented.
The modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical units, may be located in one place, or may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
The embodiment of the application can acquire and process the related data based on the artificial intelligence technology. Among these, artificial intelligence (Artificial Intelligence, AI) is the theory, method, technique and application system that uses a digital computer or a digital computer-controlled machine to simulate, extend and extend human intelligence, sense the environment, acquire knowledge and use knowledge to obtain optimal results.
In addition, each functional module in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units can be realized in a form of hardware or a form of hardware and a form of software functional modules.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential characteristics thereof.
The present embodiments are, therefore, to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
The blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm and the like. The Blockchain (Blockchain), which is essentially a decentralised database, is a string of data blocks that are generated by cryptographic means in association, each data block containing a batch of information of network transactions for verifying the validity of the information (anti-counterfeiting) and generating the next block. The blockchain may include a blockchain underlying platform, a platform product services layer, an application services layer, and the like.
Furthermore, it is evident that the word "comprising" does not exclude other elements or steps, and that the singular does not exclude a plurality. A plurality of units or means recited in the system claims can also be implemented by means of software or hardware by means of one unit or means. The terms second, etc. are used to denote a name, but not any particular order.
Finally, it should be noted that the above-mentioned embodiments are merely for illustrating the technical solution of the present invention and not for limiting the same, and although the present invention has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications and equivalents may be made to the technical solution of the present invention without departing from the spirit and scope of the technical solution of the present invention.

Claims (10)

1. A method of creating a web page code, the method comprising:
receiving a visual manuscript of a webpage to be created and a webpage code type;
performing layer separation on the visual manuscript to separate all layers in the visual manuscript;
identifying components in each layer by utilizing a pre-constructed component identification model to obtain the identification type and the component contour coordinates of each component in the layer;
searching a component code corresponding to the identification type of each component from a pre-constructed component code library to obtain an initial component code of the component;
converting the initial component code of the component into the target webpage code type according to the component outline coordinates to obtain a target component code of the component;
and combining all the target component codes to obtain the webpage codes of the webpage to be created.
2. The method for creating a web page code according to claim 1, wherein the identifying the components in each layer using the pre-built component identification model to obtain the identification type and the component profile coordinates of each component in the layer comprises:
identifying component contour coordinates of components in the layer, and cutting an area surrounded by the component contour coordinates in the layer to obtain a component picture;
convolving and pooling the component pictures by utilizing a feature extraction network in the component identification model to obtain a component feature matrix;
performing feature compression on the component feature matrix by utilizing a feature compression network comprising a plurality of full-connection layers in the component recognition model to obtain feature values of different preset component recognition types;
calculating the recognition probability of each component recognition type by using a preset classification function based on the characteristic value;
and screening all the component identification types by using a preset identification probability threshold value to obtain the identification types.
3. The method for creating a web page code according to claim 2, wherein said screening all the component recognition types by using a preset recognition probability threshold value to obtain a recognition type comprises:
determining a component identification type with the identification probability larger than the identification probability threshold as an initial identification type;
and determining the initial recognition type with the largest recognition probability as the recognition type.
4. The method for creating a web page code according to claim 1, wherein searching for a component code corresponding to an identification type of each component from a pre-built component code library to obtain an initial component code of the component comprises:
extracting a component type corresponding to each component code in the component code library;
determining the same component type as the identification type as a target component type;
and inquiring the component code corresponding to the target component type in the component code library to obtain the initial component code.
5. The method for creating a web page code according to claim 1, wherein searching for a component code corresponding to an identification type of each component from a pre-built component code library to obtain an initial component code of the component comprises:
extracting a component type corresponding to each component code in the component code library;
converting the component type into a component type vector;
converting the identification type into an identification type vector;
calculating the similarity of the component type vector and the identification type vector to obtain component similarity;
and screening all the component codes according to the component similarity to obtain the initial component code.
6. The method for creating a web page code according to any one of claims 1 to 4, wherein said converting the initial component code into the target web page code type according to the component outline coordinates to obtain a target component code includes:
replacing the position parameters in the initial component codes corresponding to the components with the component contour coordinates corresponding to the components to obtain the universal component codes of the components;
and converting the general component code of the component into a target webpage code type to obtain the target component code of the component.
7. A web page code creation apparatus, comprising:
the layer separation module is used for receiving the visual manuscript of the webpage to be created and the type of the webpage code; performing layer separation on the visual manuscript to separate all layers in the visual manuscript;
the component identification module is used for identifying the components in each layer by utilizing a pre-constructed component identification model to obtain the identification type and the component contour coordinates of each component in the layer;
the code creation module is used for searching the component code corresponding to the identification type of each component from the pre-constructed component code library to obtain the initial component code of the component; converting the initial component code of the component into the target webpage code type according to the component outline coordinates to obtain a target component code of the component; and combining all the target component codes to obtain the webpage codes of the webpage to be created.
8. The web page code creation apparatus of claim 7, wherein the searching for the component code corresponding to the identification type of each component from the pre-built component code library to obtain the initial component code of the component comprises:
extracting a component type corresponding to each component code in the component code library;
converting the component type into a component type vector;
converting the identification type into an identification type vector;
calculating the similarity of the component type vector and the identification type vector to obtain component similarity;
and screening all the component codes according to the component similarity to obtain the initial component code.
9. An electronic device, the electronic device comprising:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor;
wherein the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the web page code creation method of any of claims 1 to 6.
10. A computer-readable storage medium storing a computer program, wherein the computer program when executed by a processor implements the web code creation method according to any one of claims 1 to 6.
CN202310386713.5A 2023-04-03 2023-04-03 Webpage code creation method, device, equipment and storage medium Pending CN116225416A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310386713.5A CN116225416A (en) 2023-04-03 2023-04-03 Webpage code creation method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310386713.5A CN116225416A (en) 2023-04-03 2023-04-03 Webpage code creation method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116225416A true CN116225416A (en) 2023-06-06

Family

ID=86573337

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310386713.5A Pending CN116225416A (en) 2023-04-03 2023-04-03 Webpage code creation method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116225416A (en)

Similar Documents

Publication Publication Date Title
CN113157927B (en) Text classification method, apparatus, electronic device and readable storage medium
CN114708461A (en) Multi-modal learning model-based classification method, device, equipment and storage medium
CN114491047A (en) Multi-label text classification method and device, electronic equipment and storage medium
CN114398557A (en) Information recommendation method and device based on double portraits, electronic equipment and storage medium
CN115018588A (en) Product recommendation method and device, electronic equipment and readable storage medium
CN113360654B (en) Text classification method, apparatus, electronic device and readable storage medium
CN114399775A (en) Document title generation method, device, equipment and storage medium
CN113157739A (en) Cross-modal retrieval method and device, electronic equipment and storage medium
CN115409041B (en) Unstructured data extraction method, device, equipment and storage medium
CN116630712A (en) Information classification method and device based on modal combination, electronic equipment and medium
CN113704474B (en) Bank outlet equipment operation guide generation method, device, equipment and storage medium
CN116468025A (en) Electronic medical record structuring method and device, electronic equipment and storage medium
CN113435308B (en) Text multi-label classification method, device, equipment and storage medium
CN113626605B (en) Information classification method, device, electronic equipment and readable storage medium
CN112233194B (en) Medical picture optimization method, device, equipment and computer readable storage medium
CN114943306A (en) Intention classification method, device, equipment and storage medium
CN115186188A (en) Product recommendation method, device and equipment based on behavior analysis and storage medium
CN115203364A (en) Software fault feedback processing method, device, equipment and readable storage medium
CN114676307A (en) Ranking model training method, device, equipment and medium based on user retrieval
CN114385815A (en) News screening method, device, equipment and storage medium based on business requirements
CN114610854A (en) Intelligent question and answer method, device, equipment and storage medium
CN114120347A (en) Form verification method and device, electronic equipment and storage medium
CN113343102A (en) Data recommendation method and device based on feature screening, electronic equipment and medium
CN116225416A (en) Webpage code creation method, device, equipment and storage medium
CN115204158B (en) Data isolation application method and device, electronic equipment and 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