A static webpage manuscript publishing method, system, computer and storage medium
By generating a linking mechanism between index files and list files, the problem of manuscripts being unable to be viewed normally due to frequent updates of static pages is solved, thus ensuring efficient manuscript updates and fast webpage browsing speed.
Patent Information
- Application Number
- CN202211709308.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-29
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2042-12-29
AI Technical Summary
When manuscripts are frequently updated, the static pages fail to be generated in a timely manner, causing the manuscripts to be unviewable.
By generating index and list files and utilizing an information group association mechanism, the manuscripts and the displayed list are updated synchronously, avoiding the need to update the manuscripts directly on the static page. Only the list file needs to be modified to update the manuscripts.
When updating articles, only the display list needs to be updated, avoiding the repeated loading of static pages and ensuring webpage browsing speed and stability.
Smart Images

Figure CN116127218B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, in particular to a static webpage manuscript publishing method and system, a computer and a storage medium. BACKGROUND
[0002] As a carrier of announcements, information, news and other content, adding or deleting manuscripts is a daily task. At the same time, in order to ensure the stable operation of the website, the entire manuscript is published in the form of a static page to avoid users accessing the server every time they browse the manuscript, thereby improving the user browsing efficiency and ensuring the stability of the website.
[0003] A static page refers to a page in which the webpage content display is converted into an HTML (HyperText Mark-up Language) static file directly stored on a website server and can be directly displayed on a client browser. Generating a static file can effectively accelerate the page opening and browsing speed. A static page does not need to connect to a database, and the opening speed is significantly improved compared to a dynamic page.
[0004] However, when the manuscript in the website needs to be updated, i.e., needs to be added, deleted or modified, the static page needs to be directly modified, so that the static page needs to be regenerated. In today's information explosion era, the manuscript is updated very frequently, and the static page also needs to be frequently regenerated. If the static page cannot be generated in time due to data congestion or other reasons, the corresponding manuscript cannot be normally browsed. SUMMARY
[0005] The embodiments of the present application provide a static webpage manuscript publishing method and system, a computer and a storage medium to solve the technical problem that in the prior art, when the manuscript needs to be frequently updated, the static page is directly modified, and the static page is frequently regenerated with the update of the manuscript. If a new static page cannot be generated in time, the manuscript cannot be normally browsed.
[0006] In a first aspect, the embodiments of the present application provide a static webpage manuscript publishing method, including the following steps:
[0007] Generating a static page, the static page including a column list and a display list;
[0008] Generating an index file and a list file according to the column list;
[0009] Associating the manuscript to the list file through a first information group of the manuscript, associating the list file to the index file through a second information group of the list file, and updating the manuscript in the display list by modifying the first information group and the second information group.
[0010] Further, the step of generating the static page comprises:
[0011] generating a static file and a dynamic file of the page;
[0012] splicing the static file and the dynamic file to form the static page.
[0013] Further, the static page further comprises a page style, a header style and a footer style.
[0014] Further, the step of generating the index file and the list file according to the column list comprises:
[0015] generating an index file corresponding to the column according to different columns under the column list;
[0016] generating a list file corresponding to the classification according to different classifications under the column.
[0017] Further, the step of associating the article to the list file through the first information group of the article and associating the list file to the index file through the second information group of the list file comprises:
[0018] generating a classification field with the classification, and separating a plurality of articles to the corresponding classification through the classification field;
[0019] extracting a first information group of a plurality of articles, and storing the first information group into the corresponding list file according to the classification;
[0020] extracting a second information group of the list file, and storing the second information group into the corresponding index file according to the column.
[0021] Further, the first information group comprises a unique identifier, a title, a publication time and a static connection address, and the second information group comprises a file serial number, a file path and an article quantity.
[0022] Further, the step of updating the article in the display list by modifying the first information group and the second information group comprises:
[0023] modifying the first information group in the list file to complete the update of the article;
[0024] modifying the second information group in the index file according to the change of the list file;
[0025] updating the article displayed in the display list according to the modified first information group and the modified second information group.
[0026] In a second aspect, the embodiments of the present application provide a static webpage manuscript publishing system, applied to the static webpage manuscript publishing method, the system comprises:
[0027] a first generating module configured to generate a static page, the static page comprising a column list and a display list, the display list being configured to display a manuscript;
[0028] a second generating module configured to generate an index file and a list file according to the column list;
[0029] an associating module configured to associate the manuscript to the list file through a first information group of the manuscript, and associate the list file to the index file through a second information group of the list file;
[0030] a modifying module configured to update the manuscript in the display list by modifying the first information group and the second information group.
[0031] In a third aspect, the embodiments of the present application provide a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the static webpage manuscript publishing method of the first aspect.
[0032] In a fourth aspect, the embodiments of the present application provide a computer readable storage medium, having a computer program stored thereon, and the program is executable on a processor to implement the static webpage manuscript publishing method of the first aspect.
[0033] Compared with the related art, the present application has the following beneficial effects: when the static page is loaded, the index file can be loaded synchronously, the manuscripts in the list file can be located through the index file by the mutual association among the index file, the list file and the manuscripts, and the corresponding first information group is updated to the display list to complete the publication of the manuscript; when the manuscript needs to be modified, the manuscript in the list file can be repositioned through the index file by modifying the list file, to complete the update of the manuscript; the manuscript is directly updated on the static page, which avoids the repeated loading of the static page, and only the display list needs to be updated when the manuscript is updated, which ensures the webpage browsing speed to a certain extent.
[0034] The details of one or more embodiments of the present application are presented in the following drawings and description to make other features, objects and advantages of the present application more clear and easy to understand. BRIEF DESCRIPTION OF DRAWINGS
[0035] Figure 1 a flowchart of the static webpage manuscript publishing method in the first embodiment of the present application;
[0036] Figure 2 The flow chart of the static webpage manuscript publishing method in the second embodiment of the present application is shown in Fig. 2.
[0037] Figure 3 The structural block diagram of the static webpage manuscript publishing system in the third embodiment of the present application is shown in Fig. 3.
[0038] The following specific embodiments will further illustrate the present application in combination with the above-mentioned drawings. DETAILED DESCRIPTION
[0039] In order to make the objects, technical solutions and advantages of the present application clearer, the present application will be described and illustrated in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and should not be used to limit the present application. Based on the embodiments provided in the present application, all other embodiments obtained by those of ordinary skill in the art without making creative efforts fall within the scope of protection of the present application.
[0040] Obviously, the drawings in the following description are only some examples or embodiments of the present application, and for those of ordinary skill in the art, the present application can be applied to other similar scenarios without making creative efforts based on the drawings. In addition, it should be understood that although the efforts made in the development process can be complex and lengthy, for those of ordinary skill in the art related to the content disclosed in the present application, some designs, manufacturing or production changes based on the technical content disclosed in the present application are only routine technical means and should not be understood as insufficient disclosure of the present application.
[0041] In the present application, "embodiment" means that the specific features, structures or characteristics described in combination with the embodiment can be included in at least one embodiment of the present application. The phrase appears at various places in the specification does not necessarily refer to the same embodiment, nor is it independent or alternative to other embodiments. Those of ordinary skill in the art explicitly and implicitly understand that the embodiments described in the present application can be combined with other embodiments without conflict.
[0042] Referring to Figure 1 The static webpage manuscript publishing method provided in the first embodiment of the present application includes the following steps:
[0043] Step S10: generating a static page, the static page including a column list and a display list, the display list being used to display manuscripts;
[0044] By setting the webpage as a static page, the user can avoid accessing the server every time when browsing the manuscript, which can effectively improve the browsing efficiency of the user and ensure the stability of the website. Understandably, the column list is used to separate different types of manuscripts to facilitate the user to select the required column to check the corresponding manuscript when browsing the manuscript.
[0045] Step S20: generating an index file and a list file according to the column list;
[0046] After completing the loading of the static page, the index file and the list file corresponding to the column under the column list can be loaded according to the column list. Understandably, each column corresponds to an index file, and an index file corresponds to a plurality of list files.
[0047] Step S30: associating the manuscript to the list file through the first information group of the manuscript, and associating the list file to the index file through the second information group of the list file;
[0048] The content of each manuscript includes a large amount of text information. By extracting the text information associated with the column list, the first information group of the manuscript can be obtained. By associating the manuscript and the list file through the first information group, the list file can be located to the required manuscript. By associating the list file to the index file, the first information group can be published to the display list through the index file after completing the loading of the static page.
[0049] Step S40: updating the manuscript in the display list by modifying the first information group and the second information group;
[0050] When loading the static page, the index file can be loaded synchronously. By the mutual association among the index file, the list file and the manuscript, the manuscript in the list file can be located through the index file, and the corresponding first information group is updated to the display list to complete the publication of the manuscript. When the manuscript needs to be modified, only the list file needs to be modified, and the manuscript in the list file can be repositioned through the index file to complete the update of the manuscript. This avoids directly updating the manuscript on the static page, which leads to the repeated loading of the static page. Moreover, only the display list needs to be updated when the manuscript is updated, which ensures the webpage browsing speed to a certain extent.
[0051] Please refer to Figure 2 The static webpage manuscript publishing method provided by the second embodiment of the present application comprises the following steps:
[0052] Step S100: generating static files and dynamic files of a page;
[0053] Step S101: splicing the static files and the dynamic files to form a static page, the static page including a column list and a display list, the display list being used for displaying manuscripts;
[0054] The static page further includes a page style, a header style and a bottom style. Understandably, the static files include the page style, the header style, the bottom style and the column list, and the dynamic files include the display list. The static files specifically refer to static contents which do not change with the maintenance of manuscript information, that is, after the loading of the static web page is completed, the static files do not need to be generated again except for the operations such as style adjustment and column information adjustment of the column list.
[0055] Step S102: generating index files corresponding to different columns under the column list according to the different columns;
[0056] The column list corresponds to different columns, and the columns include military affairs, entertainment, sports, finance, international affairs and the like. According to the different columns, each column corresponds to an index file, that is, there is a correlation between the index file and the column. By loading different columns, the index file corresponding to the column can be loaded correspondingly.
[0057] Step S103: generating list files corresponding to different classifications under the column according to the different classifications;
[0058] Under the column, there are also different classifications. Taking the column of sports as an example, the classifications include football, basketball, badminton and table tennis and the like. According to the different classifications, the list files associated with the classifications are generated correspondingly. The list files can be associated with the column through the classifications, that is, the list files are associated with the index file through the classifications. Understandably, since there are a plurality of classifications under the column, one index file corresponds to a plurality of list files.
[0059] Step S104: generating a classification field with the classifications, and classifying a plurality of manuscripts into corresponding classifications through the classification field;
[0060] According to the classifications, a classification field for classifying the contents of the manuscripts can be generated. Taking the classification of basketball as an example, the classification field includes NBA, men's basketball, women's basketball and LeBron and the like. Through the classification field, a plurality of manuscripts can be compared by keywords to correspond to the classification to which the manuscripts belong.
[0061] Step S105: extracting a first information group of a plurality of the manuscripts, and storing the first information group into the corresponding list file according to the classification;
[0062] The first information group includes a unique identifier, a title, a publication time, and a static connection address. The static connection address corresponds to a storage path of a detail static page of the manuscript. The static connection address is unique. Through the static connection address, the first information group can be connected to the static page of the corresponding manuscript to browse the manuscript. The unique identifier is a 32-bit random string. The unique identifier corresponds to the association between the manuscript and the classification. One manuscript can be affiliated to multiple classifications. Each association corresponds to a unique identifier. In the case of displaying news comments and calculating the access volume of accumulated news, the unique identifier is used as a working parameter. The title and the publication time are used to assist users in judging the content and quickly browsing the required manuscript.
[0063] Step S106: extracting a second information group of the list file, and storing the second information group into the corresponding index file according to the column;
[0064] The second information group includes a file serial number, a file path, and a manuscript quantity. The list file stores a plurality of first information groups to correspond to a plurality of manuscripts. The file serial number, the file path, and the manuscript quantity of the list file are extracted. When the index file is loaded, the different list files can be positioned through the file serial number. The corresponding list file can be connected from the index file through the file path. The specific quantity of the manuscripts under a certain list file can be obtained through the manuscript quantity.
[0065] The association between the manuscript, the list file, the index file, and the column list can be established through the first information group and the second information group. After generating a static page, the corresponding index file is loaded according to the different columns under the column list. The second information group in the index file is linked to the list file. The first information group in the list file can be published in the display list. By clicking any first information group, the corresponding manuscript can be browsed through the static connection address of the first information group.
[0066] Step S107: modifying the first information group in the list file to complete the update of the manuscript;
[0067] When the manuscript needs to be added, the first information group of the manuscript to be added is extracted, and the first information group is stored in the list file, so that the addition of the manuscript is completed. When the manuscript needs to be deleted, the first information group of the manuscript to be deleted is deleted in the list file, so that the deletion of the manuscript is completed.
[0068] Step S108: modifying the second information group in the index file according to the change of the list file;
[0069] When the first information group in the list file changes, the file number and the number of manuscripts change. By modifying the second information group in the index file, the index file and the list file can be associated again to accurately locate the manuscript.
[0070] Step S109: updating the manuscript displayed in the display list according to the modified first information group and the modified second information group;
[0071] After the modification of the list file and the index file is completed, that is, after the update of the first information group and the second information group is completed, the list file and the manuscript can be located by the index file, the updated first information group is displayed in the display list, and the update of the display list is completed.
[0072] It can be understood that when the column under the column list is accessed, the index file and the list file are reacquired according to the selected column. Therefore, when the first information group and the second information group change, the static page can load the latest first information group in real time, so that the latest manuscript can be accessed in real time, and the static page itself is not affected by the change. By triggering the corresponding index file through different columns, the list file corresponding to the manuscript is repositioned, the update of the manuscript is completed, the situation that the static page needs to be repeatedly loaded due to the direct update of the manuscript on the static page is avoided, and only the display list needs to be updated when the manuscript is updated, which ensures the webpage browsing speed to a certain extent.
[0073] Please refer to Figure 3 The third embodiment of the present application provides a static web page manuscript publishing system, which is applied to the static web page manuscript publishing method and has been described above. As used below, the terms "module", "unit", "sub-unit" and the like can be a combination of software and / or hardware that can realize a predetermined function. Although the device described in the following embodiments is preferably realized by software, the realization of hardware or a combination of software and hardware is also possible and is conceived.
[0074] The system comprises:
[0075] A first generating module 10 is configured to generate a static page, wherein the static page comprises a column list and a display list, and the display list is configured to display a manuscript;
[0076] The first generating module 10 comprises:
[0077] A loading unit is configured to generate static files and dynamic files of a page;
[0078] An assembling unit is configured to splice the static files and the dynamic files to form a static page
[0079] A second generating module 20 is configured to generate an index file and a list file according to the column list;
[0080] The second generating module 20 comprises:
[0081] A first unit is configured to generate an index file corresponding to a column according to different columns under the column list;
[0082] A second unit is configured to generate a list file corresponding to a classification according to different classifications under the column.
[0083] An association module 30 is configured to associate the manuscript to the list file through a first information group of the manuscript, and associate the list file to the index file through a second information group of the list file;
[0084] The association module 30 comprises:
[0085] A partition unit is configured to generate a partition field according to the classification, and partition a plurality of manuscripts to the corresponding classification through the partition field;
[0086] A first extraction unit is configured to extract a first information group of a plurality of manuscripts, and store the first information group into the corresponding list file according to the classification;
[0087] A second extraction unit is configured to extract a second information group of the list file, and store the second information group into the corresponding index file according to the column.
[0088] A modification module 40 is configured to update the manuscript in the display list by modifying the first information group and the second information group;
[0089] The modification module 40 comprises:
[0090] A first modification unit is configured to modify the first information group in the list file to complete the update of the manuscript;
[0091] a second modification unit for modifying the second information group in the index file according to the change of the list file;
[0092] an updating unit for updating the manuscript displayed in the display list according to the modified first information group and the modified second information group.
[0093] The application further provides a computer device, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, and the processor implements the static web manuscript publishing method as described in the above technical solution when executing the computer program.
[0094] The application further provides a computer readable storage medium, which stores a computer program, and the program is executed by a processor to implement the static web manuscript publishing method as described in the above technical solution.
[0095] The technical features of the above embodiments can be combined in any manner, and to make the description concise, all possible combinations of the technical features in the above embodiments are not described, however, as long as the combinations of the technical features do not exist contradictions, they should be considered as the scope of the present application.
[0096] The above embodiments only express several implementation manners of the present application, and the description is relatively specific and detailed, however, it should not be understood as the limitation of the patent scope of the present application. It should be pointed out that, for the ordinary skilled in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the patent protection scope of the present application should be subject to the appended claims.
Claims
1. A static web page template publishing method characterized by, The method comprises the following steps: generating a static page, the static page comprising a column list and a display list, the display list being used to display a manuscript; generating an index file and a list file according to the column list; the step of generating the index file and the list file according to the column list comprises: generating an index file corresponding to a column according to different columns under the column list; generating a list file corresponding to a classification according to different classifications under the column; associating the manuscript to the list file through a first information group of the manuscript, and associating the list file to the index file through a second information group of the list file, the first information group comprising a unique identifier, a title, a publication time and a static connection address, and the second information group comprising a file serial number, a file path and a number of manuscripts; the step of associating the manuscript to the list file through the first information group of the manuscript, and associating the list file to the index file through the second information group of the list file specifically comprises: generating a classification field according to the classification, and separating a plurality of manuscripts to the corresponding classification through the classification field; extracting a first information group of a plurality of manuscripts, and storing the first information group into the corresponding list file according to the classification; extracting a second information group of the list file, and storing the second information group into the corresponding index file according to the column; updating the manuscript in the display list by modifying the first information group and the second information group; the step of updating the manuscript in the display list by modifying the first information group and the second information group comprises: modifying the first information group in the list file to complete the update of the manuscript; modifying the second information group in the index file according to the change of the list file; updating the manuscript displayed in the display list according to the modified first information group and the modified second information group.
2. The static web page template publishing method according to claim 1, wherein the step of generating the static page comprises: generating a static file and a dynamic file of a page; splicing the static file and the dynamic file to form a static page.
3. The static web page template publishing method according to claim 1, wherein The static page further comprises a page style, a header style and a footer style.
4. A static web page material publishing system for use in the static web page material publishing method according to any one of claims 1 to 3, characterized by The system comprises: a first generating module, configured to generate a static page, the static page comprising a column list and a display list, the display list being used to display a manuscript; a second generating module, configured to generate an index file and a list file according to the column list; the second generating module comprises: a first unit, configured to generate an index file corresponding to a column according to different columns under the column list; a second unit, configured to generate a list file corresponding to a classification according to different classifications under the column; an association module, configured to associate the manuscript to the list file through a first information group of the manuscript, and associate the list file to the index file through a second information group of the list file, the first information group comprising a unique identifier, a title, a publication time and a static connection address, and the second information group comprising a file serial number, a file path and a number of manuscripts; The association module comprises: a partition unit configured to generate a partition field according to the classification, and partition a plurality of the manuscripts into corresponding categories according to the partition field; a first extraction unit configured to extract a first information group of the plurality of the manuscripts, and store the first information group into corresponding list files according to the classification; a second extraction unit configured to extract a second information group of the list files, and store the second information group into corresponding index files according to the category; a modification module configured to update the manuscripts in the display list by modifying the first information group and the second information group; the modification module comprises: a first modification unit configured to modify the first information group in the list file to complete the update of the manuscripts; a second modification unit configured to modify the second information group in the index file according to the change of the list file; an update unit configured to update the manuscripts displayed in the display list according to the modified first information group and the modified second information group.
5. A computer comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the computer program to implement the static web manuscript publishing method according to any one of claims 1 to 3.
6. A storage medium having stored thereon a computer program, characterized in that The program is executed by the processor to implement the static web manuscript publishing method according to any one of claims 1 to 3.
Citation Information
Patent Citations
Webpage generating method and device
CN108804471A
Content management system, static page management method and device and storage medium
CN114329297A