Website updating method and device, equipment, medium and program product
By editing and updating website content in real time on the front end, the problem of cumbersome and time-consuming updates in the existing technology is solved, real-time reflection of website changes is achieved, and update efficiency and user experience is improved.
Patent Information
- Application Number
- CN202411292286.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-14
- Publication Date
- 2024-12-17
AI Technical Summary
The existing website update method is cumbersome and time-consuming, and cannot reflect the latest changes in the website content in real time. Users need to wait for the update to complete before seeing the new content.
Provide a website update method, which calls the development documents of the target website through user information verification, displays and edits the pages on the front end, and monitors changes in real time, and updates the website content and document project directories based on user operations.
Improve website update efficiency and reduce tedious steps and delays in the editing process. Users can see the modified results in real time, improving website maintenance efficiency and user experience.
Smart Images

Figure CN119149852A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and more specifically to a website updating method, device, equipment, medium and program product. Background Art
[0002] The existing website updating method requires using web design software on a local computer to edit and modify the website pages, and then uploading the modified files to the website server after the editing is completed.
[0003] On the one hand, since the content needs to be edited locally before being uploaded, the entire update process is relatively cumbersome and time-consuming, especially when dealing with a large number of files or frequent updates. On the other hand, this method cannot reflect the latest changes in the website content in real time, and users need to wait for the update to complete before they can see the new content. Summary of the invention
[0004] In view of the above problems, the present disclosure provides a website updating method, apparatus, device, medium and program product for improving website updating efficiency.
[0005] According to a first aspect of the present disclosure, a website updating method is provided, comprising: verifying a user request based on user information, and if the verification is successful, calling a first document of a target website based on the user request; wherein the first document is a website development document of the target website; displaying a first page in a first window of a front end based on the first document; wherein the first page includes at least part of the content of the first document; editing the first document in response to a user's operating instruction, and displaying an update effect of the target website in a second window of the front end; updating the website content and a document project directory of the target website based on a second document; wherein the document project directory is used to store the first document, and the second document is obtained by editing the first document.
[0006] According to an embodiment of the present disclosure, the first document of the target website is stored in a document project directory, which includes folders of different levels. Folders of different levels have different access rights, and different types of files are stored in folders of different levels.
[0007] According to an embodiment of the present disclosure, displaying a first page in a first window on a front end based on a first document includes: rendering file data of the first document to obtain a first page of the first document; sending the first page to a front end for display; or sending the first document to a front end, and having the front end render and display the file data.
[0008] According to an embodiment of the present disclosure, displaying a first page in a first window on the front end based on a first document also includes: performing desensitization processing on first data in the first document; and generating a configuration page based on the desensitized file data.
[0009] According to an embodiment of the present disclosure, the update effect of the target website is displayed in the second window of the front end, including: monitoring the changes of the first document; in response to the change event of the first window, searching and modifying the object element corresponding to the change event in the second window to obtain the updated preview image of the target website.
[0010] According to an embodiment of the present disclosure, updating the website content and document project directory of a target website based on a second document includes: in response to receiving a first instruction sent by a front end, obtaining and processing the second document from the front end; updating the website content and document project directory of the target website based on the processed second document; wherein the first instruction is used to indicate that the first document has been edited.
[0011] According to an embodiment of the present disclosure, a target file is obtained from a front end and a processing operation is performed on the target file, including: converting a second document into a target format; obtaining a second document path, and saving the second document in a folder corresponding to a document project directory.
[0012] According to an embodiment of the present disclosure, updating the website content and the document engineering directory of a target website based on a processed second document includes: parsing the processed second document; converting the processed second document into a second form file, and updating the website content of the target website based on the second form file; and storing the second document in a specified location of the document engineering directory and overwriting the corresponding first document.
[0013] A second aspect of the present disclosure provides a website updating device, including: a calling module, used to verify a user request based on user information, and if the verification is successful, calling a first document of a target website based on the user request; wherein the first document is a website development document of the target website; a display module, used to display a first page in a first window on the front end based on the first document; wherein the first page includes at least part of the content in the first document; an editing module, used to edit the first document in response to a user's operation instruction, and display the update effect of the target website in a second window on the front end; and an updating module, used to update the website content and the document project directory of the target website based on the second document; wherein the document project directory is used to store the first document, and the second document is obtained by editing the first document.
[0014] A third aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the above method.
[0015] The fourth aspect of the present disclosure further provides a computer-readable storage medium having a computer program or instructions stored thereon, which implements the steps of the above method when the above computer program or instructions are executed by a processor.
[0016] The fifth aspect of the present disclosure further provides a computer program product, including a computer program or instructions, which implement the steps of the above method when the above computer program or instructions are executed by a processor. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The above contents and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:
[0018] Figure 1 The application scenario diagram of the website updating method, apparatus, device, medium and program product according to the embodiments of the present disclosure is schematically shown;
[0019] Figure 2 A flowchart of a website updating method according to an embodiment of the present disclosure is schematically shown;
[0020] Figure 3 A flowchart schematically shows a method of verifying a user request based on user information according to an embodiment of the present disclosure, and, if the verification is successful, calling a first document of a target website based on the user request;
[0021] Figure 4 A flowchart schematically shows a method of displaying a first page in a first window on a front end based on a first document according to an embodiment of the present disclosure;
[0022] Figure 5 A flowchart schematically shows the update effect of displaying the target website in the second window according to an embodiment of the present disclosure;
[0023] Figure 6 A flowchart schematically illustrates updating the website content of a target website and the document project directory where the target file is located based on the edited file according to an embodiment of the present disclosure;
[0024] Figure 7 A schematic diagram showing a structural block diagram of a website updating device according to an embodiment of the present disclosure; and
[0025] Figure 8 A block diagram of an electronic device suitable for implementing a website updating method according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0026] Hereinafter, embodiments of the present disclosure will 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 present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.
[0027] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.
[0028] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.
[0029] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0030] It should be noted that the website updating method and device provided by the present disclosure can be used in the fields of computer technology and financial technology, and can also be used in any field except the field of financial technology. The application field of the website updating method and device provided by the present disclosure is not limited.
[0031] It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0032] In the technical solution of the present disclosure, the user information (including but not limited to user personal information, user image information, user device information, such as location information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved are all information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with relevant laws, regulations and standards, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0033] In the scenario of using personal information for automated decision-making, the methods, devices, and systems provided by the embodiments of the present disclosure provide users with corresponding operation portals for users to choose to agree or reject the automated decision-making results; if the user chooses to reject, the expert decision-making process will be entered. The expression "automated decision-making" here refers to the activity of automatically analyzing and evaluating a person's behavioral habits, interests and hobbies, or economic, health, credit status, etc. through computer programs, and making decisions. The expression "expert decision-making" here refers to the activity of making decisions by people who specialize in a certain field, have specialized experience, knowledge and skills, and have reached a certain level of professionalism.
[0034] An embodiment of the present disclosure provides a website updating method, comprising: verifying a user request based on user information, and if the verification is successful, calling a first document of a target website based on the user request; wherein the first document is a website development document of the target website; displaying a first page in a first window of a front end based on the first document; wherein the first page includes at least part of the content of the first document; editing the first document in response to a user's operating instruction, and displaying the update effect of the target website in a second window of the front end; updating the website content and a document project directory of the target website based on a second document; wherein the document project directory is used to store the first document, and the second document is obtained by editing the first document.
[0035] Figure 1 The application scenario diagram of the website updating method, apparatus, device, medium and program product according to the embodiments of the present disclosure is schematically shown.
[0036] like Figure 1 As shown, 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, and a server 105. The network 104 is used to provide a medium for a communication link 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, wireless communication links, or optical fiber cables, etc.
[0037] The user can use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 through the network 104 to receive or send messages, etc. Various communication client applications can be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only for example).
[0038] The first terminal device 101, the second terminal device 102, and the third terminal device 103 may be various electronic devices having display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.
[0039] The server 105 may be a server that provides various services, such as a background management server (only as an example) that provides support for websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103. The background management server may analyze and process the received data such as user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.
[0040] It should be noted that the website updating method provided in the embodiment of the present disclosure can generally be executed by the server 105. Accordingly, the website updating device provided in the embodiment of the present disclosure can generally be set in the server 105. The website updating method provided in the embodiment of the present disclosure can also be executed by a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105. Accordingly, the website updating device provided in the embodiment of the present disclosure can also be set in a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105.
[0041] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0042] The following will be based on Figure 1 The scene described by Figure 2~Figure 6 The website updating method of the disclosed embodiment is described in detail.
[0043] Figure 2 The flowchart of the website updating method according to the embodiment of the present disclosure is schematically shown.
[0044] like Figure 2 As shown, the website updating method of this embodiment includes operations S210 to S240.
[0045] In operation S210, the user request is verified based on the user information. If the verification is successful, a first document of the target website is called based on the user request; wherein the first document is a website development document of the target website.
[0046] In some embodiments, the user information may include, for example, a user name, a device ID, an IP address, a user position, etc., and the user request may include, for example, the domain name of the target website, the first document path, the document ID, keywords, etc. The user information is used to verify whether the user request satisfies the user authority. After the verification is passed, the received user request is parsed, and the target document of the target website is called based on the parsing result.
[0047] The first document is the website development document of the target website, which includes design documents, content documents, technical documents, test documents, etc. The design document is used to describe the overall design ideas, layout, color matching, interaction methods, etc. of the website. The content document includes all the content that the website needs to display, such as text, pictures, videos and other materials, as well as the organizational structure and presentation method of these materials. The technical document includes the configuration information of the website, such as the technology stack, development environment configuration, code specifications, build process, etc. The test document includes the test plan, test cases, test results, etc. of the website.
[0048] Specifically, the site development document of the target website can be generated by a static site generator, for example. The static site generator automatically generates multiple first documents for generating the target website by reading the source file (such as a Markdown file) and configuration file specified by the user, wherein the first document contains the content of the source file and the configuration file. Among them, the first file of the target website is stored in a document project directory, which includes multiple folders of different levels, and the access rights corresponding to the folders of different levels are different. Different types of files are stored in folders of different levels. The document project directory can be directly stored in the file system of the server 105, and only users who have passed the authority verification can access it.
[0049] In operation S220, a first page is displayed in a first window at a front end based on the first document.
[0050] In some embodiments, in response to a successful call, the backend server sends the first document to the frontend, and displays the first page of the first document in the first window of the frontend, so that the user can operate on the configuration page to modify the content of the target file, wherein the first page includes at least part of the content of the first document.
[0051] In the specific implementation process, the configuration page can be generated by rendering the document data of the first document. By rendering the first document data, the readability of the configuration page can be effectively improved, and it is convenient for relevant personnel to read and edit the target document. Furthermore, when the first window displays the first page, it can also call a code editor (such as CodeMirror, Monaco Editor, etc.) at the same time. These editors usually support multiple language modes and syntax highlighting prompts, which can improve the editing experience and the accuracy of document editing. By rendering the content of the first document, it is displayed on the front end in a user-friendly manner, and an element (such as an event trigger) for monitoring the occurrence of change events is inserted in the configuration page, so that the preview screen of the target website in the second window is adjusted in time according to the changes in the content of the configuration page, so that the user can promptly understand the association between the editing operation and the target website and adjust the target document based on the preview effect in real time.
[0052] The rendering operation can be performed at the backend or at the frontend. Specifically, performing the rendering operation at the backend includes: rendering the file data of the first document to obtain the first page of the first document; and sending the first page to the frontend for display. Performing the rendering operation at the frontend includes: sending the target file to the frontend, and the frontend rendering and displaying the file data.
[0053] Rendering the generated configuration page on the back end can effectively improve the first screen loading time of the page and the compatibility of the configuration page. Rendering the generated configuration page on the front end can improve the loading speed of the page and reduce the burden on the server. Relevant personnel in this field can make choices based on actual application scenarios, and this disclosure is not limited here.
[0054] In operation S230, the first document is edited in response to the user's operation instruction, and the update effect of the target website is displayed in the second window of the front end.
[0055] In some embodiments, the second window is used to display the update effect of the target website in real time, and the second window and the first window are displayed simultaneously in different areas of the front end. The configuration page in the first window is provided with an event trigger to monitor in real time whether there is a change event on the configuration page. The second window is provided with an object element, namely a Document Object Model (DOM) element, which is associated with a change event. When a change event occurs on the configuration page, the corresponding DOM element in the second window is dynamically modified to display the update effect of the target website in real time and realize a website update preview. Among them, the DOM element is used to connect web pages and scripts, so that developers can dynamically access and update web page content programmatically.
[0056] In operation S240, the website content and the document project directory of the target website are updated based on the second document; wherein the document project directory is used to store the target file, and the second document is obtained by editing the first document.
[0057] In some embodiments, in response to receiving a first instruction indicating that the first document has been edited, a second document is obtained. The second document is the website content of the target website in the form of data, and the second document needs to be stored in a storage location corresponding to the target website to update the target website and obtain the updated website content of the target website. The document project directory is also updated to maintain data consistency for subsequent maintenance.
[0058] In addition, before performing operation S210, the website updating method provided by the embodiment of the present disclosure further includes: obtaining user information. In the embodiment of the present disclosure, before obtaining the user information, the user's consent or authorization may be obtained. For example, before performing operation S210, a request for obtaining the user information may be issued to the user. When the user agrees or authorizes that the user information may be obtained, operation S210 is performed.
[0059] The website update method provided by the embodiment of the present disclosure edits the target website online by calling the first document of the target website, thereby effectively improving the website update efficiency. In the process of online editing of the website, no file downloading and uploading is involved, which can effectively improve the editing efficiency and reduce the maintenance cost of the website. The present disclosure also proposes to display the website update effect in real time based on the first window and the second window, which greatly improves the user experience, allowing the user to intuitively see the modified results, so as to quickly adjust and optimize the configuration. And by displaying the update effect in real time, it can help users immediately find potential problems or places that do not meet expectations, so as to make adjustments in time, which helps to reduce the possibility of misconfiguration and improve the accuracy and effectiveness of website updates.
[0060] Figure 3 The flowchart schematically shows a method of verifying a user request based on user information according to an embodiment of the present disclosure, and, if the verification is successful, calling a first document of a target website based on the user request.
[0061] like Figure 3 As shown, this embodiment verifies the user request based on the user information, and if the verification is successful, calls the first document of the target website based on the user request, including operations S310 to S350.
[0062] In operation S310 , in response to the user identity authentication being passed, a user request is received.
[0063] In some embodiments, the user first needs to pass identity authentication to prove the authenticity of his or her identity. Specifically, the user needs to enter credentials to compare with the credentials stored in the database. After the verification is passed, the user request is received. The credentials entered by the user can be, for example, a user name and password, two-factor authentication, or other identity authentication methods.
[0064] In operation S320, the user request is parsed to obtain first document information of the target website.
[0065] In some embodiments, a request sent by a user is received through a specified transmission protocol. The specified transmission protocol may include, for example, HyperText Transfer Protocol (HTTP), File Transfer Protocol (FTP), etc. The received user request is parsed, wherein the user request includes information such as URL, request method (such as GET, POST), request header and request body to determine the target website and the first document. The user request may include, for example, the domain name of the target website, the target document path, document ID, keywords, etc. The target website and the first document are selected by parsing the user request, wherein the permission information of different websites may be different, and the permission information of different documents on the same website may also be different.
[0066] In operation S330, authority information of the user is determined based on the user information.
[0067] In some embodiments, the user information may include, for example, a user name, a device ID, an IP address, a user position, etc., and the role to which the user belongs is determined based on the user information.
[0068] Different roles have different permissions. There is a many-to-many relationship between roles and permissions, that is, one role can have multiple permissions, and one permission can be owned by multiple roles. There is a many-to-one relationship between users and roles, that is, one user can only belong to one role.
[0069] In operation S340, the authority information of the user is compared with the authority information of the first document.
[0070] In some embodiments, the user's permission information is compared with the access permission information of the first document, and a corresponding operation is performed according to the comparison result. The user permission information may include, for example, function operation permission, data access permission, interface access permission, etc.
[0071] In operation S350, if the authority of the user satisfies the access requirement of the first document, the first document is called.
[0072] In some embodiments, if the user permission information meets the access requirements of the first document, the user request is allowed to continue to be executed, and the first document of the target website is called based on the user request. Specifically, according to the first document information in the request, a specific file is located on the target website. The first document is accessed using an appropriate protocol (such as HTTP) and method (such as GET, POST), and the first document is processed according to the request requirements.
[0073] In the case that the user's authority does not meet the access requirement of the first document, the user's request is rejected and a corresponding error message is returned.
[0074] The website updating method provided by the disclosed embodiment verifies the user information to determine the user's access rights, and calls the first document according to the user's access rights, effectively ensuring that only legitimate users can access system resources, thereby effectively preventing unauthorized users from obtaining sensitive information or performing malicious operations. Ensure that the user's personal data and other sensitive information are not viewed or abused by unauthorized personnel. And by assigning different access rights according to the user's role and responsibilities, fine-grained control of system resources can be achieved, which helps to ensure that users can only access the information required for their work and avoid information leakage and misoperation.
[0075] Figure 4 The flowchart of displaying a first page in a first window at the front end based on a first document according to an embodiment of the present disclosure is schematically shown.
[0076] like Figure 4 As shown, this embodiment displays a first page in a first window on the front end based on a first document, including operations S410 to S420.
[0077] In operation S410, desensitization processing is performed on first data in a first document.
[0078] In operation S420, a configuration page is generated based on the desensitized file data.
[0079] In some embodiments, before generating the configuration page, some contents in the target document need to be desensitized to protect the security of sensitive information. The first data is sensitive information in the first document, such as connection strings, passwords, interface information, etc.
[0080] Specifically, desensitization processing may include, for example, mask desensitization, replacement desensitization, stage desensitization, formatted desensitization, etc. By desensitizing data, data privacy security is effectively protected and the risk of sensitive information leakage is reduced.
[0081] Figure 5 The flowchart of displaying the update effect of the target website in the second window according to an embodiment of the present disclosure is schematically shown.
[0082] like Figure 5 As shown, this embodiment displays the update effect of the target website in the second window, including operation S510 to operation S520.
[0083] In operation S510, changes in a first document are monitored.
[0084] In some embodiments, for example, an event trigger may be used to monitor changes in the first document. If a change event occurs, it is determined that the content of the target document has changed.
[0085] Change events include input events and change events. The input event is triggered in real time when the user inputs. Whether the content is changed by keyboard input, pasting, or dragging, the input event will be triggered. The change event is triggered when the value of the element changes and loses focus. That is, when the value of the input box is changed but the focus is not removed from the input box, the change event will not be triggered.
[0086] In operation S520, in response to a change event in the first window, an object element corresponding to the change event is searched and modified in the second window to obtain an updated preview image of the target website.
[0087] In some embodiments, when a change in the content of the first window is detected, the object element in the second window is dynamically modified to reflect the change in the target document, wherein the object element is a Document Object Model (DOM) element.
[0088] Since the first document in the first window is the development document of the target website displayed in the second window, the resources loaded in the first window and the second window belong to the same source website and can access each other's DOM, send or receive Cookies, and perform AJAX operations.
[0089] For example, when a user enters text in a designated area of the first window, an input event is triggered. In response to the input event being triggered, the DOM element corresponding to the change event is searched in the second window, and the input content is dynamically set to the DOM element to achieve a real-time preview of the target website. The screen displayed in the second window can be a complete screen of the target website or a partial screen of the target website corresponding to the target document.
[0090] The DOM element is an interface that is independent of programming languages and platforms. The DOM element allows programs and scripts to dynamically access and update the content, structure, and style of a web page. The DOM element can connect web pages and scripts / programming languages, allowing technicians to operate web pages programmatically.
[0091] The present disclosure monitors the changes of the first document and responds to the edited content in real time. Once a change event is detected, the corresponding DOM element is immediately updated in the second window, which effectively improves the real-time performance of the second window website preview. Compared with the traditional polling or timed inspection method, the method can capture changes and respond more quickly, thereby reducing update delays. And only the DOM element corresponding to the change event is updated, which can effectively improve the update efficiency, reduce unnecessary resource consumption, and effectively avoid the risk of page errors or layout confusion caused by incorrect updates of other elements.
[0092] Figure 6 A flowchart of updating the website content of a target website and the document project directory where the target file is located based on the edited file according to an embodiment of the present disclosure is schematically shown.
[0093] like Figure 6 As shown, this embodiment updates the website content and the document project directory of the target website based on the second document, including operations S610 to S620.
[0094] In operation S610, in response to receiving a first instruction sent by a front end, a second document is acquired and processed from the front end.
[0095] In some embodiments, in response to receiving a first instruction sent by the front end, a second document is obtained from the front end. The second document is obtained based on performing an editing operation on the first document, for example, it can be obtained by editing the content of the first document, or it can be obtained by creating a new document based on the first document. The first instruction is used to indicate that the second document has been edited, which can be achieved through the first button of the first page. For example, when the user completes the editing, he clicks the first button of the first page layout. In response to the first button being clicked, the front end encapsulates the current document and automatically sends the first instruction to the back end. In response to the back end receiving the first instruction sent by the front end, the encapsulated second document is obtained based on a preset transmission method, and a processing operation is performed on the obtained second document.
[0096] The processing operation performed on the second document includes: converting the second document into a target format; obtaining a target file path, and saving the converted second document in a folder corresponding to the document project directory.
[0097] In some embodiments, the format of the received second document is similar to the file format corresponding to the code editor. If the code editor is Markdown, the format of the received second document is a string in Markdown format, which is different from the file format required by the document engineering directory. It is necessary to perform format conversion on the second document to convert the second document into the file format required by the document engineering directory so as to facilitate storage in the document engineering directory.
[0098] In operation S620, the website content and the document project directory of the target website are updated based on the processed second document.
[0099] In some embodiments, a writing path of the second document is obtained based on the attribute information of the second document, and the processed second document is written into the document project directory based on the writing path.
[0100] Among them, writing the processed second document into the document project directory is divided into two cases. The first case is: the second document is a document edited from the content of the first document, then the second document is directly written to the specified location of the document project directory based on the path of the first document and the original file is overwritten. The second case is: the second document is a new document created based on the first document, then the second document is stored in the specified location in the document project directory, such as a newly created folder, based on the attribute information of the second document. If it is the first case, there is no need to update the document project directory accordingly. If it is the second case, after writing the second document, the document project directory needs to be updated accordingly.
[0101] The second document is parsed, different elements are identified according to the grammatical rules of the second document, the identified elements are combined with a preset template, a compile and package command is executed, the target website is updated, and an updated static website is obtained.
[0102] The website updating method provided by the present disclosure reduces the steps and possibility of errors of manual operation by automatically receiving front-end instructions, obtaining files, processing files and updating website content. The automated process can quickly respond to front-end requests and quickly complete file processing and website content updating, thereby improving website updating efficiency.
[0103] Based on the above website updating method, the present disclosure also provides a website updating device. Figure 7 The device is described in detail.
[0104] Figure 7 The structural block diagram of the website updating device according to the embodiment of the present disclosure is schematically shown.
[0105] like Figure 7As shown, the website updating device 700 of this embodiment includes a calling module 710 , a display module 720 , an editing module 730 and an updating module 740 .
[0106] The calling module 710 is used to verify the user request based on the user information, and if the verification is successful, call the first document of the target website based on the user request; wherein the first document is a website development document of the target website. In one embodiment, the calling module 710 can be used to perform the operation S210 described above, which will not be repeated here.
[0107] The display module 720 is used to display the first page in the first window based on the first document; wherein the first page includes at least part of the content of the first document. In one embodiment, the display module 720 can be used to perform the operation S220 described above, which will not be repeated here.
[0108] The editing module 730 is used to edit the first document in response to the user's operation instruction, and to display the update effect of the target website in the second window of the front end. In one embodiment, the editing module 730 can be used to perform the operation S230 described above, which will not be repeated here.
[0109] The update module 740 is used to update the website content and the document project directory of the target website based on the second document; wherein the document project directory is used to store the first document, and the second document is obtained by editing the first document. In one embodiment, the update module 740 can be used to perform the operation S240 described above, which will not be repeated here.
[0110] According to an embodiment of the present disclosure, any multiple modules of the calling module 710, the display module 720, the editing module 730 and the updating module 740 can be combined into one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the calling module 710, the display module 720, the editing module 730 and the updating module 740 can be at least partially implemented as a hardware circuit, 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 a package, an application-specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware and firmware or in any appropriate combination of any of them. Alternatively, at least one of the calling module 710, the display module 720, the editing module 730 and the updating module 740 can be at least partially implemented as a computer program module, and when the computer program module is run, the corresponding function can be executed.
[0111] Figure 8 A block diagram of an electronic device suitable for implementing a website updating method according to an embodiment of the present disclosure is schematically shown.
[0112] like Figure 8 As shown, the electronic device 800 according to an embodiment of the present disclosure includes a processor 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage part 808 to a random access memory (RAM) 803. The processor 801 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset and / or a dedicated microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 801 may also include an onboard memory for caching purposes. The processor 801 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.
[0113] In RAM 803, various programs and data required for the operation of electronic device 800 are stored. Processor 801, ROM 802 and RAM 803 are connected to each other via bus 804. Processor 801 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 802 and / or RAM 803. It should be noted that the program can also be stored in one or more memories other than ROM 802 and RAM 803. Processor 801 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in the one or more memories.
[0114] According to an embodiment of the present disclosure, the electronic device 800 may further include an input / output (I / O) interface 805, which is also connected to the bus 804. The electronic device 800 may further include one or more of the following components connected to the input / output (I / O) interface 805: an input portion 806 including a keyboard, a mouse, etc.; an output portion 807 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 808 including a hard disk, etc.; and a communication portion 808 including a network interface card such as a LAN card, a modem, etc. The communication portion 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the input / output (I / O) interface 805 as needed. A removable medium 811, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 810 as needed, so that a computer program read therefrom is installed into the storage portion 808 as needed.
[0115] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.
[0116] According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, it may include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, an apparatus or a device. For example, according to an embodiment of the present disclosure, the computer-readable storage medium may include the ROM 802 and / or RAM 803 described above and / or one or more memories other than ROM 802 and RAM 803.
[0117] The embodiment of the present disclosure also includes a computer program product, which includes a computer program, and the computer program contains program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the website updating method provided by the embodiment of the present disclosure.
[0118] The above functions defined in the system / device of the embodiment of the present disclosure are executed when the computer program is executed by the processor 801. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.
[0119] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices, magnetic storage devices, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of signals on a network medium, and downloaded and installed through the communication part 809, and / or installed from a removable medium 811. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0120] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 809, and / or installed from the removable medium 811. When the computer program is executed by the processor 801, the above functions defined in the system of the embodiment of the present disclosure are performed. According to the embodiment of the present disclosure, the system, device, means, module, unit, etc. described above can be implemented by a computer program module.
[0121] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect through the Internet).
[0122] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0123] It will be appreciated by those skilled in the art that the features described in the various embodiments of the present disclosure may be combined and / or combined in a variety of ways, even if such combinations or combinations are not explicitly described in the present disclosure. In particular, without departing from the spirit and teachings of the present disclosure, the features described in the various embodiments of the present disclosure may be combined and / or combined in a variety of ways. All of these combinations and / or combinations fall within the scope of the present disclosure.
[0124] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.
Claims
1. A website updating method, characterized in that: The method comprises: Verify the user request based on the user information, and if the verification is successful, call a first document of the target website based on the user request; wherein the first document is a website development document of the target website; Displaying a first page in a first window on the front end based on the first document; wherein the first page includes at least part of the content in the first document; Editing the first document in response to the user's operation instruction, and displaying the update effect of the target website in the second window of the front end; The website content and the document project directory of the target website are updated based on the second document; wherein the document project directory is used to store the first document, and the second document is obtained by editing the first document.
2. The website updating method according to claim 1, characterized in that: The method of verifying the user request based on the user information and, if the verification is successful, calling the first document of the target website based on the user request includes: In response to the user identity authentication being passed, receiving a user request; Parsing the user request to obtain first document information of the target website; Determine the user's permission information based on the user information; comparing the user's permission information with the permission information of the first document; In a case where the authority of the user meets the access requirement of the first document, the first document is called.
3. The website updating method according to claim 2, characterized in that: The first document of the target website is stored in a document project directory, which includes folders of different levels. Folders of different levels have different access rights corresponding to them, and documents of different types are stored in folders of different levels.
4. The website updating method according to claim 1, characterized in that: The displaying the first page in the first window on the front end based on the first document includes: Rendering the file data of the first document to obtain a first page of the first document; Sending the first page to the front end for display; or The first document is sent to the front end, which renders and displays the file data.
5. The website updating method according to claim 4, characterized in that: The displaying of the first page in the first window on the front end based on the first document also includes: Performing desensitization processing on the first data in the first document; Generate a configuration page based on the desensitized file data.
6. The website updating method according to claim 1, characterized in that: The second window on the front end displays the update effect of the target website, including: Monitoring changes in the first document; In response to a change event of the first window, an object element corresponding to the change event is searched and modified in the second window to obtain an updated preview image of the target website.
7. The website updating method according to claim 1, characterized in that: The updating of the website content and the document project directory of the target website based on the second document includes: In response to receiving the first instruction sent by the front end, acquiring and processing the second document from the front end; Update the website content of the target website and the document project directory based on the processed second document; The first instruction is used to indicate that the second document has been edited.
8. The website updating method according to claim 7, characterized in that: The obtaining and processing the second document from the front end includes: converting the second document into a target format; Obtain the second document path and save the second document in a folder corresponding to the document project directory.
9. The website updating method according to claim 8, characterized in that: The updating of the website content of the target website and the document project directory based on the processed second document includes: parsing the processed second document; converting the processed second document into a second format file, and updating the website content of the target website based on the second format file; and The second document is stored in a designated location in the document project directory and overwrites the corresponding first document.
10. A website updating device, characterized in that: The device comprises: A calling module, used to verify the user request based on the user information, and if the verification is passed, call the first document of the target website based on the user request; wherein the first document is a website development document of the target website; A display module, configured to display a first page in a first window on the front end based on the first document; wherein the first page includes at least part of the content in the first document; an editing module, configured to edit the first document in response to a user's operation instruction, and display an updated effect of the target website in a second window of the front end; and An update module is used to update the website content and the document project directory of the target website based on the second document; wherein the document project directory is used to store the first document, and the second document is obtained by editing the first document.
11. An electronic device, comprising: one or more processors; a memory for storing one or more computer programs, It is characterized in that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 9.
12. A computer-readable storage medium having a computer program or instruction stored thereon, characterized in that: When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.
13. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.
Citation Information
Patent Citations
Page editing method, device and system
CN102880664A
Website content updating method and device, terminal and storage medium
CN111191176A
Page editing method and system, computer equipment and computer readable storage medium
CN112035111A
System and a method for web-based editing of documents online with an editing interface and concurrent display to webpages and print documents
US8745488B1
Content management system, static page management method and device, and storage medium
WO2023123089A1
