A method, device, equipment, storage medium and program product for generating static pages
By monitoring the maintenance page module content and determining the update content, the target page is statically processed, which solves the problem of slow static processing speed of the entire site, improves the static processing efficiency and ensures integrity.
Patent Information
- Application Number
- CN202411514528.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2044-10-29
AI Technical Summary
The current technology gradually slows down during the entire site static processing, resulting in inefficient page static processing.
By monitoring the maintenance page module content, the target page module for content update and its update content are determined, and the target page is statically processed based on these contents.
The target page that only updates statically is achieved, which improves the efficiency of static page static, ensures the integrity of static, and avoids fewer static pages.
Smart Images

Figure CN119025775B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of front-end page processing, and in particular to a method, device, equipment, storage medium and program product for static page generation. Background Art
[0002] In order to improve the access speed of the website and enhance the user experience of the website, it is a common practice to use static technology to generate static web pages for users to access. Staticization is to convert dynamically generated html (Hyper Text Markup Language) pages into static content and save them so that users can directly access static pages when they request them.
[0003] However, as the number of web pages and resources on the website continues to increase, the speed of staticization of the entire site will become slower and slower. Therefore, how to achieve efficient processing of page staticization has become a problem that needs to be solved urgently. Summary of the invention
[0004] The present invention provides a page static generation method, device, equipment, storage medium and program product to improve the efficiency of website page static processing.
[0005] According to one aspect of the present invention, a method for generating static pages is provided, comprising:
[0006] Performing module content monitoring on at least one maintenance page module, and when monitoring the module content update of the maintenance page module, determining a target page module for content update and the updated module content of the target page module; determining a target page associated with the target page module from at least one maintenance page;
[0007] The target page is statically processed using the update module content of the target page module to obtain a static target page.
[0008] According to another aspect of the present invention, there is provided a static page generation device, comprising:
[0009] A module content monitoring module, used to monitor the module content of at least one maintenance page module, and when monitoring the module content update of the maintenance page module, determine the target page module for content update, and the updated module content of the target page module;
[0010] a target page determination module, used to determine a target page associated with the target page module from at least one maintenance page;
[0011] The static processing module is used to adopt the update module content of the target page module to perform page static processing on the target page to obtain a static target page.
[0012] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0013] at least one processor; and
[0014] a memory communicatively connected to the at least one processor; wherein,
[0015] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the page static generation method described in any embodiment of the present invention.
[0016] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the page static generation method described in any embodiment of the present invention when executed.
[0017] According to another aspect of the present invention, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the method for generating static pages according to any embodiment of the present invention is implemented.
[0018] The technical solution of the embodiment of the present invention monitors at least one maintenance page module, and when monitoring the content update of the maintenance page module, determines the target page module for content update and the content of the update module. Determine the target page associated with the target page module, use the content of the target page module to perform page static processing on the target page, and obtain a static target page. The technical purpose of only staticizing the target page where the update occurs and only searching for the target page where the dynamically changing module is located can be achieved, which can not only ensure the integrity of staticization and avoid missing static pages, but also improve the efficiency of page staticization.
[0019] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0021] Figure 1is a flow chart of a method for generating static pages according to the first embodiment of the present invention;
[0022] Figure 2A This is a diagram of the page module association tree structure provided according to the first embodiment of the present invention;
[0023] Figure 2B This is a schematic diagram of modularization of website pages provided according to the first embodiment of the present invention;
[0024] Figure 3 This is a flowchart of a method for generating static pages according to Embodiment 2 of the present invention;
[0025] Figure 4 It is a structural schematic diagram of a static page generation device provided according to Embodiment 3 of the present invention;
[0026] Figure 5 It is a structural schematic diagram of an electronic device for implementing the static page generation method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0027] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0029] Embodiment 1
[0030] Figure 1A flowchart of a method for generating static pages is provided for the first embodiment of the present invention. This embodiment is applicable to the case where a page with an update requirement is subjected to static processing. The method can be executed by a static page generating device, which can be implemented in the form of hardware and / or software. Figure 1 As shown, the method includes:
[0031] S110. Monitor the module content of at least one maintenance page module, and when the module content of the maintenance page module is monitored to be updated, determine the target page module for content update and the updated module content of the target page module. The maintenance page module may be a website page module that may have a content update requirement, and the website page module may be a page module in a website page in a portal website. The module content may specifically include text content, image content, video content, etc. The target page module may be a maintenance page module in which the module content is updated. The updated module content is the module content after the target page module is updated.
[0032] The monitoring of the module content of the maintenance page module may specifically be monitoring the module content change, for example, monitoring the content change request of the maintenance page module.
[0033] Specifically, when it is monitored that the module content of any maintenance page module has changed, such as content update, content deletion or content addition, the maintenance page module where the module content has changed is determined as the target page module, and the changed content is used as the updated module content of the target page module.
[0034] S120: Determine a target page associated with a target page module from at least one maintenance page.
[0035] Each maintenance page may be a website page that may have module update requirements, and the target page may be a maintenance page for sending module updates. The association relationship between the target page module and the target page may be that the target page module belongs to the target page.
[0036] It should be noted that, for the same front-end development project, there may be a situation where the same page module is deployed in multiple pages. Therefore, there may be multiple target pages associated with the target page module.
[0037] Optionally, determining a target page having an association relationship with a target page module from at least one maintenance page includes: obtaining a pre-built page module association tree; the page module association tree includes at least one parent node and at least one child node corresponding to each parent node; the parent node is a maintenance page; the child node is a maintenance page module; performing a node traversal on at least one child node in the page module association tree, and taking the maintenance page corresponding to the parent node to which the traversed target page module belongs as the target page.
[0038] Among them, the page module association tree is used to characterize the association relationship between at least one maintenance page and at least one maintenance page module. It can be pre-constructed by relevant technical personnel, or it can be automatically generated according to the association relationship between the page and the module. This embodiment does not limit this.
[0039] According to the pre-built page module association tree, the target page module where the content update occurs can be determined, and the association relationship between the maintenance page module and the maintenance page can be used to find the target page. Figure 2A The page module association tree architecture diagram shown in the figure takes a portal website page as an example, which is configured with N (N≥1) maintenance pages, and each maintenance page can have N maintenance page modules. There is an association relationship between each maintenance page module and the maintenance page, and a page module association tree is constructed based on the association relationship. Among them, the page module association tree includes at least one parent node and at least one child node corresponding to each parent node; the parent node is the maintenance page; the child node is the maintenance page module. It should be noted that the page module association tree is not limited to Figure 2A The double-layer structure shown, namely, one layer of parent nodes and one layer of child nodes, can also add a third layer of child nodes for the child nodes according to actual needs, which is not limited in this embodiment.
[0040] Specifically, by traversing at least one child node in the page module association tree, the child node corresponding to the target page module is determined through the traversal, so as to determine the parent node to which the child node belongs, and the maintenance page corresponding to the parent node is used as the target page.
[0041] This embodiment also provides a method for automatically constructing a page module association tree.
[0042] Optionally, the page module association tree is constructed as follows: based on a preset module division rule, at least one maintenance page is divided into page modules to obtain maintenance page modules corresponding to each maintenance page; similarity comparison is performed on each maintenance page module to obtain a similarity comparison result; based on the similarity comparison result, each maintenance page module is deduplicated to obtain a deduplicated maintenance page module; a mapping relationship is established between the deduplicated maintenance page module and the maintenance page, and a page module association tree is constructed based on the mapping relationship.
[0043] Among them, the module division rules can be pre-set by relevant technical personnel. For example, the module division rules can be divided based on different data types, or based on different typesetting layouts, etc., and can be set specifically according to the actual needs of the project. This embodiment does not limit this.
[0044] In the process of building a maintenance page, the page is divided according to the preset module division rules to obtain one or more maintenance page modules corresponding to the maintenance page. Figure 2B As shown in the modular schematic diagram of the website pages, the maintenance page X is divided into multiple maintenance page modules, including maintenance page module a, maintenance page module b, maintenance page module c and maintenance page module d, and the maintenance page Y is divided into multiple maintenance page modules, including maintenance page module a, maintenance page module d, maintenance page module e and maintenance page module f.
[0045] The page modules divided from the maintenance page X and the maintenance page Y are compared for similarity to obtain a similarity comparison result. Specifically, a similarity comparison result can be obtained that the contents of the page modules a and d corresponding to the maintenance page X and the maintenance page Y are the same, while the contents of the remaining page modules are completely different. Based on the obtained similarity comparison result, each maintenance page module can be deduplicated to obtain a deduplicated maintenance page module. A mapping relationship between the deduplicated maintenance page module and the maintenance page is established, and a page module association tree is constructed based on the mapping relationship.
[0046] This embodiment also provides a technical means for deduplicating each maintenance page module during the automatic construction of the page module association tree.
[0047] Optionally, a similarity comparison is performed on each maintenance page module to obtain a similarity comparison result, including: performing content extraction on the page text content of each maintenance page module, and performing a text content similarity comparison based on the content extraction result to obtain a first comparison result; and performing image extraction on the page layout of each maintenance page module, and performing a layout content similarity comparison based on the image extraction result to obtain a second comparison result; generating a similarity comparison result including the first comparison result and the second comparison result.
[0048] Among them, the page text content refers to the relevant text data existing in each maintenance page module in the maintenance page. It can be a text extraction model pre-built by relevant technical personnel to perform the text content extraction process, or it can be an optical character recognition OCR (Optical Character Recognition) technology to extract the text content. This embodiment does not impose specific restrictions on this. The text content in each maintenance page module can be obtained and compared for similarity to determine whether the similarity result is greater than a preset similarity threshold. If so, the first comparison result about the text content is that the maintenance page modules are highly similar, which may be the same page module that needs to be deduplicated; if not, the first comparison result about the text content is that the maintenance page modules are less similar, which may be different maintenance page modules.
[0049] The page layout is used to characterize the typesetting layout information of each maintenance page module in the maintenance page after the maintenance page is divided into different maintenance page modules. The layout image of each maintenance page module in each maintenance page can be scanned and extracted by the image scanning technology pre-set in the maintenance page, or the image scanning model pre-built by relevant technical personnel, and this embodiment does not impose specific restrictions on this. After obtaining the image result of the typesetting layout of the maintenance page module, the similarity comparison of the layout content can be performed to determine whether the similarity result is greater than the preset similarity threshold. If so, the second comparison result of the image content is that the maintenance page modules are highly similar, which may be the same page module that needs to be deduplicated; if not, the second comparison result of the image content is that the maintenance page modules are less similar, which may be different maintenance page modules. Among them, the preset similarity threshold can be pre-set according to actual needs, for example, it can be set to 95%.
[0050] If the similarities of the first comparison result and the second comparison result both reach the preset similarity threshold, page deduplication processing is performed on each maintenance page module; if any similarity in the first comparison result and the second comparison result does not reach the preset similarity threshold, it can be said that the maintenance page modules are not similar and no page deduplication processing is required.
[0051] It should be noted that the embodiment of the present invention discloses a method for constructing a page module association tree to obtain the association relationship between the maintenance page module and the maintenance page. As another optional method for obtaining the page module relationship in the embodiment of the present invention, a page module association table can also be constructed. According to the preset module division rule, at least one maintenance page is divided into page modules, and the maintenance pages obtained correspond to the maintenance page modules respectively, and a page module association table is constructed based on the maintenance pages and the corresponding maintenance page modules. It is also possible to obtain a target page that has an association relationship with the target page module according to the page module association table to realize static processing of the page, and this embodiment does not make specific restrictions on this.
[0052] S130, using the update module content of the target page module, perform page static processing on the target page to obtain a static target page. Wherein, page static processing refers to converting dynamically generated web page content into a static HTML page to reduce dynamic processing on the server side.
[0053] Specifically, the target page is statically processed by using the update module content of the target page module, which can be the module content after the target page module is updated, and the target page associated with the target page module determined according to the page module association tree. The update module content in the target page module is used as the module content in the maintenance page module corresponding to the target page, and the target page can be converted into a static HTML page.
[0054] In an optional solution of this embodiment, it can be combined with one or more optional solutions of this embodiment. Among them, the page static generation method also includes: determining the page module whose content is not updated in the target page and the corresponding page module content, so as to perform page static processing on the target page to obtain a static target page.
[0055] Specifically, each target page corresponds to at least one maintenance page module, wherein the content of the maintenance page module may be updated or not updated. The module content of the maintenance page module with updated content can be used as the module content of the corresponding maintenance page module in the target page, and the module content of the module without updated content can also be used in the corresponding maintenance page module in the target page, and the dynamically generated web page content can be converted into a static HTML page. Exemplarily, the target page can be divided into multiple maintenance page modules, such as page module g, page module h and page module i. When it is monitored that the content of page module h is updated, the updated module content is used as the content of page module h in the target page, and the original module content of page module g and page module i is used to convert the target page into a static HTML page. This embodiment does not impose specific restrictions on this.
[0056] The technical solution of the embodiment of the present invention monitors at least one maintenance page module, and when monitoring the content update of the maintenance page module, determines the target page module of the content update and the update module content. Determine the target page associated with the target page module, use the content of the target page module to perform page static processing on the target page, and obtain a static target page. In this embodiment, the technical purpose of only staticizing the target page where the update occurs and only searching for the target page where the dynamically changing module is located can be achieved, which can not only ensure the integrity of the staticization and avoid missing static pages, but also improve the efficiency of page staticization.
[0057] Embodiment 2
[0058] Figure 3 This is a flow chart of a method for generating static pages provided by the second embodiment of the present invention. Based on the above embodiment, this embodiment further optimizes the above method for generating static pages. Figure 3 As shown, the method includes:
[0059] S310. Monitor the module content of at least one maintenance page module. If multiple module content updates of the maintenance page module are monitored within a preset interval time period, determine whether the maintenance page modules at each update time are the same page modules. If so, use the same page module as the target page module, and determine whether the update module content of the same page module at each update time is the same.
[0060] The interval time period may be preset by relevant technical personnel. For example, the preset time interval period may be 10 minutes, and monitoring is continued during the preset time interval period.
[0061] By monitoring the content of at least one maintenance page module at a preset time interval, and when monitoring the module content update of multiple maintenance page modules, it is determined whether the maintenance page modules at each update number are the same page modules. If so, it means that at the preset time interval, the content of the same maintenance page module is in a state of continuous update, the same page module can be used as the target page module, and it is determined whether the update module content of the same page module at each update number is the same.
[0062] S320: If yes, then determine the update module content under any update number as the update module content of the target page module.
[0063] Specifically, it can be determined based on content monitoring that the target page module has been updated, and the update module content of the same page module at each update number in a preset interval time period is the same, which means that the content of the target module is always in an updated state, and the updated module content is the same module content. The content of the update module at any update number can be determined as the update module content of the target page module. This can avoid the waste of computing resources caused by the direct static processing of the updated content due to errors in the process of updating the page module content, and the static processing again after adjustment. Improve the fault tolerance of the maintenance page module for content update and page static generation process.
[0064] In an optional solution of this embodiment, it can be combined with one or more optional solutions of this embodiment. Wherein, if the update module content of the same page module at different update times is different, the update module content at the latest update time is determined as the update module content of the target page module.
[0065] Specifically, according to a preset time interval, at least one maintenance page module is monitored for module content. If the update module content of the same page module at each update number is different, the update module content at the latest update number is determined as the update module content of the target page module. Exemplarily, when a maintenance page contains maintenance page module j, maintenance page module k, and maintenance page module l, the module content of each maintenance page is monitored according to a preset time interval. If it is monitored that the maintenance page module j has been updated multiple times and the updated content is different, the update module content at the latest update number is determined as the update module content of the maintenance page module j. This embodiment does not impose any specific restrictions on this.
[0066] In another optional scheme of the present embodiment, if multiple module content updates of the maintenance page module are monitored within a preset interval time period, and the maintenance page modules at each update number are different page modules, the updated module content of each maintenance page module with content update will be determined as the updated module content of the corresponding target module.
[0067] Exemplarily, when at least maintenance page module j, maintenance page module k and maintenance page module l exist in a maintenance page, the module content of each maintenance page is continuously monitored according to a preset interval time period, and when it is monitored that the maintenance page module j and the maintenance page module l have respectively undergone module content updates, where the maintenance page module j has performed three module content updates in the preset interval time period, and the module content update results are all different, then the last update result is determined as the final updated module content of the maintenance page module j. And the maintenance page module l has also performed two module content updates in the preset interval time period, and the module content update results are all the same, then any one of the two update results can be determined as the final updated module content of the maintenance page module l, and this embodiment does not impose specific restrictions on this. In the scheme of this embodiment, the fault tolerance rate for content update of the target page module can be improved by determining whether the maintenance page module is the same page module at each update time, and determining the update module content of the target page module according to the updated content; it can also be that when different page modules are updated multiple times, the update module content of each maintenance page module with content update is determined as the update module content of the corresponding target module to ensure the integrity of the static processing of the maintenance page with content update, and avoid the situation where the static maintenance page module content is insufficient.
[0068] S330: Determine a target page associated with a target page module from at least one maintenance page.
[0069] S340: Using the update module content of the target page module, perform page static processing on the target page to obtain a static target page.
[0070] The technical solution of the embodiment of the present invention monitors at least one maintenance page module according to a preset interval time period, and determines the target page module according to the module content update results of the monitored maintenance page modules. The target page associated with the target page module is determined, and the target page is staticized using the content of the target page module to obtain a static target page. In this embodiment, the technical purpose of only staticizing the updated target page and only searching for the target page where the dynamically changing module is located can be achieved, which can ensure the integrity of the staticization, avoid missing static pages, and improve the efficiency of page staticization.
[0071] Embodiment 3
[0072] Figure 4 This is a schematic diagram of the structure of a static page generation device provided by the third embodiment of the present invention. Figure 4 As shown, the device comprises:
[0073] The module content monitoring module 410 is used to monitor the module content of at least one maintenance page module, and when monitoring the module content update of the maintenance page module, determine the target page module for content update and the updated module content of the target page module.
[0074] The target page determination module 420 is used to determine a target page associated with the target page module from at least one maintenance page.
[0075] The static processing module 430 is used to use the update module content of the target page module to perform page static processing on the target page to obtain a static target page.
[0076] Optionally, the target page determination module 420 includes:
[0077] An acquisition unit is used to acquire a pre-built page module association tree; the page module association tree includes at least one parent node and at least one child node corresponding to each parent node; the parent node is a maintenance page; and the child node is a maintenance page module.
[0078] The traversal unit is used to perform node traversal on at least one child node in the page module association tree, and use the maintenance page corresponding to the parent node to which the target page module belongs that has been traversed as the target page.
[0079] Optionally, the device further includes:
[0080] Construction module 440 is used to divide at least one maintenance page into page modules based on a preset module division rule to obtain maintenance page modules corresponding to each maintenance page; perform similarity comparison on each maintenance page module to obtain a similarity comparison result; perform page deduplication processing on each maintenance page module based on the similarity comparison result to obtain a deduplicated maintenance page module; establish a mapping relationship between the deduplicated maintenance page module and the maintenance page, and construct a page module association tree based on the mapping relationship.
[0081] Based on the above embodiment, optionally, the construction module 440 includes:
[0082] The similarity comparison unit is used to extract the page text content of each maintenance page module, and perform text content similarity comparison based on the content extraction result to obtain a first comparison result; and to extract the image of the page layout of each maintenance page module, and perform layout content similarity comparison based on the image extraction result to obtain a second comparison result.
[0083] A generating unit is used to generate a similarity comparison result including the first comparison result and the second comparison result.
[0084] Based on the above embodiment, optionally, the module content monitoring module 410 includes:
[0085] A page module determination unit is used to monitor the module content of at least one maintenance page module, and if multiple module content updates of the maintenance page module are monitored within a preset interval time period, determine whether the maintenance page modules at each update number are the same page module; if so, use the same page module as the target page module, and determine whether the update module content of the same page module at each update number is the same;
[0086] The update module content determination unit is used to determine the update module content under any update number as the update module content of the target page module.
[0087] Based on the above embodiment, optionally, the update module content determination unit is further used to determine the update module content at the latest update number as the update module content of the target page module if the update module content of the same page module at different update times is different.
[0088] The static page generation device provided in the embodiment of the present invention can execute the static page generation method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0089] Embodiment 4
[0090] Figure 5 A schematic diagram of an electronic device 50 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0091] like Figure 5As shown, the electronic device 50 includes at least one processor 51, and a memory connected to the at least one processor 51 in communication, such as a read-only memory (ROM) 52, a random access memory (RAM) 53, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 51 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 52 or the computer program loaded from the storage unit 58 to the random access memory (RAM) 53. In the RAM 53, various programs and data required for the operation of the electronic device 50 can also be stored. The processor 51, the ROM 52 and the RAM 13 are connected to each other through a bus 54. An input / output (I / O) interface 55 is also connected to the bus 54.
[0092] A number of components in the electronic device 50 are connected to the I / O interface 55, including: an input unit 56, such as a keyboard, a mouse, etc.; an output unit 57, such as various types of displays, speakers, etc.; a storage unit 58, such as a disk, an optical disk, etc.; and a communication unit 59, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 59 allows the electronic device 50 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0093] The processor 51 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 51 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 51 executes the various methods and processes described above, such as a page static generation method.
[0094] In some embodiments, the page static generation method can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 58. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 50 via the ROM 52 and / or the communication unit 59. When the computer program is loaded into the RAM 53 and executed by the processor 51, one or more steps of the page static generation method described above can be performed. Alternatively, in other embodiments, the processor 51 can be configured to execute the page static generation method in any other appropriate manner (for example, by means of firmware).
[0095] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0096] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0097] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, device, or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0098] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0099] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0100] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0101] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0102] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for generating static pages, characterized in that: include: Performing module content monitoring on at least one maintenance page module, and when monitoring the module content update of the maintenance page module, determining a target page module for content update, and the updated module content of the target page module; Determine a target page associated with the target page module from at least one maintenance page; Using the update module content of the target page module, the target page is subjected to page static processing to obtain a static target page; The step of determining the target page associated with the target page module from at least one maintenance page includes: Obtaining a pre-built page module association tree; the page module association tree includes at least one parent node and at least one child node corresponding to each parent node; the parent node is a maintenance page; and the child node is a maintenance page module; Perform node traversal on at least one child node in the page module association tree, and use the maintenance page corresponding to the parent node to which the target page module belongs that has been traversed as the target page; The page module association tree is constructed as follows: Based on a preset module division rule, at least one maintenance page is divided into page modules to obtain maintenance page modules corresponding to each maintenance page; Performing a similarity comparison on each of the maintenance page modules to obtain a similarity comparison result; Based on the similarity comparison result, performing page deduplication processing on each of the maintenance page modules to obtain a deduplicated maintenance page module; A mapping relationship between the maintenance page modules after deduplication and the maintenance page is established, and a page module association tree is constructed based on the mapping relationship.
2. The method according to claim 1, characterized in that The performing similarity comparison on each maintenance page module to obtain a similarity comparison result includes: Extracting the page text content of each maintenance page module, and performing text content similarity comparison based on the content extraction result to obtain a first comparison result; and Performing image extraction on the page layout of each maintenance page module, and performing layout content similarity comparison based on the image extraction result to obtain a second comparison result; A similarity comparison result including the first comparison result and the second comparison result is generated.
3. The method according to claim 1, characterized in that The module content monitoring of at least one maintenance page module and determining a target page module for content update and the updated module content of the target page module when the module content update of the maintenance page module is monitored include: Monitoring the module content of at least one maintenance page module, if multiple module content updates of the maintenance page module are monitored within a preset interval time period, determining whether the maintenance page modules at each update number are the same page module; If yes, the same page module is used as the target page module, and it is determined whether the update module contents of the same page module at each update number are the same; If so, the update module content under any update number is determined as the update module content of the target page module.
4. The method according to claim 3, characterized in that The method further comprises: If the update module contents of the same page module at different update times are different, the update module contents at the latest update time are determined as the update module contents of the target page module.
5. A static page generation device, characterized in that: include: A module content monitoring module, used to monitor the module content of at least one maintenance page module, and when monitoring the module content update of the maintenance page module, determine the target page module for content update, and the updated module content of the target page module; a target page determination module, used to determine a target page associated with the target page module from at least one maintenance page; A static processing module, used to perform page static processing on the target page using the update module content of the target page module to obtain a static target page; Wherein, the target page determination module includes: An acquisition unit, used for acquiring a pre-built page module association tree; the page module association tree comprises at least one parent node and at least one child node corresponding to each parent node; the parent node is a maintenance page; the child node is a maintenance page module; A traversal unit, used to traverse at least one child node in the page module association tree, and use the maintenance page corresponding to the parent node to which the target page module belongs that has been traversed as the target page; Wherein, the device further includes: A construction module is used to divide at least one maintenance page into page modules based on a preset module division rule to obtain maintenance page modules corresponding to each maintenance page; perform similarity comparison on each maintenance page module to obtain a similarity comparison result; perform page deduplication processing on each maintenance page module based on the similarity comparison result to obtain a deduplicated maintenance page module; establish a mapping relationship between the deduplicated maintenance page module and the maintenance page, and construct a page module association tree based on the mapping relationship.
6. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the page static generation method according to any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the page static generation method according to any one of claims 1 to 4 when executed.
8. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method for generating static pages according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Page content updating method and device
CN111949354A
Static fragmented page generation method and system, electronic equipment and storage medium
CN117851708A