Unlock instant, AI-driven research and patent intelligence for your innovation.

File generation method and device, equipment and storage medium

A file generation and file technology, applied in the field of computer networks, can solve problems such as duplication of labor and spelling errors in CSS declaration codes, and achieve the effect of improving efficiency and accuracy.

Pending Publication Date: 2020-08-28
BEIJING BYTEDANCE NETWORK TECH CO LTD
View PDF3 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Therefore, when there are many tags in the hypertext code, there will be a lot of CSS declaration codes to be generated, which will cause a lot of duplication of work and generate a large number of misspellings of CSS declaration codes

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • File generation method and device, equipment and storage medium
  • File generation method and device, equipment and storage medium
  • File generation method and device, equipment and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0051] figure 1 It is a flow chart of a file generation method in Embodiment 1 of the present disclosure. This embodiment is applicable to the situation of generating a CSS declaration file based on a hypertext file. The method can be executed by a file generation device, which can use software and And / or implemented in a hardware manner, the apparatus may be configured in a device, such as a terminal device. Such as figure 1 As shown, the method specifically includes the following steps:

[0052] Step 110, acquire the hypertext file, and generate a character string file corresponding to the hypertext file.

[0053] Wherein, the string file includes multiple sets of opening and closing tags in a nested manner, and each set of opening and closing tags corresponds to a class name.

[0054] In this embodiment, a hypertext file refers to a file storing hypertext codes, and there are multiple sets of tags in the hypertext codes, and each set of tags corresponds to a class name. ...

Embodiment 2

[0068] Figure 2a It is a flowchart of a file generation method in Embodiment 2 of the present disclosure. This embodiment may be combined with various optional solutions in the foregoing embodiments. Specifically, refer to Figure 2a , the method may include the following steps:

[0069] Step 210, obtain the hypertext file, and generate a string file corresponding to the hypertext file, the string file includes multiple sets of opening and closing tags in a nested manner, and each set of opening and closing tags corresponds to a class name.

[0070] In this embodiment, step 210 is the same as step 110 in the first embodiment, and will not be repeated here.

[0071] Step 220, traversing the opening and closing tags included in the string file, and nesting and storing the nested relationship between the opening and closing tags and the class names corresponding to each group of opening and closing tags in multiple data objects , get the target data object.

[0072] In this...

Embodiment 3

[0079] image 3 It is a schematic structural diagram of a file generation device in Embodiment 3 of the present disclosure. This embodiment is applicable to the situation of generating a CSS declaration file based on a hypertext file. The device can be implemented by software and / or hardware. The device can It is configured in a device, such as a typical terminal device. Such as image 3 As shown, the device may include:

[0080] The obtaining module 310 is used to obtain the hypertext file, and generates a string file corresponding to the hypertext file, the string file includes multiple groups of opening and closing tags formed in a nested form, and each group of opening and closing tags corresponds to a class name;

[0081] The parsing module 320 is used to parse the string file according to the opening and closing tags included in the string file to obtain the target data object in a tree structure, and the tree structure is used to describe the nesting form of multiple ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The embodiment of the invention discloses a file generation method and device, equipment and a storage medium. The file generation method comprises the steps: acquiring a hypertext file, and generating a character string file corresponding to the hypertext file, wherein the character string file comprises multiple sets of opening and closing labels formed in a nested mode, and each set of openingand closing labels corresponds to one class name; analyzing the character string file according to each opening and closing label included in the character string file to obtain a target data object of a tree structure, the tree structure being used for describing the nesting mode of the plurality of groups of opening and closing labels; and generating a declaration file corresponding to the hypertext file according to the target data object. According to the technical scheme of the embodiment of the invention, the CSS statement file is automatically generated according to the hypertext file,and the efficiency and accuracy of front-end development are improved.

Description

technical field [0001] Embodiments of the present disclosure relate to the technical field of computer networks, and in particular, to a file generation method, device, device, and storage medium. Background technique [0002] With the development of front-end development, more and more tools are used to improve development efficiency. Currently, in front-end development, writing page codes usually includes Hyper Text Markup Language (Hyper Text Markup Language, HTML) codes and Cascading Style Sheets (Cascading Style Sheets, CSS) codes. [0003] There are many declarations of class attributes in the hypertext code. When there are declaration codes corresponding to these declarations in the CSS code, the CSS code can take effect. If the declaration name in the hypertext code is different from the declaration name in the CSS code, the CSS code will not take effect. Therefore, when there are many tags in the hypertext code, a lot of CSS declaration codes need to be generated,...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F8/30
CPCG06F8/31
Inventor 俞亮
Owner BEIJING BYTEDANCE NETWORK TECH CO LTD