Out-link generation, content access method, device, system, equipment and storage medium

By using an external link generation system, and leveraging proxy servers and configuration servers to collaboratively handle content access requests, the problem of resource scarcity on the web platform was solved, enabling efficient and secure content access.

CN115695402BActive Publication Date: 2026-05-01CCB FINTECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CCB FINTECH CO LTD
Filing Date
2022-09-29
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

In existing technologies, the web applications of internet companies need to handle a large number of constantly updated content access requests, leading to resource shortages. How to properly handle this content to ensure normal access has become an urgent problem to be solved.

Method used

The external link generation system utilizes proxy servers and configuration servers to work together to generate external links and store web page files on the proxy server, avoiding the storage of original files on the native web client. Different servers are used to perform processing steps to improve efficiency and security.

Benefits of technology

It reduced the storage requirements of the native web client, improved content processing efficiency, ensured data security, and met the timeliness requirements of business growth.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115695402B_ABST
    Figure CN115695402B_ABST
Patent Text Reader

Abstract

The present disclosure provides an external link generation method, device, equipment and storage medium, which can be applied to the technical field of webpage processing. The method comprises: performing parsing processing on an external link generation request forwarded by a proxy server by a configuration server to obtain an original file; performing modification processing on the original file by the configuration server to obtain a webpage file; storing the webpage file from the configuration server in a preset static webpage file directory by the proxy server and generating an external link; and returning the external link to a front end by the proxy server. The storage of the external link reduces the storage of the original file; the webpage file is placed in the proxy server to ensure security; different servers perform their respective server logic, which also speeds up the external link generation efficiency in the face of massive content.
Need to check novelty before this filing date? Find Prior Art

Description

External link generation, content access methods, devices, systems, equipment and storage media Technical Field

[0001] This disclosure relates to the field of web page processing technology, and in particular to a method, apparatus, system, device, storage medium, and program product for generating external links and accessing content. Background Technology

[0002] For the system services developed by Internet companies, there are usually a large number of content access requirements. These accessed contents also have a continuous need for updates. Consequently, the large number of constantly updated content access requirements cause the web to allocate some resources to perform operations such as saving, processing and maintaining the content in order to ensure that the content can be accessed normally. Undoubtedly, this places a huge burden on the web.

[0003] Therefore, how to properly handle the content originally stored on the web to ensure that the content in the corresponding Internet access services can be accessed normally has become an urgent technical problem to be solved. Summary of the Invention

[0004] In view of the above problems, this disclosure provides methods, apparatus, systems, devices, storage media, and program products for generating external links and accessing content.

[0005] According to a first aspect of this disclosure, a method for generating backlinks is provided. The method is used in a backlink generation system, which includes a proxy server and a configuration server. The method includes: the configuration server parsing a backlink generation request forwarded from the proxy server to obtain an original file; the configuration server modifying the original file to obtain a webpage file; the proxy server storing the webpage file from the configuration server in a preset static webpage file directory and generating a backlink; and the proxy server returning the backlink to the frontend.

[0006] According to embodiments of this disclosure, the original file includes original content and an original identifier. The configuration server performs modification processing on the original file to obtain a web page file, including: obtaining a preset web page file model; rendering the preset web page file model based on the original content using preset modification logic to obtain the web page file; and naming the web page file based on the original identifier.

[0007] According to an embodiment of this disclosure, after the configuration server performs modification processing on the original file to obtain a web page file, the method further includes: persisting the original file and the corresponding web page file to store them locally.

[0008] According to an embodiment of this disclosure, the proxy server stores web page files from the configuration server to a preset static web page file directory and generates external links, including: generating the external links based on the reference path of the web page files in the preset static web page file directory.

[0009] According to an embodiment of this disclosure, the method further includes: the configuration server performing parsing processing on the external link regeneration request forwarded from the proxy server to obtain the original identifier; the configuration server searching for the corresponding original file and the web page file based on the original identifier; and the configuration server synchronizing the original file and the web page file to the proxy server to generate the external link.

[0010] According to an embodiment of this disclosure, after the proxy server stores the web page files from the configuration server to a preset static web page file directory and generates backlinks, the method further includes: the proxy server performs maintenance on the web page files and the corresponding backlinks based on preset maintenance rules, wherein the preset maintenance rules include: cleaning up a first preset number of web page files and the corresponding backlinks according to a preset period, wherein the cleaning method includes: performing cleaning in order from oldest to newest based on the generation time of the backlinks; or retaining a second preset number of the most recently generated web page files and the corresponding backlinks.

[0011] According to an embodiment of this disclosure, after the configuration server performs modification processing on the original file to obtain a web page file, the method further includes: synchronizing the web page file from the configuration server to the proxy server via a secure copy.

[0012] According to a second aspect of this disclosure, a content access generation method is provided, the method being applied to a proxy server, the method comprising: receiving a webpage file access request, wherein the webpage file access request is generated in response to a user clicking an external link; searching for a corresponding webpage file based on the webpage file access request; and returning the webpage file to the front end, wherein the external link is obtained by performing the aforementioned external link generation method.

