RBI data processing methods, apparatus, equipment and media
By monitoring changes to the DOM tree of the origin website's web pages through the RBI server, generating and sorting node change events, the problems of slow transmission speed and low security of existing RBI technology are solved, and efficient and secure data transmission and page updates are achieved.
Patent Information
- Application Number
- CN202311385929.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-24
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2043-10-24
AI Technical Summary
Existing RBI remote browser isolation technology is poorly implemented, resulting in slow transmission speeds, low security, and an inability to effectively protect end-user devices.
The RBI server obtains node changes in the DOM tree of the source webpage, generates change events, reorders and incrementally retrieves the node changes, generates new change events, and the user end reproduces the new change events according to the time sequence, thus achieving efficient and secure data transmission.
It improves data transmission rate and security, ensures efficient updating and complete display of information on user-side pages, and enhances the security and efficiency of RBI technology.
Smart Images

Figure CN119892595B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of Internet technology, and in particular to an RBI data processing method, apparatus, device and medium. Background Technology
[0002] Remote Browser Isolation (RBI) is a technology used to protect end-user devices from attacks by web browsers. The core idea is to isolate the web browser in a secure environment, preventing malicious code from attacking end-user devices through the web browser.
[0003] However, there is no suitable way to implement existing RBI (Remote Browser Isolation) technology. For example, video transmission technology is not well applied to the implementation of remote browser isolation technology. In other words, the existing methods for implementing remote browser isolation technology are not good, resulting in the corresponding RBI technology having disadvantages such as slow speed and low security.
[0004] Therefore, there is an urgent need to propose a more suitable implementation method for remote browser isolation technology. Summary of the Invention
[0005] This application provides an RBI data processing method, apparatus, device, and medium to solve the problems of low transmission speed and low security performance caused by the poor implementation of RBI remote browser isolation technology in the prior art.
[0006] Firstly, this application provides an RBI data processing method, including:
[0007] The RBI server obtains node changes in the DOM tree of the source website and generates change events. Each change event includes at least one node change, and there is a temporal relationship between the change events.
[0008] The node changes in each change event are reordered, and the increment of the node changes is obtained to obtain a new change event, wherein the new change event includes the reordered node changes and the increment of the node changes;
[0009] Based on the aforementioned timing relationship, the new change event is reproduced via the user terminal.
[0010] In one possible implementation, reordering the node changes in each of the change events includes:
[0011] In each of the change events, obtain the most recent state of the node corresponding to the change;
[0012] Based on the most recent state of the node corresponding to the node change, the previous state of the node corresponding to the node change is obtained in reverse order until the initial state of the node corresponding to the node change is obtained.
[0013] Based on the initial state of the corresponding node change, confirm the order of the node changes.
[0014] In one possible implementation, obtaining the previous state of the node corresponding to the node change in reverse order until the initial state of the node corresponding to the node change is obtained includes:
[0015] In each of the change events, it is determined whether the node corresponding to the node change is a parent node and whether there is a child node corresponding to the parent node in the node corresponding to the node change in the change event;
[0016] If the node corresponding to the node change is the parent node and there is a child node corresponding to the parent node among the nodes corresponding to the node change in the change event, then the previous state of the child node is obtained in reverse order until the initial state of the child node is obtained.
[0017] If the node corresponding to the node change is not the parent node, then the previous state of the node corresponding to the node change is obtained in reverse order until the initial state of the node corresponding to the node change is obtained.
[0018] In one possible implementation, when generating the change event, the method further includes:
[0019] Based on the time sequence in which the change events were generated, the change events are sequentially numbered to obtain the temporal relationship between each change event, wherein the temporal relationship is used to indicate the order in which the user terminal reproduces the new change event.
[0020] In one possible implementation, before obtaining the node changes of the DOM tree of the source webpage through the RBI server, the method further includes:
[0021] Access the origin server via RBI server and obtain the DOM tree of the origin server's web pages;
[0022] The DOM tree of the real-time origin webpage is initially reconstructed through the RBI server to obtain the initially reconstructed DOM tree, and the initially reconstructed DOM tree is sent to the user terminal.
[0023] The user terminal is used to access the initial webpage of the source site after receiving the initially reconstructed DOM tree.
[0024] In one possible implementation, after obtaining the new change event, the method further includes:
[0025] Convert the new change event into JSON format to obtain the new change event in JSON format;
[0026] The new change event in JSON format is transmitted to the user terminal in real time;
[0027] The user terminal is used to reproduce the new change event in JSON format after receiving the new change event in JSON format, according to the time sequence relationship.
[0028] Secondly, this application provides an RBI data processing apparatus, comprising:
[0029] The acquisition module is used to acquire node changes of the DOM tree of the source webpage through the RBI server and generate change events, wherein each change event includes at least one node change and there is a temporal relationship between the change events;
[0030] The first processing module is used to reorder the node changes in each change event and obtain the increment of the node changes to obtain a new change event, wherein the new change event includes the reordered node changes and the increment of the node changes;
[0031] The second processing module is used to reproduce the new change event through the user terminal according to the time sequence relationship.
[0032] In one possible implementation, the first processing module is specifically used for:
[0033] In each of the change events, obtain the most recent state of the node corresponding to the change;
[0034] Based on the most recent state of the node corresponding to the node change, the previous state of the node corresponding to the node change is obtained in reverse order until the initial state of the node corresponding to the node change is obtained.
[0035] Based on the initial state of the corresponding node change, confirm the order of the node changes.
[0036] Thirdly, this application provides an RBI data processing device, comprising: at least one processor and a memory;
[0037] The memory stores computer-executed instructions;
[0038] The at least one processor executes computer execution instructions stored in the memory, causing the at least one processor to perform the RBI data processing method as described above.
[0039] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the RBI data processing method described above.
[0040] This application provides an RBI data processing method, apparatus, device, and medium. The method involves obtaining node changes in the DOM tree of a source webpage through an RBI server and generating change events. Each change event includes at least one node change, and there is a temporal relationship between the change events. The method reorders the node changes in each change event and obtains the increment of the node changes to obtain a new change event. The new change event includes the reordered node changes and the increment of the node changes. Based on the temporal relationship, the new change event is reproduced through a user terminal.
[0041] In the above method, the RBI server monitors changes to the DOM tree of the origin website, i.e., node changes, and generates change events for each node change. Each change event is treated as a group, and node changes in the same group are processed together. The order of node changes in each change event is relatively disordered, so the node changes in the same group can be reordered to easily find the increment of node changes. The new change events include the reordered node changes and the increment of node changes. The new change events are dynamically transmitted to the user terminal, allowing the user terminal to update the page information according to the new change events. This achieves efficient transmission of information from the origin website while also ensuring security. Attached Figure Description
[0042] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0043] Figure 1 This application provides a schematic diagram of an RBI data processing scenario.
[0044] Figure 2 A flowchart illustrating an RBI data processing method provided in this application embodiment. Figure 1 ;
[0045] Figure 3 A flowchart illustrating an RBI data processing method provided in this application embodiment. Figure 2 ;
[0046] Figure 4A flowchart illustrating an RBI data processing method provided in this application embodiment. Figure 3 ;
[0047] Figure 5 A flowchart illustrating an RBI data processing method provided in this application embodiment. Figure 4 ;
[0048] Figure 6 A diagram of an RBI data processing device provided in an embodiment of the present invention;
[0049] Figure 7 This is a hardware schematic diagram of an RBI data processing device provided in an embodiment of the present invention. Detailed Implementation
[0050] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0051] RBI (Remote Browser Isolation) technology can prevent malicious code from attacking the client / end-user device through the web browser by transferring the browser's rendering process from the server to the client / end-user device.
[0052] However, existing RBI technologies do not have a good implementation method. For example, video transmission technology is mainly used to transmit audio and video data, which cannot enable RBI technology to achieve secure and efficient isolation. Therefore, existing RBI technologies generally have disadvantages such as slow speed, low security, high bandwidth requirements, and poor server security.
[0053] Therefore, this application optimizes the processing of RBI technology to improve data transmission rate and data transmission security.
[0054] The implementation process of the RBI data processing method proposed in this application is described below with reference to the accompanying drawings and specific embodiments.
[0055] Figure 1 This is a schematic diagram illustrating a scenario of RBI data processing provided in an embodiment of this application. Figure 1 As shown, the system includes: a source server, an RBI server, and a user terminal;
[0056] The origin server is the remote web browser that the user wants to access; the RBI server is used as middleware for the user to access the origin server, and is used to obtain web page information from the origin server; the RBI server includes a service browser and a renderer; the service browser is used to obtain web page information from the origin server and information that needs to be presented to the user, and presents the corresponding information to the user; the obtained web page information can be rendered by the renderer, and the rendered information can be transmitted to the user through the RBI server.
[0057] When the information on the source webpage changes, the corresponding DOM tree also changes. The listening process (watches.js) in the RBI server can detect node changes in the DOM tree of the source webpage and generate change events accordingly. A change event includes at least one node change. The node changes for each change event are reordered to find the changes in the corresponding nodes, i.e., the increment of the node change. The node changes of the change event are reordered and the increment is obtained to form a new change event. Based on the temporal relationship of the new change events, the client can reproduce the new change events in sequence to update the accessed page in a timely manner.
[0058] Figure 2 A flowchart illustrating an RBI data processing method provided in this application embodiment. Figure 1 .like Figure 2 As shown, the method includes:
[0059] S201. Obtain the node changes of the DOM tree of the source webpage through the RBI server and generate change events, wherein each change event includes at least one node change and there is a temporal relationship between the change events.
[0060] Before the RBI server monitors changes to the DOM tree nodes of the origin website, it has already initialized and rendered the initial page of the origin website for the user when the user needs to access the origin website:
[0061] For example, access the origin server via the RBI server and obtain the DOM tree of the origin server's web pages;
[0062] The DOM tree of the real-time origin webpage is initially reconstructed through the RBI server to obtain the initially reconstructed DOM tree, and the initially reconstructed DOM tree is sent to the user terminal.
[0063] The user terminal is used to access the initial webpage of the source site after receiving the initially reconstructed DOM tree.
[0064] Based on the user's access request, the RBI server knows that the user needs to access a specific webpage from the origin server. The RBI server obtains the DOM tree of the origin webpage and performs initial reconstruction, i.e., initial rendering, based on the obtained DOM tree. During the initial reconstruction, the DOM tree of the origin webpage is not fully loaded, so after the RBI server sends the initially reconstructed DOM tree to the user, the origin webpage accessed by the user only displays a portion of the webpage's content. This basically does not affect the display effect and allows the user to quickly access the corresponding origin webpage. Subsequently, regardless of whether there are any node changes, the origin webpage accessed by the user can be fully displayed. If node changes occur, the display is updated and fully displayed at the same time.
[0065] The subsequent process of the RBI server monitoring changes in the DOM tree of the origin webpage and updating the accessed webpage on the client side is a loop process, without having to perform an initial rendering every time a node change is detected.
[0066] The DOM tree can be used to represent the hierarchical structure of all elements in a web page document. A web page corresponds to a document, and each document can be represented by a DOM tree. A DOM tree consists of multiple nodes. Except for the root node, each node has a parent node. Nodes with parent nodes are child nodes. That is to say, a node may be both a parent node and a child node. For example, node A is the root node, nodes a1 and a2 are child nodes of node A, node b1 is a child node of node a1 (node a1 is the parent node of node b1), and nodes c1 and c2 are child nodes of node a2 (node a2 is the parent node of nodes c1 and c2).
[0067] The content of nodes in the DOM tree includes: tags (all tags are elements), attributes, text, comments, etc. Changes to nodes in the DOM tree are monitored by the RBI server. For example, if an element is a box with text content (the text is a child node of the box), and the text content changes, the RBI server will detect the node change (Mutation) and generate a change event accordingly. Sometimes there will be multiple node changes in the DOM tree at one time, and these node changes can be aggregated into a single change event for processing.
[0068] After a change event is aggregated, subsequent node changes can be aggregated into another change event, so there is a temporal relationship between the various change events:
[0069] For example, the change events are sequentially numbered according to the time order in which they are generated, thus obtaining the temporal relationship between each change event. The temporal relationship is used to indicate the order in which the user terminal reproduces the new change event.
[0070] The process of generating change events (MutationObserver events) on the RBI server has a chronological order. Change events generated earlier need to be processed by the user first. Therefore, when generating change events, they are numbered sequentially according to the time order, from smallest to largest. For example, change event 1, change event 2, change event 3, change event 4; the numbering order is the chronological relationship.
[0071] S202. Reorder the node changes in each change event and obtain the increment of the node changes to obtain a new change event, wherein the new change event includes the reordered node changes and the increment of the node changes.
[0072] When multiple nodes change in a change event, the order of the node changes is disordered. Therefore, in order to obtain the incremental value of node changes, the node changes need to be reordered according to the order in which the actual change operations of the corresponding nodes occurred. Each node change corresponds to only one node.
[0073] During reordering, the node change process can be found by reversing the order of each node, thereby obtaining the order and increment of node changes. After the node changes in the change event are reordered, they become new change events, which include the reordered node changes and the increment of node changes.
[0074] S203. Based on the aforementioned timing relationship, reproduce the new change event through the user terminal.
[0075] The new change event and the change event have the same timing relationship. Before transmission, the RBI server needs to transform the new change event. Because the transformation processing speed of each new change event is different, the process of transmitting the transformed new change event to the user is out of order. However, the user still needs to reproduce the new change event according to the timing relationship.
[0076] For example, if the timing relationship of new change events is new change event 1, new change event 2, new change event 3, and new change event 4, and the order in which they are transmitted to the user terminal is new change event 1, new change event 3, new change event 4, and new change event 2, the user terminal will not process new change event 3 even if it receives it first. It will wait until new change event 2 is received and reproduced before processing new change event 3, thus ensuring a smooth user experience.
[0077] In this embodiment, the changes in the DOM tree of the origin webpage, i.e., node changes, are monitored by the RBI server, and change events are generated for each node change. Each change event is treated as a group, and node changes in the same group are processed together. The order of node changes in each change event is relatively disordered, so the node changes in the same group can be reordered to easily find the increment of node change. A new change event is obtained, including the reordered node changes and the increment of node changes. The new change event is dynamically transmitted to the user terminal, allowing the user terminal to update the page information according to the new change event, realizing efficient transmission of origin webpage information while also ensuring security.
[0078] Figure 3 A flowchart illustrating an RBI data processing method provided in this application embodiment. Figure 2 .like Figure 3 As shown, the method includes:
[0079] S301. In each of the change events, obtain the most recent state of the node corresponding to the node change.
[0080] For each change event, when confirming the order of node changes, we can first obtain the most recent state of the node corresponding to the node change. In other words, the node change record records the state of the node after the most recent change. For example, if an element is a box with text content (the text is a child node of the box), and the text content changes to: cloudy - rainy - sunny, then sunny is the most recent state of the node corresponding to the node change.
[0081] S302. Based on the most recent state of the node corresponding to the node change, obtain the previous state of the node corresponding to the node change in reverse order until the initial state of the node corresponding to the node change is obtained.
[0082] The RBI server continuously monitors the changes to the corresponding nodes, allowing the server to retrieve the previous state of each node in reverse order. For example, if the text content changes from cloudy to rainy to sunny, the previous state of sunny was rainy, and the previous state of rainy was cloudy. The reverse order continues until the initial state of the node corresponding to the change is obtained. The initial state can be categorized into different cases: if the page has just undergone initial rendering, the initial state of the node is the state corresponding to the initial page; if the page has been updated, the initial state is the state after the most recent update.
[0083] S303. Based on the initial state of the corresponding node, confirm the order of the node changes.
[0084] By comparing the initial states of the nodes corresponding to the node changes, we can know which node changed first and which node changed last. The node changes are then reordered according to the order of change. For example, the first time: node a1 did not change, node a2 changed; the second time: node a1 changed, node a2 did not change; the third time: node a1 changed, node a2 changed. Looking back, node a2 changed first.
[0085] In this embodiment, the changes of each node in each change event are reordered in reverse order to facilitate the identification of the incremental changes of the nodes later.
[0086] The incremental method for obtaining the increment is to compare the initial state of the node with the most recent state to obtain the increment of the node change. For example, if the text content changes from cloudy to rainy to sunny, the increment is from cloudy to sunny. On the page displayed to the user, the intermediate value "rainy" is not displayed.
[0087] Figure 4 A flowchart illustrating an RBI data processing method provided in this application embodiment. Figure 3 .like Figure 4 As shown, the method includes:
[0088] S401. In each of the change events, determine whether the node corresponding to the node change is a parent node and whether there is a child node corresponding to the parent node in the node corresponding to the node change in the change event.
[0089] There are parent and child node relationships between nodes that undergo changes. For example, an element is a box containing text (the text is a child node of the box). The text content changes from cloudy to rainy to sunny. A change in the box is considered a node change, and the changed node corresponds to the box. However, the change in the node corresponding to the box does not actually record the changed content. Instead, it is reflected by its child nodes. That is, a change in the text is considered a node change, and the changed node corresponds to the text. The most recent state of the changed content is sunny.
[0090] If a node change corresponds to a parent node, then the initial state of that parent node and its order with other nodes can be determined based on the changes to its child nodes.
[0091] S402. If the node corresponding to the node change is the parent node and there is a child node corresponding to the parent node among the nodes corresponding to the node change in the change event, then the previous state of the child node is obtained in reverse order until the initial state of the child node is obtained.
[0092] If the node corresponding to the node change is the parent node, and there is a node change in the change event of the parent node that is a child node of the parent node, then the initial state order of the parent node is related to the child node. The initial state of the child node can be determined step by step by using the reverse order method, so as to determine the order of the parent node's corresponding node changes based on the initial state of the child node.
[0093] S403. If the node corresponding to the node change is not the parent node, then the previous state of the node corresponding to the node change is obtained in reverse order until the initial state of the node corresponding to the node change is obtained.
[0094] If the node corresponding to the node change is not its parent node, then the change has no child node reference. The initial state of the node corresponding to the node change is determined directly by reversing the order, so as to determine the order of the changes of the parent node's corresponding nodes.
[0095] In this embodiment of the application, the order of node changes is determined by whether there are changes to child nodes in the node changes, so as to ensure that the correct sorting of each node change is obtained.
[0096] Figure 5 A flowchart illustrating an RBI data processing method provided in this application embodiment. Figure 4 .like Figure 5 As shown, the method includes:
[0097] S501. Convert the new change event into JSON format to obtain the new change event in JSON format.
[0098] The RBI server converts new change events into JSON format. It performs the JSON conversion on the nodes corresponding to the node changes using a corresponding function. This function processing is asynchronous, so each new change event is not converted according to the original chronological order. Furthermore, the converted events are sent to the user immediately after conversion, resulting in the final converted new change events sent to the user not being arranged in the original chronological order.
[0099] S502. Transmit the new change event in JSON format to the user terminal in real time;
[0100] The user terminal is used to reproduce the new change event in JSON format after receiving the new change event in JSON format, according to the time sequence relationship.
[0101] The new change events are converted into JSON format and transmitted to the user in real time. The new change events in JSON format are not arranged according to the original time sequence, but according to the transmission order. However, the user needs to reproduce the new change events in JSON format according to the time sequence. For a specific example of the process of reproducing the new change events, please refer to the above embodiment. It will not be repeated here.
[0102] When the user receives a new change event in JSON format, they can confirm which content on the page needs to be changed and then render the corresponding content.
[0103] In this embodiment of the application, the method of converting new change events into JSON format improves the speed and security of transmission.
[0104] Figure 6 A diagram of an RBI data processing device provided in an embodiment of the present invention is shown below. Figure 6 As shown, the device includes: an acquisition module 601, a first processing module 602, and a second processing module 603;
[0105] The acquisition module 601 is used to acquire node changes of the DOM tree of the source webpage through the RBI server and generate change events, wherein each change event includes at least one node change and there is a temporal relationship between the change events.
[0106] The first processing module 602 is used to reorder the node changes in each change event and obtain the increment of the node changes to obtain a new change event, wherein the new change event includes the reordered node changes and the increment of the node changes.
[0107] The first processing module 602 is further configured to, in each change event, obtain the most recent state of the node corresponding to the node change;
[0108] Based on the most recent state of the node corresponding to the node change, the previous state of the node corresponding to the node change is obtained in reverse order until the initial state of the node corresponding to the node change is obtained.
[0109] Based on the initial state of the corresponding node change, confirm the order of the node changes.
[0110] The first processing module 602 is further configured to, in each change event, determine whether the node corresponding to the node change is a parent node and whether there is a child node corresponding to the parent node in the node corresponding to the node change in the change event.
[0111] If the node corresponding to the node change is the parent node and there is a child node corresponding to the parent node among the nodes corresponding to the node change in the change event, then the previous state of the child node is obtained in reverse order until the initial state of the child node is obtained.
[0112] If the node corresponding to the node change is not the parent node, then the previous state of the node corresponding to the node change is obtained in reverse order until the initial state of the node corresponding to the node change is obtained.
[0113] The second processing module 603 is used to reproduce the new change event through the user terminal according to the time sequence relationship.
[0114] This application also provides an RBI data processing device, comprising: at least one processor and a memory;
[0115] The memory stores computer-executed instructions;
[0116] The at least one processor executes computer execution instructions stored in the memory, causing the at least one processor to perform an RBI data processing method.
[0117] Figure 7 This is a hardware schematic diagram of an RBI data processing device provided in an embodiment of the present invention. Figure 7 As shown, the RBI data processing device 70 provided in this embodiment includes at least one processor 701 and a memory 702. The device 70 also includes a communication component 703. The processor 701, memory 702, and communication component 703 are connected via a bus 704.
[0118] In the specific implementation process, at least one processor 701 executes the computer execution instructions stored in the memory 702, causing at least one processor 701 to execute the RBI data processing method described above.
[0119] The specific implementation process of processor 701 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.
[0120] In the above Figure 7In the illustrated embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.
[0121] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.
[0122] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.
[0123] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the RBI data processing method described above.
[0124] The aforementioned computer-readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.
[0125] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.
[0126] The division of units described herein is merely a logical functional division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.
[0127] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0128] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0129] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.
Claims
1. An RBI data processing method, characterized in that, include: The RBI server obtains node changes in the DOM tree of the source website and generates change events. Each change event includes at least one node change, and there is a temporal relationship between the change events. The node changes in each change event are reordered, and the increment of the node changes is obtained to obtain a new change event, wherein the new change event includes the reordered node changes and the increment of the node changes; Based on the aforementioned timing relationship, the new change event is reproduced via the user terminal; The step of reordering the node changes in each of the change events includes: In each of the change events, obtain the most recent state of the node corresponding to the change; Based on the most recent state of the node corresponding to the node change, the previous state of the node corresponding to the node change is obtained in reverse order until the initial state of the node corresponding to the node change is obtained. Based on the initial state of the corresponding node change, confirm the order of the node changes.
2. The method according to claim 1, characterized in that, The step of obtaining the previous state of the node corresponding to the node change in reverse order until the initial state of the node corresponding to the node change is obtained includes: In each of the change events, it is determined whether the node corresponding to the node change is a parent node and whether there is a child node corresponding to the parent node in the node corresponding to the node change in the change event; If the node corresponding to the node change is the parent node and there is a child node corresponding to the parent node among the nodes corresponding to the node change in the change event, then the previous state of the child node is obtained in reverse order until the initial state of the child node is obtained. If the node corresponding to the node change is not the parent node, then the previous state of the node corresponding to the node change is obtained in reverse order until the initial state of the node corresponding to the node change is obtained.
3. The method according to claim 1, characterized in that, When generating the change event, the method further includes: Based on the time sequence in which the change events were generated, the change events are sequentially numbered to obtain the temporal relationship between each change event, wherein the temporal relationship is used to indicate the order in which the user terminal reproduces the new change event.
4. The method according to claim 1, characterized in that, Before obtaining the node changes of the DOM tree of the source webpage through the RBI server, the method further includes: Access the origin server via RBI server and obtain the DOM tree of the origin server's web pages; The DOM tree of the real-time origin webpage is initially reconstructed through the RBI server to obtain the initially reconstructed DOM tree, and the initially reconstructed DOM tree is sent to the user terminal. The user terminal is used to access the initial webpage of the source site after receiving the initially reconstructed DOM tree.
5. The method according to claim 1, wherein After obtaining the new change event, the method further includes: Convert the new change event into JSON format to obtain the new change event in JSON format; The new change event in JSON format is transmitted to the user terminal in real time; The user terminal is used to reproduce the new change event in JSON format after receiving the new change event in JSON format, according to the time sequence relationship.
6. An RBI data processing device, characterized in that, include: The acquisition module is used to acquire node changes of the DOM tree of the source webpage through the RBI server and generate change events, wherein each change event includes at least one node change and there is a temporal relationship between the change events; The first processing module is used to reorder the node changes in each change event and obtain the increment of the node changes to obtain a new change event, wherein the new change event includes the reordered node changes and the increment of the node changes; The second processing module is used to reproduce the new change event through the user terminal according to the time sequence relationship; The first processing module is specifically used for: In each of the change events, obtain the most recent state of the node corresponding to the change; Based on the most recent state of the node corresponding to the node change, the previous state of the node corresponding to the node change is obtained in reverse order until the initial state of the node corresponding to the node change is obtained. Based on the initial state of the corresponding node change, confirm the order of the node changes.
7. An RBI data processing device, characterized in that, include: At least one processor and memory; The memory stores computer-executable instructions; The at least one processor executes computer execution instructions stored in the memory, causing the at least one processor to perform the RBI data processing method as described in any one of claims 1-5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the steps of the RBI data processing method as described in any one of claims 1-5.
Citation Information
Patent Citations
Method and device for detecting webpage changes
CN104199915A
Web-based incremental computing
US8572477B1