CN110209959B - Information processing method and device - Google Patents

Information processing method and device Download PDF

Info

Publication number
CN110209959B
CN110209959B CN201810140366.7A CN201810140366A CN110209959B CN 110209959 B CN110209959 B CN 110209959B CN 201810140366 A CN201810140366 A CN 201810140366A CN 110209959 B CN110209959 B CN 110209959B
Authority
CN
China
Prior art keywords
information
cache file
browser cache
target page
calling
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.)
Active
Application number
CN201810140366.7A
Other languages
Chinese (zh)
Other versions
CN110209959A (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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information 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 Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201810140366.7A priority Critical patent/CN110209959B/en
Publication of CN110209959A publication Critical patent/CN110209959A/en
Application granted granted Critical
Publication of CN110209959B publication Critical patent/CN110209959B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • 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
    • G06F16/9574Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the application discloses an information processing method and device. The specific implementation mode of the information processing method for the setting end comprises the steps of receiving a call request which is triggered by an associated page associated with the setting end and comprises call information and a target page identifier; writing the target page identification into a preset first browser cache file, writing calling information into a preset second browser cache file, so that when the execution end associated with the target page indicated by the target page identification detects that the target page identification exists in the first browser cache file, acquiring the calling information from the second browser cache file, and executing corresponding calling operation based on the calling information; the associated page, the target page, the first browser cache file and the second browser cache file are provided with the same primary domain name. The embodiment can realize cross-domain calling between pages provided with the same primary domain name and different subdomain names.

Description

Information processing method and device
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to an information processing method and device.
Background
Existing applications typically include multiple sub-applications, with sub-application pages derived from different sub-applications typically provided with the same primary domain name and different sub-domain names (e.g., secondary domain name, tertiary domain name, etc.). In addition to the content of the main page, the main page of an application usually introduces a sub-application page with the same level domain name, for example, the sub-application page is introduced in an iframe form. Where the iframe is an HTML (HyperText Markup Language ) tag, the iframe tag may specify an inline frame. An inline frame may be used to embed another document in the current HTML document.
In addition, in applications, there is typically a call relationship between the main page and the sub-application page, and between the sub-application page and the sub-application page. For example, the sub-application page may inform the main page that its own page has been loaded, and/or provide data to the main page, and so forth. Each sub-application page is typically imported through its own secondary or tertiary domain name, and script calls between the sub-application page and the main page are cross-domain, and are typically prohibited by being considered unsafe by the browser.
Disclosure of Invention
The embodiment of the application provides an information processing method and device.
In a first aspect, an embodiment of the present application provides an information processing method for a setting terminal, where the method includes: receiving a call request triggered by an associated page associated with the setting end, wherein the call request comprises call information and a target page identifier, and the call information is used for indicating execution of a call operation; writing the target page identifier into a preset first browser cache file, and writing the calling information into a preset second browser cache file, so that when an execution end associated with a target page indicated by the target page identifier detects that the target page identifier exists in the first browser cache file, the calling information is acquired from the second browser cache file, and corresponding calling operation is executed based on the calling information; the related page, the target page, the first browser cache file and the second browser cache file are provided with the same primary domain name.
In some embodiments, writing the call information into a preset second browser cache file includes: and writing the calling information into a designated position related to the target page identifier in the second browser cache file.
In a second aspect, an embodiment of the present application provides an information processing method for an execution end, where the method includes: detecting whether a target page identifier of a target page associated with the execution end exists in a preset first browser cache file; in response to detecting the target page identifier, acquiring information associated with the target page identifier from a preset second browser cache file; analyzing the information, and determining whether the information is calling information for indicating to execute calling operation; responding to the determination that the information is the calling information, and executing corresponding calling operation based on the information; the target page, the first browser cache file and the second browser cache file are provided with the same primary domain name.
In some embodiments, the obtaining, from the preset second browser cache, information associated with the target page identifier includes: and acquiring the information from the appointed position in the second browser cache file, wherein the appointed position is related to the target page identification.
In some embodiments, the above method further comprises: and when the calling operation is executed, the target page identification in the first browser cache file is cleared.
In some embodiments, the above method further comprises: and when the calling operation is executed, clearing the information in the second browser cache file.
In some embodiments, the information includes a method name and parameter information, the parameter information includes callback function information, the callback function information is associated with a page identifier, and a page indicated by the page identifier associated with the callback function information and the target page are set to the same primary domain name.
In some embodiments, the above method further comprises: after the calling operation is executed to obtain a calling result, writing the page identifier associated with the callback function information into the first browser cache file, and writing the calling result into the second browser cache file.
In a third aspect, an embodiment of the present application provides an information processing apparatus for a setting terminal, including: the receiving unit is configured to receive a call request triggered by an associated page associated with the setting end, wherein the call request comprises call information and a target page identifier, and the call information is used for indicating execution of a call operation; the writing unit is configured to write the target page identifier into a preset first browser cache file and write the calling information into a preset second browser cache file, so that when an executing end associated with a target page indicated by the target page identifier detects that the target page identifier exists in the first browser cache file, the calling information is acquired from the second browser cache file, and corresponding calling operation is executed based on the calling information; the related page, the target page, the first browser cache file and the second browser cache file are provided with the same primary domain name.
In some embodiments, the writing unit is further configured to: and writing the calling information into a designated position related to the target page identifier in the second browser cache file.
In a fourth aspect, an embodiment of the present application provides an information processing apparatus for an execution end, including: the detection unit is configured to detect whether a target page identifier of a target page associated with the execution end exists in a preset first browser cache file; an obtaining unit, configured to obtain information associated with the target page identifier from a preset second browser cache file in response to detecting the target page identifier; a determining unit configured to parse the information, and determine whether the information is call information for instructing to execute a call operation; an execution unit configured to execute a corresponding calling operation based on the above information in response to determining that the above information is the above calling information; the target page, the first browser cache file and the second browser cache file are provided with the same primary domain name.
In some embodiments, the above-mentioned acquisition unit is further configured to: and acquiring the information from the appointed position in the second browser cache file, wherein the appointed position is related to the target page identification.
In some embodiments, the apparatus further comprises: and the first clearing unit is configured to clear the target page identifier in the first browser cache file when the calling operation is executed.
In some embodiments, the apparatus further comprises: and the second clearing unit is configured to clear the information in the second browser cache file when the calling operation is executed.
In some embodiments, the information includes a method name and parameter information, the parameter information includes callback function information, the callback function information is associated with a page identifier, and a page indicated by the page identifier associated with the callback function information and the target page are set to the same primary domain name.
In some embodiments, the apparatus further comprises: and the writing unit is configured to write the page identifier associated with the callback function information into the first browser cache file and write the calling result into the second browser cache file after the calling operation is performed to obtain the calling result.
In a fifth aspect, embodiments of the present application provide an electronic device, including: one or more processors; a storage means for storing one or more programs; the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method as described in any of the implementations of the first aspect.
In a sixth aspect, embodiments of the present application provide an electronic device, including: one or more processors; a storage means for storing one or more programs; the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method as described in any of the implementations of the second aspect.
In a seventh aspect, embodiments of the present application provide a computer readable medium having stored thereon a computer program which, when executed by a processor, implements a method as described in any of the implementations of the first aspect.
In an eighth aspect, embodiments of the present application provide a computer readable medium having stored thereon a computer program which, when executed by a processor, implements a method as described in any of the implementations of the second aspect.
According to the information processing method and device, the setting end receives the call request which is triggered by the associated page and comprises the call information and the target page identifier, then the target page identifier is written into the preset first browser cache file, and the call information is written into the preset second browser cache file. When the target page identification is detected in the first browser cache file through the execution end associated with the target page indicated by the target page identification, information associated with the target page identification is acquired from the second browser cache file, and when the information is determined to be call information for indicating to execute a call operation, corresponding call operation is executed based on the information. The associated page, the target page, the first browser cache file and the second browser cache file are provided with the same primary domain name. Therefore, through effective utilization of the first browser cache file and the second browser cache file, cross-domain calling between pages provided with the same primary domain name and different subdomain names can be achieved.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the detailed description of non-limiting embodiments, made with reference to the following drawings, in which:
FIG. 1 is an exemplary system architecture diagram in which the present application may be applied;
FIG. 2 is a flow chart of one embodiment of an information processing method for a setup side according to the present application;
fig. 3 is a schematic view of an application scenario of the information processing method for a setup terminal according to the present application;
FIG. 4 is a flow chart of one embodiment of an information processing method for an executive according to the present application;
FIG. 5 is a schematic structural view of one embodiment of an information processing apparatus for a setup terminal according to the present application;
FIG. 6 is a schematic structural view of one embodiment of an information processing apparatus for an execution side according to the present application;
fig. 7 is a schematic diagram of a computer system suitable for use in implementing embodiments of the present application.
Detailed Description
The present application is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be noted that, for convenience of description, only the portions related to the present invention are shown in the drawings.
It should be noted that, in the case of no conflict, the embodiments and features in the embodiments may be combined with each other. The present application will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
FIG. 1 illustrates an exemplary system architecture 100 in which embodiments of the information processing methods and apparatus of the present application may be applied.
As shown in fig. 1, a system architecture 100 may include a setup side 101, a network 102, and an execution side 103. Network 102 is the medium used to provide communication links between setup side 101 and execution side 103. Network 102 may include various connection types such as wired, wireless communication links, or fiber optic cables, among others.
The setting end 101 may be a server providing various services, may be a thread with software and hardware resources deployed on the server, or may be a method for providing a JS (JavaScript) library obtained by encapsulating script method calls between different domain names in advance. The setting end 101 may receive a call request triggered by the associated page and process the call request.
The execution end 103 may be a server that provides various services, may be a thread that is deployed on the server and has software and hardware resources, or may be a method that is provided externally by a JS library that is obtained by encapsulating script method calls between different domain names in advance. The executing end 103 may detect, in real time or at regular time, whether a target page identifier of a target page associated with the executing end 103 exists in a preset first browser cache file, and perform a corresponding processing operation when the target page identifier is detected.
It should be noted that, the setting end 101 and the executing end 103 may be the same server, may be different threads deployed on the same server, or may be different methods provided by the same JS library.
It should be understood that the numbers of setup, network and execution ends in fig. 1 are merely illustrative. There may be any number of setup sides, networks, and execution sides, as desired for implementation.
With continued reference to fig. 2, a flow 200 of one embodiment of an information processing method for a setup side according to the present application is shown. The process 200 of the information processing method for the setup end includes the following steps:
step 201, a call request triggered by an associated page is received.
In this embodiment, the electronic device on which the information processing method for the setup terminal operates (for example, the setup terminal 101 shown in fig. 1) may receive a call request triggered by an associated page with which it is associated in real time. Wherein the call request may be a call request triggered by a user performing a specified operation on the associated page. The call request may include call information and a destination page identification. The call information may be information for indicating that the call operation is performed. The target page indicated by the target page identification may be a page belonging to the same application as the associated page.
In addition, the call information may include a method name and parameter information. The parameter information may include, for example, callback function information. The callback function information may include, for example, a pointer (address) of the callback function. The callback function may be a function called by a function pointer.
It should be noted that, each page in the application where the associated page is located may be associated with a setting end respectively. Of course, the setting end and the executing end may be associated with each page at the same time of associating the setting end with each page. In addition, the individual pages may be provided with the same primary domain name. Of course, where the same primary domain name is provided, the individual pages may be provided with different sub-domain names (e.g., secondary domain name, tertiary domain name, etc.).
It should be noted that domain names may be classified into different levels, including top-level domain names (which may be referred to as primary domain names), secondary domain names, tertiary domain names, and the like. The top-level domain names can be divided into two categories: first, national top-level domainnames (nTLDs); and the second is an international top-level domain name (international top-level domain names, abbreviated as iTDs). The second-level domain name refers to a domain name below the top-level domain name, and under the international top-level domain name, it may refer to a network name of a domain registrant; under the name of the country top level domain, it may be a symbol representing a registered business category. The three-level domain name is generally composed of letters (A-Z, a-Z, cases, etc.), numbers (0-9) and connectors (-), and all levels of domain names are connected by real points (). The tertiary domain name generally cannot exceed 20 characters in length.
Step 202, writing the target page identifier into a preset first browser cache file, and writing the call information into a preset second browser cache file, so that when the execution end associated with the target page indicated by the target page identifier detects that the target page identifier exists in the first browser cache file, the call information is acquired from the second browser cache file, and corresponding call operation is executed based on the call information.
In this embodiment, after receiving a call request triggered by an associated page associated with the electronic device, the electronic device may write a target page identifier included in the call request into a preset first browser cache (the browser cache may be a text file stored in a browser directory and may be referred to as a cookie), and write call information included in the call request into a preset second browser cache, so that when an executing end associated with a target page indicated by the target page identifier detects that the target page identifier exists in the first browser cache, the executing end obtains the call information from the second browser cache, and executes a corresponding call operation based on the call information. The first browser cache file and the second browser cache file may be set to have the same first-level domain name as the associated page associated with the electronic device and the target page.
As an example, the electronic device may write the call information and the target page identifier in the second browser cache file, so that the executing end searches the call information in the second browser cache file.
It should be noted that, the executing end may be configured to detect, in real time or at regular time, whether a target page identifier of a target page associated with the executing end exists in the second browser cache file, and when the target page identifier is detected, acquire information associated with the target page identifier from the second browser cache file, determine whether the information is call information for indicating to execute a call operation, and execute, when the information is determined to be the call information, a corresponding call operation based on the information. For example, the corresponding script method is directly called based on the method name and the parameter information in the information, and the cross-domain call is completed.
It should be noted that the first browser cache and the second browser cache may be created by the first set-up end that receives the call request. The setting end is a setting end associated with the page in the application where the associated page is located. It should be understood that the present embodiment does not limit any method for creating the first browser cache file and the second browser cache file.
In some optional implementations of this embodiment, the electronic device may write call information into a designated location in the second browser cache file that is associated with the target page identifier.
With continued reference to fig. 3, fig. 3 is a schematic diagram of an application scenario of the information processing method for the setup end according to the present embodiment. In the application scenario of fig. 3, a web browser application a may be installed on a terminal device 301 held by a user. The web browser application a may include a sub-application A1, and a main page of the web browser application a introduces a sub-application page of the sub-application A1, where the main page and the sub-application page may be respectively associated with a setting end and an executing end. Further, the cookie 302 and the cookie 303 associated with the web browser application a may be stored in advance on the terminal device 301. The cookie 302 may be used to store page identifications; the cookie 303 may be used to store call information. The cookie 302, cookie 303, the main page, and the sub-application page may be provided with the same primary domain name. The main page and the sub-application page may be provided with different sub-domain names.
First, the user may trigger the call request 304 for the sub-application page of the sub-application A1 by performing a specified operation on the main page by the terminal device 301, where the call request 304 may include call information 3041 and a page identifier 3042 of the sub-application page, and the call information 3041 may include a method name and parameter information.
Then, the setup terminal 305 associated with the above-described main page may receive the call request 304.
Finally, the setting end 305 may write the page identifier 3042 into the cookie 302 and write the call information 3041 into the cookie 303, so that when the execution end associated with the sub-application page indicated by the page identifier 3042 detects that the page identifier 3042 exists in the cookie 302, the call information 3041 is acquired from the cookie 303, and a corresponding call operation is performed based on the method name and the parameter information in the call information 3041.
According to the method provided by the embodiment of the application, through effective utilization of the first browser cache file and the second browser cache file, cross-domain calling between pages provided with the same primary domain name and different subdomain names can be achieved.
With further reference to fig. 4, a flow 400 of one embodiment of a method for information processing at an executing end is shown. The process 400 of the information processing method for the execution end includes the following steps:
step 401, detecting whether a target page identifier of the associated target page exists in a preset first browser cache file.
In this embodiment, the electronic device (for example, the executing end 103 shown in fig. 1) on which the information processing method of the executing end operates may detect, in real time or in a fixed time, whether the target page identifier of the target page associated with the electronic device exists in the preset first browser cache.
Each page in the application where the target page is located may be respectively associated with an execution end. In addition, when the execution ends are respectively associated with the pages, the setting ends may be respectively associated with the pages. In addition, the individual pages may be provided with the same primary domain name. Of course, where the same primary domain name is provided, the individual pages may be provided with different sub-domain names (e.g., secondary domain name, tertiary domain name, etc.).
Here, each setting end may be configured to receive a call request triggered by its associated page and process the call request. For example, the setup side may process the call request using flow 200 of the embodiment shown in fig. 2.
It should be noted that, the browser cache file may be a text file stored in a browser directory, which may be referred to as a cookie. The first browser cache may be used to store page identifiers.
In step 402, in response to detecting the target page identifier, information associated with the target page identifier is obtained from a preset second browser cache.
In this embodiment, in response to the electronic device detecting the target page identifier, the electronic device may acquire information associated with the target page identifier from a preset second browser cache.
As an example, the second browser cache may store the information and the target page identifier corresponding to the information, and the electronic device may acquire the information based on the target page identifier.
It should be noted that, the second browser cache file may be used to store call information (information for indicating that the call operation is performed) and a call result. The first browser cache, the second browser cache, and the target page may be provided with the same primary domain name. In addition, the first browser cache file and the second browser cache file may be created by a setting end, which is associated with a page in the application where the target page is located, and is the first setting end to receive the call request. It should be understood that the present embodiment does not limit any method for creating the first browser cache file and the second browser cache file.
In some optional implementations of this embodiment, the target page identifier may correspond to a specified location in the second browser cache file. The electronic device may obtain information from the specified location.
Step 403, parse the information to determine whether the information is call information for indicating to execute the call operation.
In this embodiment, the electronic device may parse the obtained information associated with the target page identifier, and determine whether the information is call information for indicating that the call operation is performed. As an example, the electronic device may be associated with a method name and a function name in advance. The electronic device may determine whether the information is call information by determining whether the information includes the method name or the function name.
Step 404, in response to determining that the information is call information, performing a corresponding call operation based on the information.
In this embodiment, in response to the electronic device determining that the acquired information associated with the target page identifier is call information, the electronic device may perform a corresponding call operation based on the information. For example, if the information includes a method name, the electronic device may call a method indicated by the method name.
In some optional implementations of this embodiment, when the electronic device executes the calling operation, the target page identifier in the first browser cache file may be cleared, so as to avoid affecting a next calling process.
In some optional implementations of this embodiment, the electronic device may clear the acquired information stored in the second browser cache file and associated with the target page identifier when performing the call operation.
If the information is stored in the second browser cache file at the designated location related to the target page identifier, the electronic device may not need to clear the information when performing the call operation, and when writing the information to the designated location again, the original information in the designated location is usually covered.
In some optional implementations of this embodiment, the information associated with the target page identifier acquired by the electronic device may include a method name and parameter information. The parameter information may include callback function information. The callback function information may be associated with a page identification. The page indicated by the page identifier associated with the callback function information and the target page are provided with the same primary domain name and belong to the same application. In addition, the callback function information may include a pointer (address) of the callback function, and the electronic device may transfer the pointer as a parameter to a method indicated by the method name and then call the method. After the call is ended and a call result (the call result may include information such as a return value) is obtained, the electronic device may write the page identifier associated with the callback function information into the first browser cache file, and write the call result into the second browser cache file, so that when the execution end associated with the page indicated by the page identifier detects that the page identifier exists in the first browser cache file, the call result is obtained from the second browser cache file, and corresponding processing is performed.
According to the method provided by the embodiment of the application, whether the target page identifier of the target page associated with the setting end exists in the preset first browser cache file is detected by the setting end, so that the setting end can acquire information associated with the target page identifier from the preset second browser cache file when detecting the target page identifier. And then by parsing the information to determine whether the information is information indicating that a call operation is to be performed. Then, when the information is determined to be call information, a corresponding call operation can be performed based on the information. Therefore, the first browser cache file and the second browser cache file are effectively utilized, and cross-domain calling between pages provided with the same primary domain name and different subdomain names can be realized.
With further reference to fig. 5, the present application provides an embodiment of an information processing apparatus for a setup terminal, which corresponds to the method embodiment shown in fig. 2, and which is particularly applicable to various electronic devices.
As shown in fig. 5, the information processing apparatus 500 for a setup terminal shown in the present embodiment includes: a receiving unit 501 and a writing unit 502. The receiving unit 501 is configured to receive a call request triggered by an associated page associated with the setting end, where the call request may include call information and a target page identifier, and the call information may be used to indicate execution of a call operation; the writing unit 502 is configured to write the target page identifier into a preset first browser cache file and write the call information into a preset second browser cache file, so that when detecting that the target page identifier exists in the first browser cache file, an executing end associated with the target page indicated by the target page identifier obtains the call information from the second browser cache file, and executes a corresponding call operation based on the call information; the related page, the target page, the first browser cache file and the second browser cache file are provided with the same primary domain name.
In the present embodiment, in the information processing apparatus 500 for the setting side: the specific processing of the receiving unit 501 and the writing unit 502 and the technical effects thereof may refer to the relevant descriptions of step 201 and step 202 in the corresponding embodiment of fig. 2, and are not repeated herein.
In some optional implementations of this embodiment, the writing unit 502 may be further configured to: and writing the calling information into a designated position related to the target page identifier in the second browser cache file.
According to the device provided by the embodiment of the application, through effective utilization of the first browser cache file and the second browser cache file, cross-domain calling between pages provided with the same primary domain name and different subdomain names can be realized.
With further reference to fig. 6, the present application provides an embodiment of an information processing apparatus for an execution end, which corresponds to the method embodiment shown in fig. 4, and which is particularly applicable to various electronic devices.
As shown in fig. 6, the information processing apparatus 600 for an execution side shown in the present embodiment includes: a detection unit 601, an acquisition unit 602, a determination unit 603, and an execution unit 604. The detecting unit 601 is configured to detect whether a target page identifier of a target page associated with the executing end exists in a preset first browser cache file; the obtaining unit 602 is configured to obtain, in response to detecting the target page identifier, information associated with the target page identifier from a preset second browser cache; the determining unit 603 is configured to parse the above information, and determine whether the above information is call information for instructing to execute a call operation; the execution unit 604 is configured to execute a corresponding calling operation based on the above information in response to determining that the above information is the above calling information; the target page, the first browser cache file and the second browser cache file are provided with the same primary domain name.
In the present embodiment, in the information processing apparatus 600 for an execution side: the specific processes of the detecting unit 601, the acquiring unit 602, the determining unit 603, and the executing unit 604 and the technical effects thereof may refer to the descriptions related to step 201, step 202, step 203, and step 204 in the corresponding embodiment of fig. 4, and are not repeated herein.
In some optional implementations of this embodiment, the acquiring unit 602 may be further configured to: and acquiring the information from the appointed position in the second browser cache file, wherein the appointed position is related to the target page identification.
In some optional implementations of this embodiment, the apparatus 600 may further include: and a first clearing unit (not shown in the figure) configured to clear the target page identifier in the first browser cache file when performing a call operation.
In some optional implementations of this embodiment, the apparatus 600 may further include: and a second clearing unit (not shown in the figure) configured to clear the information in the second browser cache file when performing the call operation.
In some optional implementations of this embodiment, the information may include a method name and parameter information, where the parameter information may include callback function information, where the callback function information may be associated with a page identifier, and a page indicated by the page identifier associated with the callback function information and the target page are set to the same primary domain name.
In some optional implementations of this embodiment, the apparatus 600 may further include: and a writing unit (not shown in the figure) configured to write the page identifier associated with the callback function information into the first browser cache after the calling operation is performed to obtain a calling result, and write the calling result into the second browser cache.
The device provided by the embodiment of the application effectively utilizes the first browser cache file and the second browser cache file, and can realize cross-domain calling between pages provided with the same primary domain name and different subdomain names.
Referring now to FIG. 7, a schematic diagram of a computer system 700 suitable for use in implementing the electronic device of the present embodiments is shown. The electronic device shown in fig. 7 is only an example and should not impose any limitation on the functionality and scope of use of the embodiments of the present application.
As shown in fig. 7, 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 section 708 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, ROM 702, and RAM 703 are connected to each other through a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
The following components are connected to the I/O interface 705: an input section 706 including a keyboard, a mouse, and the like; an output portion 707 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, a speaker, and the like; a storage section 708 including a hard disk or the like; and a communication section 709 including a network interface card such as a LAN card, a modem, or the like. The communication section 709 performs communication processing via a network such as the internet. The 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, or the like is mounted on the drive 710 as necessary, so that a computer program read therefrom is mounted into the storage section 708 as necessary.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via the communication portion 709, and/or installed from the removable medium 711. The above-described functions defined in the system of the present application are performed when the computer program is executed by a Central Processing Unit (CPU) 701.
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 two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present application, however, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present application may be implemented by software, or may be implemented by hardware. The described units may also be provided in a processor, for example, described as: a processor includes a receiving unit and a writing unit. It can also be described as: a processor includes a detection unit, an acquisition unit, a determination unit, and an execution unit. Where the names of these units do not constitute a limitation on the unit itself in some cases, for example, the receiving unit may also be described as "unit receiving a call request triggered by an associated page associated with the set-end".
As another aspect, the present application also provides a computer-readable medium that may be contained in the electronic device described in the above embodiment; or may exist alone without being incorporated into the electronic device. The computer readable medium carries one or more programs which, when executed by one of the electronic devices, cause the electronic device to include: receiving a call request triggered by the associated page, wherein the call request can comprise call information and a target page identifier, and the call information can be used for indicating to execute a call operation; writing the target page identification into a preset first browser cache file, and writing calling information into a preset second browser cache file, so that when the execution end associated with the target page indicated by the target page identification detects that the target page identification exists in the first browser cache file, the calling information is acquired from the second browser cache file, and corresponding calling operation is executed based on the calling information; the associated page, the target page, the first browser cache file and the second browser cache file are provided with the same primary domain name.
In addition, the present application also provides a computer-readable medium that may be included in the electronic device described in the above embodiments; or may exist alone without being incorporated into the electronic device. The computer readable medium carries one or more programs which, when executed by one of the electronic devices, cause the electronic device to include: detecting whether a target page identifier of a target page associated with the electronic equipment exists in a preset first browser cache file; in response to detecting the target page identifier, acquiring information associated with the target page identifier from a preset second browser cache file; analyzing the information, and determining whether the information is calling information for indicating to execute calling operation; responding to the determined information as the calling information, and executing corresponding calling operation based on the information; the target page, the first browser cache file and the second browser cache file are provided with the same first-level domain name.
The foregoing description is only of the preferred embodiments of the present application and is presented as a description of the principles of the technology being utilized. It will be appreciated by persons skilled in the art that the scope of the invention referred to in this application is not limited to the specific combinations of features described above, but it is intended to cover other embodiments in which any combination of features described above or equivalents thereof is possible without departing from the spirit of the invention. Such as the above-described features and technical features having similar functions (but not limited to) disclosed in the present application are replaced with each other.

Claims (20)

1. An information processing method for a setup terminal, comprising:
receiving a call request triggered by an associated page associated with the setting end, wherein the call request comprises call information and a target page identifier, and the call information is used for indicating execution of a call operation;
writing the target page identification into a preset first browser cache file, and writing the calling information into a preset second browser cache file, so that when an execution end associated with a target page indicated by the target page identification detects that the target page identification exists in the first browser cache file, the calling information is acquired from the second browser cache file, and corresponding calling operation is executed based on the calling information;
the associated page, the target page, the first browser cache file and the second browser cache file are provided with the same primary domain name.
2. The method of claim 1, wherein the writing the call information into the preset second browser cache file comprises:
and writing the calling information into a designated position which is related to the target page identifier in the second browser cache file.
3. An information processing method for an execution end, comprising:
detecting whether a target page identifier of a target page associated with the execution end exists in a preset first browser cache file;
in response to detecting the target page identifier, acquiring information associated with the target page identifier from a preset second browser cache file;
analyzing the information, and determining whether the information is calling information for indicating to execute calling operation;
responding to the determination that the information is the calling information, and executing corresponding calling operation based on the information;
the target page, the first browser cache file and the second browser cache file are provided with the same first-level domain name.
4. The method of claim 3, wherein the obtaining information associated with the target page identification from a preset second browser cache file comprises:
and acquiring the information from the appointed position which is in the second browser cache file and is related to the target page identification.
5. A method according to claim 3, wherein the method further comprises:
and when the calling operation is executed, the target page identification in the first browser cache file is cleared.
6. A method according to claim 3, wherein the method further comprises:
and when the calling operation is executed, clearing the information in the second browser cache file.
7. A method according to claim 3, wherein the information comprises a method name and parameter information, the parameter information comprises callback function information, page identifications are associated with the callback function information, and a page indicated by the page identifications associated with the callback function information and the target page are provided with the same primary domain name.
8. The method of claim 7, wherein the method further comprises:
after the calling operation is executed to obtain a calling result, writing the page identifier associated with the callback function information into the first browser cache file, and writing the calling result into the second browser cache file.
9. An information processing apparatus for a setup terminal, comprising:
the receiving unit is configured to receive a call request triggered by an associated page associated with the setting end, wherein the call request comprises call information and a target page identifier, and the call information is used for indicating execution of a call operation;
The writing unit is configured to write the target page identifier into a preset first browser cache file and write the calling information into a preset second browser cache file, so that when an executing end associated with a target page indicated by the target page identifier detects that the target page identifier exists in the first browser cache file, the calling information is acquired from the second browser cache file, and corresponding calling operation is executed based on the calling information;
the associated page, the target page, the first browser cache file and the second browser cache file are provided with the same primary domain name.
10. The apparatus of claim 9, wherein the writing unit is further configured to:
and writing the calling information into a designated position which is related to the target page identifier in the second browser cache file.
11. An information processing apparatus for an execution side, comprising:
the detection unit is configured to detect whether a target page identifier of a target page associated with the execution end exists in a preset first browser cache file;
The acquisition unit is configured to respond to the detection of the target page identification and acquire information associated with the target page identification from a preset second browser cache file;
the determining unit is configured to parse the information and determine whether the information is calling information for indicating to execute calling operation;
the execution unit is configured to execute corresponding calling operation based on the information in response to determining that the information is the calling information;
the target page, the first browser cache file and the second browser cache file are provided with the same first-level domain name.
12. The apparatus of claim 11, wherein the acquisition unit is further configured to:
and acquiring the information from the appointed position which is in the second browser cache file and is related to the target page identification.
13. The apparatus of claim 11, wherein the apparatus further comprises:
and the first clearing unit is configured to clear the target page identifier in the first browser cache file when the calling operation is executed.
14. The apparatus of claim 11, wherein the apparatus further comprises:
And the second clearing unit is configured to clear the information in the second browser cache file when the calling operation is executed.
15. The apparatus of claim 11, wherein the information comprises a method name and parameter information, the parameter information comprising callback function information, the callback function information being associated with a page identity, the page indicated by the page identity associated with the callback function information and the target page being provided with the same primary domain name.
16. The apparatus of claim 15, wherein the apparatus further comprises:
and the writing unit is configured to write the page identifier associated with the callback function information into the first browser cache file and write the calling result into the second browser cache file after the calling operation is performed to obtain the calling result.
17. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs,
when executed by the one or more processors, causes the one or more processors to implement the method of any of claims 1-2.
18. An electronic device, comprising:
One or more processors;
storage means for storing one or more programs,
when executed by the one or more processors, causes the one or more processors to implement the method of any of claims 3-8.
19. A computer readable medium having stored thereon a computer program, wherein the program when executed by a processor implements the method of any of claims 1-2.
20. A computer readable medium having stored thereon a computer program, wherein the program when executed by a processor implements the method of any of claims 3-8.
CN201810140366.7A 2018-02-11 2018-02-11 Information processing method and device Active CN110209959B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810140366.7A CN110209959B (en) 2018-02-11 2018-02-11 Information processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810140366.7A CN110209959B (en) 2018-02-11 2018-02-11 Information processing method and device

Publications (2)

Publication Number Publication Date
CN110209959A CN110209959A (en) 2019-09-06
CN110209959B true CN110209959B (en) 2024-01-12

Family

ID=67778586

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810140366.7A Active CN110209959B (en) 2018-02-11 2018-02-11 Information processing method and device

Country Status (1)

Country Link
CN (1) CN110209959B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112732513B (en) * 2019-10-28 2023-05-23 腾讯科技(深圳)有限公司 Memory monitoring method, memory monitoring device, computer readable storage medium and computer equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101662460A (en) * 2008-08-25 2010-03-03 阿里巴巴集团控股有限公司 Method, system and device for cross-domain communication
JP2011257810A (en) * 2010-06-04 2011-12-22 Fujitsu Ltd Relay server device, cookie control method and cookie control program
CN103905477A (en) * 2012-12-25 2014-07-02 阿里巴巴集团控股有限公司 HTTP request processing method and server
CN104426862A (en) * 2013-08-27 2015-03-18 腾讯科技(深圳)有限公司 Method, system, and browser realizing cross-domain request login
CN105550014A (en) * 2015-12-08 2016-05-04 上海交通大学 Flexible and efficient cross-permission-level and cross-domain calling method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101662460A (en) * 2008-08-25 2010-03-03 阿里巴巴集团控股有限公司 Method, system and device for cross-domain communication
JP2011257810A (en) * 2010-06-04 2011-12-22 Fujitsu Ltd Relay server device, cookie control method and cookie control program
CN103905477A (en) * 2012-12-25 2014-07-02 阿里巴巴集团控股有限公司 HTTP request processing method and server
CN104426862A (en) * 2013-08-27 2015-03-18 腾讯科技(深圳)有限公司 Method, system, and browser realizing cross-domain request login
CN105550014A (en) * 2015-12-08 2016-05-04 上海交通大学 Flexible and efficient cross-permission-level and cross-domain calling method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
浏览器跨域通信安全技术研究;何良;方勇;方昉;蒲伟;;信息安全与通信保密(04);全文 *

Also Published As

Publication number Publication date
CN110209959A (en) 2019-09-06

Similar Documents

Publication Publication Date Title
US10635735B2 (en) Method and apparatus for displaying information
CN110708346B (en) Information processing system and method
CN109857515B (en) Bridge communication method, device, equipment and computer readable storage medium
US9223977B2 (en) Detection of DOM-based cross-site scripting vulnerabilities
CN106815031B (en) Kernel module loading method and device
CN111435393B (en) Object vulnerability detection method, device, medium and electronic equipment
CN109343975B (en) Method and apparatus for inter-page asynchronous communication
CN112685671A (en) Page display method, device, equipment and storage medium
CN110598135A (en) Network request processing method and device, computer readable medium and electronic equipment
CN107766224B (en) Test method and test device
CN106454403B (en) Data display method, equipment and system
CN111131236A (en) Web fingerprint detection device, method, equipment and medium
CN109670100B (en) Page data capturing method and device
US10931771B2 (en) Method and apparatus for pushing information
CN110209959B (en) Information processing method and device
CN111125605B (en) Page element acquisition method and device
CN103051722B (en) A kind ofly determine the method whether page is held as a hostage and relevant device
CN103390129A (en) Method and device for detecting security of uniform resource locator
CN114626061A (en) Webpage Trojan horse detection method and device, electronic equipment and medium
CN111338928A (en) Chrome-based browser testing method and device
CN111783005A (en) Method, apparatus and system for displaying web page, computer system and medium
CN112860538A (en) Method and device for performing interface regression test based on online log
CN111124530A (en) Method and device for calculating first rendering time of browser, browser and storage medium
CN108920589B (en) Browsing hijacking identification method, device, server and storage medium
CN112749078B (en) Buried point testing method and device

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