[0013] According to a third aspect of this disclosure, an external link generation system is provided, the system comprising a proxy server and a configuration server, wherein the configuration server is configured to: perform parsing processing on external link generation requests forwarded from the proxy server to obtain original files; and perform modification processing on the original files to obtain web page files; the proxy server is configured to: store the web page files from the configuration server in a preset static web page file directory and generate external links; and return the external links to the front end.

[0014] According to embodiments of this disclosure, the original file includes original content and an original identifier, and the configuration server is further configured to: obtain a preset web page file model; based on the original content, render the preset web page file model through preset modification logic to obtain the web page file; and name the web page file based on the original identifier.

[0015] According to embodiments of this disclosure, the configuration server is further configured to: persist the original file and the corresponding web page file to local storage.

[0016] According to an embodiment of this disclosure, the proxy server is further configured to generate the external link based on the reference path of the web page file in the preset static web page file directory.

[0017] According to an embodiment of this disclosure, the configuration server is further configured to: perform parsing processing on the external link regeneration request forwarded from the proxy server to obtain the original identifier; locate the corresponding original file and the web page file based on the original identifier; and synchronize the original file and the web page file to the proxy server to generate the external link.

[0018] According to an embodiment of this disclosure, the proxy server is further configured to perform maintenance on the web page files and the corresponding external links based on preset maintenance rules, wherein the preset maintenance rules include: cleaning up a first preset number of web page files and the corresponding external links according to a preset period, wherein the cleaning method includes: performing cleaning in order from oldest to newest based on the generation time of the external links; or retaining a second preset number of the most recently generated web page files and the corresponding external links.

[0019] According to an embodiment of this disclosure, the configuration server is further configured to: synchronize the web page file from the configuration server to the proxy server via a secure copy.

[0020] According to a fourth aspect of this disclosure, a content access device is provided, the device comprising: an access request receiving module for receiving a webpage file access request, wherein the webpage file access request is generated in response to a user clicking an external link; a webpage file searching module for searching for a corresponding webpage file based on the webpage file access request; and a webpage file returning module for returning the webpage file to the front end, wherein the external link is obtained by performing the aforementioned external link generation method.

[0021] According to a fifth aspect of this disclosure, an electronic device is provided, comprising: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to perform the external link generation method or content access method described above.

[0022] According to a sixth aspect of this disclosure, a computer-readable storage medium is also provided, having stored executable instructions thereon, which, when executed by a processor, cause the processor to perform the aforementioned external link generation method or content access method.

[0023] According to the seventh aspect of this disclosure, a computer program product is also provided, including a computer program that, when executed by a processor, implements the above-described external link generation method or content access method.

[0024] The following effects can be achieved by using the external link generation and content access methods, devices, systems, equipment, storage media, and program products provided in this disclosure: 1. By generating content as external links, the original files are avoided in the native web application, requiring only the external links, which occupy less space, to be stored. This is more conducive to the storage of the original files, and the target files can be displayed as needed. 2. By storing web page files in a proxy server and generating corresponding external links, external link access and web page file generation are isolated from each other, ensuring the data security of the backend server. 3. By executing different processing steps on different servers, the efficiency of content processing is increased. When faced with massive amounts of content to be modified, the efficiency of external link generation can be accelerated, ensuring the timeliness of external link generation and meeting the needs of business growth. This can at least partially solve the technical problem of resource scarcity in the native web application. Attached Figure Description

[0025] The foregoing contents, as well as other objects, features, and advantages of this disclosure, will become clearer from the following description of embodiments with reference to the accompanying drawings, in which:

[0026] Figure 1 schematically illustrates an application scenario of the external link generation and content access method according to an embodiment of the present disclosure.

[0027] Figure 2 schematically illustrates a flowchart of an external link generation method according to an embodiment of the present disclosure.

[0028] Figure 3 schematically illustrates a flowchart of an external link generation method according to an embodiment of the present disclosure.

[0029] Figure 4 schematically illustrates a flowchart of an external link generation method according to an embodiment of the present disclosure.

[0030] Figure 5 schematically illustrates a flowchart of a content access method according to an embodiment of the present disclosure.

[0031] Figure 6 schematically illustrates a front-end image upload interface according to an embodiment of the present disclosure.

[0032] Figure 7 schematically illustrates a theoretical diagram of the MVC pattern according to an embodiment of the present disclosure.

[0033] Figure 8 schematically illustrates an MVC interaction diagram according to an embodiment of the present disclosure.

[0034] Figure 9 schematically illustrates a structural block diagram of an external link generation system according to an embodiment of the present disclosure.

[0035] Figure 10 schematically illustrates a structural block diagram of a content access device according to an embodiment of the present disclosure.

[0036] Figure 11 schematically illustrates a block diagram of an electronic device suitable for implementing an external link generation and content access method according to an embodiment of the present disclosure. Detailed Implementation

