Method, device and equipment for updating page data in non-refresh window of browser and medium
The method addresses the inefficiency of data updates in web applications by using browser storage and real-time listening to update data in the browser without refreshing, enhancing data updating efficiency and cross-device synchronization.
Patent Information
- Application Number
- CN202411699966.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-03-14
AI Technical Summary
Current web applications require page refreshes to synchronize data updates, leading to inefficient data updating, as seen in scenarios like adding items to a shopping cart on e-commerce sites, where the cart quantity does not update until the page is refreshed.
A method where a monitoring variable is defined and stored locally in the browser, listening for user actions in a secondary window, sending data change instructions to the server, and generating targeted requests based on data modifications to update the primary window without refreshing, utilizing browser storage and frequency-based listening.
This method enables real-time data updates in the browser without refreshing the window, improving data updating efficiency and enabling cross-device data synchronization.
Smart Images

Figure CN119622135A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of browser data updating, and in particular to a method, device, equipment and medium for updating page data in a browser non-refresh window. Background Art
[0002] For orders that need to be processed on the computer side, you usually click on the To-Do item in the task list and open a new window. After processing, close the new window. At this time, theoretically, the data and content of the task list page should change synchronously, but usually the page data changes by refreshing the page to obtain the latest data. If you do not refresh the page, it cannot be updated synchronously.
[0003] In response to the above problem, for mature web applications such as Taobao and JD.com, opening a new window to enter the product details page to add the product to the shopping cart does not change the number of shopping cart pages. The shopping cart page needs to be refreshed to synchronize the new data, and the data update efficiency is low. Summary of the invention
[0004] The present invention provides a method, device, equipment and medium for updating page data in a browser non-refresh window, the main purpose of which is to solve the problem of low efficiency in updating data of existing web page applications.
[0005] To achieve the above object, the present invention provides a method for updating page data in a browser non-refresh window, comprising:
[0006] Defining monitoring variables in the first window, using a browser to locally store the monitoring variables, and monitoring the monitoring variables in real time;
[0007] Monitor the operation actions of the user in the second window in real time, and when the user performs a data modification operation, reassign the monitoring variable, send a data change instruction to the server, and use the server to reassign the predefined global monitoring variable according to the data change instruction;
[0008] Acquire detailed data of the data modification by the user in the second window, and send the detailed data of the data modification to the server;
[0009] When a change in the monitoring variable is monitored or a change in the global monitoring variable is monitored by accessing the server, the data modification detailed data is obtained, targeted request data is generated according to the data modification detailed data, and the targeted request data is sent to the server;
[0010] Acquire the synchronization data returned by the server according to the targeted request data, and update part of the data in the first window according to the synchronization data.
[0011] Optionally, the locally storing the monitoring variables by using a browser includes:
[0012] Convert the monitoring variable into a character string to obtain a variable character string;
[0013] Perform storage availability detection on the browser;
[0014] If browser storage is unavailable, a prompt message is sent to the user;
[0015] If the browser storage is available, the variable string is stored according to a predetermined key name.
[0016] Optionally, monitoring the operation action of the user in the second window in real time includes:
[0017] Obtain the user's click event data according to the preset monitoring frequency;
[0018] Determine in real time whether the click event data contains a data modification event;
[0019] If the click event data does not include a data modification event, continue to execute the step of obtaining the user's click event data according to the preset monitoring frequency;
[0020] If the click event data includes a data modification event, it is determined that the user has performed a data modification operation.
[0021] Optionally, the obtaining detailed data of the data modification by the user in the second window includes:
[0022] Extracting data modification event data from the click event data;
[0023] Identify the data attributes corresponding to each data modification event in the data modification event data to obtain data modification detailed data.
[0024] Optionally, generating targeted request data according to the data modification detailed data, and sending the targeted request data to the server includes:
[0025] Extracting data attributes contained in the data modification detailed data to obtain a data attribute set;
[0026] Determine whether the number of data attributes included in the data attribute set is greater than or equal to a preset number threshold;
[0027] If the number of data attributes included in the data attribute set is greater than or equal to a preset number threshold, generating multiple separate request data according to each data attribute, and sending each request data to the server;
[0028] If the number of data attributes included in the data attribute set is less than a preset number threshold, collective request data is generated according to the data attributes included in the data attribute set, and the collective request data is sent to the server.
[0029] Optionally, sending each request data to the server includes:
[0030] Each request data is sent to the server through concurrent requests.
[0031] Optionally, sending the collective request data to the server includes:
[0032] The collective request data is sent to the server through a single-threaded mode.
[0033] In order to solve the above problem, the present invention also provides a browser non-refresh window updating page data device, the device comprising:
[0034] A variable monitoring module, used for defining monitoring variables in the first window, storing the monitoring variables locally using a browser, and monitoring the monitoring variables in real time;
[0035] An operation monitoring module is used to monitor the operation actions of the user in the second window in real time. When the user performs a data modification operation, the monitoring variable is reassigned, and a data change instruction is sent to the server. The server reassigns the predefined global monitoring variable according to the data change instruction, obtains the user's data modification detailed data in the second window, and sends the data modification detailed data to the server;
[0036] A data request module, for obtaining the data modification detailed data when monitoring the changes of the monitoring variables or monitoring the changes of the global monitoring variables by accessing the server, generating targeted request data according to the data modification detailed data, and sending the targeted request data to the server;
[0037] The data updating module is used to obtain the synchronization data returned by the server according to the targeted request data, and update part of the data in the first window according to the synchronization data.
[0038] In order to solve the above problem, the present invention further provides an electronic device, the electronic device comprising:
[0039] at least one processor;
[0040] and, a memory communicatively coupled to the at least one processor;
[0041] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the above-mentioned method for updating page data in a browser non-refresh window.
[0042] In order to solve the above problem, the present invention also provides a computer-readable storage medium, in which at least one computer program is stored, and the at least one computer program is executed by a processor in an electronic device to implement the above-mentioned method for updating page data in a browser non-refresh window. In an embodiment of the present invention, a monitoring variable is defined in a first window, the monitoring variable is stored locally by a browser, and the monitoring variable is monitored in real time, and the user's operation action in a second window is monitored in real time. When the user performs a data modification operation, the monitoring variable is reassigned, and a data change instruction is sent to a server. The server is used to reassign a predefined global monitoring variable according to the data change instruction, obtain the user's data modification detailed data in the second window, and send the data modification detailed data to the server. When the monitoring variable is monitored to change or the global monitoring variable is monitored to change by accessing the server, the data modification detailed data is obtained, and targeted request data is generated according to the data modification detailed data, and the targeted request data is sent to the server. The synchronization data returned by the server according to the targeted request data is obtained, and part of the data in the first window is updated according to the synchronization data. The invention realizes updating data in a browser window without refreshing the window, and realizes updating page data across devices by different users, thereby improving the efficiency of data updating. Therefore, the method, device, electronic device and computer-readable storage medium for updating page data in a browser window without refreshing the window proposed in the present invention can solve the problem of low efficiency of data updating in existing web applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 A flowchart of a method for updating page data in a browser non-refresh window provided by an embodiment of the present invention;
[0044] Figure 2 A schematic diagram of a flow chart for calculating a matching value provided by an embodiment of the present invention;
[0045] Figure 3 A schematic diagram of a process of real-time monitoring of user operation actions provided by an embodiment of the present invention;
[0046] Figure 4 A functional module diagram of a browser non-refresh window updating page data device provided by an embodiment of the present invention;
[0047] Figure 5is a schematic diagram of a structure of a computer device in one embodiment of the present invention;
[0048] Figure 6 It is another structural schematic diagram of a computer device in one embodiment of the present invention.
[0049] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0050] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0051] The embodiment of the present application provides a method for updating page data in a browser non-refresh window. The execution subject of the method for updating page data in a browser non-refresh window includes but is not limited to at least one of the electronic devices such as a server, a terminal, etc. that can be configured to execute the method provided in the embodiment of the present application. In other words, the method for updating page data in a browser non-refresh window can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc. The server can be an independent server, or it can be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and big data and artificial intelligence platforms.
[0052] Reference Figure 1 FIG. 1 is a flow chart of a method for updating page data in a browser non-refresh window provided by an embodiment of the present invention. In this embodiment, the method for updating page data in a browser non-refresh window includes:
[0053] S1. Define monitoring variables in a first window, use a browser to locally store the monitoring variables, and monitor the monitoring variables in real time.
[0054] In the embodiment of the present invention, the first serial port refers to a window opened by a user when using a related service. In the embodiment of the present invention, the monitoring variable may be a natural number.
[0055] In the embodiment of the present invention, the local storage of the monitoring variables by the browser is achieved by calling the localStorage (browser saves data) method.
[0056] In the embodiment of the present invention, the locally storing the monitoring variables by using a browser includes:
[0057] Convert the monitoring variable into a character string to obtain a variable character string;
[0058] Perform storage availability detection on the browser;
[0059] If browser storage is unavailable, a prompt message is sent to the user;
[0060] If the browser storage is available, the variable string is stored according to a predetermined key name.
[0061] In detail, the monitoring variable is converted into a string because localStorage can only store strings.
[0062] In detail, the monitoring variable is converted into a string to obtain a variable string. The monitoring variable can be converted into a JSON string by calling a JSON.stringify method.
[0063] In detail, the memory availability detection on the browser can determine the storage availability by attempting to write data to the local storage of the browser.
[0064] In detail, the predetermined key name is an identifier for marking the variable string, and is used for subsequently reading the variable string according to the key name.
[0065] In the embodiment of the present invention, the real-time monitoring of the monitoring variable is to perform a monitoring action according to a preset monitoring frequency, and the monitoring frequency may be once per second.
[0066] In the embodiment of the present invention, the real-time monitoring of the monitoring variable refers to acquiring the monitoring variable at a preset frequency and determining whether the monitoring variable changes.
[0067] In the embodiment of the present invention, by defining monitoring variables in the first window, using the browser to locally store the monitoring variables, and monitoring the monitoring variables in real time, the efficiency of subsequent determination of whether the user performs a data modification operation is improved.
[0068] S2. Monitor the user's operation actions in the second window in real time. When the user performs a data modification operation, reassign the monitoring variable and send a data change instruction to the server. The server reassigns the pre-defined global monitoring variable according to the data change instruction.
[0069] In the embodiment of the present invention, the second window is the next window entered after clicking the relevant content in the first window. For example, in a Taobao webpage, if the user's shopping cart page is the first window, the detailed information page entered by clicking the product in the shopping cart is the second window.
[0070] In the embodiment of the present invention, the real-time monitoring of the user's operation actions in the second window also monitors the user's operation actions in the second window according to the monitoring frequency.
[0071] In the embodiment of the present invention, the sending of the data change instruction to the server is to notify the server that the user has performed a data modification operation.
[0072] In the embodiment of the present invention, the server is used to reassign the predefined global monitoring variable according to the data change instruction so that different machines can judge whether refresh is needed by monitoring the changes of the global monitoring variable, so that different users can refresh data across devices.
[0073] In the embodiment of the present invention, refer to Figure 2 As shown, a schematic diagram of a process of real-time monitoring of user operation actions is provided in an embodiment of the present invention, wherein real-time monitoring of user operation actions in a second window includes:
[0074] S21, obtaining the user's click event data according to a preset monitoring frequency;
[0075] Execute S22 in real time, determine whether the click event data includes a data modification event;
[0076] If the click event data does not include a data modification event, re-execute S21, obtaining the user's click event data according to a preset monitoring frequency;
[0077] If the click event data includes a data modification event, then S23 , it is determined that the user has performed a data modification operation.
[0078] In the embodiment of the present invention, the user's click event data is obtained according to the preset monitoring frequency by setting a monitoring method at a clickable position in the second window. When the user performs a click operation, the monitoring method records the user's click operation.
[0079] In detail, the real-time judgment of whether the click event data contains data modification events is performed by assigning a special attribute to the monitoring method of the operation button that can modify the data in the web page. After obtaining all the user's click event data, it is judged whether it contains click events with characteristic attributes.
[0080] In the embodiment of the present invention, the reassignment of the monitoring variable is intended to change the monitoring variable, and the reassignment of the monitoring variable can be achieved by adding a preset natural number to the monitoring variable.
[0081] In an embodiment of the present invention, by monitoring the user's operating actions in the second window in real time, when the user performs a data modification operation, the monitoring variable is reassigned, thereby improving the efficiency of monitoring whether the monitoring variable changes, and by sending a data change instruction to the server, the server reassigns the pre-defined global monitoring variable according to the data change instruction, thereby improving the efficiency of refreshing the page across devices for different users.
[0082] S3. Obtain detailed data of the data modification by the user in the second window, and send the detailed data of the data modification to the server.
[0083] In the embodiment of the present invention, the data modification detailed data includes detailed data of the attributes of each data modified by the user.
[0084] In detail, each data has its corresponding attribute, and the attribute of each data is preset.
[0085] In the embodiment of the present invention, the step of obtaining detailed data of the data modification by the user in the second window includes:
[0086] Extracting data modification event data from the click event data;
[0087] Identify the data attributes corresponding to each data modification event in the data modification event data to obtain data modification detailed data.
[0088] In detail, the extraction of the data modification event data from the click event data is to assign a special attribute to the click event of the data modification operation in advance, and to extract each click event containing the characteristic attribute to obtain the data modification event data.
[0089] In the embodiment of the present invention, in the second window, each data with different attributes corresponds to a different data modification event, and each data modification event includes the attributes of the data modified by the data modification event.
[0090] In detail, the identifying of the data attribute corresponding to each data modification event in the data modification event data is performed by identifying the attribute of the data modified by each data modification event.
[0091] In the embodiment of the present invention, when the user performs a data modification operation, the detailed data of the data modification of the user in the second window is obtained and sent to the server, thereby improving the efficiency of subsequent generation of targeted request data.
[0092] S4. When a change in the monitoring variable is monitored or a change in the global monitoring variable is monitored by accessing the server, the data modification detailed data is obtained, targeted request data is generated according to the data modification detailed data, and the targeted request data is sent to the server.
[0093] In the embodiment of the present invention, the monitoring of the monitoring variable is achieved by determining in real time whether the value of the monitoring variable is the same as the value of the original monitoring variable.
[0094] In the embodiment of the present invention, whether the global monitoring variable changes is determined by accessing the server in real time to obtain the value of the global monitoring variable.
[0095] In the embodiment of the present invention, the targeted request data refers to request data for updating only the modified data.
[0096] In the embodiment of the present invention, refer to Figure 3 As shown, a schematic diagram of a process of generating targeted request data is provided in an embodiment of the present invention, wherein the targeted request data is generated according to the data modification detailed data, and the targeted request data is sent to the server, including:
[0097] S31, extracting data attributes contained in the data modification detailed data to obtain a data attribute set;
[0098] S32, determining whether the number of data attributes included in the data attribute set is greater than or equal to a preset number threshold;
[0099] If the number of data attributes included in the data attribute set is greater than or equal to the preset number threshold, executing S33, generating multiple separate request data according to each data attribute, and sending each request data to the server;
[0100] If the number of data attributes included in the data attribute set is less than a preset number threshold, S34 is executed to generate collective request data according to the data attributes included in the data attribute set, and the collective request data is sent to the server.
[0101] In the embodiment of the present invention, the step of sending each request data to the server includes:
[0102] Each request data is sent to the server through concurrent requests.
[0103] In the embodiment of the present invention, the sending of the collective request data to the server includes:
[0104] The collective request data is sent to the server through a single-threaded mode.
[0105] In detail, the preset quantity threshold can be set according to the performance of the server. The larger the preset quantity threshold is, the larger the amount of data requested by the targeted request for data is, and the higher the performance requirement for the server is.
[0106] In detail, generating a plurality of separate request data according to each data attribute refers to generating a separate request data according to each data attribute, and each request data only requests the server to update one data.
[0107] In detail, generating collective request data according to the data attributes included in the data attribute set refers to generating request data for updating multiple data.
[0108] Specifically, the concurrent request refers to sending multiple HTTP requests at the same time. When multiple data need to be requested, this technology can improve the performance and response rate of data requests.
[0109] In detail, sending the collective request data to the server in a single-threaded mode means executing only one data request at the same time, which can reduce resource usage.
[0110] In the embodiment of the present invention, each request data is sent to the server through concurrent requests, thereby improving the efficiency of data requests.
[0111] In the embodiment of the present invention, the collective request data is sent to the server in a single-threaded mode, thereby reducing the occupation of system resources.
[0112] In an embodiment of the present invention, when changes in the monitoring variables are monitored or changes in the global monitoring variables are monitored by accessing the server, targeted request data is generated by modifying the detailed data according to the data, and the targeted request data is sent to the server, thereby improving the efficiency of data requests and the efficiency of cross-device refresh for different users.
[0113] S5. Acquire synchronization data returned by the server according to the targeted request data, and update part of the data in the first window according to the synchronization data.
[0114] In the embodiment of the present invention, the synchronization data is the corresponding update data returned by the server according to the request data.
[0115] In the embodiment of the present invention, the step of obtaining the synchronous data returned by the server according to the targeted request data is to obtain the synchronous data by calling a corresponding data request method.
[0116] In the embodiment of the present invention, updating part of the data in the first window according to the synchronization data refers to replacing data with corresponding attributes in the first window according to attributes of the data in the synchronization data to update part of the data in the first window.
[0117] In the embodiment of the present invention, by acquiring the synchronization data returned by the server according to the targeted request data, part of the data in the first window is updated according to the synchronization data, thereby realizing the updating of data in a non-refresh window of the browser window and improving the efficiency of data updating.
[0118] like Figure 4 , which is a functional module diagram of a browser non-refresh window page data updating device provided by an embodiment of the present invention.
[0119] The browser non-refresh window page data updating device 100 of the present invention can be installed in an electronic device. According to the functions to be implemented, the browser non-refresh window page data updating device 100 may include a variable monitoring module 101, an operation monitoring module 102, a data request module 103 and a data update module 104. The module of the present invention may also be referred to as a unit, which refers to a series of computer program segments that can be executed by an electronic device processor and can complete fixed functions, and is stored in the memory of the electronic device.
[0120] In this embodiment, the functions of each module / unit are as follows:
[0121] The variable monitoring module 101 is used to define monitoring variables in the first window, store the monitoring variables locally using a browser, and monitor the monitoring variables in real time;
[0122] The operation monitoring module 102 is used to monitor the user's operation actions in the second window in real time. When the user performs a data modification operation, the monitoring variable is reassigned, and a data change instruction is sent to the server. The server reassigns the predefined global monitoring variable according to the data change instruction, obtains the user's data modification detailed data in the second window, and sends the data modification detailed data to the server;
[0123] The data request module 103 is used to obtain the data modification detailed data when monitoring the change of the monitoring variable or monitoring the change of the global monitoring variable by accessing the server, generate targeted request data according to the data modification detailed data, and send the targeted request data to the server;
[0124] The data updating module 104 is used to obtain the synchronization data returned by the server according to the targeted request data, and update part of the data in the first window according to the synchronization data.
[0125] In detail, each module described in the apparatus 100 for updating page data in a browser non-refresh window in the embodiment of the present invention is used in the same manner as described above. Figures 1 to 3 The same technical means as the method for updating page data in the browser non-refresh window described in , and can produce the same technical effects, will not be repeated here.
[0126] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 5 As shown. The computer device includes a processor, a memory, a network interface and a database connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile and / or volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external client via a network connection. When the computer program is executed by the processor, it implements the functions or steps on the server side of a complex branch process processing method.
[0127] In one embodiment, a computer device is provided. The computer device may be a client, and its internal structure diagram may be as follows: Figure 6 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external server through a network connection. When the computer program is executed by the processor, it implements the functions or steps of the client side of a complex branch process processing method
[0128] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:
[0129] Defining monitoring variables in the first window, using a browser to locally store the monitoring variables, and monitoring the monitoring variables in real time;
[0130] Monitor the operation actions of the user in the second window in real time, and when the user performs a data modification operation, reassign the monitoring variable, send a data change instruction to the server, and use the server to reassign the predefined global monitoring variable according to the data change instruction;
[0131] Acquire detailed data of the data modification by the user in the second window, and send the detailed data of the data modification to the server;
[0132] When a change in the monitoring variable is monitored or a change in the global monitoring variable is monitored by accessing the server, the data modification detailed data is obtained, targeted request data is generated according to the data modification detailed data, and the targeted request data is sent to the server;
[0133] Acquire the synchronization data returned by the server according to the targeted request data, and update part of the data in the first window according to the synchronization data.
[0134] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0135] Defining monitoring variables in the first window, using a browser to locally store the monitoring variables, and monitoring the monitoring variables in real time;
[0136] Monitor the operation actions of the user in the second window in real time, and when the user performs a data modification operation, reassign the monitoring variable, send a data change instruction to the server, and use the server to reassign the predefined global monitoring variable according to the data change instruction;
[0137] Acquire detailed data of the data modification by the user in the second window, and send the detailed data of the data modification to the server;
[0138] When a change in the monitoring variable is monitored or a change in the global monitoring variable is monitored by accessing the server, the data modification detailed data is obtained, targeted request data is generated according to the data modification detailed data, and the targeted request data is sent to the server;
[0139] Acquire the synchronization data returned by the server according to the targeted request data, and update part of the data in the first window according to the synchronization data.
[0140] It should be noted that the above functions or steps that can be implemented by the computer-readable storage medium or computer device can refer to the relevant descriptions on the server side and the client side in the aforementioned method embodiment. To avoid repetition, they will not be described one by one here.
[0141] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0142] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0143] Therefore, no matter from which point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present invention is limited by the appended claims rather than the above description, so it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any attached figure mark in the claims should not be regarded as limiting the claims involved.
[0144] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0145] In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the system claim can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.
[0146] If software tools or components not owned by the patent applicant appear in the embodiments of the present application, they are merely used to illustrate that a wide range of software tools or components can be selected during the actual implementation of the technical solution disclosed in the present application, and do not mean that the patent applicant actually used these example software tools or components; the above-mentioned embodiments are only used to illustrate the technical solution of the present invention, rather than to limit it; although the present invention has been described in detail with reference to the aforementioned embodiments, ordinary technicians in this field should understand that they can still modify the technical solutions recorded in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.
Claims
1. A method for updating page data in a browser non-refresh window, characterized in that: The method comprises: Defining monitoring variables in the first window, using a browser to locally store the monitoring variables, and monitoring the monitoring variables in real time; Monitor the operation actions of the user in the second window in real time, and when the user performs a data modification operation, reassign the monitoring variable, send a data change instruction to the server, and use the server to reassign the predefined global monitoring variable according to the data change instruction; Acquire detailed data of the data modification by the user in the second window, and send the detailed data of the data modification to the server; When a change in the monitoring variable is monitored or a change in the global monitoring variable is monitored by accessing the server, the data modification detailed data is obtained, targeted request data is generated according to the data modification detailed data, and the targeted request data is sent to the server; Acquire the synchronization data returned by the server according to the targeted request data, and update part of the data in the first window according to the synchronization data.
2. The method for updating page data in a browser non-refresh window as claimed in claim 1, characterized in that: The locally storing the monitoring variables by using a browser includes: Convert the monitoring variable into a character string to obtain a variable character string; Perform storage availability detection on the browser; If browser storage is unavailable, a prompt message is sent to the user; If the browser storage is available, the variable string is stored according to a predetermined key name.
3. The method for updating page data in a browser non-refresh window as claimed in claim 1, characterized in that: The real-time monitoring of the user's operation actions in the second window includes: Obtain the user's click event data according to the preset monitoring frequency; Determine in real time whether the click event data contains a data modification event; If the click event data does not include a data modification event, continue to execute the step of obtaining the user's click event data according to the preset monitoring frequency; If the click event data includes a data modification event, it is determined that the user has performed a data modification operation.
4. The method for updating page data in a browser non-refresh window as claimed in claim 3, characterized in that: The obtaining detailed data of the data modification by the user in the second window includes: Extracting data modification event data from the click event data; Identify the data attributes corresponding to each data modification event in the data modification event data to obtain data modification detailed data.
5. The method for updating page data in a browser non-refresh window as claimed in claim 1, characterized in that: Generating targeted request data according to the data modification detailed data, and sending the targeted request data to the server, including: Extracting data attributes contained in the data modification detailed data to obtain a data attribute set; Determine whether the number of data attributes included in the data attribute set is greater than or equal to a preset number threshold; If the number of data attributes included in the data attribute set is greater than or equal to a preset number threshold, generating multiple separate request data according to each data attribute, and sending each request data to the server; If the number of data attributes included in the data attribute set is less than a preset number threshold, collective request data is generated according to the data attributes included in the data attribute set, and the collective request data is sent to the server.
6. The method for updating page data in a browser non-refresh window as claimed in claim 5, characterized in that: The sending each request data to the server includes: Each request data is sent to the server through concurrent requests.
7. The method for updating page data in a browser non-refresh window as claimed in claim 5, characterized in that: The sending the collective request data to the server includes: The collective request data is sent to the server through a single-threaded mode.
8. A browser non-refresh window updating page data device, characterized in that: The device comprises: A variable monitoring module, used for defining monitoring variables in the first window, storing the monitoring variables locally using a browser, and monitoring the monitoring variables in real time; An operation monitoring module is used to monitor the operation actions of the user in the second window in real time. When the user performs a data modification operation, the monitoring variable is reassigned, and a data change instruction is sent to the server. The server reassigns the predefined global monitoring variable according to the data change instruction, obtains the user's data modification detailed data in the second window, and sends the data modification detailed data to the server; A data request module, for obtaining the data modification detailed data when a change in the monitoring variable is monitored or a change in the global monitoring variable is monitored by accessing the server, generating targeted request data according to the data modification detailed data, and sending the targeted request data to the server; The data updating module is used to obtain the synchronization data returned by the server according to the targeted request data, and update part of the data in the first window according to the synchronization data.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively coupled to the at least one processor; The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method for updating page data in a browser non-refresh window as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for updating page data in a browser non-refresh window as claimed in any one of claims 1 to 7 is implemented.