A method and device for dynamically generating website content
By obtaining and verifying historical static website files and dynamically generating website content with static and dynamic website module pools, the problems of low efficiency and high resource consumption in the existing technology are solved, and efficient and fast dynamic generation and response of website content are achieved.
Patent Information
- Application Number
- CN202411851731.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2025-04-01
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing dynamic web page technology has problems such as low web page generation efficiency, low dynamic content interpretation execution efficiency, and consuming more system resources, resulting in slow response to dynamic web page generation and high pressure on server performance.
By obtaining the historical static website file, verify its validity label. If it is valid, obtain the static website module pool, website template and dynamic website module configuration table. Assemble the static website module into the website template to generate a temporary static website file and distribute it to the terminal to generate the initial website interface. Analyze the dynamic website module configuration table to build a dynamic website module pool, and dynamically generate target website files based on static and dynamic module pools.
It improves the efficiency of dynamic website content generation, reduces resource consumption, improves response speed, alleviates server performance pressure, and optimizes the interpretation and execution efficiency of dynamic website modules.
Smart Images

Figure CN119739938A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of computer technology, and in particular relates to a method and device for dynamically generating website content. Background Art
[0002] With the development of computer technology, dynamic web page technology has emerged. The main steps of dynamic web page technology are to process the browser request in real time based on the server, and then transmit the processing result to the browser as the response to the browser request. The content in dynamic web pages can change dynamically with time, environment or the result of database operation. This feature perfectly fits the characteristics of the sudden increase in data volume and information in today's big data era.
[0003] With the development of network technology and computer science, the number of computer network users in my country has continued to rise, which has put forward higher requirements for the real-time dynamic generation of website content. However, the existing dynamic web page technology has problems such as low efficiency of web page generation, low efficiency of dynamic content interpretation and execution language, and high consumption of system resources, which leads to the defects of slow response of dynamic web page generation and high pressure on server system performance. Summary of the invention
[0004] Based on this, it is necessary to provide a method, device, computer equipment and storage medium for dynamic generation of website content, which can improve the efficiency of dynamic generation of website content and reduce the resource consumption of dynamic generation of website content, thereby improving the response speed of dynamic generation of website content and alleviating the performance pressure of server system.
[0005] The present application provides a method for dynamically generating website content, including:
[0006] Obtain historical static website files, and verify the validity period labels of the historical static website files to obtain verification results;
[0007] If the verification result is valid, obtain the static website module pool, website template and dynamic website module configuration table in the historical static website file;
[0008] Assemble the static website modules in the static website module pool into the website template to generate a temporary static website file, and distribute the temporary static website file to the website display terminal. The temporary static website file is used to generate the initial website interface;
[0009] Parse the dynamic website module configuration table to obtain the dynamic website module to-be-acquired queue, and build a dynamic website module pool according to the dynamic website module to-be-acquired queue, the dynamic website module pool is used to display the dynamic content of the website in real time;
[0010] The target website files are dynamically generated based on the static website module pool, the dynamic website module pool and the website template, and the target website files are distributed to the website display terminal. The target website files are used to generate the target website interface covering the initial website interface.
[0011] The above-mentioned website content dynamic generation method, device, computer equipment and storage medium can reuse the existing effective resources in the past by obtaining historical static website files, reducing the time cost of repeatedly obtaining the same website elements and repeatedly building the same website modules, effectively improving the efficiency of the overall web page generation, and accelerating the presentation speed of the website interface through a two-stage website interface generation method.
[0012] Furthermore, by parsing the dynamic website module configuration table and building a dynamic website module pool, the management of dynamic content is made more effective and stable, and the interpretation and execution efficiency of the dynamic website module is optimized. The method of dynamically generating target website files based on the static website module pool, the dynamic website module pool and the website template can not only quickly build the initial interface through the static part of the website, but also ensure the real-time update and display of dynamic content through the dynamic part of the website, thereby improving the user's website interface experience.
[0013] Furthermore, by using historical static website files to dynamically generate website content, the server is prevented from repeatedly generating existing and valid static content, reducing server resource overhead. And by building a dynamic website module pool based on the dynamic website module configuration table, more accurate allocation and control of website dynamic resources is achieved, reducing the overall burden of the server in the process of dynamic web page generation. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0015] Figure 1 A schematic diagram of an application environment of an embodiment of the present application;
[0016] Figure 2 A schematic diagram of a flow chart of a method for dynamically generating website content in one embodiment of the present application;
[0017] Figure 3 This is a structural diagram of a website access verification system in one embodiment of the present application;
[0018] Figure 4A schematic diagram of a flow chart of a method for building a dynamic website module pool in one embodiment of the present application;
[0019] Figure 5 A flowchart of another method for dynamically generating website content in one embodiment of the present application;
[0020] Figure 6 This is a schematic diagram of the structure of a system for dynamically generating website content in one embodiment of the present application. DETAILED DESCRIPTION
[0021] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0022] The website content dynamic generation method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown, the terminal 102 communicates with the server 101 through the network. The database 103 can store data that the server 101 needs to process. The database 103 can be integrated on the server 104, or placed on the cloud or other network servers.
[0023] Illustratively, when it is necessary to generate a target website file, the server 101 may receive a target website file generation request sent by the terminal 102. The target website file is used to display at least one dynamic data, and the dynamic data is data updated in real time according to a preset time interval. The target website file generation request includes a website template corresponding to the target website file, and the website template includes at least one website module. The website module may include website elements, and the website module is used to display dynamic content based on the website elements. The website elements in the website module may be stored in the database 103. In response to obtaining the target website file generation request, the server 101 may generate the target website file based on the website template, the website module and the dynamic data in the database 103. The server 101 may send the generated target website file to the terminal 102, so that the terminal 102 displays the target website interface.
[0024] Exemplarily, server 101 can be implemented with an independent server or a server cluster composed of multiple servers. Terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices. Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. Database 103 can be, but is not limited to, a relational database, a non-relational database, a key-value storage database, and a column family database. In addition, database 103 can also be a distributed database, which distributes data on multiple nodes, ensures data consistency and availability through distributed algorithms, and can handle massive data storage and high-concurrency access requests, such as a distributed database system for storing user data, log data, etc.
[0025] In an exemplary embodiment, Figure 2 As shown, a method for dynamically generating website content is provided, and the method is applied to Figure 1 The server 101 in the example is used as an example to illustrate the method, which includes the following steps S201 to S205. Among them:
[0026] Step S201, obtain historical static website files, and verify the validity period labels of the historical static website files to obtain verification results.
[0027] Specifically, when it is necessary to generate a target website file, the terminal 102 may send a target website file generation request to the server 101 through a communication channel. In response to obtaining the target website file generation request, the server 101 may obtain the historical static website file, and verify the validity period label of the historical static website file to obtain a verification result.
[0028] Furthermore, the data sources of historical static website files may include but are not limited to HTML files, CSS style sheets, JavaScript scripts, images and font files stored in the browser cache in terminal 102; the data sources of historical static website files may include but are not limited to frequently accessed website files stored in the content distribution network server in server 101; the data sources of historical static website files may include but are not limited to website fragments, website query results, and website user session data stored in the Web server cache and / or application server cache in server 101; the data sources of historical static website files may include but are not limited to infrequently updated website basic configuration information and long-term valid website content information tables stored in database 103.
[0029] Exemplarily, the embodiment of the present application does not limit the target website interface mapped by the target website file, and the target website interface may include but is not limited to a cockpit website interface, a social platform website interface, a financial service website interface, a product display website interface, a news information website interface, an education and training website interface, and a media display website interface. Correspondingly, the dynamic data displayed in the target website interface may include but is not limited to device summary data, private domain content data, financial transaction data, product details page data, news information data, learning task data, and multimedia data.
[0030] Illustratively, the target website file generated by the server 101 based on the historical static website file can be used to dynamically generate website content on the terminal 102, and the website content can be dynamically generated in real time on the target website interface according to a preset time interval. The preset time interval can include but is not limited to thirty seconds, one minute, and one hour. The preset time interval can be obtained based on the update frequency of the dynamic data displayed in the target page.
[0031] Furthermore, the server 101 may set a validity period label of the historical static website file based on a preset time interval of the website content mapped by the dynamically generated historical static website file.
[0032] Exemplarily, the server 101 may generate an expiration date tag based on the module weight and content update frequency of the website module in the static website file. A feasible expression of the expiration date tag is as follows:
[0033]
[0034] Where T is the validity period label, γ i is the module weight of the website module, f i The frequency with which the content of a website module is updated.
[0035] In order to realize the real-time update of dynamic data, the dynamic data of the target website file is not fixed data, but corresponds to the relevant data interface. The dynamic data at the current moment can be obtained in real time through the data interface and updated on the target page, thereby ensuring the real-time nature of the dynamic data.
[0036] Step S202: If the verification result is valid, obtain the static website module pool, website template and dynamic website module configuration table in the historical static website file.
[0037] Specifically, if the verification result of the validity period tag of the historical static website file is valid, the server 101 can obtain the static website module pool and website configuration file in the historical static website file, and obtain the website template and dynamic website module configuration table based on the website configuration file.
[0038] Schematically, the server 101 can split the static part of the historical static website file to obtain the static website modules in the static website module pool, and the static website modules can have corresponding functions and styles and can be reused. The server 101 can build a static website module pool based on the obtained static website modules, and the server 101 can build a navigation subsystem of the target website based on the static website module pool to guide users to explore and use the target website.
[0039] Furthermore, the server 101 may generate static website module content through a multimodal content generation model based on the static website module size, static website module type, and static website module content tag in the historical static website file.
[0040] Exemplarily, the server 101 may obtain the resource access path and website component parameters of the target website based on the website configuration file, and the website configuration file may be, but is not limited to, an XML file, an INI file, and a JSON file. The server 101 may obtain the website template resource based on the resource access path and obtain the website template, and the website template may include a website layout, and the server 101 may generate a website grid network based on the website layout. The server 101 may obtain a dynamic website module configuration table based on the website component parameters, and the dynamic website module configuration table may be used to obtain a dynamic website module for dynamically generating website content.
[0041] Step S203, assembling the static website modules in the static website module pool into the website template, generating a temporary static website file, and distributing the temporary static website file to the website display terminal.
[0042] Specifically, the server 101 can identify the required and valid static website modules from the static website module pool according to the generation request of the target website file, and assemble the identified static website modules into the page layout structure mapped by the website template, generate a temporary static website file, and distribute the temporary static website file to the website display terminal. The temporary static website file is used to generate the initial website interface.
[0043] Illustratively, the server 101 may insert the code or file content of the identified static website module into the corresponding position in the website template, thereby assembling the static website module into the website template.
[0044] Exemplarily, the temporary static website files generated by the server 101 may be, but are not limited to, HTML files, CSS files, JavaScript files, and compressed package files containing multiple resources.
[0045] Step S204, parsing the dynamic website module configuration table to obtain a dynamic website module to-be-acquired queue, and constructing a dynamic website module pool according to the dynamic website module to-be-acquired queue.
[0046] Specifically, the server 101 can parse the dynamic website module configuration table, obtain the information of the dynamic website module mapped by the dynamic website module configuration table, and generate a dynamic website module to-be-acquired queue based on the information of the dynamic website module. Furthermore, the server 101 can construct a dynamic website module pool according to the dynamic website module to-be-acquired queue, and the dynamic website module pool is used to display the dynamic content of the website in real time.
[0047] Exemplarily, the dynamic website module configuration table may be a JSON configuration file, and the server 101 may extract key information of the dynamic website module by parsing the key values of the JSON configuration file, and generate a dynamic website module to-be-acquired queue based on the key information matching of the dynamic website module.
[0048] Further, the server 101 can start from the head of the dynamic website module to be obtained queue and obtain each dynamic website module in turn. The dynamic website module may include but is not limited to a local file, a URL file, and a third-party application program interface file. After the server 101 obtains the dynamic website module, the dynamic website module can be stored in the created data structure to build a dynamic website module pool.
[0049] Step S205: dynamically generate target website files based on the static website module pool, the dynamic website module pool and the website template, and distribute the target website files to the website display terminal.
[0050] Specifically, the server 101 can dynamically generate target website files based on the static website module pool, the dynamic website module pool and the website template, and distribute the target website files to the website display terminal. The target website files are used to generate a target website interface covering the initial website interface, thereby realizing the dynamic generation of website content.
[0051] Exemplarily, the server 101 can load the selected website template into the memory for initialization processing. The website template can set the basic layout framework, area division and placeholder settings of the target website interface mapped by the target website file. Furthermore, the server 101 can identify the website modules required to construct the target website file from the static website module pool and the dynamic website module pool, and assemble the website modules into the website template after the initialization processing to dynamically generate the target website file.
[0052] Illustratively, in response to the generation of the target website file, the server 101 may update the historical static website file to the target website file, and the server 101 may update the validity period tag of the historical static website file based on the target website file.
[0053] Further, in response to the generation of the target website file, the server 101 may store the website template corresponding to the target website file into the website template library.
[0054] In the above-mentioned website content dynamic generation method, by obtaining historical static website files, multiple historical static resources can be reused to avoid repeated dynamic generation of the same content, greatly reducing the server's resource overhead and processing time, and improving the overall efficiency of target website file generation. And based on the validity period label of the historical static website file, it is guaranteed that the website content can be updated in a timely manner according to the actual situation, avoiding the problem of data obsolescence due to excessive reuse of old resources, so that the website can achieve a good balance between efficiency and real-time performance.
[0055] Furthermore, by assembling static website modules into website templates to generate temporary static website files and distributing them to display terminals to generate the initial website interface, it is possible to efficiently build the basic framework of the website, quickly present the initial interface of the website, improve the response speed when visiting the website, and enhance the user experience.
[0056] Furthermore, by parsing the dynamic website module configuration table to generate a queue to be obtained and constructing a dynamic website module pool, dynamic website modules can be obtained according to preset rules, improving the stability and accuracy of dynamic generation of website content. In addition, based on the static and dynamic website module pools and website templates, the target website files are dynamically generated, and finally the dynamic generation of website content is realized, which can meet the user's needs for the timeliness and interactivity of website content and improve the user's continuous attention and frequency of use.
[0057] In one embodiment, please refer to Figure 4 , parsing the dynamic website module configuration table to obtain the dynamic website module to-be-acquired queue, and building a dynamic website module pool according to the dynamic website module to-be-acquired queue, including the steps of:
[0058] Step S4010, parsing the dynamic website module configuration table to obtain a dynamic website module to-be-acquired queue.
[0059] Specifically, the dynamic website module configuration table may be in, but not limited to, JSON format. The server may obtain the dynamic website module to-be-acquired queue by parsing the dynamic website module array in the dynamic website module configuration table in JSON format, where each element in the dynamic website module array represents a dynamic website module; the dynamic website module configuration table may be in, but not limited to, XML format. The server may obtain key information of the dynamic website module by parsing the sub-tags or attributes under the corresponding module tag in the dynamic website module configuration table in XML format, and then form a dynamic website module to-be-acquired queue; the dynamic website module configuration table may be in, but not limited to, INI format. The server may obtain key information of the dynamic website module by parsing the key values in the sections in the dynamic website module configuration table in INI format, and then form a dynamic website module to-be-acquired queue.
[0060] In an illustrative manner, the server can add the key information of the dynamic website module obtained by parsing the dynamic website module configuration table to the created queue data structure to obtain the dynamic website module queue to be obtained. The queue data structure to be obtained can be but is not limited to an array, a linked list, a stack, a queue, a tree, a graph and a heap.
[0061] Furthermore, after completing the construction of the queue of dynamic website modules to be acquired, the server can traverse each module in the queue of dynamic website modules to be acquired to check whether the dependency relationship of the dynamic website modules is normal. When the server finds that a dynamic website module that a dynamic website module depends on is not in the queue, it can identify the dynamic website module that is depended on and insert the dynamic website module that is depended on into a suitable position in the queue, thereby improving the stability of dynamic generation of website content.
[0062] Step S4011, using the user preference model to prioritize the dynamic page modules to be acquired in the dynamic website module to-be-acquired queue, and generating a priority sequence of the dynamic page modules to be acquired.
[0063] Specifically, the server may construct and adopt a user preference model to generate a user preference evaluation result, and prioritize the dynamic website modules in the to-be-acquired queue based on the user preference evaluation result.
[0064] Exemplarily, a feasible expression of the user preference model is as follows:
[0065]
[0066] Where M is the user preference model represented by binary, is the genotype matrix of the evolving individuals, is the fitness value matrix of the evolving individual, α uv To express a gene fragment with a specific function, x uis the fitness value of the evolutionary individual, n is the number of evolutionary individuals under the user preference mode, m is the number of evolutionary individuals, G(α uv ) is the user preference value, l is the total number of preference individuals evaluated by the user, and k is the number of users with α uv The preferred number of individuals, ω v Because of α uv The corresponding weight of the composition, β is the preferred combination factor, H C is the number of times the preference combination involves mergers, Z C is the number of components in the preference combination, ω is any newly generated evolutionary individual, S(ω) is the user's estimated fitness value, f ω is the combination frequency of the preferred combination, f c is the critical point of the combination frequency.
[0067] Furthermore, the server can generate a user estimated adaptation value S(ω) based on the user preference model as the user preference evaluation result, and determine the priority of the dynamic page module based on the size of the user estimated adaptation value S(ω), and then reorder the generated dynamic website module to be acquired queue.
[0068] Step S4012, acquiring the dynamic website elements of the dynamic page module to be acquired in the order of the priority sequence of the dynamic page module to be acquired, and generating the target dynamic page module based on the dynamic website elements.
[0069] Specifically, the server can parse the priority sequence of the dynamic page modules to be obtained, obtain the order of obtaining the dynamic page modules, and can sequentially obtain the dynamic website elements of each dynamic page module to be obtained according to the order of the dynamic page modules. After obtaining all the dynamic website elements corresponding to a single dynamic page module to be obtained each time, the server can integrate and assemble the obtained dynamic website elements according to the format requirements of the dynamic page module to generate a target dynamic page module.
[0070] Step S4013, constructing a dynamic website module pool in real time based on the target dynamic page module.
[0071] Specifically, the server can identify the position of the target dynamic page module generated in real time in the data structure corresponding to the dynamic website module pool, and add the target dynamic page module generated in real time to the data structure corresponding to the created dynamic website module pool, and build the dynamic website module pool in real time. The data structure of the dynamic website module pool can be, but is not limited to, a hash table, an array, a linked list, a tree structure, and a graph structure.
[0072] In the above-mentioned website content dynamic generation method, by using the user preference model to prioritize the dynamic page modules to be acquired in the dynamic website module to be acquired queue, the user's preference factor is fully considered, so that the dynamically generated website content can meet the personalized needs of the user. In addition, the dynamic website elements are acquired and the target dynamic page module is generated in the order of the priority sequence of the dynamic page modules to be acquired, which can ensure the orderliness and efficiency of module acquisition and assembly.
[0073] In one embodiment, please refer to Figure 4 , the validity period label includes the defect validity period label, and the verification result is valid includes the verification result is defective valid. If the verification result of the historical static website file is defective valid, before assembling the static website modules in the static website module pool into the website template, generating a temporary static website file, and distributing the temporary static website file to the website display terminal, it also includes:
[0074] Step S4006, if the verification result of the historical static website file is defective and valid, the historical static website file is input into the expired static website module identification engine, the expired static website module to be updated in the static website module pool is identified, and an expired static website module pool is generated.
[0075] Specifically, the server can construct an expired static website module identification engine based on the support vector machine model. If the server verifies that the validity period label of the historical static website file is defective and valid, the server can input the historical static website file into the constructed expired static website module identification engine to identify the expired static website module to be updated in the static website module pool, and generate an expired static website module pool. The expired static website module pool can be used to map the expired static website modules in the static website module pool.
[0076] Step S4007, obtaining the real-time static page element of the expired static website module mapped in the expired static website module pool, and updating the expired static website module according to the real-time static page element to generate a real-time static website module.
[0077] Specifically, the server can obtain the source path of the real-time static page element of the expired static website module mapped in the expired static website module pool, and can obtain the real-time static page element based on the source path. The server can parse and extract the static page element, and update the expired static website module, replace the expired resource reference in the expired static website module, and generate a real-time static website module.
[0078] Step S4008, updating the expired static website module mapped in the expired static website module pool to a real-time static website module, thereby implementing the update of the static website module pool.
[0079] In the above-mentioned website content dynamic generation method, the expired static website module identification engine can accurately identify the expired static website modules to be updated in the static website module pool. Before assembling the static website modules into the website template to generate temporary static website files, the historical static website files that may have problems can be processed to improve the timeliness and effectiveness of the dynamic generation of website content.
[0080] In one of the embodiments, the dynamic network module pool includes a historically valid dynamic network module pool and a real-time dynamic website module pool. The historically valid dynamic network module pool is used to map the historically valid dynamic website modules whose corresponding historical versions in the static website files meet the historical version retention conditions. The real-time dynamic website module pool is used to map the real-time dynamic website modules whose corresponding historical versions in the static website files meet the version update conditions.
[0081] The validity period tag includes an absolute validity period tag, and the verification result being valid includes the verification result being absolutely valid. The absolute validity period tag is used to represent that the proportion of the historical valid dynamic network module pool in the dynamic website module pool exceeds a preset threshold.
[0082] Illustratively, the preset threshold can be used as a decision reference to determine the overall effectiveness status of the dynamic network module pool. The server can decide whether to update the dynamic network module pool based on the preset threshold.
[0083] If the historical static website file is verified to be absolutely valid, the dynamic website module configuration table is parsed to obtain the dynamic website module queue to be obtained, and a dynamic website module pool is constructed according to the dynamic website module queue to be obtained, including:
[0084] The historically invalid dynamic website modules that meet the version update condition in the dynamic website module pool mapped by the dynamic website module to-be-acquired queue are screened, and the dynamic website module to-be-acquired queue is divided into a historically valid dynamic website module to-be-acquired queue and a historically invalid dynamic website module to-be-acquired queue.
[0085] The historically valid dynamic website modules mapped by the historically valid dynamic website module to-be-acquired queue are acquired from the historical static website files, and a historically valid dynamic network module pool is constructed based on the historically valid dynamic website modules.
[0086] The real-time dynamic website elements of the historically invalid dynamic website modules are obtained according to the historically invalid dynamic website modules to be obtained queue.
[0087] According to the real-time dynamic website elements, the historical invalid dynamic website modules are updated to real-time dynamic website modules, and a real-time dynamic website module pool is built based on the real-time dynamic website modules.
[0088] In the above-mentioned website content dynamic generation method, by dividing the historical effective dynamic network module pool and the real-time dynamic website module pool, refined classification management of dynamic network modules is achieved, which can improve the overall resource utilization efficiency of the website content generation system.
[0089] In one embodiment, please refer to Figure 4 , obtain historical static website files and verify the validity period labels of historical static website files, including:
[0090] Step S4001, in response to identifying a historical static website file acquisition request, acquiring real-time access data.
[0091] Step S4002: input the real-time access data into the website access verification system to obtain the access security assessment result.
[0092] Specifically, the server can build a zero-trust access management system as a dynamic element to obtain the verification system, and can input real-time access data into the zero-trust access management system to generate access security assessment results in real time.
[0093] Exemplarily, the access security assessment result obtained by the server may include an identity authentication assessment result and a behavior characteristic assessment result.
[0094] Step S4003, setting the access user data permission based on the access security assessment result, where the access user data permission is used to characterize the website content that the access user can obtain.
[0095] In one embodiment, please refer to Figure 5 , real-time access data includes real-time user permissions, real-time database permissions, and real-time table permissions. The real-time access data is input into the website access verification system to obtain access security assessment results, including:
[0096] Build a website access verification system based on user permissions, database permissions, and data table permissions.
[0097] Based on the website access verification system, the user real-time permissions, database real-time permissions and data table real-time permissions are verified in turn to generate access security assessment results.
[0098] Specifically, the server can verify the user's real-time permissions. If the user's real-time permissions verification fails, the server can set the access security assessment result to permissions not being met. If the user's real-time permissions verification succeeds, the database real-time permissions can be verified. If the database real-time permissions verification fails, the server can set the access security assessment result to user permissions being met. If the database real-time permissions verification succeeds, the data table real-time permissions can be verified. If the data table real-time permissions verification fails, the server can set the access security assessment result to database permissions being met. If the data table real-time permissions verification succeeds, the server can set the access security assessment result to data table permissions being met.
[0099] In one embodiment, before dynamically generating a target website file based on a static website module pool, a dynamic website module pool and a website template and distributing the target website file to a website display terminal, the method further includes:
[0100] Based on the dynamic website module configuration table and the dynamic website module pool, a dynamic website module valid table is obtained, where the dynamic website module valid table is used to represent dynamic website modules in the dynamic website module to-be-obtained queue whose acquisition request is successful.
[0101] Specifically, if the server successfully generates a dynamic page module, the dynamic website module valid table is updated according to the successfully generated dynamic page module.
[0102] The template components corresponding to the invalid dynamic website modules in the website template that are not mapped in the effective table of dynamic website modules are replaced or deleted to generate a real-time website template, and the website template is updated to the real-time website template.
[0103] In one embodiment, if Figure 4 As shown, a method for dynamically generating website content is provided, comprising the following steps S4001 to S4014. Among them:
[0104] Step S4001, in response to identifying a historical static website file acquisition request, acquiring real-time access data.
[0105] Step S4002: input the real-time access data into the website access verification system to obtain the access security assessment result.
[0106] Step S4003: Setting the access rights to user data based on the access security assessment result.
[0107] Step S4004, obtaining historical static website files, and verifying the validity period labels of the historical static website files to obtain verification results.
[0108] Step S4005: If the verification result is valid, obtain the static website module pool, website template and dynamic website module configuration table in the historical static website file.
[0109] Step S4006, if the verification result of the historical static website file is defective and valid, the historical static website file is input into the expired static website module identification engine, the expired static website module to be updated in the static website module pool is identified, and an expired static website module pool is generated.
[0110] Step S4007, obtaining the real-time static page element of the expired static website module mapped in the expired static website module pool, and updating the expired static website module according to the real-time static page element to generate a real-time static website module.
[0111] Step S4008, updating the expired static website module mapped in the expired static website module pool to a real-time static website module, thereby implementing the update of the static website module pool.
[0112] Step S4009, assembling the static website modules in the static website module pool into the website template, generating a temporary static website file, and distributing the temporary static website file to the website display terminal.
[0113] Step S4010, parsing the dynamic website module configuration table to obtain a dynamic website module to-be-acquired queue.
[0114] Step S4011, using the user preference model to prioritize the dynamic page modules to be acquired in the dynamic website module to-be-acquired queue, and generating a priority sequence of the dynamic page modules to be acquired.
[0115] Step S4012, acquiring the dynamic website elements of the dynamic page module to be acquired in the order of the priority sequence of the dynamic page module to be acquired, and generating the target dynamic page module based on the dynamic website elements.
[0116] Step S4013, constructing a dynamic website module pool in real time based on the target dynamic page module.
[0117] Step S4014: dynamically generate target website files based on the static website module pool, the dynamic website module pool and the website template, and distribute the target website files to the website display terminal.
[0118] The above-mentioned method for dynamically generating website content can effectively prevent unauthorized users from accessing website content and ensure the security of website data; by identifying and updating expired static website modules, the accuracy and timeliness of dynamic generation of website content can be maintained; by making dynamic adjustments based on user preferences, the flexibility and user adaptability of the website can be guaranteed, avoiding unnecessary waste of resources.
[0119] Based on the same inventive concept, the embodiment of the present application also provides a website content dynamic generation device 600 for implementing the website content dynamic generation method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more website content dynamic generation device embodiments provided below can refer to the limitations of the website content dynamic generation method above, and will not be repeated here.
[0120] In an exemplary embodiment, Figure 6 As shown, a website content dynamic generation device 600 is provided, comprising:
[0121] The historical static website file acquisition module 601 is used to acquire the historical static website file and verify the validity period label of the historical static website file to obtain the verification result;
[0122] The historical static website file parsing module 602 is used to obtain the static website module pool, website template and dynamic website module configuration table in the historical static website file if the verification result is valid;
[0123] A temporary static website file generating module 603 is used to assemble the static website modules in the static website module pool into the website template, generate a temporary static website file, and distribute the temporary static website file to the website display terminal. The temporary static website file is used to generate an initial website interface;
[0124] The dynamic website module pool construction module 604 is used to parse the dynamic website module configuration table to obtain the dynamic website module to-be-acquired queue, and to construct a dynamic website module pool according to the dynamic website module to-be-acquired queue, and the dynamic website module pool is used to display the dynamic content of the website in real time;
[0125] The target website file generation module 605 is used to dynamically generate target website files based on the static website module pool, the dynamic website module pool and the website template, and distribute the target website files to the website display terminal. The target website files are used to generate a target website interface covering the initial website interface.
[0126] In one of the embodiments, the dynamic website module pool construction module 604 is also used to parse the dynamic website module configuration table to obtain a dynamic website module to-be-acquired queue; use a user preference model to prioritize the dynamic page modules to be acquired in the dynamic website module to-be-acquired queue, and generate a priority sequence of the dynamic page modules to be acquired; acquire the dynamic website elements of the dynamic page modules to be acquired in the order of the priority sequence of the dynamic page modules to be acquired, and generate a target dynamic page module based on the dynamic website elements; and construct a dynamic website module pool in real time based on the target dynamic page module.
[0127] In one of the embodiments, the historical static website file acquisition module 601 is also used to input the historical static website file into the expired static website module identification engine, identify the expired static website modules to be updated in the static website module pool, and generate an expired static website module pool, which is used to map the expired static website modules in the static website module pool; obtain the real-time static page elements of the expired static website modules mapped in the expired static website module pool, and update the expired static website modules according to the real-time static page elements to generate a real-time static website module; update the expired static website modules mapped in the expired static website module pool to the real-time static website modules, and realize the update of the static website module pool.
[0128] In one of the embodiments, the dynamic website module pool construction module 604 is also used to screen the historical invalid dynamic website modules that meet the version update conditions in the dynamic website module pool mapped by the dynamic website module to-be-acquired queue, and divide the dynamic website module to-be-acquired queue into a historical valid dynamic website module to-be-acquired queue and a historical invalid dynamic website module to-be-acquired queue; obtain the historical valid dynamic website modules mapped by the historical valid dynamic website module to-be-acquired queue from the historical static website files, and build a historical valid dynamic network module pool based on the historical valid dynamic website modules; obtain the real-time dynamic website elements of the historical invalid dynamic website modules according to the historical invalid dynamic website modules to-be-acquired queue; update the historical invalid dynamic website modules to real-time dynamic website modules according to the real-time dynamic website elements, and build a real-time dynamic website module pool based on the real-time dynamic website modules.
[0129] In one of the embodiments, the historical static website file acquisition module 601 is also used to obtain real-time access data in response to identifying a historical static website file acquisition request; input the real-time access data into the website access verification system to obtain an access security assessment result; set access user data permissions based on the access security assessment result, and the access user data permissions are used to characterize the website content that the access user can obtain.
[0130] In one of the embodiments, the historical static website file acquisition module 601 is also used to build a website access verification system based on user permissions, database permissions and data table permissions; based on the website access verification system, the user's real-time permissions, database real-time permissions and data table real-time permissions are verified in turn to generate an access security assessment result.
[0131] In one of the embodiments, the historical static website file acquisition module 604 is also used to acquire a dynamic website module valid table based on the dynamic website module configuration table and the dynamic website module pool, the dynamic website module valid table is used to represent the dynamic website modules in the dynamic website module to-be-acquired queue whose acquisition requests are successful; replace or delete the template components corresponding to the invalid dynamic website modules in the website template that are not mapped in the dynamic website module valid table, generate a real-time website template, and update the website template to the real-time website template.
[0132] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of a power supply safety management method as described above when executing the computer program.
[0133] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0134] The above-mentioned embodiments only express several implementation methods of the embodiments of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the patent of the embodiments of the present application. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the embodiments of the present application, and these all belong to the protection scope of the embodiments of the present application.
Claims
1. A method for dynamically generating website content, characterized in that: The method comprises: Obtain historical static website files, and verify the validity period labels of the historical static website files to obtain verification results; If the verification result is valid, obtain the static website module pool, website template and dynamic website module configuration table in the historical static website file; Assembling the static website modules in the static website module pool into the website template to generate a temporary static website file, and distributing the temporary static website file to the website display terminal, wherein the temporary static website file is used to generate an initial website interface; Parsing the dynamic website module configuration table to obtain a dynamic website module to-be-acquired queue, and constructing a dynamic website module pool according to the dynamic website module to-be-acquired queue, wherein the dynamic website module pool is used to display the dynamic content of the website in real time; A target website file is dynamically generated based on the static website module pool, the dynamic website module pool and the website template, and the target website file is distributed to the website display terminal. The target website file is used to generate a target website interface covering the initial website interface.
2. The method according to claim 1, characterized in that: Parsing the dynamic website module configuration table to obtain a dynamic website module to-be-acquired queue, and constructing a dynamic website module pool according to the dynamic website module to-be-acquired queue, including: Parsing the dynamic website module configuration table to obtain the dynamic website module to-be-acquired queue; The user preference model is used to prioritize the dynamic page modules to be acquired in the dynamic website module to-be-acquired queue, and a priority sequence of the dynamic page modules to be acquired is generated; Acquire the dynamic website elements of the dynamic page module to be acquired in the order of the priority sequence of the dynamic page module to be acquired, and generate a target dynamic page module based on the dynamic website elements; The dynamic website module pool is constructed in real time based on the target dynamic page module.
3. The method according to claim 1, characterized in that The validity period label includes a defective validity period label, and the verification result being valid includes the verification result being defective valid; If the verification result of the historical static website file is defective and valid, before assembling the static website modules in the static website module pool into the website template to generate a temporary static website file, and distributing the temporary static website file to the website display terminal, the method further includes: Inputting the historical static website file into an expired static website module identification engine, identifying the expired static website module to be updated in the static website module pool, and generating an expired static website module pool, wherein the expired static website module pool is used to map the expired static website module in the static website module pool; Acquire the real-time static page element of the expired static website module mapped in the expired static website module pool, and update the expired static website module according to the real-time static page element to generate a real-time static website module; The expired static website module mapped by the expired static website module pool is updated to the real-time static website module, so as to realize the update of the static website module pool.
4. The method according to claim 1, characterized in that: The dynamic network module pool includes a historically valid dynamic network module pool and a real-time dynamic website module pool. The historically valid dynamic network module pool is used to map the historically valid dynamic website modules whose corresponding historical versions in the static website files meet the historical version retention conditions. The real-time dynamic website module pool is used to map the real-time dynamic website modules whose corresponding historical versions in the static website files meet the version update conditions. The validity period tag includes an absolute validity period tag, the verification result being valid includes the verification result being absolutely valid, and the absolute validity period tag is used to indicate that the proportion of the historically valid dynamic network module pool in the dynamic website module pool exceeds a preset threshold; If the historical static website file is verified to be absolutely valid, parsing the dynamic website module configuration table to obtain a dynamic website module to-be-acquired queue, and constructing a dynamic website module pool according to the dynamic website module to-be-acquired queue, including: Screening the historically invalid dynamic website modules that meet the version update condition in the dynamic website module pool mapped by the dynamic website module to-be-acquired queue, and dividing the dynamic website module to-be-acquired queue into a historically valid dynamic website module to-be-acquired queue and a historically invalid dynamic website module to-be-acquired queue; Acquire the historically valid dynamic website module mapped by the historically valid dynamic website module to-be-acquired queue from the historical static website file, and construct the historically valid dynamic network module pool based on the historically valid dynamic website module; Acquire the real-time dynamic website elements of the historically invalid dynamic website modules according to the historically invalid dynamic website modules to be acquired queue; The historical invalid dynamic website module is updated to the real-time dynamic website module according to the real-time dynamic website element, and the real-time dynamic website module pool is constructed based on the real-time dynamic website module.
5. The method according to claim 1, characterized in that The obtaining of historical static website files and verifying the validity period labels of the historical static website files includes: Responsive to identifying a historical static website file acquisition request, acquiring real-time access data; Input the real-time access data into the website access verification system to obtain access security assessment results; The access user data permission is set based on the access security assessment result, and the access user data permission is used to characterize the website content that the access user can obtain.
6. The method according to claim 5, characterized in that The real-time access data includes real-time user permissions, real-time database permissions, and real-time data table permissions. The real-time access data is input into the website access verification system to obtain access security assessment results, including: Build a website access verification system based on user permissions, database permissions, and data table permissions; Based on the website access verification system, the user real-time authority, the database real-time authority and the data table real-time authority are verified in sequence to generate the access security assessment result.
7. The method according to any one of claims 1 to 6, characterized in that: Before dynamically generating a target website file based on the static website module pool, the dynamic website module pool and the website template and distributing the target website file to the website display terminal, the method further includes: Acquire a dynamic website module valid table based on the dynamic website module configuration table and the dynamic website module pool, wherein the dynamic website module valid table is used to indicate the dynamic website modules in the dynamic website module to-be-acquired queue whose acquisition request is successful; The template components corresponding to the invalid dynamic website modules in the website template that are not mapped in the dynamic website module valid table are replaced or deleted to generate a real-time website template, and the website template is updated to the real-time website template.
8. A device for dynamically generating website content, characterized in that: The device comprises: A historical static website file acquisition module is used to acquire historical static website files and verify the validity period labels of historical static website files to obtain verification results; A historical static website file parsing module, for obtaining a static website module pool, a website template and a dynamic website module configuration table in the historical static website file if the verification result is valid; A temporary static website file generation module, used to assemble the static website modules in the static website module pool into the website template, generate a temporary static website file, and distribute the temporary static website file to the website display terminal, wherein the temporary static website file is used to generate an initial website interface; A dynamic website module pool construction module, used for parsing the dynamic website module configuration table to obtain a dynamic website module to-be-acquired queue, and constructing a dynamic website module pool according to the dynamic website module to-be-acquired queue, wherein the dynamic website module pool is used for displaying the dynamic content of the website in real time; The target website file generation module is used to dynamically generate a target website file based on the static website module pool, the dynamic website module pool and the website template, and distribute the target website file to the website display terminal. The target website file is used to generate a target website interface covering the initial website interface.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.