[0037] The embodiments of the present disclosure will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the disclosure. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of the present disclosure for ease of explanation. However, it will be apparent that one or more embodiments may be practiced without these specific details. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concepts of the present disclosure.

[0038] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.

[0039] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.

[0040] When using expressions such as "at least one of A, B, and C", they should generally be interpreted in accordance with the meaning that is commonly understood by a person skilled in the art (e.g., "a system having at least one of A, B, and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B, and C, etc.).

[0041] In the technical solutions disclosed herein, the collection, storage, use, processing, transmission, provision, disclosure, and application of data (including but not limited to user personal information) comply with the provisions of relevant laws and regulations, necessary confidentiality measures have been taken, and they do not violate public order and good morals.

[0042] Before describing the technical solutions of this disclosure, the key technical terms mentioned in this disclosure are explained as follows:

[0043] Nginx is a high-performance HTTP and reverse proxy web server. The Nginx service used in website development is a proxy software that can perform functions such as request distribution, load balancing, and static / dynamic content separation. When a user requests a target website, the request will first go through Nginx before being redirected to the web application.

[0044] External links: These are links that originate from other websites and lead to your own website, or links that originate from your own website and lead to other websites. Specifically, external links include plain text external links, anchor text external links, and image external links.

[0045] Uniform Resource Locator (URL) is the Uniform Resource Locator for the World Wide Web, i.e., a network address.

[0046] Hypertext Markup Language (HTML) is a language used to describe web pages. HTML allows users to format text, add images, create links, input forms, frames, tables, and more, and save these as text files for browsers to read and display.

[0047] Cascading Style Sheets (CSS) is a computer language used to style HTML (an application of Standard Generalized Markup Language) or XML (a subset of Standard Generalized Markup Language) documents. CSS can not only statically format web pages, but also dynamically format elements on a webpage in conjunction with various scripting languages. CSS allows for pixel-level precise control over the layout and positioning of elements on a webpage, supports almost all font sizes and styles, and has the ability to edit the styles of webpage objects and models.

[0048] Secure Copy (SCP) is a command used in Linux to perform remote file copying. This command securely copies files to a remote system and from a remote system to the local machine via the SSH protocol.

[0049] To address the technical problems existing in the prior art, embodiments of this disclosure provide an external link generation method. The method is used in an external link generation system, which includes a proxy server and a configuration server. The method includes: the configuration server parsing an external link generation request forwarded from the proxy server to obtain an original file; the configuration server modifying the original file to obtain a webpage file; the proxy server storing the webpage file from the configuration server in a preset static webpage file directory and generating an external link; and the proxy server returning the external link to the front end.

[0050] In the embodiments disclosed herein, at least the following beneficial effects can be achieved: 1. By generating content as external links, the original files are avoided from being stored in the native web application. This means that only external links, which occupy less space, need to be stored in the native web application, which is more conducive to the storage of the original files. The target files can then be displayed as needed. 2. By storing the web page files in a proxy server and generating the corresponding external links, external link access and web page file generation are isolated from each other, ensuring the data security of the backend server. 3. By executing different processing steps on different servers, the efficiency of content processing is increased. When faced with massive amounts of content to be modified, the efficiency of external link generation can be accelerated, ensuring the timeliness of external link generation and meeting the needs of business growth.

[0051] Figure 1 schematically illustrates an application scenario of the external link generation and content access method according to an embodiment of the present disclosure.

[0052] As shown in Figure 1, the application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, a proxy server 105, and a configuration server 106. The network 104 serves as a medium for providing communication links between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.

[0053] Users can interact with server 105 via network 104 using at least one of the first terminal device 101, second terminal device 102, and third terminal device 103 to receive or send messages, etc. Various communication client applications can be installed on the first terminal device 101, second terminal device 102, and third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social media platform software, etc. (for example only).

[0054] The first terminal device 101, the second terminal device 102, and the third terminal device 103 can be various electronic devices with displays and support web browsing, including but not limited to smartphones, tablets, laptops, and desktop computers.

[0055] The proxy server 105 can be a server that provides various services, such as a backend management server that supports websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103 (this is just an example). The backend management server can perform analysis and other processing on the received user requests and other data, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices.

[0056] Configuration server 106 can be a server that provides various services. Configuration server 106 does not communicate directly with first terminal device 101, second terminal device 102, and third terminal device 103, but communicates with first terminal device 101, second terminal device 102, and third terminal device 103 through proxy server 105 to provide corresponding services.

[0057] It should be noted that the external link generation and content access methods provided in this embodiment can generally be executed by the proxy server 105 and the configuration server 106, depending on the specific circumstances. Correspondingly, the external link generation and content access devices provided in this embodiment can generally be located in the proxy server 105 and the configuration server 106. The external link generation and content access methods provided in this embodiment can also be executed by a server or server cluster that is different from the proxy server 105 and the configuration server 106 and is capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or the proxy server 105 and the configuration server 106. Correspondingly, the external link generation and content access devices provided in this embodiment can also be located in a server or server cluster that is different from the proxy server 105 and the configuration server 106 and is capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or the proxy server 105 and the configuration server 106.

[0058] It should be understood that the number of terminal devices, networks, and servers shown in Figure 1 is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.

[0059] The following will describe in detail the external link generation and content access methods of the disclosed embodiments based on the scenario described in Figure 1, with reference to Figures 2 to 8.

[0060] Figure 2 schematically illustrates a flowchart of an external link generation method according to an embodiment of the present disclosure.

[0061] Figure 6 schematically illustrates a front-end image upload interface according to an embodiment of the present disclosure.

[0062] Figure 7 schematically illustrates a theoretical diagram of the MVC pattern according to an embodiment of the present disclosure.

[0063] As shown in Figure 2, the external link generation method in this embodiment includes operations S210 to S240.

[0064] In operation S210, the configuration server performs parsing processing on the external link generation request forwarded from the proxy server to obtain the original file, wherein the original file includes the original content and the original identifier.

[0065] The original content includes multiple different types of content, such as text, images, and icons. Different types of original content are distinguished by original identifiers. Therefore, the original content and its corresponding original identifiers are collectively referred to as the original file. It is understood that the original file refers to the file uploaded by the user from the front end, and this original file remains unchanged during transmission.

[0066] As shown in Figure 6, which uses an image as an example, the user uploads the image information and title through the image upload page. After clicking the "Submit" button, the image information and title are converted into JSON format. The frontend then synchronously submits this JSON file to the proxy server via HTTP. The external link generation request uses HTTP to communicate between the user's client and the proxy server.

[0067] The proxy server can be an Nginx server, which is a reverse proxy server that can directly interact with the front-end. The configuration server can be built using the Django framework, which can be developed in Python and can encapsulate some easy-to-use web development tools. Of course, other proxy servers and configuration servers that can also perform proxy and configuration functions are also acceptable, and there are no restrictions here.

[0068] Specifically, web development based on the Django framework will revolve around the MVC concept, as shown in Figure 7. Here, M (Model) corresponds to the model class that maps to the backend database; V (Views) is the function that receives a request, performs operations on the backend database, and returns data to the frontend for display; C (Controller) receives user input, calls the model and view to receive the request, determines which model component to call to handle the request, and then determines the view to display the returned data.

[0069] In operation S220, the configuration server performs modification processing on the original file to obtain a web page file.

[0070] The transformation process involves converting the original file into a webpage file. For example, a webpage file can be an HTML file; the process of converting an image into an HTML file is the transformation process described above. Compared to the original file, webpage files are more configurable and allow the addition of tags and attributes.

[0071] Figure 3 schematically illustrates a flowchart of an external link generation method according to an embodiment of the present disclosure.

[0072] Figure 8 schematically illustrates an MVC interaction diagram according to an embodiment of the present disclosure.

[0073] As shown in Figure 3, the external link generation method in this embodiment includes operations S310 to S330.

[0074] In operation S310, a preset web page file model is obtained.

[0075] In operation S320, based on the original content, the preset network file model is rendered through preset modification logic to obtain the web page file.

[0076] The preset webpage file model is a file with the same format as the webpage file; for example, the preset webpage file model and the webpage file are both HTML files. The preset modification logic, on the other hand, is pre-defined by the developers and transforms the original file into a webpage file that meets the requirements. For example, during the process of converting an image into an HTML file, the image is modified, including but not limited to resizing, repositioning, and adding attributes. These modifications (or preset modification logic) are pre-set by the developers and will not be elaborated further here.

[0077] In operation S330, the web page file is named based on the original identifier.

[0078] Identifying a webpage file using its original identifier allows for the differentiation of different webpage files. This also establishes a one-to-one correspondence between the original file (including its original content and identifier) ​​and the webpage file.

[0079] As shown in Figure 8, when configuring the server as the Django framework, it is divided into model files, view files, and template files according to the MVC concept. In particular, according to the conventional naming convention, the model file can be named "models.py", the view file can be named "view.py", and the file containing the URL matching rules and their correspondence with the view can be named "urls.py".

[0080] Based on the MVC interaction relationship in Figure 8, it can be further understood as operations S801 to S804.

[0081] In the S801 operation, the received HTTP requests are routed and matched with the corresponding view files through url.py.

[0082] In the S802 operation, the matched HTTP requests are matched with the models.py file through view.py to obtain the model files from the database.

[0083] In S803, the model file is returned to an HTML file (or template file) via view.py to generate a new HTML file.

[0084] In S804 operation, a new HTTP request is generated based on the new HTML file, and the new HTML file is synchronized to the Nginx server.

[0085] Specifically, users can request URLs using methods such as GET, POST, and DELETE. GET requests and their corresponding processing are placed in urls.py and views.py, and the response is HTML content. Requests initiated via POST or DELETE are usually triggered by clicking on page forms or other data-interactive elements, and their purpose is typically to add, delete, or modify data, returning data in JSON format.

[0086] To display user-uploaded images on the HTML, the images, along with the image titles entered by the user, first need to be stored in a local folder. The view then packages this information into a JSON list and sends it as a parameter to the corresponding HTML file on the homepage. Simultaneously, the file is synchronized to the Nginx's HTML folder, making it accessible to all users.

[0087] According to an embodiment of this disclosure, after the configuration server performs modification processing on the original file to obtain a web page file, the method further includes: synchronizing the web page file from the configuration server to the proxy server via a secure copy.

[0088] For example, SCP can be used to remotely copy files to ensure that web page files can be securely transferred between different servers.

[0089] In the embodiments of this disclosure, after the configuration server receives the original file and the corresponding original identifier, it does not directly generate backlinks for the original file. Instead, it modifies the original file into a webpage format and then generates the corresponding backlinks on other servers. This allows users to process the original content and quickly iterate the code according to their needs, enabling customized development.

[0090] In operation S230, the proxy server stores the web page files from the configuration server to a preset static web page file directory and generates external links.

[0091] External links refer to links from non-native web servers. External links can exist in formats such as URLs and CSS.

[0092] According to an embodiment of this disclosure, the proxy server stores web page files from the configuration server to a preset static web page file directory and generates external links, including: generating the external links based on the reference path of the web page files in the preset static web page file directory.

[0093] For example, use the reference path of the HTML file in the static file directory of the Nginx server as the URL.

[0094] According to an embodiment of this disclosure, after the configuration server performs modification processing on the original file to obtain a web page file, the method further includes: persisting the original file and the corresponding web page file to store them locally.

[0095] Here, "local" refers to a storage path on a non-native web server. For example, a mini-program includes a native mini-program server and a local server. Generally, all content and / or web pages are uploaded to the native mini-program server. Since the specific content and / or web pages are located remotely compared to the local server, there is a risk of data tampering. Therefore, in the embodiments of this disclosure, this content and / or web pages can be stored "locally," for reasons such as backup or usage considerations.

[0096] It is understood that the aforementioned "persisting the original file and the corresponding web page file to local storage" refers to storing them on a non-native web platform. This storage operation will not consume the storage resources of the native server. For example, local storage could be on a configuration server, or on a storage server and / or server cluster connected to the configuration server.

[0097] In the embodiments of this disclosure, on the one hand, by ensuring that the data is stored locally, data security can be guaranteed, and data tampering can be prevented. On the other hand, since different logic is executed on different servers, the original file may encounter anomalies during transmission. Therefore, configuring local storage on the server side can increase the number of traceable nodes, which is beneficial for error troubleshooting when anomalies occur.

[0098] In operation S240, the proxy server returns the external link to the front end.

[0099] In the embodiments disclosed herein, at least the following beneficial effects can be achieved: 1. By generating content as external links, the original files are avoided from being stored in the native web application. This means that only external links, which occupy less space, need to be stored in the native web application, which is more conducive to the storage of the original files. The target files can then be displayed as needed. 2. By storing the web page files in a proxy server and generating the corresponding external links, external link access and web page file generation are isolated from each other, ensuring the data security of the backend server. 3. By executing different processing steps on different servers, the efficiency of content processing is increased. When faced with massive amounts of content to be modified, the efficiency of external link generation can be accelerated, ensuring the timeliness of external link generation and meeting the needs of business growth.

[0100] Understandably, if a proxy server persistently stores a large number of original files, web page files, and external links, it will undoubtedly challenge the performance limits of the proxy server.

[0101] According to an embodiment of this disclosure, after the proxy server stores the web page files from the configuration server to a preset static web page file directory and generates backlinks, the method further includes: the proxy server performs maintenance on the web page files and the corresponding backlinks based on preset maintenance rules, wherein the preset maintenance rules include: cleaning up a first preset number of web page files and the corresponding backlinks according to a preset period, wherein the cleaning method includes: performing cleaning in order from oldest to newest based on the generation time of the backlinks; or retaining a second preset number of the most recently generated web page files and the corresponding backlinks.

[0102] For example, within a preset period, four webpage files A, B, C, and D are saved sequentially in chronological order (including the corresponding original files and external links). The maintenance rule could be: if the first preset quantity is 1, then the earliest generated webpage file A is deleted, and the newer B, C, and D are retained. Alternatively, without considering the preset period, a second preset quantity of files is always retained. Specifically, four webpage files A, B, C, and D are saved sequentially in chronological order (including the corresponding original files and external links). The maintenance rule could be: if the second preset quantity is 2, then the newer generated webpage files C and D are retained. Of course, the actual preset period, the first preset quantity, and the second preset quantity are set based on the developers' comprehensive consideration of the proxy server's performance, and will not be elaborated further here.

[0103] It should be noted that due to the nature of content access, more recently generated (or configured server-stored) web page files are more likely to be accessed by users. Therefore, to ensure high availability of the proxy server's storage space, newer web page files are prioritized for user access. For example, the space used for file storage on an Nginx server is limited, so ensuring the high availability of this storage space is crucial.

[0104] In the embodiments of this disclosure, preset maintenance rules are used to maintain these storage spaces to ensure high availability of the storage spaces.

[0105] Understandably, since the external link generation method involves multiple different servers, if an anomaly occurs during network transmission, resulting in the final proxy server not storing the original files and webpage files, then operations S230-S240 will be restarted first, retrieving the original files and webpage files stored on the configuration server to generate the external link and return it. Alternatively, it's also possible that after the external link is generated, the original files, webpage files, and external link are stored on the proxy server, only to be cleaned up by maintenance rules. In this case, it's necessary to further restart operations S230-S240 to generate the external link and return it.

[0106] Figure 4 schematically illustrates a flowchart of an external link generation method according to an embodiment of the present disclosure.

[0107] As shown in Figure 4, the external link generation method in this embodiment includes operations S410 to S430.

[0108] In operation S410, the configuration server performs parsing processing on the external link regeneration request forwarded from the proxy server to obtain the original identifier.

[0109] It is understandable that the external link regeneration request can be sent from the front end to the proxy server when the user finds that the external link has failed to return (the front end has not received the returned external link), and then forwarded by the proxy server to the configuration server; the external link regeneration request can also be sent from the front end to the proxy server when the user finds that the use of the external link has failed (the front end uses the external link but does not obtain the response web page file), and then forwarded by the proxy server to the configuration server.

[0110] In operation S420, the configuration server locates the corresponding original file and the web page file based on the original identifier.

[0111] In operation S430, the configuration server synchronizes the original file and the web page file to the proxy server to generate the external link.

[0112] In the embodiments of this disclosure, files persistent on the configuration server are directly sent to the proxy server, which then quickly generates external links. This ensures high efficiency in external link regeneration, especially when dealing with large volumes of data.

[0113] Figure 5 schematically illustrates a flowchart of a content access method according to an embodiment of the present disclosure.

[0114] As shown in Figure 5, the content access method of this embodiment includes operations S510 to S530. The method is applied to the proxy server 105.

[0115] In operation S510, a webpage file access request is received, wherein the webpage file access request is generated in response to a user clicking an external link.

[0116] In operation S520, the corresponding web page file is located based on the web page file access request.

[0117] In operation S530, the web page file is returned to the front end.

[0118] Understandably, unlike external link generation methods that require the cooperation of a proxy server and a configuration server, content access directly redirects to the proxy server via the external link, retrieves the static resources (web page resources) pre-stored on the proxy server, and returns them to the front end.

[0119] In the embodiments disclosed herein, web page files are obtained by directly accessing the proxy server via an external link, thus ensuring the network security of other backend servers.

[0120] Based on the above-mentioned backlink generation method, the backlink generation system corresponding to the backlink generation method will be described in detail below with reference to Figure 9.

[0121] Figure 9 schematically illustrates a structural block diagram of an external link generation system according to an embodiment of the present disclosure.

[0122] As shown in Figure 9, the external link generation system 900 of this embodiment includes a proxy server 105 and a configuration server 106.

[0123] The configuration server 105 is configured to: perform parsing processing on external link generation requests forwarded from the proxy server to obtain the original file; and perform modification processing on the original file to obtain the web page file.

[0124] The proxy server 106 is configured to: store web page files from the configuration server to a preset static web page file directory and generate external links; and return the external links to the front end.

[0125] According to an embodiment of this disclosure, the original file includes original content and an original identifier, and the configuration server 106 is further configured to: obtain a preset web page file model; based on the original content, render the preset web page file model through a preset modification logic to obtain the web page file; and name the web page file based on the original identifier.

[0126] According to an embodiment of this disclosure, the configuration server 106 is further configured to: persist the original file and the corresponding web page file to local storage.

[0127] According to an embodiment of this disclosure, the proxy server 105 is further configured to generate the external link based on the reference path of the web page file in the preset static web page file directory.

[0128] According to an embodiment of this disclosure, the configuration server 106 is further configured to: perform parsing processing on the external link regeneration request forwarded from the proxy server to obtain the original identifier; locate the corresponding original file and the web page file based on the original identifier; and synchronize the original file and the web page file to the proxy server to generate the external link.

[0129] According to an embodiment of this disclosure, the proxy server 105 is further configured to perform maintenance on the web page files and the corresponding external links based on preset maintenance rules, wherein the preset maintenance rules include: cleaning up a first preset number of web page files and the corresponding external links according to a preset period, wherein the cleaning method includes: performing cleaning in order from oldest to newest based on the generation time of the external links; or retaining a second preset number of the most recently generated web page files and the corresponding external links.

[0130] According to an embodiment of this disclosure, the configuration server 106 is further configured to: synchronize the web page file from the configuration server to the proxy server via a secure copy.

[0131] In the embodiments disclosed herein, at least the following beneficial effects can be achieved: 1. By generating content as external links, the original files are avoided from being stored in the native web application. This means that only external links, which occupy less space, need to be stored in the native web application, which is more conducive to the storage of the original files. The target files can then be displayed as needed. 2. By storing the web page files in a proxy server and generating the corresponding external links, external link access and web page file generation are isolated from each other, ensuring the data security of the backend server. 3. By executing different processing steps on different servers, the efficiency of content processing is increased. When faced with massive amounts of content to be modified, the efficiency of external link generation can be accelerated, ensuring the timeliness of external link generation and meeting the needs of business growth.

[0132] Based on the above content access method, this disclosure also provides a content access device. The content access system corresponding to the content access method will be described in detail below with reference to Figure 10.

[0133] Figure 10 schematically illustrates a structural block diagram of a content access device according to an embodiment of the present disclosure.

[0134] As shown in Figure 10, the content access device 1000 of this embodiment includes an access request receiving module 1010, a webpage file search module 1020, and a webpage file return module 1030. This content access device can be applied to the configuration server 105 in Figure 9.

[0135] The access request receiving module 1010 is used to receive webpage file access requests, wherein the webpage file access requests are generated in response to a user clicking an external link. In one embodiment, the access request receiving module 1010 can be used to perform the operation S510 described above, which will not be repeated here.

[0136] The webpage file search module 1020 is used to search for the corresponding webpage file based on the webpage file access request. In one embodiment, the webpage file search module 1020 can be used to perform the operation S520 described above, which will not be repeated here.

[0137] The webpage file return module 1030 is used to return the webpage file to the front end. In one embodiment, the webpage file return module 1030 can be used to perform the operation S530 described above, which will not be repeated here.

[0138] According to embodiments of this disclosure, any plurality of modules among the access request receiving module 1010, the webpage file search module 1020, and the webpage file return module 1030 can be combined into one module, or any one of these modules can be split into multiple modules. Alternatively, at least part of the functionality of one or more of these modules can be combined with at least part of the functionality of other modules and implemented in one module. According to embodiments of this disclosure, at least one of the access request receiving module 1010, the webpage file search module 1020, and the webpage file return module 1030 can be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit (ASIC), or implemented in hardware or firmware by any other reasonable means of integrating or packaging the circuitry, or implemented in software, hardware, or firmware, or in any suitable combination of any of these three implementation methods. Alternatively, at least one of the access request receiving module 1010, the webpage file search module 1020, and the webpage file return module 1030 may be implemented at least partially as a computer program module, which can perform corresponding functions when the computer program module is run.

[0139] Figure 11 schematically illustrates a block diagram of an electronic device suitable for implementing an external link generation and content access method according to an embodiment of the present disclosure.

[0140] As shown in FIG11, an electronic device 1100 according to an embodiment of the present disclosure includes a processor 1101, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1102 or a program loaded from a storage portion 1108 into a random access memory (RAM) 1103. The processor 1101 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 1101 may also include onboard memory for caching purposes. The processor 1101 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.

[0141] RAM 1103 stores various programs and data required for the operation of electronic device 1100. Processor 1101, ROM 1102, and RAM 1103 are interconnected via bus 1104. Processor 1101 performs various operations of the method flow according to embodiments of the present disclosure by executing programs in ROM 1102 and / or RAM 1103. It should be noted that the programs may also be stored in one or more memories other than ROM 1102 and RAM 1103. Processor 1101 may also perform various operations of the method flow according to embodiments of the present disclosure by executing programs stored in said one or more memories.

[0142] According to embodiments of this disclosure, the electronic device 1100 may further include an input / output (I / O) interface 1105, which is also connected to a bus 1104. The electronic device 1100 may also include one or more of the following components connected to the I / O interface 1105: an input section 1106 including a keyboard, mouse, etc.; an output section 1107 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1108 including a hard disk, etc.; and a communication section 1109 including a network interface card such as a LAN card, modem, etc. The communication section 1109 performs communication processing via a network such as the Internet. A drive 1110 is also connected to the I / O interface 1105 as needed. A removable medium 1111, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 1110 as needed so that computer programs read from it can be installed into the storage section 1108 as needed.

[0143] This disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs, which, when executed, implement the methods provided according to the embodiments of this disclosure.

[0144] According to embodiments of this disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, such as including, but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this disclosure, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to embodiments of this disclosure, the computer-readable storage medium may include ROM 1102 and / or RAM 1103 and / or one or more memories other than ROM 1102 and RAM 1103 described above.

[0145] Embodiments of this disclosure also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowchart. When the computer program product is run on a computer system, the program code is used to cause the computer system to implement the methods provided in the embodiments of this disclosure.

[0146] When the computer program is executed by the processor 1101, it performs the functions defined in the system / apparatus of this disclosure embodiments. According to embodiments of this disclosure, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.

[0147] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and may be downloaded and installed via the communication section 1109, and / or installed from the removable medium 1111. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.

[0148] In such an embodiment, the computer program can be downloaded and installed from a network via communication section 1109, and / or installed from removable medium 1111. When the computer program is executed by processor 1101, it performs the functions defined in the system of this disclosure embodiment. According to embodiments of this disclosure, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.

[0149] According to embodiments of this disclosure, program code for executing the computer programs provided in embodiments of this disclosure can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, languages ​​such as Java, C++, Python, "C", or similar programming languages. The program code can execute entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0150] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0151] Those skilled in the art will understand that the features recited in the various embodiments and / or claims of this disclosure can be implemented in various combinations and / or arrangements, even if such combinations or arrangements are not expressly stated in this disclosure. In particular, the features recited in the various embodiments and / or claims of this disclosure can be implemented in various combinations and / or arrangements without departing from the spirit and teachings of this disclosure. All such combinations and / or arrangements fall within the scope of this disclosure.

