Web page data processing method and device, storage medium and electronic device
By processing the modified data and identification information of web editing content on the server side, the problem that web editing content cannot be synchronized across browsers and devices in the prior art is solved, and the real-time sharing function is realized.
Patent Information
- Application Number
- CN202011357311.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-26
- Publication Date
- 2025-02-21
- Estimated Expiration
- 2040-11-26
AI Technical Summary
The prior art cannot realize cross-browser and cross-device synchronization of web editing content, and cannot be shared with others in real time to view.
By responding to the modification operation of web page page data, the modified data and corresponding identification information are generated and sent to the server. Based on the identification information and web page URL information, modify data is obtained from the server to realize data synchronization across browsers and devices, and real-time sharing through the URL.
It realizes cross-browser and cross-device synchronization of web editing content. Users can view and modify data on different browsers and devices, and can share it with others in real time to view it.
Smart Images

Figure CN113792243B_ABST
Abstract
Description
Background Art
[0002] With the continuous development of Internet technology, many websites have online editing functions, such as inputting text into web pages, inserting pictures and videos, and modifying the position and size of page elements.
[0003] In the prior art, the content edited by the user on the web page is stored in the local cache of the browser. When the user refreshes the page, the user-edited content stored in the local cache is extracted and displayed on the refreshed page.
[0004] However, this method can only extract data from a browser used to edit web page content on a local computer. It cannot extract user-edited content across browsers, nor can it extract user-edited content on different devices, and it cannot share the content edited on the web page with others in real time for viewing. Summary of the invention
[0005] The purpose of the present disclosure is to provide a web page data processing method and device, a computer-readable storage medium and an electronic device, thereby at least to a certain extent overcoming the problem that the content edited on the web page cannot be shared with others in real time due to the limitations and defects of the relevant technology.
[0006] According to a first aspect of the present disclosure, a web page data processing method is provided, comprising: generating first modification data and identification information corresponding to the first modification data in response to a first modification operation on page data of a web page; sending the first modification data and the identification information to a server, so as to obtain the first modification data from the server according to the identification information and URL information of the web page.
[0007] Optionally, the web page data processing method also includes: generating second modification data in response to a second modification operation on the page data of the web page; the second modification operation is a modification operation after the first modification operation is completed; and sending the second modification data and identification information to the server so as to obtain the second modification data from the server based on the identification information and the URL information of the web page.
[0008] Optionally, obtaining the first modification data from the server according to the identification information and the URL information of the web page includes: determining the target URL information according to the identification information and the URL information of the web page; and obtaining the first modification data from the server according to the target URL information.
[0009] Optionally, generating the first modification data and identification information corresponding to the first modification data includes: generating the first modification data, determining whether the user has modification authority; and generating identification information corresponding to the first modification data if the user has modification authority.
[0010] Optionally, sending the first modified data and identification information to the server includes: packaging the first modified data into a json format to obtain the first modified data in the json format; and sending the first modified data and identification information in the json format to the server via ajax.
[0011] According to a second aspect of the present disclosure, another web page data processing method is provided, including: receiving first modification data and identification information corresponding to the first modification data, the first modification data being data generated in response to a first modification operation on page data of a web page; sending the first modification data upon receiving a web page data acquisition request; wherein the web page data acquisition request includes the identification information and URL information of the web page.
[0012] Optionally, after receiving the first modified data and identification information corresponding to the first modified data, the method includes: creating a subspace corresponding to the identification information according to the identification information; and saving the first modified data in the subspace.
[0013] Optionally, when receiving a web page data acquisition request, sending the first modification data includes: extracting identification information and user address information according to the web page data acquisition request; acquiring the first modification data according to the identification information; and sending the first modification data according to the user address information.
[0014] According to a third aspect of the present disclosure, a web page data processing device is provided, including: an information generating module and an information acquiring module.
[0015] Specifically, the information generation module can be used to respond to a first modification operation on the page data of a web page, generate first modification data and identification information corresponding to the first modification data; the information acquisition module can be used to send the first modification data and identification information to the server, so as to obtain the first modification data from the server based on the identification information and the URL information of the web page.
[0016] Optionally, the information generation module can be configured to perform: generating second modification data in response to a second modification operation on the page data of a web page; the second modification operation is a modification operation after the first modification operation is completed; sending the second modification data and identification information to the server, so as to obtain the second modification data from the server based on the identification information and the URL information of the web page.
[0017] Optionally, the information acquisition module may be configured to execute: determining target website information according to the identification information and website information of the web page; and acquiring first modification data from a server according to the target website information.
[0018] Optionally, the information generation module may be configured to execute: generating first modification data, determining whether the user has modification authority; and generating identification information corresponding to the first modification data if the user has modification authority.
[0019] Optionally, the information acquisition module may be configured to execute: packaging the first modified data into a json format to obtain the first modified data in the json format; and sending the first modified data in the json format and the identification information to the server via ajax.
[0020] According to a fourth aspect of the present disclosure, another web page data processing device is provided, including: an information receiving module and an information sending module.
[0021] Specifically, the information receiving module can be used to receive first modification data and identification information corresponding to the first modification data, the first modification data being data generated in response to a first modification operation on page data of a web page; the information sending module can be used to send the first modification data when receiving a web page data acquisition request; wherein the web page data acquisition request includes identification information and URL information of the web page.
[0022] Optionally, the information receiving module may be configured to execute: creating a subspace corresponding to the identification information according to the identification information; and saving the first modified data into the subspace.
[0023] Optionally, the information sending module may be configured to execute: extracting identification information and user address information according to a web page data acquisition request; acquiring first modification data according to the identification information; and sending the first modification data according to the user address information.
[0024] According to a fifth aspect of the present disclosure, a storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, any one of the above-mentioned web page data processing methods is implemented.
[0025] According to a sixth aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute any one of the above-mentioned web page data processing methods by executing the executable instructions.
[0026] In the technical solutions provided by some embodiments of the present disclosure, in response to a first modification operation on the page data of a web page, first modification data and identification information corresponding to the first modification data are generated; the first modification data and identification information are sent to a server, so that the first modification data can be obtained from the server according to the identification information and the URL information of the web page. The method in the present disclosure can send the modification data and identification information to the server in real time for storage, and then obtain the modification data from the server through the identification information and the URL information, so as to realize the viewing of the modification data on different browsers and different devices, and can share the modification data with others in real time through the identification information and the URL information.
[0027] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present disclosure, and together with the specification, are used to explain the principles of the present disclosure. Obviously, the drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0029] Figure 1 A flowchart of a webpage data processing method according to an exemplary embodiment of the present disclosure is schematically shown;
[0030] Figure 2 A flowchart schematically shows another web page data processing method according to an exemplary embodiment of the present disclosure;
[0031] Figure 3 A flowchart of a webpage data processing method according to an exemplary embodiment of the present disclosure is schematically shown;
[0032] Figure 4 A flowchart schematically shows another web page data processing method according to an exemplary embodiment of the present disclosure;
[0033] Figure 5 A flowchart of a method for processing H5 mini-game online editing webpage data according to an exemplary embodiment of the present disclosure is schematically shown;
[0034] Figure 6 A block diagram schematically shows a web page data processing device according to an exemplary embodiment of the present disclosure;
[0035] Figure 7 A block diagram schematically shows another web page data processing device according to an exemplary embodiment of the present disclosure;
[0036] Figure 8 A block diagram of an electronic device according to an exemplary embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0037] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as being limited to the examples set forth herein; on the contrary, these embodiments are provided so that the present disclosure will be more comprehensive and complete, and the concepts of the example embodiments are fully conveyed to those skilled in the art. The described features, structures, or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.
[0038] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.
[0039] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the steps. For example, some steps may be decomposed, while some steps may be combined or partially combined, so the actual execution order may change according to the actual situation.
[0040] Currently, many web pages support online editing functions. Users can modify the content of the page according to their needs, such as adding text, pictures, videos, or changing the size, color, and position of certain elements on the page.
[0041] However, in the existing technology, the data modified by the user can only be saved in the cache of the local browser currently in use. When a different browser is used to open a web page, the edited data will be lost, and it is inconvenient to view it in multiple browsers during the editing process. Since the data is saved in the local browser cache, it cannot be shared with others through the web page URL. And if the user does not manually clear it, the data will always be stored in the local memory, resulting in a waste of local storage space.
[0042] In view of this, the present disclosure proposes a web page data processing method.
[0043] In this exemplary embodiment, a web page data processing method is provided, which can be applied to a visualized H5 (web page based on HTML5) mini-game online editing system. In a system for making H5 mini-games online using a visualized web page, the user first selects the game that he needs to edit in the game list, clicks to enter the corresponding game template editing page, and the initial page only displays the default layout and content of the game page. Users generally need to edit the content, size, and position of text, pictures, and other elements to create a game page that meets their personalized needs.
[0044] Figure 1 The flowchart of the webpage data processing method according to the exemplary embodiment of the present disclosure is schematically shown, and the method is executed on the client. Figure 1 , the web page data processing method may include the following steps:
[0045] S12. In response to a first modification operation on page data of a web page, generate first modification data and identification information corresponding to the first modification data.
[0046] In an exemplary embodiment of the present disclosure, the client responds to a first modification operation on page data of a web page, where the web page refers to an editable web page, which may be a web page for making a visual online H5 mini-game, and the page data refers to various elements in the web page, such as text, pictures, videos, etc. The first modification operation refers to the user's first operation to modify the page data of the web page, which may be the first operation to modify the page data within a certain period of time, the first operation to modify the page data in a certain browser, or the first operation to modify the page data on a certain device.
[0047] In an exemplary embodiment of the present disclosure, the first modified data is data generated with the first modification operation, and the first modified data includes the data content and data attributes modified by the user on the web page, and the data attributes include the position, size, color and other data of the modified data in the web page. For example, the data format of the first modified data can be {banner:{width:100,height:200,left:100,top:50,value:””}}, where banner is the element name, width and height are the width and height of the element respectively, left and top are the position of the element in the page, and value is the specific content of the element. For example, if the content added in the web page is "123", then value is "123".
[0048] In an exemplary embodiment of the present disclosure, the identification information corresponds to the first modification data, and refers to the query parameters of the first modification data, or may be the specific storage address of the first modification data in the server. Through the identification information, the storage address of the first modification data in the server can be accurately found, so that the first modification data can be obtained from the server according to the identification information. For example, the URL of an editable web page is http: / / www.xxx.com / detials? tempId=1&dataId=xxxx, where dataId=xxxx is the identification information, which identifies the storage address in the server.
[0049] In an exemplary embodiment of the present disclosure, after the local device receives a first modification operation of a user on page data on a web page, the local device generates first modification data and identification information corresponding to the first modification data in response to the modification operation.
[0050] In an exemplary embodiment of the present disclosure, generating the first modification data and the identification information corresponding to the first modification data includes: generating the first modification data, determining whether the user has modification authority; if the user has modification authority, generating the identification information corresponding to the first modification data. The modification authority refers to the user's authority to modify certain page data. If the user does not have the authority to modify certain page data, then when the user modifies the page data, only the modification data will be generated locally, and no identification information will be generated; only when the user has modification authority, the identification information of the modification data will be generated.
[0051] In an exemplary embodiment of the present disclosure, sending the first modified data and the identification information to the server includes: packaging the first modified data into a json format to obtain the first modified data in the json format; sending the first modified data and the identification information in the json format to the server via ajax. The server extracts the identification information and saves the first modified data to the address indicated by the identification information.
[0052] S14. Sending the first modified data and the identification information to a server, so as to obtain the first modified data from the server according to the identification information and the URL information of the web page.
[0053] In an exemplary embodiment of the present disclosure, the first modification data and the identification information are sent to a server corresponding to the webpage for storage, and the first modification data is obtained from the server using the identification information and the webpage URL information, wherein the URL information is a URL (Uniform Resource Locator), which is a uniform resource locator of www and refers to a network address.
[0054] In an exemplary embodiment of the present disclosure, obtaining the first modification data from the server according to the identification information and the URL information of the web page includes: determining the target URL information according to the identification information and the URL information of the web page; obtaining the first modification data from the server according to the target URL information. The target URL information may be a target URL formed by combining the identification information and the URL information of the web page, and through the target URL, the storage address of the first modification data can be determined from the corresponding server, thereby obtaining the first modification data.
[0055] In an exemplary embodiment of the present disclosure, the target website information may be a combination of identification information and website information of a web page, and may be combined using a general rule. For example, the website address of a web page is http: / / www.xxx.com / detials? tempId=1, and the identification information is dataId=xxxx. The two may be combined by using the "&" symbol to obtain a target website address of http: / / www.xxx.com / detials? tempId=1&dataId=xxxx. Specifically, the http (HyperText Transfer Protocol) in the website address is the protocol part, and may also be other protocols such as FTP (File Transfer Protocol) and Gopher (The Internet Gopher Protocol), all of which fall within the protection scope of the present disclosure; xxx.com is the domain name part, .com is the top-level domain name, identifying a commercial organization, and in addition, the top-level domain name also includes other top-level domain names such as .org and .gov, detials? tempId=1 indicates that it is used to pass parameters to the dynamic web page. There can be multiple parameters, separated by the "&" symbol, and the name and value of each parameter are separated by the "=" symbol. dataId=xxxx is the parameter added, that is, the information in this disclosure. Through the target URL, you can specify to obtain data from a certain address of the server.
[0056] In an exemplary embodiment of the present disclosure, second modification data is generated in response to a second modification operation on page data of a web page; the second modification operation is a modification operation after the first modification operation is completed; the second modification data and identification information are sent to a server so as to obtain the second modification data from the server based on the identification information and the URL information of the web page.
[0057] In an exemplary embodiment of the present disclosure, the second modification operation is a modification operation performed after the first modification operation is completed, and the second modification data is the modification data generated by the second modification operation. If the webpage data of the same webpage is modified multiple times, identification information is generated only when the modification is performed for the first time, and subsequent modification operations after the first modification operation is completed only generate modification data corresponding to the modification operation, and no new label data is generated. The modification data generated by subsequent modification operations after the first modification operation is completed are all stored at the address corresponding to the identification information generated by the first modification operation, and the identification information is the query parameters corresponding to the first modification data and the second modification data and the storage address in the server.
[0058] In an exemplary embodiment of the present disclosure, the modified data generated by the user's modification operation can be sent to the server by setting a time threshold. Specifically, the data can be automatically packaged and sent to the server at regular intervals, and when the user closes or reopens the webpage, the data can be automatically packaged and sent to the server for storage.
[0059] In an exemplary embodiment of the present disclosure, different types of modified data may also be set to be saved at different addresses. Specifically, the first modification operation may be set as the first modification operation for text data, the first modification operation for image data, the first modification operation for video data, etc. When the first modification operation is performed on different types of web page data, first modification data and identification information are generated. The modified data are classified and stored according to the different modification data and corresponding identification information generated by the first modification operation on different types of web page data, and stored at different addresses in the server according to the different identification information corresponding to different types of modified data.
[0060] In the exemplary embodiments of the present disclosure, a variety of different modified data storage methods can also be defined according to different requirements. For example, some data types do not need to save the previous modified data, and when new modified data is generated, it is only necessary to replace the previous modified data; however, some data types need to save the previous modified data, and when new modified data is generated, the new modified data is saved on the basis of the original modified data.
[0061] Figure 2 The flowchart of a webpage data processing method according to another exemplary embodiment of the present disclosure is schematically shown, and the method is executed on the server side. Figure 2 , the web page data processing method may include the following steps:
[0062] S22. Receive first modification data and identification information corresponding to the first modification data, where the first modification data is data generated in response to a first modification operation on page data of a web page.
[0063] In an exemplary embodiment of the present disclosure, after the server receives the first modification data and the identification information corresponding to the first modification data, the process includes: creating a subspace corresponding to the identification information according to the identification information; and saving the first modification data in the subspace. The subspace may be a newly created folder on the server, and the name and location of the folder correspond to the identification information. After the server receives the first modification data and the identification information, a folder corresponding to the identification information is created in the server according to the identification information, and the first modification data is saved in the folder. The path of the folder in the server is the address of the first modification data in the server.
[0064] S24. When receiving a web page data acquisition request, send the first modification data; wherein the web page data acquisition request includes the identification information and the URL information of the web page.
[0065] In an exemplary embodiment of the present disclosure, when a web page data acquisition request is received, first modification data is sent, including: extracting identification information and user address information according to the web page data acquisition request; acquiring first modification data according to the identification information; and sending first modification data according to the user address information.
[0066] In the exemplary embodiment of the present disclosure, a web page acquisition request refers to a request sent by a client to acquire web page data, and the web page data acquisition request includes identification information and web page URL information. By parsing the web page URL information, a server corresponding to the URL information is found and the identification information is extracted, and a web page data acquisition request is sent to the server so as to acquire data from the server according to the identification information. At the same time, the server also obtains the address information of the client. After the server extracts the first modified data requested by the client, the first modified data is sent to the client through the address information of the client.
[0067] It should be noted that, in the exemplary embodiment of the present disclosure, both the first modification data and the second modification data have corresponding identification information, and the method for the client to obtain the first modification data from the server is also applicable when obtaining the second modification data.
[0068] In the exemplary embodiment of the present disclosure, referring to Figure 3 , Figure 3 A flowchart of a web page data processing method according to an exemplary embodiment of the present disclosure is schematically shown. Figure 3As shown, in step S301, the client responds to the first modification operation on the page data of the web page, executes step S303, generates first modification data and identification information corresponding to the first modification data, and then executes step S305 to send the first modification data and identification information to the server.
[0069] In the exemplary embodiment of the present disclosure, referring to Figure 4 , Figure 4 A flowchart of another web page data processing method according to an exemplary embodiment of the present disclosure is schematically shown. Figure 4 As shown, in step S401, the server receives the first modification data and the identification information corresponding to the first modification data sent by the client 1, and then in step S403, the server saves the first modification data in the corresponding subspace according to the identification information, and in step S405, receives the web page data acquisition request sent by the client 2, according to the web page data acquisition request, the web page data acquisition request includes the URL information and identification information of the web page; in step S407, the server extracts the first modification data, and in step S409, sends the first modification data to the client 2. It should be noted that the client 1 and the client 2 can be the same browser on the same device, or different browsers on the same device, or different browsers on different devices. The web page data processing method proposed in the present disclosure, when the user edits on the editable web page, realizes the extraction of the user's edited content across browsers according to the URL information and identification information of the web page, and can also extract the user's edited content on different devices, and can also share the content edited on the web page in real time for others to view.
[0070] The following takes the visualized H5 mini-game online editing web page as an example to further illustrate the web page data processing method proposed in the present disclosure.
[0071] refer to Figure 5 , Figure 5 The flowchart of the method for processing H5 mini game online editing web page data according to an exemplary embodiment of the present disclosure is schematically shown. Figure 5As shown, when making modifications and editing on the visual H5 mini-game online editing webpage, first, execute step S51, monitor the user's first modification, dynamically update the URL, and write an identification ID. When the user performs a certain modification behavior on the webpage, such as moving an element in the page, after monitoring the user's first modification, call the browser's history.replaceState method to rewrite the current URL, such as history.replaceState(null,null,location.href+'?id=123'). This method adds a query parameter of "id" to the current URL. When this method is executed, the page will not be reloaded (refreshed) and no historical records will be generated. After that, when the user refreshes the page, the URL will retain the above-mentioned added id.
[0072] In step S53, each modification operation of the user is monitored, and the changed data is synchronized to the server. By monitoring the user's operation, each time the user modifies the edited data, the data is packaged into JSON format and sent to the server through ajax for storage together with the above id. In step S55, the server side monitors the storage request from the client and stores the data in the database.
[0073] In step S57, when the page is reloaded (refreshed), data is requested from the server through the ID preset in the URL, and the modified page is loaded. A program is written in the web page, and each time the web page is reopened, it first detects whether the current URL has the above ID. If there is such an ID, it uses the ID to send a request to the server to retrieve the above stored data, and modifies and displays the attributes of the elements of the page according to the data correspondence.
[0074] Enter the game editing page, for example, the URL is http: / / www.xxx.com / detials? tempId=1. Here, take modifying the position of the banner element as an example. When the client detects that the user has moved the position of the banner element, it calls the pre-packaged replaceUrl method. This method first obtains the current identification information through location.search, and uses the includes method in javascript to determine whether there is a preset dataId in the identification information. If not, the history.replaceState method is called to rewrite the current URL and merge a dataId query parameter at its end. The value of dataId can be generated according to some algorithms, mainly serving as an identification, that is, the identification information in this disclosure. When calling the history.replaceState method to rewrite the URL of the currently edited web page, the browser will not be forced to refresh, so it is imperceptible to the user and the experience is better. After completing the above steps, the user refreshes the browser, and the URL will always carry the identification information of dataId. At the same time, the URL can be copied and shared with others for viewing.
[0075] Monitor the attribute changes of elements in the page and send the modified data to the server in real time for storage. In the visual editing page, it is necessary to monitor the user's modification of all elements, such as the position, size and text content of the elements. When the program monitors the change of the attribute of an element, it uses the above dataId and the modified data of the user to send it to the server through an ajax request for storage.
[0076] Write a program on the server side to listen to storage requests from the client and store the data in the database in real time. At the same time, listen to requests to obtain data and return the data stored in the database to the client.
[0077] After the page is reloaded, the dataId in the URL is obtained through the location.search method, and then an ajax request is sent to retrieve the data previously saved by the user from the server, and the modified page element attributes are displayed according to the corresponding relationship of the data.
[0078] After monitoring the user's first page modification, an identification information is generated by rewriting the browser's URL without the user's awareness, and a binding relationship is established between this identification information and the data edited by the user. Each time the user's modification is monitored, the data is stored on the server side through ajax technology without the user's awareness. When the page is reloaded, the identification information in the URL is obtained by parsing, and a request is sent to the server using the identification information to obtain the previously stored data, and then the content of the page is modified according to the data, so that the modified page data can be displayed on the pages of different browsers, and can be shared with others in real time through the URL.
[0079] It should be noted that some of the technologies in this disclosure can also be implemented by modifying the hash value in the browser's URL. When the user modifies the data in the page for the first time, location.hash = 'dataId = XXX' can be used to update the URL, and the hash value will still be retained when the web page is refreshed. From a technical perspective, although the hash change will not refresh the web page, it will be written into the history stack and the browser's back button will be activated, so it is not as good as history.replaceState.
[0080] It should be noted that although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.
[0081] Furthermore, this example implementation also provides a web page data processing device.
[0082] Figure 6 The block diagram schematically shows a web page data processing device according to an exemplary embodiment of the present disclosure. Figure 6 According to an exemplary embodiment of the present disclosure, the web page data processing device 6 may include an information generating module 61 and an information acquiring module 63 .
[0083] Specifically, the information generation module 61 can be used to respond to a first modification operation on the page data of a web page, generate first modification data and identification information corresponding to the first modification data; the information acquisition module 63 can be used to send the first modification data and identification information to the server, so as to obtain the first modification data from the server based on the identification information and the URL information of the web page.
[0084] Optionally, the information generation module 61 can be configured to perform: generating second modification data in response to a second modification operation on the page data of a web page; the second modification operation is a modification operation after the first modification operation is completed; sending the second modification data and identification information to the server, so as to obtain the second modification data from the server based on the identification information and the URL information of the web page.
[0085] Optionally, the information acquisition module 63 may be configured to execute: determining target website information according to the identification information and website information of the web page; and acquiring first modification data from a server according to the target website information.
[0086] Optionally, the information generation module 61 may be configured to execute: generating first modification data, determining whether the user has modification authority; and generating identification information corresponding to the first modification data if the user has modification authority.
[0087] Optionally, the information acquisition module 63 may be configured to execute: packaging the first modified data into a json format to obtain the first modified data in the json format; and sending the first modified data in the json format and the identification information to the server via ajax.
[0088] Furthermore, this exemplary embodiment also provides another web page data processing device.
[0089] Figure 7 The block diagram schematically shows another web page data processing device according to an exemplary embodiment of the present disclosure. Figure 7 According to an exemplary embodiment of the present disclosure, the web page data processing device 7 may include an information receiving module 71 and an information sending module 73 .
[0090] Specifically, the information receiving module 71 can be used to receive first modification data and identification information corresponding to the first modification data, the first modification data being data generated in response to a first modification operation on page data of a web page; the information sending module 73 can be used to send the first modification data when receiving a web page data acquisition request; wherein the web page data acquisition request includes identification information and URL information of the web page.
[0091] Optionally, the information receiving module 71 may be configured to execute: creating a subspace corresponding to the identification information according to the identification information; and saving the first modified data into the subspace.
[0092] Optionally, the information sending module 73 may be configured to execute: extracting identification information and user address information according to a webpage data acquisition request; acquiring first modification data according to the identification information; and sending the first modification data according to the user address information.
[0093] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the above method of the present specification is stored. In some possible implementations, various aspects of the present invention can also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary embodiments of the present invention described in the above "Exemplary Method" section of the present specification.
[0094] The program product for implementing the above method according to an embodiment of the present invention can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto, and in this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.
[0095] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical disk, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0096] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0097] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
[0098] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may 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 may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0099] In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.
[0100] It will be appreciated by those skilled in the art that various aspects of the present invention may be implemented as a system, method or program product. Therefore, various aspects of the present invention may be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as a "circuit", "module" or "system".
[0101] Refer to the following Figure 8 An electronic device 800 according to this embodiment of the present invention will be described. Figure 8 The electronic device 800 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0102] like Figure 8 As shown, the electronic device 800 is in the form of a general computing device. The components of the electronic device 800 may include, but are not limited to: the at least one processing unit 810, the at least one storage unit 820, a bus 830 connecting different system components (including the storage unit 820 and the processing unit 810), and a display unit 840.
[0103] The storage unit 820 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 8201 and / or a cache memory unit 8202 , and may further include a read-only memory unit (ROM) 8203 .
[0104] The storage unit 820 may also include a program / utility 8204 having a set (at least one) of program modules 8205, such program modules 8205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0105] Bus 830 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0106] The electronic device 800 may also communicate with one or more external devices 900 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 800, and / or communicate with any device that enables the electronic device 800 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 850. Furthermore, the electronic device 800 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 860. As shown, the network adapter 860 communicates with other modules of the electronic device 800 via a bus 830. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 800, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.
[0107] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation of the present disclosure.
[0108] In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to an exemplary embodiment of the present invention, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.
[0109] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.
[0110] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.
[0111] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A web page data processing method, characterized in that: include: In response to a first modification operation on page data of a webpage, generating first modification data and identification information corresponding to the first modification data; wherein the first modification data and the identification information are stored at an address corresponding to a type of the first modification data; Sending the first modification data and the identification information to a server, so as to obtain the first modification data from the server according to the identification information and the URL information of the web page; Among them, it also includes: The trigger server replaces the stored original modified data with the first modified data according to the modified data storage mode corresponding to the first modified data, or saves the first modified data on the basis of saving the original modified data.
2. The webpage data processing method according to claim 1, characterized in that: The method further comprises: In response to a second modification operation on the page data of the webpage, second modification data is generated; the second modification operation is a modification operation after the first modification operation is completed; The second modification data and the identification information are sent to a server, so as to obtain the second modification data from the server according to the identification information and the URL information of the web page.
3. The webpage data processing method according to claim 1, characterized in that: Acquiring the first modification data from the server according to the identification information and the URL information of the webpage includes: Determine target website information according to the identification information and the website information of the web page; The first modification data is obtained from the server according to the target website information.
4. The webpage data processing method according to claim 1, characterized in that: Generating first modification data and identification information corresponding to the first modification data includes: Generate the first modification data, and determine whether the user has modification authority; If the user has the modification authority, the identification information corresponding to the first modification data is generated.
5. The webpage data processing method according to claim 1, characterized in that: Sending the first modification data and the identification information to a server includes: Packing the first modified data into json format to obtain the first modified data in json format; The first modified data in JSON format and the identification information are sent to the server via Ajax.
6. A web page data processing method, characterized in that: include: receiving first modification data and identification information corresponding to the first modification data, wherein the first modification data is data generated in response to a first modification operation on page data of a webpage; wherein the first modification data and the identification information are stored at an address corresponding to a type of the first modification data; In case of receiving a webpage data acquisition request, sending the first modification data; Wherein, the webpage data acquisition request includes the identification information and the URL information of the webpage; Among them, it also includes: According to the modified data storage mode corresponding to the first modified data, the stored original modified data is replaced with the first modified data, or the first modified data is saved on the basis of saving the original modified data.
7. The webpage data processing method according to claim 6, characterized in that: After receiving the first modification data and the identification information corresponding to the first modification data, the method includes: According to the identification information, creating a subspace corresponding to the identification information; The first modified data is saved in the subspace.
8. The webpage data processing method according to claim 6, characterized in that: In the case of receiving a webpage data acquisition request, sending the first modification data comprises: extracting the identification information and user address information according to the webpage data acquisition request; According to the identification information, acquiring the first modification data; The first modification data is sent according to the user address information.
9. A web page data processing device, characterized in that: include: An information generation module, configured to generate first modification data and identification information corresponding to the first modification data in response to a first modification operation on the page data of a webpage; wherein the first modification data and the identification information are stored at an address corresponding to a type of the first modification data; An information acquisition module, used for sending the first modification data and the identification information to a server, so as to obtain the first modification data from the server according to the identification information and the URL information of the web page; Among them, it is also used for: The trigger server replaces the stored original modified data with the first modified data according to the modified data storage mode corresponding to the first modified data, or saves the first modified data on the basis of saving the original modified data.
10. A web page data processing device, characterized in that: include: an information receiving module, configured to receive first modification data and identification information corresponding to the first modification data, wherein the first modification data is data generated in response to a first modification operation on page data of a webpage; wherein the first modification data and the identification information are stored at an address corresponding to a type of the first modification data; An information sending module, when receiving a webpage data acquisition request, sends the first modification data; wherein the webpage data acquisition request includes the identification information and the URL information of the webpage; Among them, it is also used for: According to the modified data storage mode corresponding to the first modified data, the stored original modified data is replaced with the first modified data, or the first modified data is saved on the basis of saving the original modified data.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the web page data processing method according to any one of claims 1 to 8 is implemented.
12. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; Wherein, the processor is configured to execute the web page data processing method according to any one of claims 1 to 8 by executing the executable instructions.
Citation Information
Patent Citations
Web page annotation method and device
CN104424232A