Cross-domain data processing method, device, equipment and storage medium
By using the message transmission interface and intermediate mapping components in cross-domain operations, a communication connection between the first domain name page and the second domain name page is established, and data status monitoring and management is carried out, the problems of large occupancy, poor stability and low security of cross-domain operation resources in the prior art are solved, and efficient and secure cross-domain data processing is achieved.
Patent Information
- Application Number
- CN202110643362.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-09
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2041-06-09
AI Technical Summary
When operating across the domain, the prior art occupies a large amount of network resources, the information interaction is unstable, the implementation method is cumbersome, and there are security risks, resulting in low security of data transmission.
By obtaining the page data of the first domain name page and sending it to the first intermediate mapping component through the message transmission interface, the component includes a preset pop-up window with the same origin as the second domain name, which is used to establish a communication connection between the first domain name page and the second domain name page, and processing the page data through the component to obtain the second domain name page, and finally monitoring and management of the data status of the two pages.
There is no need to generate unnecessary data interaction and configuration operations with the server, which saves server network resources, simplifies the difficulty of server operation and maintenance, realizes automation of cross-domain operations, improves web page performance, and improves the security of data state synchronization.
Smart Images

Figure CN113282856B_ABST
Abstract
Description
Technical Field
[0001] The present invention generally relates to the field of Internet technology, and specifically relates to a cross-domain data processing method, device, equipment and storage medium. Background Art
[0002] A domain name is a name of a computer or computer group on the Internet, which is composed of a series of names separated by dots. It is used to identify the electronic location of the computer during data transmission. Each website corresponds to a unique domain name. Switching between different websites is called cross-domain jump. For example, clicking a link from one website to another in a browser is a cross-domain jump of the page. However, due to the security restrictions of the browser, direct communication between pages across domain names is not allowed. Therefore, the study of cross-domain operations of pages is particularly important.
[0003] At present, in the related technology, when performing cross-domain operations, network communication with the server can be carried out by establishing a long connection or real-time network communication technology such as websocket, so as to realize cross-domain data transmission and synchronization of data information. However, this method will take up a lot of network resources, making information interaction unstable. At the same time, it requires operations such as server proxy configuration. Its implementation method is relatively cumbersome, resulting in incomplete cross-domain operation. In addition, in the process of information transmission through the network, user sensitive information including cookies needs to be transmitted, which poses a security risk and leads to low data transmission security. Summary of the invention
[0004] In view of the above-mentioned defects or deficiencies in the prior art, it is desirable to provide a cross-domain data processing method, apparatus, device and storage medium.
[0005] In a first aspect, the present application provides a cross-domain data processing method, the method comprising:
[0006] Obtain page data of the first domain name page;
[0007] Sending the page data to a first intermediate mapping component through a message transmission interface, wherein the first intermediate mapping component includes a preset pop-up window having the same origin as the second domain name, and the pop-up window is used to establish a communication connection between the first domain name page and the second domain name page;
[0008] Processing the page data through the first intermediate mapping component to obtain a second domain name page;
[0009] Monitor and manage the data status of the first domain name page and the second domain name page.
[0010] In one embodiment, the first intermediate mapping component includes a receiver and a filter, and the page data is processed by the first intermediate mapping component to obtain a second domain name page, including:
[0011] receiving the page data by the receiver;
[0012] According to a preset data filtering rule, the filter is used to process the page data to determine whether there is information to be synchronized of the first domain name page and the second domain name page in the page data;
[0013] When the information to be synchronized exists, the second domain name page is generated based on the information to be synchronized.
[0014] In one embodiment, the first intermediate mapping component further includes a cache, and generating the second domain name page based on the information to be synchronized includes:
[0015] storing the information to be synchronized in the buffer;
[0016] The information to be synchronized in the cache is rendered to generate the second domain name page.
[0017] In one embodiment, after determining whether there is information to be synchronized of the first domain name page and the second domain name page in the page data, the method further includes:
[0018] When the information to be synchronized does not exist in the page data, the page data is stored in a database corresponding to the first domain name page.
[0019] In one embodiment, monitoring and managing the data status of the first domain name page and the second domain name page includes:
[0020] Acquire the data status of the first domain name page and the second domain name page through the first intermediate mapping component;
[0021] A first status monitoring management component and a second status monitoring management component are respectively used to monitor and manage the data status. The first status monitoring management component is the monitoring component corresponding to the first domain name page, and the second status monitoring management component is the monitoring component corresponding to the second domain name page.
[0022] In one embodiment, the method further comprises:
[0023] Receiving a modification operation instruction for the second domain name page, wherein the modification operation instruction carries modification operation data;
[0024] Sending the modification operation data to a second intermediate mapping component through the message transmission interface, wherein the second intermediate mapping component includes a preset pop-up window having the same origin as the first domain name;
[0025] The modification operation data is processed by the second intermediate mapping component so that the first domain name page synchronously saves the modification operation data.
[0026] In one embodiment, processing the modification operation data by the second intermediate mapping component so that the first domain name page synchronously saves the modification operation data includes:
[0027] Acquire a modification data identifier and a modification behavior corresponding to the modification identifier from the modification operation data through the second intermediate mapping component;
[0028] When it is determined that the modification identifier exists in the first domain name page, the modification behavior corresponding to the modification identifier is synchronously saved in the database corresponding to the first domain name page.
[0029] In a second aspect, the present application provides a cross-domain data processing device, the device comprising:
[0030] An acquisition module, used to acquire page data of a first domain name page;
[0031] A sending module, used to send the page data to a first intermediate mapping component through a message transmission interface, wherein the first intermediate mapping component includes a preset pop-up window of the same origin as the second domain name, and the pop-up window is used to establish a communication connection between the first domain name page and the second domain name page;
[0032] A processing module, configured to process the page data through the first intermediate mapping component to obtain a second domain name page;
[0033] A management module is used to monitor and manage the data status of the first domain name page and the second domain name page.
[0034] In a third aspect, an embodiment of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method of the first aspect when executing the program.
[0035] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program is used to implement the method described in the first aspect.
[0036] The cross-domain data processing method, device, equipment and storage medium provided in the embodiment of the present application obtains the page data of the first domain name page, and sends the page data to the first intermediate mapping component through the message transmission interface. The first intermediate mapping component includes a preset pop-up window with the same origin as the second domain name, and the pop-up window is used to establish a communication connection between the first domain name page and the second domain name page, and processes the page data through the first intermediate mapping component to obtain the second domain name page, and then monitors and manages the data status of the first domain name page and the second domain name page. Compared with the prior art, this solution does not need to generate unnecessary data interaction and configuration operations with the server, saves server network resources, simplifies the difficulty of server operation and maintenance, and automatically implements cross-domain operations of the first domain name page and the second domain name page by sending the page data to the first intermediate mapping component through the message transmission interface, thereby improving the performance of the web page, and automatically implements the monitoring and management of the data status across domain names in the browser locally, improving the security of data status synchronization. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:
[0038] Figure 1 A schematic diagram of a cross-domain data processing method provided in an embodiment of the present application;
[0039] Figure 2 A flow chart of a method for monitoring and managing data status provided in an embodiment of the present application;
[0040] Figure 3 A schematic diagram of a cross-domain data processing method provided in an embodiment of the present application;
[0041] Figure 4 A schematic diagram of the structure of the cross-domain data processing method provided in an embodiment of the present application;
[0042] Figure 5 A schematic diagram of the structure of a cross-domain data processing device provided in an embodiment of the present application;
[0043] Figure 6 A schematic diagram of the structure of a cross-domain data processing device provided in an embodiment of the present application;
[0044] Figure 7 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0045] The present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It is also necessary to explain that, for ease of description, only the parts related to the invention are shown in the accompanying drawings.
[0046] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0047] It is understandable that with the rapid development of mobile Internet information technology, more and more users will use various application systems in their daily lives. In the process of using the application system, it is often necessary to introduce other application system pages into a certain application system page to achieve cross-domain jumps between different pages, and the application system page needs to communicate with other application system pages, for example, other application system pages need to obtain the user name displayed on the application system page. It should be noted that the generation of cross-domain comes from the "same-origin policy" commonly used by modern browsers. The same-origin policy refers to the same protocol, the same domain name, and the same port. If accessed from different sources, it is called cross-domain.
[0048] At present, in the related technology, jsonp (JSON with Padding) is used to establish a long connection or websocket and other real-time network communication technologies to communicate with the server, so as to realize cross-domain data transmission and synchronization of data information. Among them, websocket refers to a protocol for full-duplex communication on a single TCP connection. However, this method will occupy a large amount of network resources, making information interaction unstable. At the same time, it requires operations such as server proxy configuration. Its implementation method is relatively cumbersome, resulting in incomplete cross-domain communication. In addition, during the transmission of information through the network, user sensitive information including cookies needs to be transmitted, which poses security risks and leads to low data transmission security. Among them, cookies are plain text files stored on the client, such as txt files. When a user uses a computer to access a web page through a browser, the server will generate a certificate and return it to the browser and write it to the user's computer. This certificate is a cookie. jsonp is a way of data call, a format for describing information, and an unofficial cross-domain data interaction protocol.
[0049] Based on the above-mentioned defects, the present application provides a cross-domain data processing method, device, equipment and storage medium. Compared with the related technology, this solution does not require unnecessary data interaction and configuration operations with the server, saves server network resources, simplifies server operation and maintenance, and automatically realizes cross-domain operations of the first domain name page and the second domain name page by sending page data to the first intermediate mapping component through a message transmission interface, thereby improving web page performance, and automatically realizes cross-domain data status monitoring and management in the local browser, thereby improving the security of data status synchronization.
[0050] The cross-domain data processing method provided in the embodiment of the present application can be applied to terminal devices.
[0051] Optionally, the terminal devices may include smart phones, tablet computers, computers, handheld game consoles, smart home appliances and other devices with operating systems installed, such as smart home appliances such as smart TVs. The type of operating system is not limited in the embodiments of the present application, and may include, for example, Android operating system, Windows operating system and Apple (iOS) operating system.
[0052] At least one browser may be installed in the terminal device, and the browser may open various application systems, such as a medical system, a financial system, a personnel system, etc.
[0053] For ease of understanding and explanation, the following Figures 1 to 7 The cross-domain data processing method, device, equipment and storage medium provided in the embodiments of the present application are elaborated in detail.
[0054] Figure 1 FIG. 1 is a flow chart of a cross-domain data processing method provided in an embodiment of the present application, wherein the method is applied to a terminal device, such as Figure 1 As shown, the method includes:
[0055] S101: Obtain page data of a first domain name page.
[0056] Specifically, the first domain name page is a page displayed after the user enters the first domain name in the input box corresponding to the browser running on the terminal device. The first domain name can be a domain name corresponding to any application system, for example, a domain name corresponding to a financial system, or a domain name corresponding to a personnel system.
[0057] After entering the first domain name page by inputting the first domain name, the user can enter the corresponding data information on the first domain name page, thereby obtaining the page data of the first domain name page, which refers to the data generated by operating the first domain name page. For example, when the first domain name page is a login system page, the user can enter the user name and login password on the login system page, and the user name and login password are used as the page data corresponding to the login system page.
[0058] S102: Send the page data to the first intermediate mapping component through a message transmission interface. The first intermediate mapping component includes a preset pop-up window with the same origin as the second domain name. The pop-up window is used to establish a communication connection between the first domain name page and the second domain name page.
[0059] In this step, the message transmission interface may be a message interface corresponding to a browser running on a terminal device, and the message transmission interface may be window.postMessage. It should be noted that window.postMessage is a secure, event-based message API that can securely implement cross-source communication and allow data to be sent and received between two domain page systems.
[0060] Since the message transmission interface window.postMessage can only transmit information in windows of the same origin, iframes in document windows, pop-ups opened by JavaScript, and windows opened in pages, it cannot fully meet the cross-source requirements of independent windows. Therefore, it is necessary for the developer to pre-set a first intermediate mapping component, which may include a preset pop-up window of the same origin as the second domain name, which may be nested and hidden in the first domain name system, such as an iframe pop-up window. The pop-up window is used to establish a communication connection between the first domain name page and the second domain name page, and can be used for data interaction between the first domain name page and the second domain name page.
[0061] It should be noted that developers can pre-set receivers and filters in the first intermediate mapping component, where the receiver is used to receive page data of the first domain name page, and the filter is used to filter the page data to obtain the information to be synchronized between the first domain name page and the second domain name page.
[0062] After obtaining the page data of the first domain name page, the page data can be sent to the first intermediate mapping component through the message transmission interface window.postMessage. Specifically, when sending the page data to the first intermediate mapping component through window.postMessage, it can be implemented through the postMessage function, which includes two parameters, message and targetOrigin. Among them, message is the page data that needs to be sent to the first intermediate mapping component, and the page data can be in the form of a string; targetOrigin refers to the URL of the window where the message is to be sent, that is, the first domain name.
[0063] S103: Process the page data through the first intermediate mapping component to obtain a second domain name page.
[0064] In this embodiment, the above-mentioned first intermediate mapping component may include a preconfigured receiver and filter, which can receive page data through the receiver and process the page data using the filter according to preset data filtering rules to determine whether there is information to be synchronized of the first domain name page and the second domain name page in the page data. When there is information to be synchronized in the page data, a second domain name page is generated based on the information to be synchronized; when there is no information to be synchronized in the page data, the page data is stored in the database corresponding to the first domain name page.
[0065] It should be noted that the receiver is used to receive the page data of the first domain name page sent by the first domain name system. The filter is used to filter the page data according to the preset data filtering rules to obtain the information to be synchronized. The information to be synchronized refers to the pre-defined information to be synchronized on the first domain name page and the second domain name page, for example, the user's login information, including the user name and login password.
[0066] Specifically, the first intermediate mapping component further includes a cache, which may be a storage cache, in which the information to be synchronized may be stored, and then the information to be synchronized on the cache may be rendered to generate a second domain name page. Since cookies or storage in browser pages of the same origin and domain name may be shared, when generating the second domain name page, the second domain name system may automatically listen to the cache to obtain the corresponding information to be synchronized, thereby generating a component based on the information to be synchronized and the basic page, realizing real-time sharing of data such as the information to be synchronized, and then generating the second domain name page.
[0067] S104: Monitor and manage the data status of the first domain name page and the second domain name page.
[0068] In this step, since there is synchronization information between the first domain name page and the second domain name page, the subscription, publishing and monitoring of the data status in the first intermediate mapping component can be realized through vuex based on the cross-domain vue project framework, thereby realizing the monitoring and management of the data status of the first domain name page and the second domain name page.
[0069] Optional, Figure 2 A flow chart of a method for monitoring and managing the data status of a first domain name page and a second domain name page, such as Figure 2 As shown, the method includes:
[0070] S201. Obtain data status of a domain name page and a second domain name page through a first intermediate mapping component.
[0071] S202: Use a first state monitoring management component and a second state monitoring management component to monitor and manage the data state.
[0072] Specifically, the data status of a domain name page and a second domain name page can be obtained through the first intermediate mapping component, and the data status can be monitored and managed using the first status monitoring management component and the second status monitoring management component respectively.
[0073] The first state monitoring management component is a monitoring component corresponding to the first domain name page, and the second state monitoring management component is a monitoring component corresponding to the second domain name page. The first state monitoring management component and the second state monitoring management component can be vuex state management monitoring modules based on the vue framework. The data state can include data actions and data parameters. The data action can be, for example, a modification operation, a new addition operation, and a deletion operation performed on the data.
[0074] It should be noted that the vue framework, namely vue.js, is a progressive framework for building user interfaces. vue adopts a bottom-up incremental development design and can realize data binding. Based on the vue framework, element data can be set according to the corresponding elements, and data can be bound in real time through input boxes, get data, and other methods to render data for web pages and applications. Based on the vue framework, component-based development can be carried out, and various modules designed in a web development can be split into separate components and data and function binding and encapsulation can be performed. vuex is a state management mode developed specifically for vue.js applications. It uses centralized storage to manage the status of all components of the application, and uses corresponding rules to ensure that the status changes in a predictable way, which can realize data sharing between components.
[0075] In this embodiment, feasible browser cross-source communication technology and Vue-based state management mode vuex are used to monitor and manage the data status of the first domain name page and the second domain name page through a dynamic subscription and publishing system, so as to maintain the first intermediate mapping component and further realize the state management of the same data state across domain name systems.
[0076] It is understandable that the Domain Name System (DNS) is a service of the Internet. As a distributed database that maps domain names and IP addresses to each other, it enables users to access the Internet more conveniently. DNS uses UDP port 53. Currently, the length limit for each level of domain name is 63 characters, and the total length of the domain name cannot exceed 253 characters.
[0077] This embodiment obtains the page data of the first domain name page, and sends the page data to the first intermediate mapping component through the message transmission interface. The first intermediate mapping component includes a preset pop-up window with the same origin as the second domain name. The pop-up window is used to establish a communication connection between the first domain name page and the second domain name page, and the page data is processed by the first intermediate mapping component to obtain the second domain name page, and then the data status of the first domain name page and the second domain name page is monitored and managed. Compared with the prior art, this solution does not need to generate unnecessary data interaction and configuration operations with the server, saves server network resources, simplifies the difficulty of server operation and maintenance, and automatically realizes cross-domain operations of the first domain name page and the second domain name page by sending the page data to the first intermediate mapping component through the message transmission interface, thereby improving the performance of the web page, and automatically realizes the monitoring and management of the data status across domain names in the browser locally, improving the security of data status synchronization.
[0078] Based on the above embodiment, as a feasible method, Figure 3 A flowchart of a modification operation data synchronization method provided in an embodiment of the present application is provided.
[0079] like Figure 3 As shown, the method includes:
[0080] S301: Receive a modification operation instruction for a second domain name page, where the modification operation instruction carries modification operation data.
[0081] S302: Send the modification operation data to the second intermediate mapping component through a message transmission interface, where the second intermediate mapping component includes a preset pop-up window with the same origin as the first domain name.
[0082] S303: Process the modification operation data through the second intermediate mapping component so that the first domain name page synchronously saves the modification operation data.
[0083] In this step, in order to establish a communication connection between the first domain name page and the second domain name page, the developer pre-sets a second intermediate mapping component, which includes a preset pop-up window with the same origin as the first domain name, and the pop-up window can be nested and hidden in the second domain name system, for example, it can be an iframe pop-up window. The pop-up window is used to establish a communication connection between the first domain name page and the second domain name page, and can be used for data interaction between the first domain name page and the second domain name page.
[0084] Specifically, after the first domain name page and the second domain name page are generated, the user needs to add or modify information in the second domain name page, and can perform a modification operation on the second domain name page, such as performing a modification operation to change the user login password, so that the terminal receives a modification operation instruction for the second domain name page, the modification operation instruction carries modification operation data, and then sends the modification operation data to the second intermediate mapping component through the message transmission interface, so that the first domain name page synchronously saves the modification operation data. Among them, the above-mentioned modification operation data may include a modification identifier and a modification behavior, the modification identifier is a unique identifier corresponding to the modification data, and the modification behavior may be an addition, deletion, change, etc.
[0085] Optionally, a second intermediate mapping component can be used to obtain a modification data identifier and a modification behavior corresponding to the modification identifier from the modification operation data, and then determine whether the modification identifier exists in the first domain name page. When it is determined that the modification identifier exists in the first domain name page, the modification behavior corresponding to the modification identifier is synchronously saved in a database corresponding to the first domain name page; when it is determined that the modification identifier does not exist in the first domain name page, there is no need to synchronize the data status with the first domain name page, and the modification behavior corresponding to the modification identifier can be directly saved in a local database corresponding to the second domain name page.
[0086] For example, see Figure 4As shown, taking the application scenario of multiple cross-domain name subsystems managing the same user information status to realize sequential logging into multiple systems as an example, when the user enters the A domain name on the browser to open the A domain name page, the A domain name page can be the system login page corresponding to the A domain name system. The user can enter user information such as user name and user password on the A domain name page, so that the terminal obtains the page data of the A domain name page, which includes user name, user password, etc., and then the user can click the login operation on the A domain name page. At this time, the page data corresponding to the A domain name page will be sent to the first intermediate mapping component, that is, the intermediate mapping state module, through the message transmission interface window.postMessage. The intermediate mapping state module may include a preset pop-up window with the same origin as the B domain name. The pop-up window can be nested and hidden in the A domain name system, and is used to establish a communication connection between the A domain name page and the B domain name page, and can be used for data interaction between the A domain name page and the B domain name page.
[0087] Further, the page data in the A domain page can be received by the receiving container in the intermediate mapping state module, and then the page data can be processed by the filter according to the preset filtering rules to determine whether there is information to be synchronized of the A domain page and the B domain page in the page data. When it is determined that there is information to be synchronized of the A domain page and the B domain page in the page data, the information to be synchronized is stored in the storage buffer. Since the storage in the browser pages of the same source and the same domain name can be shared, when the B domain page is generated, it can automatically monitor from the storage buffer to obtain the corresponding information to be synchronized. The information to be synchronized can be, for example, a user name and a user password. Based on the information to be synchronized and the basic page generation component, the real-time sharing of the information to be synchronized of the A domain page and the B domain page is realized, and then the B domain page is generated. When the user clicks to save the information on the B domain page, the information to be synchronized of the B domain page and the A domain page will be synchronized and saved accordingly, thereby realizing the synchronous sharing data state. When it is determined that there is no information to be synchronized of the A domain page and the B domain page in the page data, the page data is stored in the database corresponding to the A domain page.
[0088] Among them, the A domain name page and the B domain name page are respectively configured with vuex state management monitoring modules. The data status of the A domain name page and the B domain name page can be monitored through the subscription and publishing system of the vuex state management monitoring module, thereby indirectly maintaining the same intermediate mapping state module and realizing vue's vuex cross-domain state management.
[0089] Further, when it is detected that the user performs a modification operation on the B domain name page, that is, a modification operation instruction for the B domain name page is received, and the modification operation instruction carries modification operation data, the B domain name system corresponding to the B domain name page can send the modification operation data to the second intermediate mapping component, that is, the intermediate mapping status module, through the message transmission interface window.postMessage. The intermediate mapping status module can include a preset pop-up window with the same origin as the A domain name. The intermediate mapping status module can obtain the modification data identifier and the modification behavior corresponding to the modification identifier from the modification operation data, and then determine whether the modification identifier exists in the A domain name page. When it is determined that the modification identifier exists in the A domain name page, the modification behavior corresponding to the modification identifier is synchronously saved in the database corresponding to the A domain name page; when it is determined that the modification identifier does not exist in the A domain name page, there is no need to synchronize the data status with the A domain name page, and the modification behavior corresponding to the modification identifier can be directly saved in the local database corresponding to the B domain name page. At the same time, a synchronous monitoring module can be used to monitor the data and modified data stored in the storage buffer, thereby ensuring synchronous sharing of cross-domain data status.
[0090] This embodiment uses feasible browser cross-source communication technology and Vue's state management mode Vuex to maintain the same intermediate mapping state module through a dynamic subscription and publishing system to achieve cross-domain state management, which effectively solves the problems of data state synchronization, information transmission difficulty, poor reusability and maintainability in different domain name systems and page combination application requirements of Vue projects, improves the efficiency of cross-domain page development, makes cross-domain state management easier to maintain, reduces unnecessary data interaction operations, and improves page interaction performance.
[0091] It should be noted that although the operations of the method of the present invention are described in a particular order in the accompanying drawings, this does not require or imply that the operations must be performed in this particular order, or that all the operations shown must be performed to achieve the desired results. On the contrary, the steps depicted in the flow chart can be performed in a different order. Additionally or alternatively, some steps can be omitted, multiple steps can be combined into one step, and / or one step can be decomposed into multiple steps.
[0092] on the other hand, Figure 5 Schematic diagram of the structure of a cross-domain data processing device provided in an embodiment of the present application. The device may be a device in a terminal, such as Figure 5 As shown, the device 600 includes:
[0093] The acquisition module 610 is used to acquire the page data of the first domain name page;
[0094] The sending module 620 is used to send the page data to the first intermediate mapping component through the message transmission interface, and the first intermediate mapping component includes a preset pop-up window with the same origin as the second domain name, and the pop-up window is used to establish a communication connection between the first domain name page and the second domain name page;
[0095] The processing module 630 is used to process the page data through the first intermediate mapping component to obtain a second domain name page;
[0096] The management module 640 is used to monitor and manage the data status of the first domain name page and the second domain name page.
[0097] Optional, such as Figure 6 As shown, the processing module 630 includes:
[0098] The receiving unit 631 is used to receive the page data through the receiver;
[0099] A filtering unit 632 is used to process the page data using a filter according to a preset data filtering rule to determine whether there is information to be synchronized of the first domain name page and the second domain name page in the page data;
[0100] The generating unit 633 is configured to generate a second domain name page based on the information to be synchronized when there is information to be synchronized.
[0101] Optionally, the processing module 630 includes:
[0102] Storing the information to be synchronized in a buffer;
[0103] The information to be synchronized in the cache is rendered to generate a second domain name page.
[0104] Optionally, the processing module 630 includes:
[0105] When there is no information to be synchronized in the page data, the page data is stored in a database corresponding to the first domain name page.
[0106] Optionally, the management module 640 is specifically used to:
[0107] Acquire data status of a first domain name page and a second domain name page through a first intermediate mapping component;
[0108] The first state monitoring management component and the second state monitoring management component are respectively used to monitor and manage the data state. The first state monitoring management component is the monitoring component corresponding to the first domain name page, and the second state monitoring management component is the monitoring component corresponding to the second domain name page.
[0109] Optionally, the above device is also used for:
[0110] receiving a modification operation instruction for the second domain name page, wherein the modification operation instruction carries modification operation data;
[0111] Sending the modification operation data to the second intermediate mapping component through a message transmission interface, the second intermediate mapping component including a preset pop-up window having the same origin as the first domain name;
[0112] The modification operation data is processed by the second intermediate mapping component so that the first domain name page synchronously saves the modification operation data.
[0113] Optionally, the above device is also used for:
[0114] Obtaining a modification data identifier and a modification behavior corresponding to the modification identifier from the modification operation data through a second intermediate mapping component;
[0115] When it is determined that there is a modification mark in the first domain name page, the modification behavior corresponding to the modification mark is synchronously saved in the database corresponding to the first domain name page.
[0116] The cross-domain data processing device provided by the embodiment of the present application, the acquisition module acquires the page data of the first domain name page, the sending module sends the page data to the first intermediate mapping component through the message transmission interface, the first intermediate mapping component includes a preset pop-up window with the same origin as the second domain name, the pop-up window is used to establish a communication connection between the first domain name page and the second domain name page, and the processing module uses the first intermediate mapping component to process the page data to obtain the second domain name page, and then the management module monitors and manages the data status of the first domain name page and the second domain name page. Compared with the prior art, this solution does not need to generate unnecessary data interaction and configuration operations with the server, saves server network resources, simplifies the difficulty of server operation and maintenance, and automatically realizes cross-domain operations of the first domain name page and the second domain name page by sending the page data to the first intermediate mapping component through the message transmission interface, thereby improving the performance of the web page, and automatically realizes the monitoring and management of the data status across domain names in the browser locally, improving the security of data status synchronization.
[0117] On the other hand, the device provided by the embodiment of the present application includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the program, the cross-domain data processing method as described above is implemented.
[0118] Reference below Figure 7 , Figure 7 A schematic diagram of the structure of a computer system of a terminal device according to an embodiment of the present application.
[0119] like Figure 7As shown, the computer system 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage part 703 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the system 700 are also stored. The CPU 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0120] The following components are connected to the I / O interface 705: an input section 706 including a keyboard, a mouse, etc.; an output section 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, a modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed, so that a computer program read therefrom is installed into the storage section 708 as needed.
[0121] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a machine-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 703, and / or installed from the removable medium 711. When the computer program is executed by the central processing unit (CPU) 701, the above-mentioned functions defined in the system of the present application are executed.
[0122] It should be noted that the computer-readable medium shown in the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0123] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of the code, and the aforementioned module, program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0124] The units or modules involved in the embodiments described in the present application may be implemented by software or hardware. The units or modules described may also be set in a processor, for example, may be described as: a processor, including: an acquisition module, a sending module, a processing module and a management module. The names of these units or modules do not constitute a limitation on the units or modules themselves in certain circumstances. For example, the acquisition module may also be described as "used to obtain page data of the first domain name page".
[0125] As another aspect, the present application further provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiment; or may exist independently without being assembled into the electronic device. The above computer-readable storage medium stores one or more programs, and when the above programs are used by one or more processors to execute the cross-domain data processing method described in the present application:
[0126] Obtain page data of the first domain name page;
[0127] Sending the page data to a first intermediate mapping component through a message transmission interface, wherein the first intermediate mapping component includes a preset pop-up window having the same origin as the second domain name, and the pop-up window is used to establish a communication connection between the first domain name page and the second domain name page;
[0128] Processing the page data through the first intermediate mapping component to obtain a second domain name page;
[0129] Monitor and manage the data status of the first domain name page and the second domain name page.
[0130] In summary, the cross-domain data processing method, device, equipment and storage medium provided by the embodiments of the present application obtain the page data of the first domain name page, and send the page data to the first intermediate mapping component through the message transmission interface. The first intermediate mapping component includes a preset pop-up window with the same origin as the second domain name, and the pop-up window is used to establish a communication connection between the first domain name page and the second domain name page, and process the page data through the first intermediate mapping component to obtain the second domain name page, and then monitor and manage the data status of the first domain name page and the second domain name page. Compared with the prior art, this solution does not need to generate unnecessary data interaction and configuration operations with the server, saves server network resources, simplifies the difficulty of server operation and maintenance, and automatically realizes cross-domain operations of the first domain name page and the second domain name page by sending the page data to the first intermediate mapping component through the message transmission interface, thereby improving the performance of the web page, and automatically realizes the monitoring and management of the data status across domain names in the browser locally, thereby improving the security of data status synchronization.
[0131] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the inventive concept. For example, the above features are replaced with (but not limited to) technical features with similar functions disclosed in the present application.
Claims
1. A cross-domain data processing method, characterized in that: The method comprises: Obtaining page data of a first domain name page; the first domain name page is a page presented in a browser corresponding to the first domain name; Sending the page data to a first intermediate mapping component through a message transmission interface, wherein the first intermediate mapping component includes a preset pop-up window with the same origin as the second domain name, wherein the pop-up window is used to establish a communication connection between the first domain name page and the second domain name page, and the first intermediate mapping component includes a receiver, a filter, and a cache; The page data is processed by the first intermediate mapping component to obtain a second domain name page, where the second domain name page is a page presented in the browser corresponding to the second domain name, including: receiving the page data by the receiver; According to a preset data filtering rule, the filter is used to process the page data to determine whether there is information to be synchronized of the first domain name page and the second domain name page in the page data; When there is information to be synchronized in the page data, a second domain name page is generated based on the information to be synchronized; specifically comprising: storing the information to be synchronized in the buffer; rendering the information to be synchronized on the buffer to generate the second domain name page; When there is no information to be synchronized in the page data, the page data is stored in a database corresponding to the first domain name page; wherein the information to be synchronized refers to the information that needs to be synchronized that is predefined on the first domain name page and the second domain name page; Monitor and manage the data status of the first domain name page and the second domain name page.
2. The method according to claim 1, characterized in that Monitoring and managing the data status of the first domain name page and the second domain name page includes: Acquire data status of the first domain name page and the second domain name page through the first intermediate mapping component; A first status monitoring management component and a second status monitoring management component are respectively used to monitor and manage the data status. The first status monitoring management component is the monitoring component corresponding to the first domain name page, and the second status monitoring management component is the monitoring component corresponding to the second domain name page.
3. The method according to claim 1, characterized in that The method further comprises: receiving a modification operation instruction for the second domain name page, wherein the modification operation instruction carries modification operation data; Sending the modification operation data to a second intermediate mapping component through the message transmission interface, wherein the second intermediate mapping component includes a preset pop-up window having the same origin as the first domain name; The modification operation data is processed by the second intermediate mapping component so that the first domain name page synchronously saves the modification operation data.
4. The method according to claim 3, characterized in that Processing the modification operation data by the second intermediate mapping component so that the first domain name page synchronously saves the modification operation data includes: Acquire a modification identifier and a modification behavior corresponding to the modification identifier from the modification operation data through the second intermediate mapping component; When it is determined that the modification identifier exists in the first domain name page, the modification behavior corresponding to the modification identifier is synchronously saved in the database corresponding to the first domain name page.
5. A cross-domain data processing device, characterized in that: According to any one of claims 1 to 4, the device comprises: An acquisition module, used to acquire page data of a first domain name page; A sending module, used to send the page data to a first intermediate mapping component through a message transmission interface, wherein the first intermediate mapping component includes a preset pop-up window with the same origin as the second domain name, and the pop-up window is used to establish a communication connection between the first domain name page and the second domain name page; A processing module, configured to process the page data through the first intermediate mapping component to obtain a second domain name page; A management module is used to monitor and manage the data status of the first domain name page and the second domain name page.
6. A computer device, characterized in that: The computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor is configured to implement the cross-domain data processing method according to any one of claims 1 to 4 when executing the program.
7. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and the computer program is used to implement the cross-domain data processing method as described in any one of claims 1-4.
Citation Information
Patent Citations
Cross-domain data transmission method, device and equipment and storage medium
CN110300133A