[0152] The embodiments of this disclosure have been described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of this disclosure. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. The scope of this disclosure is defined by the appended claims and their equivalents. Various substitutions and modifications can be made by those skilled in the art without departing from the scope of this disclosure, and all such substitutions and modifications should fall within the scope of this disclosure.

Claims

1. A method for generating backlinks, characterized in that, The method is used in an external link generation system, which includes a proxy server and a configuration server. The method includes: the configuration server parsing an external link generation request forwarded from the proxy server to obtain an original file; the configuration server modifying the original file to obtain a webpage file; wherein the configuration server is a non-native web server; the proxy server storing the webpage file from the configuration server in a preset static webpage file directory and generating an external link; and the proxy server returning the external link to the front end; wherein the original file includes original content and an original identifier; the configuration server modifying the original file to obtain the webpage file includes: obtaining a preset webpage file model; rendering the preset webpage file model based on the original content using preset modification logic to obtain the webpage file; and naming the webpage file based on the original identifier; wherein after the configuration server modifies the original file to obtain the webpage file, the method further includes: persisting the original file and the corresponding webpage file to the local configuration server; wherein the external link is stored on the proxy server.

2. The method according to claim 1, characterized in that, The proxy server stores web page files from the configuration server into a preset static web page file directory and generates external links, including: generating the external links based on the reference path of the web page files in the preset static web page file directory.

