CN112818270A - Data cross-domain transfer method and device and computer equipment - Google Patents

Data cross-domain transfer method and device and computer equipment Download PDF

Info

Publication number
CN112818270A
CN112818270A CN202110099074.5A CN202110099074A CN112818270A CN 112818270 A CN112818270 A CN 112818270A CN 202110099074 A CN202110099074 A CN 202110099074A CN 112818270 A CN112818270 A CN 112818270A
Authority
CN
China
Prior art keywords
page
display
website
inline frame
content
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110099074.5A
Other languages
Chinese (zh)
Other versions
CN112818270B (en
Inventor
梁勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Bilibili Technology Co Ltd
Original Assignee
Shanghai Bilibili Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Bilibili Technology Co Ltd filed Critical Shanghai Bilibili Technology Co Ltd
Priority to CN202110099074.5A priority Critical patent/CN112818270B/en
Publication of CN112818270A publication Critical patent/CN112818270A/en
Application granted granted Critical
Publication of CN112818270B publication Critical patent/CN112818270B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • G06F16/9566URL specific, e.g. using aliases, detecting broken or misspelled links
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • G06F16/972Access to data in other repository systems, e.g. legacy data or dynamic Web page generation

Abstract

The application discloses a data cross-domain transfer method, a device and computer equipment, wherein the method comprises the following steps: receiving a display request which is triggered by a first page of a first website and points to a second page of a second website, wherein the first website and the second website are websites of different domains; acquiring display configuration parameters in a display request of the second page and a resource address of the second page; creating a blank inline frame according to the display configuration parameters; acquiring second page content corresponding to the second page according to the resource address of the second page; loading the second page content to the blank inline frame to obtain an inline page; and displaying the embedded page to the first page in an embedded mode. The present application also provides a computer-readable storage medium. According to the method and the device, cross-domain data transmission is carried out through the inline frame of the front-end page, so that the time of cross-domain data transmission is effectively saved, cross-domain data interaction is more convenient and efficient, and user experience is improved.

Description

Data cross-domain transfer method and device and computer equipment
Technical Field
The present application relates to the field of internet technologies, and in particular, to a method and an apparatus for cross-domain data transfer, and a computer device.
Background
At present, for the consideration of security level, the webpage jump and call of the website using javascript language programming framework all follow the same source policy. The homologous strategy is to prevent the interaction between the javascript script of one domain and the content of the other domain, and means that two pages based on the same protocol, the host and the port number are homologous pages, and the interaction can be performed between the homologous pages; for two pages of different sources, no interaction can be made.
Of course, in the prior art, the interaction problem of two pages of different sources is usually solved by using a Web proxy. The Web agent mode, namely, the cross-domain access request to the B website generated when the user accesses the A website is submitted to the appointed page of the A website, and the page replaces the user page to complete the interaction, thereby returning a proper result. However, the existing data cross-domain transfer method has complex execution process, long time consumption and poor execution efficiency.
Disclosure of Invention
The application provides a data cross-domain transfer method, a data cross-domain transfer device and computer equipment, and can solve the problems that in the prior art, the data cross-domain transfer process is complex in the next process, long in time consumption and poor in execution efficiency.
First, to achieve the above object, the present application provides a data cross-domain transfer method, including:
receiving a display request which is triggered by a first page of a first website and points to a second page of a second website, wherein the first website and the second website are websites of different domains; acquiring display configuration parameters in a display request of the second page and a resource address of the second page; creating a blank inline frame according to the display configuration parameters; acquiring second page content corresponding to the second page according to the resource address of the second page; loading the second page content to the blank inline frame to obtain an inline page; and displaying the embedded page to the first page in an embedded mode.
In one example, the method further comprises: receiving a display request, triggered from the embedded page of the first page, directed to a third page of the second website; acquiring third page content corresponding to a third page according to the resource address of the third page in the display request of the third page; loading the third page content to the inline frame of the inline page in place of the second page content.
In one example, the display configuration parameters include size information and presentation information including whether to present a navigation bar and menu items of the second page.
In one example, the creating a white space inline frame according to the display configuration parameters comprises: and creating a blank inline frame with a corresponding size according to the size information.
In one example, the loading the second page content into the white inline frame comprises: adjusting a navigation bar and menu items of the second page content according to the display information to obtain adjusted second page content; and loading the adjusted second page content to the blank inline frame.
In an example, the obtaining, according to the resource address of the second page, the second page content corresponding to the second page includes: sending an access request of second page content corresponding to the second page to a corresponding data server according to the resource address of the second page; and receiving the second page content returned by the data server.
In an example, before the sending the access request of the content of the second page corresponding to the second page to the corresponding data server, the method further includes: judging whether the resource address of the second page is in a preset white list or not; and if the resource address of the second page is not in the white list, rejecting the access request of the second page content and reporting an error.
In one example, prior to the creating a white space inline frame according to the display configuration parameters, the method further comprises: acquiring a universal unique identification code of a terminal of the terminal and receiving time for receiving a display request of the second page; and generating an authentication token according to the universal unique identification code and the receiving time.
In one example, the method further comprises: binding the authentication token to the inline frame after creating the blank inline frame; writing the authentication token into an access request of the second page content and sending the access request to the data server; receiving the second page content returned by the data server, and judging whether the second page content contains the authentication token; if the second page content contains the authentication token, loading the second page content to the blank inline frame; otherwise, the step of writing the authentication token into the access request of the second page and sending the access request to the data server is executed again.
In addition, to achieve the above object, the present application also provides a data cross-domain transfer apparatus, including:
the display device comprises a receiving module, a display module and a display module, wherein the receiving module is used for receiving a display request which is triggered by a first page of a first website and points to a second page of a second website, and the first website and the second website are websites of different domains; the acquisition module is used for acquiring the display configuration parameters in the display request of the second page and the resource address of the second page; the loading module is used for creating a blank inline frame according to the display configuration parameters; the obtaining module is further configured to obtain second page content corresponding to the second page according to the resource address of the second page; the loading module is further configured to load the second page content to the blank inline frame to obtain an embedded page; and the display module is used for embedding and displaying the embedded page to the first page.
Further, the present application also proposes a computer device, which includes a memory and a processor, where the memory stores a computer program that can be executed on the processor, and the computer program, when executed by the processor, implements the steps of the data cross-domain transfer method as described above.
Further, to achieve the above object, the present application also provides a computer-readable storage medium storing a computer program, which is executable by at least one processor to cause the at least one processor to perform the steps of the data cross-domain transfer method as described above.
Compared with the prior art, the data cross-domain transfer method, the data cross-domain transfer device, the computer equipment and the computer readable storage medium provided by the application can be used for triggering a display request pointing to a second page of a second website by a first page of a first website, wherein the first website and the second website are websites of different domains; acquiring display configuration parameters in a display request of the second page and a resource address of the second page; creating a blank inline frame according to the display configuration parameters; acquiring second page content corresponding to the second page according to the resource address of the second page; loading the second page content to the blank inline frame to obtain an inline page; and displaying the embedded page to the first page in an embedded mode. Cross-domain data transmission is carried out through the inline frame of the front-end page, so that the time of cross-domain data transmission is effectively saved, cross-domain data interaction is more convenient and efficient, and the user experience is improved.
Drawings
FIG. 1 is a schematic diagram of an application environment according to an embodiment of the present application;
FIG. 2 is a flowchart illustrating an embodiment of a cross-domain data transfer method according to the present application;
FIG. 3 is a block diagram of a framework effect of a station in a data page connecting two domains through a data cross-domain delivery SDK according to an illustrative example of the present application;
FIG. 4 is a flowchart illustrating an effect of a cross-domain display of a picture page based on the business page of FIG. 3;
FIG. 5 is a flowchart illustrating an exemplary embodiment of the present application for invoking content of a second page according to a display request;
FIG. 6 is a block diagram of an embodiment of the present invention;
FIG. 7 is a diagram of an alternative hardware architecture of the computer device of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the descriptions in this application referring to "first", "second", etc. are for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In addition, technical solutions between various embodiments may be combined with each other, but must be realized by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination should not be considered to exist, and is not within the protection scope of the present application.
Fig. 1 is a schematic diagram of an application environment according to an embodiment of the present application. Referring to fig. 1, the computer device 1 is connected to a data server 2 and a data server 3, and the data server 2 and the data server 3 belong to different domains. The computer device 1 may send a resource request of a first page to the data server 2, i.e. a first website, then receive a data resource of the first page sent by the data server 2, and display the first page on a Web browser. Then, the computer device 1 may receive, through a preset data cross-domain transfer device, a display request, triggered by a user from a first page and directed to a second page of a second website, where the first website and the second website are websites of different domains, obtain a display configuration parameter and a resource address of the second page in the display request of the second page, and create a blank inline frame according to the display configuration parameter; sending a resource request to the data server 3 according to the resource address of the second page, and receiving second page content corresponding to the second page from the data server 3; loading the second page content to the blank inline frame to obtain an inline page; and finally, the embedded page is embedded and displayed to the first page. In the embodiment, the computer device 1 may be a mobile phone, a tablet, a portable device, a PC, or other electronic devices with a display function; the data server 2 and the data server 3 can be used as a mobile phone, a tablet, a portable device, a PC or a server. The data cross-domain transfer device is a Software package that is established in the computer device 1 and implements a specific function, and specifically, the data cross-domain transfer device may be an SDK (Software Development Kit) that is set in a Web browser and implements a data cross-domain transfer function.
Example one
Fig. 2 is a flowchart illustrating an embodiment of a data cross-domain delivery method according to the present application. It is to be understood that the flow charts in the embodiments of the present method are not intended to limit the order in which the steps are performed. The following description is made by way of example with the computer apparatus 1 as the execution subject.
As shown in FIG. 2, the data cross-domain transfer method may include steps S200-S210.
Step S200, receiving a display request which is triggered by a first page of a first website and points to a second page of a second website, wherein the first website and the second website are websites of different domains.
Step S202, obtaining the display configuration parameters in the display request of the second page and the resource address of the second page.
And step S204, creating a blank inline frame according to the display configuration parameters.
Specifically, in the process that the computer device 1 displays the first page of the first website on the Web browser, when the user triggers a resource request of another website, that is, the second website, on the first page, for example, the first page is linked with page resources of other domains, and when the user triggers a link corresponding to the second page in a manner of clicking, touching, or instruction input, then the computer device 1 may receive the display request of the second page.
Then, the computer device 1 obtains the display configuration parameters in the display request of the second page and the resource address of the second page, and creates a blank inline frame according to the display configuration parameters. Specifically, the display request of the second page includes a display configuration parameter and a Resource address of the second page, where the Resource address of the second page is a URL (Uniform Resource Locator) of second page content corresponding to the second page. The display configuration parameters comprise size information and display information, and the display information comprises whether a navigation bar and a menu item of the second page are displayed or not. The computer device 1 creating a blank inline frame according to the display configuration parameters comprises: and creating a blank inline frame with a corresponding size according to the size information. Since the inline frame is disposed in the first page, the size information includes a size smaller than that of the first page, for example, the size of the first page is 48cm by 40cm, and then the size of the inline frame may be 38cm by 30 cm; in summary, the inline frame is a display range occupying a part of the first page, and therefore, the size information includes a size not larger than a size of the first page.
Step S206, acquiring second page content corresponding to the second page according to the resource address of the second page.
And S208, loading the content of the second page to the blank inline frame to obtain an inline page.
After the blank inline frame is created, the computer device 1 further obtains second page content corresponding to the second page according to the resource address of the second page. In this embodiment, the obtaining, by the computer device 1, the second page content corresponding to the second page according to the resource address of the second page includes: sending an access request of second page content corresponding to the second page to a corresponding data server according to the resource address of the second page; and receiving the second page content returned by the data server. For example, the resource address of the second page is a URL, and therefore, the computer device 1 sends an access request of the content of the second page to a corresponding data server, that is, a website corresponding to the URL, according to the URL; the data server sends the second page content to the computer device 1 according to the access request of the second page content.
Of course, in a specific embodiment, before the computer device 1 sends the access request of the content of the second page corresponding to the second page to the corresponding data server, the method further includes: judging whether the resource address of the second page is in a preset white list or not; and if the resource address of the second page is not in the white list, rejecting the access request of the second page content and reporting an error. Since many websites may present data security concerns, the computer device 1 presets a white list of websites to which the first page is allowed to link. After receiving a display request of a second page triggered by the first page, the computer device 1 acquires a resource address of the second page corresponding to the display request of the second page and judges whether the resource address of the second page exists in the white list; and when the resource address of the second page is judged not to exist in the white list, rejecting the access request of the second page content and reporting an error.
After the computer device 1 acquires the second page content, further loading the second page content to the blank inline frame, including: adjusting a navigation bar and menu items of the second page content according to the display information to obtain adjusted second page content; and loading the adjusted second page content to the blank inline frame. In this embodiment, the computer device 1 acquires, according to the display request of the second page, the display configuration parameters for the second page content, including the display information, that is, the display mode in which the second page content is displayed on the first page: whether a navigation bar is displayed, whether a left menu item is displayed, etc. Then, the computer device 1 adjusts the second page content according to the display information to obtain a corresponding adjusted second page content; and finally, loading the adjusted content of the second page to the blank inline frame so as to generate a corresponding embedded page.
And step S210, embedding and displaying the embedded page to the first page.
In this embodiment, the computer device 1 implements, through a PostMessage application interface technology on a Web browser, cross-domain communication processing, including compatible processing in terms of a protocol, a port, and a host, on the received second page content, so that the second page content is compatible with the first page and is displayed on the first page.
In another specific embodiment, before the creating a blank inline frame according to the display configuration parameters, the computer device 1 further performs the following steps, which specifically include: acquiring a universal unique identification code of a terminal of the terminal and receiving time for receiving a display request of the second page; and generating an authentication token according to the universal unique identification code and the receiving time.
Therefore, the computer device 1 may implement, through the authentication token, that the first page can accurately invoke the content of the second page in a one-to-one manner, specifically including: binding the authentication token to the inline frame after creating the blank inline frame; writing the authentication token into an access request of the second page content and sending the access request to the data server; receiving the second page content returned by the data server, and judging whether the second page content contains the authentication token; if the second page content contains the authentication token, loading the second page content to the blank inline frame; otherwise, the step of writing the authentication token into the access request of the second page and sending the access request to the data server is executed again.
The computer device 1 establishes an authentication token according to the universal unique identification code of the device and the receiving time of the display request of the second page, and can well identify the inline frame. Of course, the computer device 1 may also add a fixed value, such as a code number for identifying the Web browser, and generate an authentication token together with the code number, the universal unique identifier, and the receiving time, so as to represent a process of opening a page embedded in another domain in a Web browser page. Therefore, the computer device 1 can simultaneously open a plurality of Web browser pages, then simultaneously execute the Web browser pages to load pages of other domains, and can ensure that the respective cross-domain page loading processes cannot interfere with each other according to different authentication tokens, and can run in parallel, thereby improving the efficiency.
In addition, after the computer device 1 loads the content of the second page into the inline frame, obtains an embedded page, and displays the embedded page to the first page, when a user triggers a display request of a third page based on the embedded page, the computer device 1 further performs steps including: receiving a display request which is triggered from the embedded page of the first page and points to a third page of the second website, wherein the third page is an upper/lower level page of the second page; acquiring third page content corresponding to a third page according to the resource address of the third page in the display request of the third page; loading the third page content to the inline frame of the inline page in place of the second page content.
FIG. 3 is a diagram of the framework effect of the station in the data page connecting two domains through the data cross-domain delivery SDK according to an exemplary embodiment of the present application, as shown in FIG. 3.
In this embodiment, the computer device 1 obtains and displays service page data from a service console through a Web browser page, and sets a data cross-domain transfer SDK in the Web browser in advance; when a user triggers a first display request of a picture page based on the service page, the data cross-domain transfer SDK is connected to a picture middle station according to the first display request, the picture middle station at least comprises picture pages with functions of picture synthesis, picture uploading, picture editing and the like corresponding to the picture page 1, the picture page 2 and the picture page 3 respectively, page data of the corresponding picture pages are obtained, and then the page data are transferred to the service middle station for being embedded and displayed to the service page. When a user triggers a second display request of other picture pages based on an embedded picture page on the service page, the data cross-domain transfer SDK is connected to a picture center station again according to the second display request, page data of the corresponding picture page is obtained, and then the page data is transferred to the service center station for being embedded and displayed in the service page to replace the original picture page data.
As shown in fig. 4, fig. 4 is a flowchart illustrating a cross-domain display of a picture page based on the business page of fig. 3.
In this embodiment, the computer device 1 first performs instantiation of the data cross-domain delivery SDK itself; then the data cross-domain transfer SDK receives a display request of a picture page of a user based on a service page; acquiring configuration parameters in the display request, and initializing an inline frame according to the configuration parameters; then, the data cross-domain transfer SDK requests a picture page corresponding to the display request from the picture center, receives the picture page returned by the picture center through the PostMessage, and mounts the picture page in-line to a Dom (Document Object Model) of a service page; finally, displaying the Dom to the service page; when the data cross-domain transfer SDK receives a request of a user for displaying other picture pages based on an embedded picture page in the service page, the corresponding picture page is requested from a picture center station according to the display request of the embedded picture page and is used for replacing an original picture page in the embedded page.
As shown in fig. 5, fig. 5 is a flowchart illustrating an effect of a process of invoking content of a second page according to a display request according to an exemplary embodiment of the present application.
In this embodiment, the computer device 1 receives a display request of a second page triggered by a first page; then, whether the configuration parameters in the display request are legal or not is obtained, including whether the resource address of the second page is in a preset white list or not; when the configuration parameters are legal, a blank inline frame is further created according to the size information in the configuration parameters; when the configuration parameters are illegal, directly reporting an error; then, the computer device 1 generates an authentication token according to the receiving time of the received display request and the universal unique identification code of the computer device 1 and binds the authentication token to the inline frame; requesting the content of the second page from a corresponding data server according to the resource address of the second page; then receiving second page content sent by the data server through a message channel of a PostMessage application interface; wherein, the computer device 1 further determines whether the process of receiving the second page content is overtime; when the receiving process is overtime, executing network abnormity alarm; otherwise, further judging whether the received second page content contains the authentication token; when the second page content contains the authentication token, generating an embedded page according to the second page content and the configuration parameters and informing the embedded page to a first page; otherwise, ignoring and not responding to the received second page content.
In summary, the data cross-domain transfer method provided in this embodiment can be used for a display request pointing to a second page of a second website, which is triggered by a first page of a first website, where the first website and the second website are websites in different domains; acquiring display configuration parameters in a display request of the second page and a resource address of the second page; creating a blank inline frame according to the display configuration parameters; acquiring second page content corresponding to the second page according to the resource address of the second page; loading the second page content to the blank inline frame to obtain an inline page; and displaying the embedded page to the first page in an embedded mode. Cross-domain data transmission is carried out through the inline frame of the front-end page, so that the time of cross-domain data transmission is effectively saved, cross-domain data interaction is more convenient and efficient, and the user experience is improved.
Example two
Fig. 6 schematically illustrates a block diagram of a data cross-domain transfer device according to a second embodiment of the present application, which may be partitioned into one or more program modules, stored in a storage medium, and executed by one or more processors to implement the second embodiment of the present application. The program modules referred to in the embodiments of the present application refer to a series of computer program instruction segments that can perform specific functions, and the following description will specifically describe the functions of the program modules in the embodiments.
As shown in fig. 6, the data cross-domain transferring apparatus 400 may include a receiving module 410, an obtaining module 420, a loading module 430, and a displaying module 440, wherein:
the receiving module 410 is configured to receive a display request, triggered by a first page of a first website, for pointing to a second page of a second website, where the first website and the second website are websites of different domains.
An obtaining module 420, configured to obtain the display configuration parameter in the display request of the second page and the resource address of the second page. The display configuration parameters comprise size information and display information, and the display information comprises whether a navigation bar and a menu item of the second page are displayed or not.
And a loading module 430, configured to create a blank inline frame according to the display configuration parameters. The method comprises the following steps: and creating a blank inline frame with a corresponding size according to the size information.
The obtaining module 420 is further configured to obtain second page content corresponding to the second page according to the resource address of the second page.
The loading module 430 is further configured to load the second page content to the blank inline frame, so as to obtain an inline page.
A display module 440, configured to display the embedded page embedded in the first page.
In an exemplary embodiment, the receiving module 410 is further configured to receive a display request, triggered from the embedded page of the first page, directed to a third page of the second website; the obtaining module 420 is further configured to obtain third page content corresponding to the third page according to a resource address of the third page in the display request of the third page; the loading module 430 is further configured to load the third page content into the inline frame of the embedded page to replace the second page content.
In an exemplary embodiment, the loading module 430 is further configured to adjust a navigation bar and a menu item of the second page content according to the presentation information, so as to obtain an adjusted second page content; and loading the adjusted second page content to the blank inline frame.
In an exemplary embodiment, the obtaining module 420 is further configured to send, to a corresponding data server, an access request of second page content corresponding to the second page according to the resource address of the second page; and receiving the second page content returned by the data server. Judging whether the resource address of the second page is in a preset white list or not; and if the resource address of the second page is not in the white list, rejecting the access request of the second page content and reporting an error.
In an exemplary embodiment, the loading module 430 is further configured to: acquiring a universal unique identification code of a terminal of the terminal and receiving time for receiving a display request of the second page; generating an authentication token according to the universal unique identification code and the receiving time; binding the authentication token to the inline frame after creating the blank inline frame. An obtaining module 420, further configured to: writing the authentication token into an access request of the second page content and sending the access request to the data server; receiving the second page content returned by the data server, and judging whether the second page content contains the authentication token; if the second page content contains the authentication token, loading the second page content to the blank inline frame; otherwise, the step of writing the authentication token into the access request of the second page and sending the access request to the data server is executed again.
EXAMPLE III
Fig. 7 schematically shows a hardware architecture diagram of a computer device 1 suitable for implementing the data cross-domain transfer method according to the third embodiment of the present application. In the present embodiment, the computer device 1 is a device capable of automatically performing numerical calculation and/or information processing in accordance with a command set or stored in advance. For example, the server may be a rack server, a blade server, a tower server or a rack server (including an independent server or a server cluster composed of a plurality of servers) with a gateway function. As shown in fig. 7, the computer device 1 includes at least, but is not limited to: memory 510, processor 520, and network interface 530 may be communicatively linked to each other by a system bus. Wherein:
the memory 510 includes at least one type of computer-readable storage medium including a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the storage 510 may be an internal storage module of the computer device 1, such as a hard disk or a memory of the computer device 1. In other embodiments, the memory 510 may also be an external storage device of the computer device 1, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the computer device 1. Of course, the memory 510 may also comprise both an internal memory module of the computer device 1 and an external memory device thereof. In this embodiment, the memory 510 is generally used for storing an operating system installed in the computer device 1 and various application software, such as program codes of a data cross-domain transfer method. In addition, the memory 510 may also be used to temporarily store various types of data that have been output or are to be output.
Processor 520 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 520 is generally used for controlling the overall operation of the computer device 1, such as performing control and processing related to data interaction or communication with the computer device 1. In this embodiment, processor 520 is configured to execute program codes stored in memory 510 or process data.
Network interface 530 may include a wireless network interface or a wired network interface, and network interface 530 is typically used to establish communication links between computer device 1 and other computer devices. For example, the network interface 530 is used to connect the computer apparatus 1 with an external terminal through a network, establish a data transmission channel and a communication link between the computer apparatus 1 and the external terminal, and the like. The network may be a wireless or wired network such as an Intranet (Intranet), the Internet (Internet), a Global System of Mobile communication (GSM), Wideband Code Division Multiple Access (WCDMA), a 4G network, a 5G network, Bluetooth (Bluetooth), or Wi-Fi.
It should be noted that FIG. 7 only shows a computer device having components 510 and 530, but it should be understood that not all of the shown components are required to be implemented, and that more or fewer components may be implemented instead.
In this embodiment, the program code of the data cross-domain transferring method stored in the memory 510 may be further divided into one or more program modules and executed by one or more processors (in this embodiment, the processor 520) to implement the embodiments of the present application.
Example four
The present embodiments also provide a computer-readable storage medium having a computer program stored thereon, the computer program, when executed by a processor, implementing the steps of:
receiving a display request which is triggered by a first page of a first website and points to a second page of a second website, wherein the first website and the second website are websites of different domains; acquiring display configuration parameters in a display request of the second page and a resource address of the second page; creating a blank inline frame according to the display configuration parameters; acquiring second page content corresponding to the second page according to the resource address of the second page; loading the second page content to the blank inline frame to obtain an inline page; and displaying the embedded page to the first page in an embedded mode.
In this embodiment, the computer-readable storage medium includes a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. In some embodiments, the computer readable storage medium may be an internal storage unit of the computer device, such as a hard disk or a memory of the computer device. In other embodiments, the computer readable storage medium may be an external storage device of the computer device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the computer device. Of course, the computer-readable storage medium may also include both internal and external storage devices of the computer device. In this embodiment, the computer-readable storage medium is generally used for storing an operating system and various types of application software installed in the computer device, for example, the program code of the data cross-domain delivery method in the embodiment, and the like. Further, the computer-readable storage medium may also be used to temporarily store various types of data that have been output or are to be output.
It will be apparent to those skilled in the art that the modules or steps of the embodiments of the present application described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different from that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, embodiments of the present application are not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present application, and not intended to limit the scope of the present application, and all modifications that can be made by the use of the equivalent structures or equivalent processes in the specification and drawings of the present application or that can be directly or indirectly applied to other related technologies are also included in the scope of the present application.

Claims (12)

1. A method for cross-domain delivery of data, the method comprising:
receiving a display request which is triggered by a first page of a first website and points to a second page of a second website, wherein the first website and the second website are websites of different domains;
acquiring display configuration parameters in a display request of the second page and a resource address of the second page;
creating a blank inline frame according to the display configuration parameters;
acquiring second page content corresponding to the second page according to the resource address of the second page;
loading the second page content to the blank inline frame to obtain an inline page;
and displaying the embedded page to the first page in an embedded mode.
2. The method of data cross-domain transfer of claim 1, wherein the method further comprises:
receiving a display request, triggered from the embedded page of the first page, directed to a third page of the second website;
acquiring third page content corresponding to a third page according to the resource address of the third page in the display request of the third page;
loading the third page content to the inline frame of the inline page in place of the second page content.
3. The data cross-domain transfer method of claim 1, wherein the display configuration parameters include size information and presentation information, the presentation information including whether to present a navigation bar and menu items of the second page.
4. The method of data cross-domain transfer of claim 3, wherein the creating a white space inline frame according to the display configuration parameters comprises:
and creating a blank inline frame with a corresponding size according to the size information.
5. The data cross-domain delivery method of claim 3, wherein the loading the second page content into the white space inline frame comprises:
adjusting a navigation bar and menu items of the second page content according to the display information to obtain adjusted second page content;
and loading the adjusted second page content to the blank inline frame.
6. The data cross-domain transfer method of claim 1, wherein the obtaining of the second page content corresponding to the second page according to the resource address of the second page comprises:
sending an access request of second page content corresponding to the second page to a corresponding data server according to the resource address of the second page;
and receiving the second page content returned by the data server.
7. The method of cross-domain data delivery according to claim 6, wherein before sending the request for access to the content of the second page corresponding to the second page to the corresponding data server, further comprising:
judging whether the resource address of the second page is in a preset white list or not;
and if the resource address of the second page is not in the white list, rejecting the access request of the second page content and reporting an error.
8. The data cross-domain delivery method of any one of claims 6 or 7, wherein prior to the creating a white space inline frame from the display configuration parameters, the method further comprises:
acquiring a universal unique identification code of a terminal of the terminal and receiving time for receiving a display request of the second page;
and generating an authentication token according to the universal unique identification code and the receiving time.
9. The method of data cross-domain transfer of claim 8, wherein the method further comprises:
binding the authentication token to the inline frame after creating the blank inline frame;
writing the authentication token into an access request of the second page content and sending the access request to the data server; and
receiving the second page content returned by the data server, and judging whether the second page content contains the authentication token;
if the second page content contains the authentication token, loading the second page content to the blank inline frame; otherwise, the step of writing the authentication token into the access request of the second page and sending the access request to the data server is executed again.
10. An apparatus for cross-domain transfer of data, the apparatus comprising:
the display device comprises a receiving module, a display module and a display module, wherein the receiving module is used for receiving a display request which is triggered by a first page of a first website and points to a second page of a second website, and the first website and the second website are websites of different domains;
the acquisition module is used for acquiring the display configuration parameters in the display request of the second page and the resource address of the second page;
the loading module is used for creating a blank inline frame according to the display configuration parameters;
the obtaining module is further configured to obtain second page content corresponding to the second page according to the resource address of the second page;
the loading module is further configured to load the second page content to the blank inline frame to obtain an embedded page;
and the display module is used for embedding and displaying the embedded page to the first page.
11. A computer arrangement, characterized in that the computer arrangement comprises a memory, a processor, the memory having stored thereon a computer program being executable on the processor, the computer program, when being executed by the processor, realizing the steps of the data cross-domain transfer method according to any of the claims 1-9.
12. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which is executable by at least one processor to cause the at least one processor to perform the steps of the data cross-domain transfer method according to any one of claims 1-9.
CN202110099074.5A 2021-01-25 2021-01-25 Data cross-domain transfer method and device and computer equipment Active CN112818270B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110099074.5A CN112818270B (en) 2021-01-25 2021-01-25 Data cross-domain transfer method and device and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110099074.5A CN112818270B (en) 2021-01-25 2021-01-25 Data cross-domain transfer method and device and computer equipment

Publications (2)

Publication Number Publication Date
CN112818270A true CN112818270A (en) 2021-05-18
CN112818270B CN112818270B (en) 2023-07-25

Family

ID=75859144

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110099074.5A Active CN112818270B (en) 2021-01-25 2021-01-25 Data cross-domain transfer method and device and computer equipment

Country Status (1)

Country Link
CN (1) CN112818270B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113296762A (en) * 2021-06-21 2021-08-24 北京有竹居网络技术有限公司 Page embedding method and device, storage medium and electronic equipment
CN113382453A (en) * 2021-08-12 2021-09-10 北京小鸟科技股份有限公司 Cross-domain graph transmission method and system based on enhanced static routing calculation and source return

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102184220A (en) * 2011-05-06 2011-09-14 中兴通讯股份有限公司 Cross-domain page display control method and device
CN102402580A (en) * 2010-09-30 2012-04-04 微软公司 Securely rendering online ads in a host page
CN103095762A (en) * 2011-11-02 2013-05-08 腾讯科技(深圳)有限公司 Web page cross-domain communication method and device
CN103246667A (en) * 2012-02-08 2013-08-14 腾讯科技(深圳)有限公司 Method and device for cross-domain transfer of data
CN104301379A (en) * 2014-08-28 2015-01-21 北京奇虎科技有限公司 Web page cross-domain communication method and device
CN104423910A (en) * 2013-08-27 2015-03-18 腾讯科技(深圳)有限公司 Cross-domain page display method, device and terminal equipment
CN104965690A (en) * 2014-04-18 2015-10-07 腾讯科技(深圳)有限公司 Method and apparatus for processing data
CN110300133A (en) * 2018-03-22 2019-10-01 财付通支付科技有限公司 Cross-domain data transmission method, apparatus, equipment and storage medium
CN111435380A (en) * 2019-01-14 2020-07-21 顺丰科技有限公司 Page cross-domain interaction method, system, device and storage device
CN112261111A (en) * 2020-10-16 2021-01-22 蜂助手股份有限公司 Method and system for realizing cross-domain access of browser in application program

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102402580A (en) * 2010-09-30 2012-04-04 微软公司 Securely rendering online ads in a host page
CN102184220A (en) * 2011-05-06 2011-09-14 中兴通讯股份有限公司 Cross-domain page display control method and device
CN103095762A (en) * 2011-11-02 2013-05-08 腾讯科技(深圳)有限公司 Web page cross-domain communication method and device
CN103246667A (en) * 2012-02-08 2013-08-14 腾讯科技(深圳)有限公司 Method and device for cross-domain transfer of data
CN104423910A (en) * 2013-08-27 2015-03-18 腾讯科技(深圳)有限公司 Cross-domain page display method, device and terminal equipment
CN104965690A (en) * 2014-04-18 2015-10-07 腾讯科技(深圳)有限公司 Method and apparatus for processing data
CN104301379A (en) * 2014-08-28 2015-01-21 北京奇虎科技有限公司 Web page cross-domain communication method and device
CN110300133A (en) * 2018-03-22 2019-10-01 财付通支付科技有限公司 Cross-domain data transmission method, apparatus, equipment and storage medium
CN111435380A (en) * 2019-01-14 2020-07-21 顺丰科技有限公司 Page cross-domain interaction method, system, device and storage device
CN112261111A (en) * 2020-10-16 2021-01-22 蜂助手股份有限公司 Method and system for realizing cross-domain access of browser in application program

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113296762A (en) * 2021-06-21 2021-08-24 北京有竹居网络技术有限公司 Page embedding method and device, storage medium and electronic equipment
CN113382453A (en) * 2021-08-12 2021-09-10 北京小鸟科技股份有限公司 Cross-domain graph transmission method and system based on enhanced static routing calculation and source return
CN113382453B (en) * 2021-08-12 2021-10-29 北京小鸟科技股份有限公司 Cross-domain graph transmission method and system based on enhanced static routing calculation and source return

Also Published As

Publication number Publication date
CN112818270B (en) 2023-07-25

Similar Documents

Publication Publication Date Title
CN111756674B (en) Network communication method, system, device and computer readable storage medium
US8966446B1 (en) Systems and methods of live experimentation on content provided by a web site
CN111988337B (en) Authority management method and system
CN111414407A (en) Data query method and device of database, computer equipment and storage medium
CN109462601B (en) Multi-platform access method and device based on eSIM
CN108255701B (en) Scene testing method and mobile terminal
CN105488125A (en) Page access method and apparatus
US8972968B1 (en) Alternate service for applications
CN112818270B (en) Data cross-domain transfer method and device and computer equipment
CN112416458A (en) Preloading method and device based on ReactNative, computer equipment and storage medium
CN112612982A (en) Webpage preloading method and device and computer equipment
CN112422450B (en) Computer equipment, and flow control method and device for service request
CN113411404A (en) File downloading method, device, server and storage medium
CN110308880A (en) Log Method of printing, system, computer equipment and computer readable storage medium
CN107391182B (en) Generation method, device, server and storage medium of theme installation package
CN111079048A (en) Page loading method and device
CN110941779A (en) Page loading method and device, storage medium and electronic equipment
AU2014412020B2 (en) Techniques to transform network resource requests to zero rated network requests
WO2015003570A1 (en) Data downloading method,device and system thereof
CN116661936A (en) Page data processing method and device, computer equipment and storage medium
JP5643449B1 (en) Server and method for displaying display screen on terminal device
CN116304403A (en) Webpage access method and device, computer equipment and storage medium
CN112672187B (en) Page generation method and device, computer equipment and readable storage medium
WO2022116587A1 (en) Web end data signature method and apparatus, and computer device
CN112688980B (en) Resource distribution method and device, and computer equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant