Data processing method, apparatus, device, medium, and program product
By using the message sending and receiving subscription module in a single-page web application, the problem of information synchronization across multiple windows is solved by comparing and sending data based on subscribed information. This enables partial refresh, reduces page lag, and improves the user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA CONSTRUCTION BANK
- Filing Date
- 2023-01-04
- Publication Date
- 2026-07-10
AI Technical Summary
In single-page web applications, when operating multiple windows, the information between windows cannot be synchronized, causing page lag and affecting user experience.
When the information sending and receiving subscription module detects an update to the data in the second window, it obtains the updated data information, compares it with the pre-set subscription information, determines the target subscription object, and sends data information to it to achieve partial refresh.
It enables multi-window data synchronization, reduces the risk of page lag, and improves user experience.
Smart Images

Figure CN116304411B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of Internet technology, and in particular relates to a data processing method, apparatus, device, computer storage medium, and computer program product. Background Technology
[0002] In single-page web applications (SPAs), users are typically restricted to operating within a single browser window. Actions such as navigating, navigating, and refreshing remain within the existing window and do not open new browser windows. This is because each new browser window initializes a new process, and the page's code and information reside in a separate system space allocated to that process. New and original windows cannot directly share or synchronize data. Even if both access the same page address, their data is not synchronized. Common JavaScript (JS) frameworks for developing SPAs, such as Vue, React, and Angular, only provide methods for sharing information between pages within a single window; they do not provide methods for synchronizing information between windows.
[0003] However, in certain application scenarios, the lack of synchronization between windows can cause numerous inconveniences. For example, in some specific business systems, users need to open multiple new windows from the main page and perform multi-window operations side-by-side to facilitate information comparison and improve work efficiency. When the information data in multiple windows cannot be synchronized, it may affect the user's work efficiency.
[0004] In related technologies, the handle of the original window is often obtained in a new window through methods provided by the browser. The new window can then use this handle to refresh the original window entirely. However, this method can only refresh the original window, which may cause page lag and other problems, resulting in a poor user experience. Summary of the Invention
[0005] This application provides a data processing method, apparatus, device, computer storage medium, and computer program product that can reduce the risk of page lag while achieving multi-window data synchronization.
[0006] In a first aspect, embodiments of this application provide a data processing method applied to an information sending and receiving / subscribing module in a first window, including:
[0007] If a data update is detected in the second window, the first data information sent by the second window is obtained, and the first data information includes the updated data of the second window.
[0008] The first data information is compared with the subscription data information of each of the multiple pre-set subscription information to determine the target subscription information. The subscription information includes subscription data information and the identification information of the subscription object. The subscription object includes subscription components and / or subscription pages.
[0009] The target subscription object is determined based on the identification information of the subscription object in the target subscription information;
[0010] Send first data information to the target subscriber so that the target subscriber can update its data based on the first data information.
[0011] In an optional implementation, before comparing the first data information with the subscription data information of each of a plurality of pre-set subscription information, the method further includes:
[0012] Receive subscription requests sent by components and / or pages in the first window. The subscription requests include target subscription data information and identification information of the components and / or pages.
[0013] Record the identification information of components and / or pages into the subscription information corresponding to the target subscription data information.
[0014] In one optional implementation, sending first data information to the target subscriber for the target subscriber to update data based on the first data information includes:
[0015] Based on the subscription data information in the target subscription information, the first data information is filtered to obtain the filtered first data information;
[0016] Send the filtered first data information to the target subscriber so that the target subscriber can update the data based on the filtered first data information.
[0017] In one alternative implementation, the method further includes:
[0018] If the data in the first window is updated, the second data information is sent to the information sending and receiving / subscribing module in the second window. The second data information includes the updated data in the first window.
[0019] Secondly, embodiments of this application provide a data processing apparatus applied to an information sending and receiving / subscribing module in a first window, comprising:
[0020] The acquisition module is used to acquire first data information sent by the second window when a data update is detected in the second window. The first data information includes the updated data of the second window.
[0021] The comparison module is used to compare the first data information with the subscription data information of each of the multiple pre-set subscription information to determine the target subscription information. The subscription information includes subscription data information and identification information of the subscription object. The subscription object includes subscription components and / or subscription pages.
[0022] The determination module is used to determine the target subscription object based on the identification information of the subscription object in the target subscription information;
[0023] The sending module is used to send first data information to the target subscription object so that the target subscription object can update its data based on the first data information.
[0024] In one alternative embodiment, the apparatus further includes:
[0025] The receiving module is used to receive subscription requests sent by components and / or pages in the first window. The subscription request includes target subscription data information and identification information of the component and / or page.
[0026] The recording module is used to record the identification information of components and / or pages into the subscription information corresponding to the target subscription data information.
[0027] In one optional implementation, the sending module is configured to send first data information to the target subscription object, so that the target subscription object can update its data based on the first data information, including:
[0028] The filtering module is used to filter the first data information based on the subscription data information in the target subscription information to obtain the filtered first data information.
[0029] The sending module is used to send the filtered first data information to the target subscriber, so that the target subscriber can update the data based on the filtered first data information.
[0030] Thirdly, embodiments of this application provide an electronic device, the device including: a processor and a memory storing computer program instructions;
[0031] When the processor executes computer program instructions, it implements a data processing method as described in any optional embodiment of the first aspect of this application.
[0032] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer program instructions, which, when executed by a processor, implement a data processing method as described in any optional embodiment of the first aspect of this application.
[0033] Fifthly, embodiments of this application provide a computer program product in which instructions, when executed by a processor of an electronic device, cause the electronic device to perform a data processing method as described in any optional embodiment of the first aspect of this application.
[0034] The data processing method, apparatus, device, computer storage medium, and computer program product of this application embodiment can, when a second window experiences a data update, acquire first data information including the updated data of the second window, then determine target subscription information related to the first data information from pre-set subscription information, and then determine the target subscription object based on the subscription object identifier in the target subscription information. In this way, components and / or pages related to the data update of the second window in the first window can be determined based on the subscription information. Then, the first data information is sent to the target subscription object so that the target subscription object can update its data according to the first data information. This allows for partial refreshing of the first window on a component-by-component basis based on the updated data information of the second window. Thus, while achieving data synchronization between windows, the risk of page lag is reduced, thereby improving the user experience. Attached Figure Description
[0035] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0036] Figure 1 This is a schematic flowchart of a data processing method provided in one embodiment of this application;
[0037] Figure 2 This is a schematic diagram of a window structure provided in another embodiment of this application;
[0038] Figure 3 This is a schematic diagram of the structure of a data processing apparatus provided in another embodiment of this application;
[0039] Figure 4 This is a schematic diagram of the structure of a data processing device provided in another embodiment of this application. Detailed Implementation
[0040] The features and exemplary embodiments of various aspects of this application will be described in detail below. To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain this application and not to limit it. For those skilled in the art, this application can be implemented without some of these specific details. The following description of the embodiments is merely to provide a better understanding of this application by illustrating examples.
[0041] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes said element.
[0042] The acquisition, storage, use, and processing of data in this application all comply with the relevant provisions of national laws and regulations.
[0043] To facilitate understanding, the following explanations will first address some of the terms used in this application specification.
[0044] Single-page web applications (SPAs) consist of only one HTML file. When switching to another page, the path changes, but no new requests are sent to the backend. The principle is that the browser initially loads the necessary HTML, CSS, and JavaScript, and all subsequent operations are performed on this single page, all controlled by JavaScript. Therefore, SPAs contain a large amount of JavaScript code. Compared to multi-page web applications, SPAs do not send requests to the backend when switching pages, resulting in faster page response times, but the amount of JavaScript code and the complexity of the processing logic are greater. Common SPA development frameworks include Vue, React, and Angular.
[0045] Browser: A browser is an application used to retrieve, display, and deliver web information resources. Web information resources are identified by Uniform Resource Identifiers (URIs), and can be a webpage, an image, a video, or any content presented on the web. Users can use hyperlinks to browse interconnected information through their browsers.
[0046] JavaScript (JS): JS is a lightweight, interpreted or just-in-time (JIT) programming language that prioritizes functions. It primarily runs in a browser environment and is used as a scripting language for developing web pages. It can also be used in many non-browser environments.
[0047] Components: In JavaScript frameworks such as Vue and React, components are the main building blocks of a webpage. A component is a simple encapsulation of data and methods; it is an interface with independent logic and functionality, while also being able to integrate with each other according to defined interface rules, ultimately forming a complete application. Components can be freely combined to form a fully functional interface. When a component is no longer needed or needs to be replaced, it can be replaced or deleted at any time without affecting the operation of the entire application.
[0048] Publish-Subscribe Pattern: The publish-subscribe pattern can be used to represent a one-to-many dependency relationship between objects. When the state of one object changes, all objects that depend on it will be notified of the state change. Subscribers register the events they want to subscribe to with a scheduling center. When a publisher publishes the event to the scheduling center, that is, when the event is triggered, the scheduling center uniformly schedules the processing code registered by the subscribers.
[0049] In single-page web applications (SPAs), users are typically restricted to operating within a single browser window. Actions such as navigating, navigating, and refreshing remain within the existing window and do not open new browser windows. This is because each new browser window initializes a new process, and the page's code and information reside in a separate system space allocated to that process. New and original windows cannot directly share or synchronize data. Even if both access the same page address, their data is not synchronized. Common JavaScript frameworks for developing SPAs, such as Vue, React, and Angular, only provide methods for sharing information between pages within a single window; they do not provide methods for synchronizing information between windows.
[0050] However, in certain application scenarios, the lack of synchronization between windows can cause numerous inconveniences. For example, in some specific business systems, users need to open multiple new windows from the main page and perform multi-window operations in parallel to facilitate information comparison and improve work efficiency. When the information data in multiple windows cannot be synchronized, it may affect the user's work efficiency. For instance, a user views a list of to-do items in the main window (Window A), where all displayed items are in the "Pending" state. Then, the user clicks on two items in the list (assuming their IDs are 1111 and 1112), opening two new windows (Window B and Window C) from the main window to view these two records. The user performs an operation on item 1111 in Window B, and after the operation is completed, Window B displays that item 1111's status has changed to "Completed." However, because the status change of item 1111 cannot be synchronized, item 1111 still appears in the to-do list in Window A, and its status is "Pending." This may lead the user to mistakenly believe that item 1111 has not been processed and repeatedly click on it, thus affecting the user's work efficiency and reducing the user experience.
[0051] In related technologies, the handle of the original window is often obtained in a new window through methods provided by the browser. The new window can then use this handle to refresh the original window entirely. However, this method can only refresh the original window, which may cause page lag and other problems, resulting in a poor user experience.
[0052] In light of this, the inventors, through in-depth consideration, ingeniously designed a data processing method, apparatus, device, computer storage medium, and computer program product. This data processing method can reduce the risk of page lag while achieving multi-window data synchronization.
[0053] The data processing method provided in this application embodiment will be described below with reference to the accompanying drawings and through specific embodiments and application scenarios. The data processing method provided in this application embodiment can be executed by a data processing device, or a portion of the data processing device used to execute the data processing method. This application embodiment uses the execution of a data processing method by a data processing device as an example to describe the data processing method provided in this application embodiment in detail.
[0054] The data processing method provided in the embodiments of this application will be described in detail below with reference to the accompanying drawings.
[0055] Figure 1 A flowchart illustrating a data processing method provided in one embodiment of this application is shown. Figure 1 As shown, the data processing method can be applied to the information sending and receiving subscription module in the first window. The method can specifically include the following steps S110 to S140.
[0056] S110, when a data update is detected in the second window, the first data information sent by the second window is obtained, the first data information including the updated data of the second window.
[0057] In step S110, the second window can be any one or more other windows besides the first window in a single-page web application. The second window can be a window of the same level as the first window; for example, both the first and second windows can be main windows or both child windows. The second window can also be a window of a different level than the first window; for example, one of the first and second windows can be the main window, and the other can be a child window. In the first data information, the updated data for the second window can include all the data contained in the window after the update, or it can only include the data that caused the second window to update. For example, if component 1 in the second window updates its data, after the second window is refreshed, the second window can send all the data it contains to the first window, or it can only send the data contained in component 1 to the first window.
[0058] S120, compare the first data information with the subscription data information of each of the multiple pre-set subscription information to determine the target subscription information. The subscription information includes subscription data information and identification information of the subscription object. The subscription object includes subscription components and / or subscription pages.
[0059] In step S120, the subscription data information may include pre-determined data information associated with the subscription object. In one embodiment, the subscription data information may include, but is not limited to, data type (e.g., data structure type) and data content (e.g., pre-defined data content tags). As an example, when the first data information contains data 'a', the first data information can be compared with the subscription data information of the subscription information. When the subscription data information is associated with data 'a', for example, when the subscription data information includes data 'a', or when a calculation result is determined based on data 'a', the subscription information can be determined as the target subscription information.
[0060] S130, determine the target subscription object based on the identification information of the subscription object in the target subscription information.
[0061] S140, send first data information to the target subscription object so that the target subscription object can update the data according to the first data information.
[0062] In step S140, the target subscription object updates its data based on the first data information. This may include the target subscription object performing corresponding logical processing based on the first data information to update its own data information and displaying the corresponding page. As an example, when the target subscription object is a subscription component, the first window may only refresh the target subscription component, thus achieving a partial refresh of the component hierarchy. As another example, when the target subscription object is a subscription page, the first window may only refresh the target subscription page, thus achieving a partial refresh of the page hierarchy.
[0063] The data processing method provided in this application embodiment can, when a second window experiences a data update, acquire first data information including the updated data of the second window, then determine target subscription information related to the first data information from pre-set subscription information, and finally determine the target subscription object based on the subscription object identifier in the target subscription information. In this way, components and / or pages in the first window related to the data update of the second window can be determined based on the subscription information. Then, the first data information is sent to the target subscription object so that the target subscription object can update its data accordingly. This allows for partial refreshing of the first window on a component-by-component basis based on the updated data information of the second window. Thus, while achieving data synchronization between windows, the risk of page lag is reduced, thereby improving the user experience.
[0064] In one embodiment, before comparing the first data information with the subscription data information of each of a plurality of pre-set subscription information, the method may further include:
[0065] Receive subscription requests sent by components and / or pages in the first window. The subscription requests include target subscription data information and identification information of the components and / or pages.
[0066] Record the identification information of components and / or pages into the subscription information corresponding to the target subscription data information.
[0067] This embodiment can be implemented using a publish-subscribe pattern at the window layer. A component or page can subscribe to multiple target data information. By receiving subscription requests sent by components and / or pages within the window and configuring corresponding subscription information for those requests, components and / or pages can be used as the smallest unit for information sending and receiving within the window. This allows for partial page updates or updates of a single page as data changes. This enables partial window refreshes, thereby reducing the risk of page lag and improving user experience while maintaining multi-window data synchronization.
[0068] In one embodiment, sending first data information to the target subscription object for the target subscription object to update its data based on the first data information may specifically include:
[0069] Based on the subscription data information in the target subscription information, the first data information is filtered to obtain the filtered first data information.
[0070] Send the filtered first data information to the target subscriber so that the target subscriber can update the data based on the filtered first data information.
[0071] As an example, the first data information may include data information of various data types and / or data content. Based on the first data information, multiple target subscription information can be identified. Then, for each target subscription information, the first data information can be filtered to select the data information corresponding to the subscription data information in the target subscription information, which is then used as the filtered first data information corresponding to that target subscription information. In one embodiment, the first data information may also include sender identification information, and the subscription data information may also include sender identification information. Thus, the first data information can be filtered based on the sender identification information.
[0072] In this embodiment, the first data information is filtered before being sent to the target subscriber. This reduces the amount of data sent to the target subscriber. This not only reduces the communication load between the information sending and receiving subscription module and the target subscriber, but also reduces the data processing load on the target subscriber, thereby further reducing the risk of page lag and improving the user experience.
[0073] In one embodiment, the method may further include:
[0074] If the data in the first window is updated, the second data information is sent to the information sending and receiving / subscribing module in the second window. The second data information includes the updated data in the first window.
[0075] In this embodiment, the second data information has a similar meaning to the first data information, and will not be elaborated here.
[0076] It should be noted that the data sent and received in this application supports flexible and customizable data structures. This not only allows for the carrying of rich information but also enables the differentiation of different senders through custom fields. The receiving window can execute different methods based on different data types, achieving precise local changes and avoiding overall page refreshes. This application allows for independent encapsulation of the entire solution, outputting it as a plugin in a single file. When using it, the code project can be easily and universally imported; a single import makes it usable across all components. After the plugin is imported, it can be tightly integrated with various page components by merging with the original methods and data of the components. This allows for the reuse of common methods provided by the plugin across different components, as well as seamless access to the components' own methods and data, enabling components to flexibly and conveniently perform various processing tasks after receiving data.
[0077] To better describe the overall solution, a specific example is provided based on the above embodiments to explain the data processing method of this application in detail. It should be noted that the following example is only for explaining this application and not for limiting it.
[0078] Figure 2 This diagram illustrates the structure of a single window in a data processing method according to an embodiment of this application. Figure 2 As shown, a window can consist of at least one page, and each page consists of at least one component. An information sending and receiving subscription module is set up within the window. The information sending and receiving subscription module can communicate between windows based on a common interface—a data sending interface and a data receiving interface. Taking windows A and B as examples, window A can include pages A1 and A2. Page A1 consists of components A1-1, A1-2, and A1-3. Each component can send a subscription request and its own data to the information sending and receiving subscription module A, and receive data sent by the information sending and receiving subscription module A. Window B can include pages B1 and B2. Page B1 consists of components B1-1 and B1-2. Each component can send a subscription request and its own data to the information sending and receiving subscription module B, and receive data sent by the information sending and receiving module B.
[0079] As an example, when component B1-1 in window B updates its data, it can send its own data to the message sending and receiving subscription module B.
[0080] The information sending and receiving module B can obtain first data information based on the data sent by component B1-1. This first data information can be the data sent by component B1-1, or it can be the data information generated after the information sending and receiving module B internally processes the data sent by component B1-1.
[0081] Then, message sending and receiving subscription module B can send the first data information to message sending and receiving subscription module A in window A.
[0082] The information sending and receiving subscription module A can compare the first data information with the subscription data information of each of the multiple pre-set subscription information to determine the target subscription information.
[0083] After determining the target subscription information, the information sending and receiving subscription module A can identify the target subscription object based on the identification information of the subscription object in the target subscription information.
[0084] Subsequently, the information sending and receiving subscription module A can send first data information to the target subscription object so that the target subscription object can update its data based on the first data information.
[0085] For example, when the target subscription objects associated with the first data information are components A1-1 and A1-2, the information sending and receiving subscription module A can publish the first data information to components A1-1 and A1-2. Components A1-1 and A1-2 receive the first data information and can perform corresponding logical processing and page display based on the first data information, thereby completing the synchronization of data information between window A and window B in a partial refresh manner.
[0086] Based on the same inventive concept, this application also provides a data processing device 200, which can be applied to the information sending and receiving subscription module in the first window.
[0087] like Figure 3 As shown, the data processing device 200 may include an acquisition module 201, a comparison module 202, a determination module 203, and a sending module 204.
[0088] The acquisition module 201 is used to acquire first data information sent by the second window when a data update is detected in the second window. The first data information includes the updated data of the second window.
[0089] The comparison module 202 is used to compare the first data information with the subscription data information of each of the multiple pre-set subscription information to determine the target subscription information. The subscription information includes subscription data information and identification information of the subscription object. The subscription object includes subscription components and / or subscription pages.
[0090] The determination module 203 is used to determine the target subscription object based on the identification information of the subscription object in the target subscription information.
[0091] The sending module 204 is used to send first data information to the target subscription object so that the target subscription object can update its data based on the first data information.
[0092] The data processing apparatus provided in this application embodiment can acquire first data information including the updated data of the second window when the second window is updated, then determine target subscription information related to the first data information from pre-set subscription information, and then determine the target subscription object based on the subscription object identifier in the target subscription information. In this way, components and / or pages related to the data update of the second window in the first window can be determined based on the subscription information. Then, the first data information is sent to the target subscription object so that the target subscription object can update its data according to the first data information. This allows for partial refreshing of the first window on a component-by-component basis based on the updated data information of the second window. Thus, while achieving data synchronization between windows, the risk of page lag is reduced, thereby improving the user experience.
[0093] In one embodiment, the apparatus may further include:
[0094] The receiving module is used to receive subscription requests sent by components and / or pages in the first window. The subscription request includes target subscription data information and identification information of the component and / or page.
[0095] The recording module is used to record the identification information of components and / or pages into the subscription information corresponding to the target subscription data information.
[0096] In one embodiment, the sending module is used to send first data information to the target subscription object, so that the target subscription object can update its data according to the first data information, which may specifically include:
[0097] The filtering module is used to filter the first data information based on the subscription data information in the target subscription information to obtain the filtered first data information.
[0098] The sending module is used to send the filtered first data information to the target subscriber, so that the target subscriber can update the data according to the filtered first data information.
[0099] In one embodiment, the sending module can also be used to send second data information to the information sending and receiving subscription module in the second window when the data in the first window is updated. The second data information includes the data updated in the first window.
[0100] The data processing device provided in this application embodiment can achieve... Figure 1 The various processes implemented in the method implementation examples will not be described again here to avoid repetition.
[0101] Figure 4 A schematic diagram of the hardware structure of the data processing device provided in an embodiment of this application is shown.
[0102] The data processing device may include a processor 301 and a memory 302 storing computer program instructions.
[0103] Specifically, the processor 301 may include a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.
[0104] Memory 302 may include mass storage for data or instructions. For example, and not limitingly, memory 302 may include a hard disk drive (HDD), floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 302 may include removable or non-removable (or fixed) media. Where appropriate, memory 302 may be internal or external to the integrated gateway disaster recovery device. In a particular embodiment, memory 302 is non-volatile solid-state memory.
[0105] Memory may include read-only memory (ROM), random access memory (RAM), disk storage media devices, optical storage media devices, flash memory devices, and electrical, optical, or other physical / tangible memory storage devices. Therefore, typically, memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the methods according to one aspect of this disclosure.
[0106] The processor 301 implements any of the data processing methods described in the above embodiments by reading and executing computer program instructions stored in the memory 302.
[0107] In one example, the data processing device may further include a communication interface 303 and a bus 310. Wherein, as... Figure 4 As shown, the processor 301, memory 302, and communication interface 303 are connected through bus 310 and complete communication with each other.
[0108] The communication interface 303 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of this application.
[0109] Bus 310 includes hardware, software, or both, that couples components of an online data traffic metering device together. For example, and not limitingly, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Microchannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, bus 310 may include one or more buses. Although specific buses are described and illustrated in embodiments of this application, any suitable bus or interconnect is contemplated herein.
[0110] The data processing device can execute the data processing method described in the embodiments of this application, thereby achieving the combination Figure 1 and Figure 3 The data processing methods and apparatus described.
[0111] Furthermore, in conjunction with the data processing methods in the above embodiments, this application embodiment can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when these computer program instructions are executed by a processor, they implement any of the data processing methods in the above embodiments.
[0112] It should be clarified that this application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of this application is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this application.
[0113] The functional blocks shown in the above-described structural diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. Programs or code segments can be stored on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried on a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.
[0114] It should also be noted that the exemplary embodiments mentioned in this application describe methods or systems based on a series of steps or apparatus. However, this application is not limited to the order of the above steps; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.
[0115] The aspects of this disclosure have been described above with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block in the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that these instructions, executable via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions / actions specified in one or more blocks of the flowchart illustrations and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It is also understood that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by special-purpose hardware performing the specified functions or actions, or can be implemented by a combination of special-purpose hardware and computer instructions.
[0116] The above description is merely a specific implementation of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the protection scope of this application.
Claims
1. A data processing method, characterized in that, The information sending, receiving, and subscription modules applied to the first window include: When a data update is detected in the second window, the system receives first data information sent by the information sending and receiving module of the second window. The first data information includes the updated data of the second window and includes the data type. The second window and the first window are independent browser processes. The first data information is compared with the subscription data information of each of the multiple subscription information settings to determine the target subscription information. The subscription information includes subscription data information and identification information of the subscription object. The subscription object includes the subscription component and / or subscription page in the first window. The target subscription object is determined based on the identification information of the subscription object in the target subscription information; The first data information is sent to the target subscription object so that the target subscription object can update its data according to the first data information, thereby realizing partial refresh of the component level and / or page level. The data update according to the first data information includes: executing different methods according to different data types.
2. The method according to claim 1, characterized in that, Before comparing the first data information with the subscription data information of each of the pre-set multiple subscription information, the method further includes: Receive subscription requests sent by components and / or pages in the first window, the subscription requests including target subscription data information and identification information of the components and / or pages; The identification information of the components and / or pages is recorded in the subscription information corresponding to the target subscription data information.
3. The method according to claim 1, characterized in that, Sending the first data information to the target subscriber for the target subscriber to update its data based on the first data information includes: Based on the subscription data information in the target subscription information, the first data information is filtered to obtain the filtered first data information; The filtered first data information is sent to the target subscriber so that the target subscriber can update its data based on the filtered first data information.
4. The method according to claim 1, characterized in that, The method further includes: When data is updated in the first window, second data information is sent to the information sending and receiving / subscribing module in the second window. The second data information includes the updated data in the first window.
5. A data processing apparatus, characterized in that, The information sending, receiving, and subscription modules applied to the first window include: The acquisition module is used to receive first data information sent by the information sending and receiving module of the second window when a data update is detected in the second window. The first data information includes the updated data of the second window and includes the data type. The second window and the first window are independent browser processes. The comparison module is used to compare the first data information with the subscription data information of each of the multiple pre-set subscription information to determine the target subscription information. The subscription information includes subscription data information and identification information of the subscription object. The subscription object includes the subscription component and / or subscription page in the first window. The determination module is used to determine the target subscription object based on the identification information of the subscription object in the target subscription information; The sending module is used to send the first data information to the target subscription object so that the target subscription object can update its data according to the first data information, thereby realizing partial refresh of the component level and / or page level. The data update according to the first data information includes: executing different methods according to different data types.
6. The apparatus according to claim 5, characterized in that, The device further includes: A receiving module is configured to receive a subscription request sent by a component and / or page in the first window, wherein the subscription request includes target subscription data information and identification information of the component and / or page; The recording module is used to record the identification information of the components and / or pages into the subscription information corresponding to the target subscription data information.
7. The apparatus according to claim 5, characterized in that, The sending module is configured to send the first data information to the target subscription object, so that the target subscription object can update its data based on the first data information, including: The filtering module is used to filter the first data information based on the subscription data information in the target subscription information to obtain the filtered first data information. The sending module is used to send the filtered first data information to the target subscription object so that the target subscription object can update its data based on the filtered first data information.
8. An electronic device, characterized in that, The device includes: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, it implements the data processing method as described in any one of claims 1-4.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program instructions that, when executed by a processor, implement the data processing method as described in any one of claims 1-4.
10. A computer program product, characterized in that, When the instructions in the computer program product are executed by the processor of the electronic device, the electronic device performs the data processing method as described in any one of claims 1-4.