3. The method according to claim 1, characterized in that, The method further includes: the configuration server performing parsing processing on the external link regeneration request forwarded from the proxy server to obtain the original identifier; the configuration server searching for the corresponding original file and web page file based on the original identifier; and the configuration server synchronizing the original file and the web page file to the proxy server to generate the external link.

4. The method according to any one of claims 1 to 3, characterized in that, After the proxy server stores the web page files from the configuration server to a preset static web page file directory and generates backlinks, the process further includes: the proxy server performing maintenance on the web page files and the corresponding backlinks based on preset maintenance rules. The preset maintenance rules include: cleaning up a first preset number of web page files and the corresponding backlinks according to a preset period. The cleaning methods include: performing cleaning in ascending order based on the generation time of the backlinks; or retaining a second preset number of the most recently generated web page files and the corresponding backlinks.

5. The method according to any one of claims 1 to 3, characterized in that, After the configuration server performs modification processing on the original file to obtain the web page file, the method further includes: synchronizing the web page file from the configuration server to the proxy server via a secure copy.

6. A content access method, characterized in that, The method is applied to a proxy server, and the method includes: receiving a webpage file access request, wherein the webpage file access request is generated in response to a user clicking an external link; finding the corresponding webpage file based on the webpage file access request; and returning the webpage file to the front end, wherein the external link is obtained by performing the method according to any one of claims 1 to 5.

