CN108491209B - Method and device for extracting public codes in html page - Google Patents
Method and device for extracting public codes in html page Download PDFInfo
- Publication number
- CN108491209B CN108491209B CN201810155159.9A CN201810155159A CN108491209B CN 108491209 B CN108491209 B CN 108491209B CN 201810155159 A CN201810155159 A CN 201810155159A CN 108491209 B CN108491209 B CN 108491209B
- Authority
- CN
- China
- Prior art keywords
- code
- html
- repeated
- repeated code
- html page
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
- G06F8/44—Encoding
- G06F8/443—Optimisation
- G06F8/4434—Reducing the memory space required by the program code
- G06F8/4435—Detection or removal of dead or redundant code
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
- G06F8/44—Encoding
- G06F8/443—Optimisation
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention provides a method and a device for extracting public codes in an html page, wherein the method comprises the following steps: acquiring an html code corresponding to the html page according to the acquired html page; when repeated code blocks (called repeated blocks below) exist in the html code, the category of each repeated block, the position information of each repeated block in the html code and the data information of each repeated block are obtained, and corresponding identification is added to each repeated block according to the category of each repeated block; searching a repeated block in the html code according to the identifier, storing the position information of the same repeated block in the html code and the data information in the repeated block as an object, and deleting the repeated block and the data information in the repeated block; and selecting a section from the repeated blocks of each category as a public code, packaging the public code as a function by taking the public code as a content and the position information and the data information in the object corresponding to the public code as parameters, and realizing code optimization redundancy removal.
Description
Technical Field
The invention relates to the technical field of computer processing, in particular to a method and a device for extracting public codes in html pages.
Background
Various and free front-end templates are provided for software project development on the internet nowadays, and many enterprises choose to directly perform secondary development of front-end pages on the basis of the front-end templates in order to pursue the speed of market update.
However, most of the web template codes are mainly rendered, and a large amount of code redundancy problems easily exist. Therefore, when the front-end template is used, the front-end personnel is required to spend a long time to be familiar with the page content of the whole project, and each module of the page is disassembled on the basis of being familiar with the global project content, so that the workload is huge.
Disclosure of Invention
The invention provides a method and a device for extracting public codes in an html page, which at least partially solve the technical problems.
In a first aspect, the present invention provides a method for extracting a public code in an html page, including:
obtaining an html page, and obtaining an html code corresponding to the html page according to the html page;
when judging that repeated code blocks exist in the html code, acquiring the category of each repeated code block, the position information of each repeated code block in the html code and the data information of each repeated code block, and adding a corresponding identifier for each repeated code block according to the category of each repeated code block;
searching repeated code blocks in the html code according to the identification, storing the position information of the same repeated code block in the html code and the data information in the repeated code blocks as an object, and deleting the repeated code blocks and the data information in the repeated code blocks;
and selecting a section from the repeated code blocks of each category as a common code, and packaging the common code as a function by taking each section as content and the position information and the data information in the object corresponding to the common code as parameters.
Preferably, the method further comprises:
writing all functions into a preset position of each section of html code or writing the functions into at least one js file;
judging whether the position information in each function corresponds to the html page one by one when each html page is initialized;
if yes, calling a function corresponding to the position information to render the html page according to the public code, the position information and the data information in the function.
Preferably, obtaining an html code corresponding to the html page according to the html page includes:
and acquiring an html code corresponding to the html page by a file reading method according to the html page.
Preferably, after obtaining the html code corresponding to each html page according to the html page, before obtaining the category of the repeated code blocks, the position information of each repeated code block in the html code, and the data information in each repeated code block, the method further includes:
and judging whether repeated code blocks exist in the html code or not by a code comparison method.
Preferably, the method further comprises:
each function is named according to the configured function naming rule.
In a second aspect, the present invention further provides an apparatus for extracting a public code in an html page, including:
the system comprises an acquisition unit, a processing unit and a display unit, wherein the acquisition unit is used for acquiring an html page and acquiring an html code corresponding to the html page according to the html page;
the adding unit is used for acquiring the category of each repeated code block, the position information of each repeated code block in the html code and the data information of each repeated code block when judging that the repeated code blocks exist in the html code, and adding a corresponding identifier for each repeated code block according to the category of each repeated code block;
a deleting unit, configured to search for a repeated code block in the html code according to the identifier, store position information of the same repeated code block in the html code and data information in the repeated code block as an object, and delete the repeated code block and the data information in the repeated code block;
and the packaging unit is used for selecting one section of the code block with repeated categories as a public code, packaging the public code as a function by taking the public code as a content and taking the position information and the data information in the object corresponding to the public code as parameters.
Preferably, the apparatus further comprises:
the writing unit is used for writing all functions into a preset position of each html code or writing the functions into at least one js file;
the judging unit is used for judging whether the position information in each function corresponds to the html page one by one when each html page is initialized;
and if so, calling a function corresponding to the position information to render the html page according to the public code, the position information and the data information in the function.
Preferably, the acquiring unit includes:
and acquiring an html code corresponding to the html page by a file reading method according to the html page.
In a third aspect, the present invention also provides an electronic device, including:
at least one processor; and
at least one memory communicatively coupled to the processor, wherein:
the memory stores program instructions executable by the processor, the processor invoking the program instructions to perform the method.
In a fourth aspect, the invention also provides a non-transitory computer-readable storage medium storing computer instructions that cause the computer to perform the method.
The invention provides a method for extracting public codes in an html page, which comprises the steps of obtaining html codes corresponding to the html page according to the html page, obtaining the category of each repeated code block, the position information of each repeated code block in the html codes and the data information in each repeated code block when judging that the repeated code blocks exist in the html codes, adding a corresponding identifier for each repeated code block according to the category of each repeated code block, searching for the repeated code blocks in the html codes according to the identifier, storing the position information of the same repeated code block in the html codes and the data information in the repeated code blocks as an object, deleting the repeated code blocks and the data information in the repeated code blocks, selecting a section from the repeated code blocks in each category as the public codes, each section of public code is taken as content, and position information and data information in an object corresponding to the public code are taken as parameters to be packaged into a function, so that the purpose of optimizing and removing redundancy of the code is achieved, and the workload of front-end development is reduced.
Drawings
Fig. 1 is a flowchart of a method for extracting a public code in an html page according to an embodiment of the present invention;
FIG. 2 is a schematic block diagram of an apparatus for extracting common codes from html pages according to another embodiment of the present invention;
fig. 3 is a block diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a flowchart of a method for extracting a public code in an html page according to an embodiment 1 of the present invention.
The method for extracting the public code in the html page shown in fig. 1 comprises the following steps:
s101, obtaining an html page, and obtaining an html code corresponding to the html page according to the html page;
specifically, the obtaining of the html code corresponding to the html page according to the html page in this step includes:
and acquiring an html code corresponding to the html page by a file reading method according to the html page. The file reading method is an existing method.
It should be noted that the html page may be an html page template, i.e. a front-end template, which is obtained, and each html page obtains a corresponding html code.
S102, when judging that repeated code blocks exist in the html code, acquiring the category of each repeated code block, the position information of each repeated code block in the html code and the data information of each repeated code block, and adding a corresponding identifier for each repeated code block according to the category of each repeated code block;
it should be noted that, after the html code corresponding to the html page is obtained according to the html page in step S101, before the category of each repeated code block, the location information of each repeated code block in the html code, and the data information in each repeated code block are obtained in step S102, the method further includes: and judging whether repeated code blocks exist in the html code or not by a code comparison method, if so, executing the step S102, and otherwise, reserving the original code of the html code. The code comparison method is an existing method.
The judgment of whether repeated code blocks exist in the html code by a code comparison method can be specifically realized by the following modes:
and providing a config configuration file, and taking the configuration file as an html code to perform extraction and packaging conditions. The configuration condition of the config configuration file mainly comprises setting (1) how many character codes are repeated as an extraction starting point; (2) extracting whether the characters in the code repeatedly throw away the difference of the data information or not; (3) the function names the template. And according to the setting condition of config, positioning all repeated codes meeting the configuration condition by using a code comparison tool, acquiring the category of each repeated code block, and adding different identifications (id numbers) for the repeated code blocks of different categories to serve as the marks of the repeated code blocks.
S103, searching repeated code blocks in the html code according to the identification, storing the position information of the same repeated code block in the html code and the data information in the repeated code blocks as an object, and deleting the repeated code blocks and the data information in the repeated code blocks;
the specific implementation manner of searching for repeated code blocks in the html code according to the identifier in this step is as follows: traversing the identification of the repeated code, specifically positioning the identification of the repeated code according to the dom node.
S104, selecting a section from the repeated code blocks of each category as a public code, and packaging a function by taking each section of the public code as content and taking the position information and the data information in the object corresponding to the public code as parameters.
And the object corresponding to the common code block is an object corresponding to the repeated code block corresponding to the common code block.
This step is illustrated by way of example:
the common codes comprising 3 categories are respectively a first category, a second category and a third category, and the first category is taken as an example for explanation: the first class corresponds to three repeated code blocks, and the position information and the data information in the three repeated code blocks are respectively a1 address and b1 data, a2 address and b2 data, and a3 address and b3 data, so that the position information and the data information in the three repeated code blocks are respectively stored as three objects, namely object 1, object 2 and object 3; the object 1 includes: a1 address and b1 data, object 2 includes: a2 address and b2 data; the object 3 includes: a3 address and b3 data; the content in the common code encapsulated function corresponding to the first category is the repeated code block of the segment and includes object 1, object 2 and object 3.
The method for extracting a common code in an html page according to embodiment 1 of the present invention obtains an html code corresponding to the html page according to the html page, obtains a category of each repeated code block, location information of each repeated code block in the html code, and data information in each repeated code block when it is judged that there are repeated code blocks in the html code, adds a corresponding identifier to each repeated code block according to the category of each repeated code block, searches for the repeated code blocks in the html code according to the identifier, stores the location information of the same repeated code block in the html code and the data information in the repeated code blocks as an object, deletes the repeated code block and the data information in the repeated code block, and selects a segment of the repeated code block in each category as the common code, each section of public code is taken as content, and position information and data information in an object corresponding to the public code are taken as parameters to be packaged into a function, so that the purpose of optimizing and removing redundancy of the code is achieved, and the workload of front-end development is reduced.
The embodiment 2 of the invention provides a method for extracting a public code in an html page, and the method in the embodiment 2 of the invention is different from the method in the embodiment 1 of the invention in that: the method further comprises the following steps:
writing all functions into a preset position of each section of html code or writing the functions into at least one js file;
for better appearance and convenience of calling, all functions are generally written into one js file, and of course, functions may also be written into different js files, which is not limited in the present invention. The predetermined location is typically the tail.
Judging whether the position information in each function corresponds to the html page one by one when each html page is initialized; if yes, calling a function corresponding to the position information to render the html page according to the public code, the position information and the data information in the function.
According to the method for extracting the public code in the html page, disclosed by the embodiment 2 of the invention, the html page can be generated by calling the encapsulated function.
Embodiment 3 of the present invention provides a method for extracting a public code in an html page, where the method described in embodiment 3 of the present invention is different from the method described in embodiment 1 of the present invention in that: the method further comprises the following steps:
each function is named according to the configured function naming rule.
It is worth noting that in order to prevent the occurrence of abnormal alarms, the names of the different functions are different.
Fig. 2 is a schematic block diagram of an apparatus for extracting common codes in an html page according to embodiment 4 of the present invention.
The apparatus for extracting common code in html page as shown in fig. 2 includes:
the obtaining unit 201 is configured to obtain an html page, and obtain an html code corresponding to the html page according to the html page;
specifically, the acquiring unit 201 includes:
and acquiring an html code corresponding to the html page by a file reading method according to the html page. The file reading method is an existing method.
It should be noted that the html page may be an html page template, i.e. a front-end template, which is obtained, and each html page obtains a corresponding html code.
An adding unit 202, configured to, when it is judged and known that there are repeated code blocks in the html code, obtain a category of each repeated code block, position information of each repeated code block in the html code, and data information in each repeated code block, and add a corresponding identifier to each repeated code block according to the category of each repeated code block;
specifically, the apparatus further comprises:
a second judging unit, configured to judge whether a repeated code block exists in the html code by using a code comparison method after acquiring the html code corresponding to the html page according to the html page, and before acquiring the category of each repeated code block, the position information of each repeated code block in the html code, and the data information of each repeated code block, if yes, entering the adding unit 202, and if not, entering the retaining unit; and the reservation unit is used for reserving the original code of the html code. The code comparison method is an existing method.
The judgment of whether repeated code blocks exist in the html code by a code comparison method can be specifically realized by the following modes:
and providing a config configuration file, and taking the configuration file as an html code to perform extraction and packaging conditions. The configuration condition of the config configuration file mainly comprises setting (1) how many character codes are repeated as an extraction starting point; (2) extracting whether the characters in the code repeatedly throw away the difference of the data information or not; (3) the function names the template. And according to the setting condition of config, positioning all repeated codes meeting the configuration condition by using a code comparison tool, acquiring the category of each repeated code block, and adding different identifications (id numbers) for the repeated code blocks of different categories to serve as the marks of the repeated code blocks.
A deleting unit 203, configured to search for a repeated code block in the html code according to the identifier, store position information of the same repeated code block in the html code and data information in the repeated code block as an object, and delete the repeated code block and the data information in the repeated code block;
the specific implementation manner of the deleting unit 203 for searching for the repeated code block in the html code according to the identifier is as follows: traversing the identification of the repeated code, specifically positioning the identification of the repeated code according to the dom node.
And the encapsulating unit 204 is configured to select a segment from the repeated code blocks of each category as a common code, and encapsulate, as a function, the position information and the data information in the object corresponding to the common code, with each segment of the common code as a content, as parameters.
And the object corresponding to the common code block is an object corresponding to the repeated code block corresponding to the common code block.
This step is illustrated by way of example:
the common codes comprising 3 categories are respectively a first category, a second category and a third category, and the first category is taken as an example for explanation: the first class corresponds to three repeated code blocks, and the position information and the data information in the three repeated code blocks are respectively a1 address and b1 data, a2 address and b2 data, and a3 address and b3 data, so that the position information and the data information in the three repeated code blocks are respectively stored as three objects, namely object 1, object 2 and object 3; the object 1 includes: a1 address and b1 data, object 2 includes: a2 address and b2 data; the object 3 includes: a3 address and b3 data; the content in the common code encapsulated function corresponding to the first category is the repeated code block of the segment and includes object 1, object 2 and object 3.
The apparatus for extracting a common code in an html page according to embodiment 4 of the present invention obtains an html code corresponding to the html page according to the html page, obtains a category of each repeated code block, location information of each repeated code block in the html code, and data information in each repeated code block when it is judged that there are repeated code blocks in the html code, adds a corresponding identifier to each repeated code block according to the category of each repeated code block, searches for the repeated code blocks in the html code according to the identifier, stores the location information of the same repeated code block in the html code and the data information in the repeated code blocks as an object, deletes the repeated code block and the data information in the repeated code block, and selects a segment of the repeated code block in each category as the common code, each section of public code is taken as content, and position information and data information in an object corresponding to the public code are taken as parameters to be packaged into a function, so that the purpose of optimizing and removing redundancy of the code is achieved, and the workload of front-end development is reduced.
Embodiment 5 of the present invention provides an apparatus for extracting a public code in an html page, where the apparatus described in embodiment 5 of the present invention is different from the apparatus described in embodiment 4 of the present invention in that: the device further comprises:
the writing unit is used for writing all functions into a preset position of each html code or writing the functions into at least one js file;
for better appearance and convenience of calling, all functions are generally written into one js file, and of course, functions may also be written into different js files, which is not limited in the present invention. The predetermined location is typically the tail.
The judging unit is used for judging whether the position information in each function corresponds to the html page one by one when each html page is initialized;
and if so, calling a function corresponding to the position information to render the html page according to the public code, the position information and the data information in the function.
The device for extracting the public code in the html page, which is provided by the embodiment 5 of the invention, can generate the html page by calling the encapsulated function.
Fig. 3 is a block diagram of an electronic device provided in embodiment 6 of the present invention.
An electronic device as shown in fig. 3, comprising: a processor 301(processor), a memory 302(memory), and a bus 303; wherein the content of the first and second substances,
the processor 301 and the memory 302 complete mutual communication through the bus 303;
the processor 301 is configured to call the program instructions in the memory 302 to execute the method provided by the above method embodiments, for example, including: obtaining an html page, and obtaining an html code corresponding to the html page according to the html page; when judging that repeated code blocks exist in the html code, acquiring the category of each repeated code block, the position information of each repeated code block in the html code and the data information of each repeated code block, and adding a corresponding identifier for each repeated code block according to the category of each repeated code block; searching repeated code blocks in the html code according to the identification, storing the position information of the same repeated code block in the html code and the data information in the repeated code blocks as an object, and deleting the repeated code blocks and the data information in the repeated code blocks; and selecting a section from the repeated code blocks of each category as a common code, and packaging the common code as a function by taking each section as content and the position information and the data information in the object corresponding to the common code as parameters.
The present invention also provides a non-transitory computer-readable storage medium storing computer instructions that cause the computer to perform a method provided by the above method embodiments, for example, comprising: obtaining an html page, and obtaining an html code corresponding to the html page according to the html page; when judging that repeated code blocks exist in the html code, acquiring the category of each repeated code block, the position information of each repeated code block in the html code and the data information of each repeated code block, and adding a corresponding identifier for each repeated code block according to the category of each repeated code block; searching repeated code blocks in the html code according to the identification, storing the position information of the same repeated code block in the html code and the data information in the repeated code blocks as an object, and deleting the repeated code blocks and the data information in the repeated code blocks; and selecting a section from the repeated code blocks of each category as a common code, and packaging the common code as a function by taking each section as content and the position information and the data information in the object corresponding to the common code as parameters.
It should be noted that, in the respective components of the apparatus of the present invention, the components therein are logically divided according to the functions to be implemented, but the present invention is not limited thereto, and the respective components may be re-divided or combined as needed, for example, some components may be combined into a single component, or some components may be further decomposed into more sub-components.
The various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functionality of some or all of the components in an apparatus according to an embodiment of the invention. The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on computer-readable media or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
The above embodiments are only suitable for illustrating the present invention and not limiting the present invention, and those skilled in the art can make various changes and modifications without departing from the spirit and scope of the present invention, so that all equivalent technical solutions also belong to the scope of the present invention, and the scope of the present invention should be defined by the claims.
Claims (10)
1. A method for extracting public codes in an html page is characterized by comprising the following steps:
obtaining an html page, and obtaining an html code corresponding to the html page according to the html page;
when judging that repeated code blocks exist in the html code, acquiring the category of each repeated code block, the position information of each repeated code block in the html code and the data information of each repeated code block, and adding a corresponding identifier for each repeated code block according to the category of each repeated code block;
searching repeated code blocks in the html code according to the identification, storing the position information of the same repeated code block in the html code and the data information in the repeated code blocks as an object, and deleting the repeated code blocks and the data information in the repeated code blocks;
selecting a section of the repeated code block of each category as a public code, and packaging a function by taking each section of the public code as content and taking position information and data information in an object corresponding to the public code as parameters;
and writing all functions into a preset position of each section of html code or writing the functions into at least one js file.
2. The method of claim 1, further comprising:
judging whether the position information in each function corresponds to the html page one by one when each html page is initialized;
if yes, calling a function corresponding to the position information to render the html page according to the public code, the position information and the data information in the function.
3. The method according to claim 1, wherein obtaining the html code corresponding to the html page according to the html page comprises:
and acquiring an html code corresponding to the html page by a file reading method according to the html page.
4. The method of claim 1, wherein after obtaining the html code corresponding to the html page according to the html page, before obtaining the category of each repeated code block, the position information of each repeated code block in the html code, and the data information in each repeated code block, the method further comprises:
and judging whether repeated code blocks exist in the html code or not by a code comparison method.
5. The method of claim 1, further comprising:
each function is named according to the configured function naming rule.
6. An apparatus for extracting public codes in html pages, comprising:
the system comprises an acquisition unit, a processing unit and a display unit, wherein the acquisition unit is used for acquiring an html page and acquiring an html code corresponding to the html page according to the html page;
the adding unit is used for acquiring the category of each repeated code block, the position information of each repeated code block in the html code and the data information of each repeated code block when judging that the repeated code blocks exist in the html code, and adding a corresponding identifier for each repeated code block according to the category of each repeated code block;
a deleting unit, configured to search for a repeated code block in the html code according to the identifier, store position information of the same repeated code block in the html code and data information in the repeated code block as an object, and delete the repeated code block and the data information in the repeated code block;
the packaging unit is used for selecting one section of the repeated code blocks in each category as a public code, packaging the public code as a function by taking each section of the public code as content and taking position information and data information in an object corresponding to the public code as parameters;
and the writing unit is used for writing all the functions into the preset position of each section of the html code or writing the functions into at least one js file.
7. The apparatus of claim 6, further comprising:
the judging unit is used for judging whether the position information in each function corresponds to the html page one by one when each html page is initialized;
and if so, calling a function corresponding to the position information to render the html page according to the public code, the position information and the data information in the function.
8. The apparatus of claim 6, wherein the obtaining unit comprises:
and acquiring an html code corresponding to the html page by a file reading method according to the html page.
9. An electronic device, comprising:
at least one processor; and
at least one memory communicatively coupled to the processor, wherein:
the memory stores program instructions executable by the processor, the processor invoking the program instructions to perform the method of any of claims 1-5.
10. A non-transitory computer-readable storage medium storing computer instructions that cause a computer to perform the method of any one of claims 1-5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810155159.9A CN108491209B (en) | 2018-02-23 | 2018-02-23 | Method and device for extracting public codes in html page |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810155159.9A CN108491209B (en) | 2018-02-23 | 2018-02-23 | Method and device for extracting public codes in html page |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108491209A CN108491209A (en) | 2018-09-04 |
CN108491209B true CN108491209B (en) | 2021-07-16 |
Family
ID=63340469
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810155159.9A Active CN108491209B (en) | 2018-02-23 | 2018-02-23 | Method and device for extracting public codes in html page |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108491209B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109918595B (en) * | 2019-01-31 | 2021-01-22 | 广州视源电子科技股份有限公司 | Method and device for acquiring public module |
CN110333851B (en) * | 2019-06-12 | 2023-06-16 | 平安科技(深圳)有限公司 | Code decoupling method and related equipment |
CN113220336A (en) * | 2020-01-21 | 2021-08-06 | 腾讯科技(深圳)有限公司 | Code processing method, device, medium and electronic equipment |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106068496A (en) * | 2014-03-20 | 2016-11-02 | 日立公共系统有限公司 | Source code is formed and provides device and source code to be formed and the method for offer |
US9875121B2 (en) * | 2014-09-17 | 2018-01-23 | International Business Machines Corporation | API server |
-
2018
- 2018-02-23 CN CN201810155159.9A patent/CN108491209B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106068496A (en) * | 2014-03-20 | 2016-11-02 | 日立公共系统有限公司 | Source code is formed and provides device and source code to be formed and the method for offer |
US9875121B2 (en) * | 2014-09-17 | 2018-01-23 | International Business Machines Corporation | API server |
Non-Patent Citations (1)
Title |
---|
如何调用html重复代码;双重幻想;《如何调用HTML重复代码 https://segmentfault.com/q/1010000006965569》;20160921;1-3 * |
Also Published As
Publication number | Publication date |
---|---|
CN108491209A (en) | 2018-09-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109829096B (en) | Data acquisition method and device, electronic equipment and storage medium | |
CN108427731B (en) | Page code processing method and device, terminal equipment and medium | |
CN108491209B (en) | Method and device for extracting public codes in html page | |
CN109376291B (en) | Website fingerprint information scanning method and device based on web crawler | |
CN108304175B (en) | Code file isolation packaging method and device | |
CN103078945B (en) | To the method and system that browser crash data processes | |
CN107357885B (en) | Data writing method and device, electronic equipment and computer storage medium | |
CN109241003B (en) | File management method and device | |
CN110990001A (en) | IVR (Interactive Voice response) process execution method and device | |
CN111428162A (en) | Page screenshot method and device | |
CN108874379B (en) | Page processing method and device | |
CN116523457A (en) | Workflow processing method, device, equipment and storage medium based on business process | |
CN109240664B (en) | Method and terminal for collecting user behavior information | |
CN112068911A (en) | Method, device, system, equipment and medium for generating electronic form | |
CN116682130A (en) | Method, device and equipment for extracting icon information and readable storage medium | |
CN108494728B (en) | Method, device, equipment and medium for creating blacklist library for preventing traffic hijacking | |
CN112232075A (en) | Article release time identification method based on time format and webpage element characteristics | |
CN110442353B (en) | Installation package management method and device and electronic equipment | |
CN111124545A (en) | Application program starting method and device, electronic equipment and storage medium | |
CN111610908B (en) | Method for generating frame diagram, computer equipment and readable storage medium | |
CN105528370B (en) | Page detection method and client | |
CN110020268B (en) | Page returning method and device | |
CN111026613A (en) | Log processing method and device | |
CN112417324A (en) | Chrome-based URL (Uniform resource locator) interception method and device and computer equipment | |
CN111338709A (en) | Target scene skipping method, device, equipment and storage medium in client |
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 |