7. An external link generation system, characterized in that, The system includes a proxy server and a configuration server. The configuration server is configured to: parse and process external link generation requests forwarded from the proxy server to obtain original files; and modify the original files to obtain web page files. The configuration server is a non-native web server. The proxy server is configured to: store the web page files from the configuration server in a preset static web page file directory and generate external links; and return the external links to the front end. The original files include original content and an original identifier. The configuration server's modification of the original files to obtain web page files includes: obtaining a preset web page file model; rendering the preset web page file model based on the original content using preset modification logic to obtain the web page files; and naming the web page files based on the original identifiers. After the configuration server modifies the original files to obtain the web page files, it further includes: persisting the original files and the corresponding web page files to the local configuration server. The external links are stored on the proxy server.

8. A content access device, characterized in that, The apparatus includes: an access request receiving module for receiving a webpage file access request, wherein the webpage file access request is generated in response to a user clicking an external link; a webpage file searching module for searching for a corresponding webpage file based on the webpage file access request; and a webpage file returning module for returning the webpage file to the front end, wherein the external link is obtained by performing the method according to any one of claims 1 to 5.

9. An electronic device, comprising: One or more processors; A storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to perform the method according to any one of claims 1 to 6.

10. A computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to perform the method according to any one of claims 1 to 6.

11. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Static webpage generation method and device

    CN110516183A

  • Method and device for generating static webpage

    CN110516190A