CN111371868A - Method, device, equipment, system and storage medium for associating web application and client - Google Patents

Method, device, equipment, system and storage medium for associating web application and client Download PDF

Info

Publication number
CN111371868A
CN111371868A CN202010121593.2A CN202010121593A CN111371868A CN 111371868 A CN111371868 A CN 111371868A CN 202010121593 A CN202010121593 A CN 202010121593A CN 111371868 A CN111371868 A CN 111371868A
Authority
CN
China
Prior art keywords
client
web application
target
server
browser
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
CN202010121593.2A
Other languages
Chinese (zh)
Other versions
CN111371868B (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 QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and 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 QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN202010121593.2A priority Critical patent/CN111371868B/en
Publication of CN111371868A publication Critical patent/CN111371868A/en
Application granted granted Critical
Publication of CN111371868B publication Critical patent/CN111371868B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0807Network architectures or network communication protocols for network security for authentication of entities using tickets, e.g. Kerberos
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0876Network architectures or network communication protocols for network security for authentication of entities based on the identity of the terminal or configuration, e.g. MAC address, hardware or software configuration or device fingerprint
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0643Hash functions, e.g. MD5, SHA, HMAC or f9 MAC

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • Computer Hardware Design (AREA)
  • Power Engineering (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the invention provides a method, a device, equipment, a system and a storage medium for associating a web application and a client, and aims to solve the problem that a server is greatly restricted when processing a request. The method for associating the web application with the client comprises the following steps: a first web application in a first browser obtains a client identifier of a target client, wherein the first browser and the target client run in the same device, and the first web application and the target client are used for providing the same service for a user; the first web application sends the client identification to a target server; and the target server side establishes and stores the incidence relation between the target client side and the first web application according to the client side identification sent by the first web application.

Description

Method, device, equipment, system and storage medium for associating web application and client
Technical Field
The present invention relates to the field of internet technologies, and in particular, to a method, an apparatus, a device, a system, and a storage medium for associating a web application with a client.
Background
With the development of internet technology and the popularization of intelligent terminal devices, various types of offline service providers gradually start to provide services, such as services of videos, music, shopping, takeaway, news, car driving, shared economy, forum, live broadcast and the like, to users in an online interaction manner, and thus, a plurality of internet enterprises are gradually formed and strengthened.
Generally, in order to provide a more convenient online interaction condition for a user, an internet enterprise simultaneously develops a client (APP) and a web application related to a service and opens the client to the user, so that the user can not only directly access the service through the client, but also indirectly access the service through the web application in a browser without installing the client, thereby more conveniently obtaining the service provided by the service. In most cases, a client and a browser are installed on a terminal device (e.g., a mobile phone, a tablet computer, a notebook computer, a desktop computer, etc.) of a user at the same time. In some cases, the user may open the browser and access the server through a web application in the browser while accessing the server through the client. In the related art, when a server faces a browser request and a client request from the same terminal device, the two requests are regarded as requests from different terminal devices, so that the server is greatly restricted when processing the requests, and it is difficult to further improve user experience.
Disclosure of Invention
Embodiments of the present invention provide a method, an apparatus, a device, a system, and a storage medium for associating a web application with a client, and aim to solve the problem that a server is greatly restricted when processing a request.
The specific technical scheme is as follows:
in a first aspect of an embodiment of the present invention, a method for associating a web application with a client is provided first, where the method includes:
a first web application in a first browser obtains a client identifier of a target client, wherein the first browser and the target client run in the same device, and the first web application and the target client are used for providing the same service for a user;
the first web application sends the client identification to a target server;
and the target server side establishes and stores the incidence relation between the target client side and the first web application according to the client side identification sent by the first web application.
In a second aspect of the embodiments of the present invention, there is provided another method for associating a web application with a client, the method including:
a web application in a browser obtains a client identifier of a target client, wherein the browser and the target client run in the same device, and the web application and the target client are used for providing the same service for a user;
and the web application sends the client identification to a target server so as to establish and store the association relationship between the target client and the web application through the target server.
In a third aspect of the embodiments of the present invention, there is provided a further method for associating a web application with a client, where the method includes:
a target server receives a client identifier sent by a first web application in a first browser;
and the target server establishes and stores an incidence relation between the first web application and a target client according to the client identifier sent by the first web application, wherein the target client corresponds to the client identifier.
In a fourth aspect of the embodiments of the present invention, there is provided yet another method for associating a web application with a client, the method including:
a first web application in a first browser obtains a client identifier of a target client and sends the client identifier to the target server, wherein the first browser and the target client run in the same device, and the first web application and the target client are used for providing the same service for a user;
the target client sends the client identification of the target client to the target server;
and after receiving the client identifier sent by the first web application and the client identifier sent by the target client, the target server compares the two client identifiers, and establishes and stores the association relationship between the target client and the first web application under the condition that the two client identifiers are consistent.
In a fifth aspect of the embodiments of the present invention, there is further provided a method for associating a web application with a client, the method including:
a target client transmits a client identifier of the target client to a web application in a browser so that the web application sends the client identifier to a target server, wherein the browser and the target client run in the same device, and the web application and the target client are used for providing the same service for a user;
and the target client sends the client identification of the target client to the target server, so that the target server compares the client identifications sent by the web application and the client identifications sent by the target client after receiving the client identifications, and establishes and stores the association relationship between the target client and the web application under the condition that the client identifications are consistent.
In a sixth aspect of the embodiments of the present invention, there is provided another apparatus for associating a web application and a client, where the apparatus is configured for the web application in a browser, and the apparatus includes:
the identification obtaining module is used for enabling a web application in a browser to obtain a client identification of a target client, wherein the browser and the target client run in the same device, and the web application and the target client are used for providing the same service for a user;
and the identification sending module is used for enabling the web application to send the client identification to a target server so as to establish and store the association relationship between the target client and the web application through the target server.
In a seventh aspect of the embodiments of the present invention, there is provided yet another apparatus for associating a web application with a client, where the apparatus is disposed at a target server, and includes:
the receiving module is used for enabling the target server to receive the client identification sent by the first web application in the first browser;
and the association module is used for enabling the target server to establish and store an association relation between the first web application and a target client according to the client identifier sent by the first web application, wherein the target client corresponds to the client identifier.
In an eighth aspect of the embodiments of the present invention, there is further provided another apparatus for associating a web application with a client, where the apparatus is disposed at a target client, and includes:
the identification transfer module is used for enabling a target client to transfer a client identification to a web application in a browser so that the web application can send the client identification to a target server, wherein the browser and the target client run in the same device, and the web application and the target client are used for providing the same service for a user;
and the request sending module is used for enabling the target client to send the client identifier of the target client to the target server, so that the target server compares the two client identifiers after receiving the client identifier sent by the web application and the client identifier sent by the target client, and establishes and stores the association relationship between the target client and the web application under the condition that the two client identifiers are consistent.
In a ninth aspect of the embodiments of the present invention, there is also provided a system for associating a web application and a client, the system including: the system comprises a first web application, a client and a server, wherein the first web application runs in a first browser, the first browser and the client run in the same device, and the first web application and the client are used for providing the same service for a user; wherein the content of the first and second substances,
the first web application is used for obtaining a client identification of the client;
the first web application is further used for sending the client identification to the server;
and the server is used for establishing and storing the association relationship between the client and the first web application according to the client identifier sent by the first web application.
In a tenth aspect of the embodiments of the present invention, there is provided another system for associating a web application with a client, the system including: the system comprises a first web application, a client and a server, wherein the first web application runs in a first browser, the first browser and the client run in the same device, and the first web application and the client are used for providing the same service for a user; wherein the content of the first and second substances,
the first web application is used for obtaining a client identifier of the client and sending the client identifier to the server;
the client is used for sending the client identification of the client to the server;
and the server is used for comparing the client identifications sent by the first web application and the client identifications sent by the client after receiving the client identifications sent by the first web application, and establishing and storing the association relationship between the client and the first web application under the condition that the two client identifications are consistent.
In an eleventh aspect of the embodiments of the present invention, there is further provided a terminal device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
and a processor, configured to implement the method steps provided in the second aspect or the fifth aspect of the embodiments of the present invention when executing the program stored in the memory.
In a twelfth aspect of the embodiments of the present invention, there is further provided a server device, including a processor, a communication interface, a memory, and a communication bus, where the processor and the communication interface complete communication between the memory and the processor through the communication bus;
a memory for storing a computer program;
a processor, configured to implement the method steps provided by the third aspect of the embodiments of the present invention when executing the program stored in the memory.
In a thirteenth aspect implemented by the present invention, there is also provided a computer-readable storage medium having stored therein instructions, which when run on a computer, cause the computer to perform any of the above-described methods of associating a web application and a client.
In a fourteenth aspect of an embodiment of the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform any of the above-described methods of associating a web application with a client.
In the method for associating a web application with a client provided by the embodiment of the present invention, the target server can determine that the web application and the target client corresponding to the client identifier operate in the same device after receiving the client identifier sent by the web application by obtaining the client identifier of the target client and sending the client identifier to the target server, and thus, the web application and the target client can be associated. In this way, when the target server receives the browser request sent by the web application and the client request sent by the target client, the two requests can be regarded as requests from the same terminal device.
In addition, because the web application and the target client are used for providing the same service for the user, the server can more intelligently process the data generated by the user through the web application and the data generated by the user through the target client, so that the request processing (such as recommendation of information such as advertisement, news, video, music and the like) can be more intelligently performed, the limitation suffered during the request processing can be reduced, and the user experience can be further improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below.
FIG. 1 is an interactive flow diagram of a method for associating a web application with a client in accordance with an embodiment of the present invention;
FIG. 2 is an interactive flow diagram of a method for associating a web application with a client in accordance with another embodiment of the present invention;
FIG. 3 is a schematic diagram of a method for associating a web application with a client according to another embodiment of the present invention;
FIG. 4 is a schematic diagram of an association process proposed by an embodiment of the present invention;
FIG. 5 is a flow chart of a method of associating a web application with a client as set forth in another embodiment of the invention;
FIG. 6 is a flow chart of a method of associating a web application with a client as set forth in yet another embodiment of the present invention;
FIG. 7 is a flow diagram of a method for associating a web application with a client in accordance with yet another embodiment of the present invention;
FIG. 8 is a flow diagram of a method for associating a web application with a client in accordance with yet another embodiment of the present invention;
FIG. 9 is a schematic diagram of a system for associating a web application with a client as set forth in an embodiment of the present invention;
FIG. 10 is a schematic diagram of an apparatus for associating a web application with a client according to an embodiment of the present invention;
FIG. 11 is a schematic diagram of an apparatus for associating a web application with a client according to another embodiment of the present invention;
FIG. 12 is a schematic diagram of a system for associating a web application with a client as set forth in another embodiment of the present invention;
FIG. 13 is a schematic diagram of an apparatus for associating a web application with a client in accordance with yet another embodiment of the present invention;
fig. 14 is a schematic diagram of a terminal according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention.
In the field of internet technology, in order to provide a more convenient online interaction condition for a user, an internet enterprise typically develops a client (APP) and a web application related to a service at the same time and opens the client to the user, so that the user can not only directly access the server through the client, but also indirectly access the server through the web application in a browser without installing the client, thereby more conveniently obtaining the service provided by the server.
In most cases, a client and a browser are installed on a terminal device (e.g., a mobile phone, a tablet computer, a notebook computer, a desktop computer, etc.) of a user at the same time. In some cases, the user may open the browser and access the server through a web application in the browser while accessing the server through the client. In the related art, when a server is faced with a browser request and a client request from the same terminal device, the two requests are regarded as requests from different terminal devices respectively. Therefore, when the server pushes information to the web application and/or the client, or when the server performs account security verification, the server is greatly restricted, so that the user experience is difficult to further improve.
In view of this, embodiments of the present invention provide a method, an apparatus, a device, a system, and a storage medium for associating a web application with a client, which are used to solve the problem that a server is greatly restricted when processing a request.
Referring to fig. 1, fig. 1 is a flowchart of a method for associating a web application and a client according to an embodiment of the present invention. As shown in fig. 1, the method comprises the steps of:
step S11: a first web application in a first browser obtains a client identification of a target client.
As shown in fig. 1, the first browser and the target client run in the same terminal device, and the first web application and the target client are used to provide the same service to the user.
Wherein, since the first web application and the target client are used for providing the same service to the user, the target client and the first web application can be regarded as: the client and the web application developed aiming at the target service can access the same server through the client and the web application, and the server can provide the target service. Among them, the web application can be understood as: a module run or loaded by a browser, such as a web application or web page.
Taking the video service as an example, the user can access the video service a through the video client a1 or through the video webpage a2, and when the present invention is executed for the video client a1 and the video webpage a2, the video webpage a2 serves as the first web application, and the video client a1 serves as the target client. The video class web page a2 obtains the client id of the video class client a1 by executing step S11.
Wherein, the client identifier may be: and the target server interacting with the target client identifies the basis for distinguishing the plurality of clients. For example, the client id of the client M running in the device a is different from the client id of the client M running in the device B. For example, a client M runs on a mobile phone of the user X, and a client M also runs on a tablet personal computer of the user X, and although the two clients M log in the same account of the user X, the respective client identifiers of the two clients M are different from each other.
In one or more embodiments, the client identification of the client can be associated with the hardware device on which the client is running. For example, the client identifier may specifically be: a Device Unique Identifier (UDID), an advertisement Identifier (IDFA), or a MAC address of a hardware Device. It should be noted that the present invention does not limit the specific type of the client identifier.
Step S12: and the first web application sends the client identification to a target server.
Wherein, the target server can be understood as: and the server can respectively interact with the target client and the first web application.
Following the above example, for example, if the user can access the video class service end a through the video class client a1 or through the video class webpage a2, the video class service end a serves as the target service end when the present invention is executed for the video class client a1, the video class webpage a2 and the video class service end a. The video class web page a2 sends the client id of the video class client a1 to the video class server a by executing step S12.
Step S13: and the target server side establishes and stores the incidence relation between the target client side and the first web application according to the client side identification sent by the first web application.
Because the first browser and the target client run in the same device, after the first web application in the first browser obtains the client identifier of the target client in the same device and sends the client identifier to the target server, the target server may determine that the target client corresponding to the first web application and the client identifier runs in the same device, and thus, the first web application and the target client may be associated.
Following the above example, for example, if a user can access the video class service a through the video class client a1 or through the video class webpage a2, when the present invention is executed for the video class client a1, the video class webpage a2 and the video class service a, the video class service a may establish and store an association relationship between the video class webpage a2 and the video class client a1 after receiving the client identifier of the video class client a1 sent by the video class webpage a2, so that the video class webpage a2 and the video class client a1 are associated with each other.
In addition, since the video-class web page a2 and the video-class client a1 are both used for providing video-class services to the user, the video-class server a can more intelligently process the data generated by the user through the video-class web page a2 and the data generated by the user through the video-class client a1, so as to more intelligently perform request processing (e.g., video recommendation), so as to reduce the restrictions imposed during the request processing and further enhance the user experience.
Considering that in some cases, multiple browsers are installed on the terminal device of the user at the same time, the user may access the target server through the web applications in the different browsers successively within a period of time (for example, a day, a week, or a month). Similarly, when the server is faced with browser requests from different browsers of the same terminal device, the browser requests are regarded as requests from different terminal devices respectively. Thus, the server may need to collect corresponding user data for each browser, maintain a set of user portrait data, and process a browser request of each browser for the user portrait data corresponding to each browser. It can be seen that, when the server processes the request under such a condition, since it cannot sense that the request of each browser is from the same terminal device, when the server responds to the request of different browsers, it needs to recommend media content for each browser according to different recommendation algorithms and user images.
Therefore, the server is greatly restricted when processing browser requests from different browsers of the same terminal device.
To this end, referring to fig. 2, fig. 2 is a flowchart of a method for associating a web application and a client according to another embodiment of the present invention. As shown in fig. 2, the method includes the following steps in addition to steps S11 to S13:
step S14: and a second web application in the second browser obtains the client identification of the target client.
The second browser and the target client run in the same device, and the second web application and the target client are used for providing the same service for the user.
Likewise, since the second web application and the target client are used to provide the same service to the user, the target client and the second web application may be viewed as: the client and the web application developed aiming at the target service can access the same server through the client and the web application, and the server can provide the target service. Among them, the web application can be understood as: a module run or loaded by a browser, such as a web application or web page.
Step S15: and the second web application sends the client identification to the target server.
Step S16: and the target server side establishes and stores an incidence relation among the target client side, the first web application and the second web application according to the client side identification sent by the second web application.
It should be noted that the first web application and the second web application can be understood as: the module contents of two modules, a first web application and a second web application, run or loaded by different browsers in the same device are typically the same. For example, the first web application and the second web application are the same web application program, or for example, the first web application and the second web application are the same web page.
Because the second browser and the target client run in the same device, after the second web application in the second browser obtains the client identifier of the target client in the same device and sends the client identifier to the target server, the target server can determine that the target client corresponding to the second web application and the client identifier runs in the same device, and thus, the second web application and the target client can be associated. Further, since the target client is already associated with the first web application, the server may further associate the second web application, the first web application, and the target client. Since the first web application, the second web application and the target client are used for providing the same service for the user, the server can more intelligently perform request processing (e.g. recommendation of information such as advertisement, news, video, music, etc.) so as to weaken the restriction imposed during the request processing and further improve the user experience.
For example, in one or more embodiments, the server may only maintain a set of user representation data for the second web application, the first web application, and the target client, and in one aspect, may gather information for the set of user representation data from three locations, the second web application, the first web application, and the target client, to more accurately create and update the set of user representation data. On the other hand, the number of user portrait data needing to be maintained in the server can be effectively reduced, and the utilization rate of storage space in the server is improved.
Referring to fig. 3, fig. 3 is a schematic diagram of a method for associating a web application and a client according to another embodiment of the present invention. In order to enable the first web application in the first browser and the second web application in the second browser to smoothly obtain the client identifier of the target client, the target client may automatically start the local server. Wherein, starting the local server means: the terminal device running the target client is used as a server to receive a request from an internal program (for example, a web application in a browser running in the terminal device) of the terminal device, and the started local server is the terminal device running the target client.
After starting the local server, the target client may monitor an http port of the local server (i.e., the terminal device). The first web application may send the identifier acquisition request to an http port of the local server after the target client starts the local server. As shown in fig. 3, after the target client listens to the identifier obtaining request, the client identifier corresponding to the target client is returned to the first web application. Similarly, after the target client starts the local server, the second web application sends an identification acquisition request to an http port of the local server. As shown in fig. 3, after the target client listens to the identifier obtaining request, the client identifier corresponding to the target client is returned to the second web application.
As shown in fig. 3, after obtaining the client identifier of the target client, the first web application may store the client identifier in a cookie corresponding to the first web application, and during the interaction between the first web application and the target server shown in fig. 2, the cookie may be carried in a request sent by the first web application to the target server. Similarly, after obtaining the client identifier of the target client, the second web application may store the client identifier in a cookie corresponding to the second web application, and during the interaction between the second web application and the target server shown in fig. 2, the cookie may be carried in a request sent by the second web application to the target server.
The web application stores the client identifier in the cookie, and the client identifier can be automatically sent to the target server because the web application can automatically carry the cookie corresponding to the web application when sending the request to the target server. Therefore, the interaction between the web application and the target server side can be simplified, the network bandwidth occupation is reduced, and the load of the target server side is reduced.
It should be noted that: during implementation of the method, the web application can store the client identification in the corresponding cookie, so that the client identification is automatically sent to the target server along with the cookie. The web application may also send the client identifier to the server, specifically via a data packet, after obtaining the client identifier. The invention is not limited to how the web application sends the client identifier to the target server.
In the following, the method shown in fig. 3 is described continuously by taking an example in which the web application stores the client identifier in the cookie and transmits the client identifier to the target server through the cookie.
To protect the security of the client identification given that cookie data is semi-public data, in one or more embodiments, the client identification returned by the target client to the web application may be an identification that has undergone data desensitization processing. In other words, the client identifications obtained by the first web application and the second web application are identifications after data desensitization processing.
The data desensitization processing may be performed in various ways, but the invention is not limited thereto. The client identity of the target client may be encrypted, for example with a public key, so that the client identity is desensitized. And the private key corresponding to the public key is mastered by the target server. For example, the hash calculation may be performed on the client identifier of the target client to obtain a hash string corresponding to the client identifier, so that the client identifier is desensitized.
For example, if the client identifier is desensitized by means of hash calculation, as shown in fig. 3, the target client may carry the client identifier in the request during interaction with the target server. After receiving the client identifier sent by the target client, the target server may store the client identifier. The target server may also perform hash calculation on the client identifier, and store the calculated hash string (hereinafter, the hash string is referred to as a target hash string).
As shown in fig. 3, during the interaction of the first web application with the target server, the cookie carried in the request includes: and the hash string of the browser identifier and the client identifier of the first browser. Referring to fig. 4, fig. 4 is a schematic diagram of an association process proposed by the embodiment of the present invention. As shown in fig. 4, after receiving the browser identifier and the hash string, the target server may compare the hash string with each of the pre-calculated and stored target hash strings. In the case where the hash string is consistent with a certain target hash string (e.g., target hash string 3), an association may be established and stored. The association relationship includes: the browser identifier of the first browser and the client identifier (for example, the client identifier 3) corresponding to the target hash string, thereby implementing association between the first web application and the target client.
Likewise, during the interaction of the second web application with the target server, the cookie carried in the request includes: and the browser identification of the second browser and the hash string of the client identification. After receiving the browser identifier and the hash string, the target server may compare the hash string with each of the target hash strings that are calculated and stored in advance. An association relationship may be established and stored in the case where the hash string is consistent with a certain target hash string. The association relationship includes: the browser identification of the second browser and the client identification corresponding to the target hash string. Thereby enabling association of the second web application with the target client.
Furthermore, since the client identity is already associated with the browser identity of the first browser at the same time, the browser identity of the second browser can thus be associated with the browser identity of the first browser. Therefore, the association among the first web application, the second web application, the target client and the like on the same device is realized.
In the above example, the terminal performs data desensitization processing through hash calculation, and the server performs matching comparison of the client identifier hash string after performing hash calculation, so that on one hand, the security of the client identifier during network transmission can be effectively improved, and the client identifier is prevented from being leaked. On the other hand, by comparing the hash strings, the client identification is favorably prevented from being tampered by a network attacker during network transmission.
Or exemplarily, if the client identification is desensitized by means of public key encryption, the first web application includes, during interaction with the target server, in a cookie carried in the request: the browser identification of the first browser and the encrypted client identification. After receiving the browser identifier and the encrypted client identifier, the target server may decrypt the encrypted client identifier using a private key grasped by the target server. After decrypting the client identifier, the target server may establish and store an association relationship, where the association relationship includes: a browser identification of the first browser, and the client identification, thereby enabling association of the first web application with the target client.
Similarly, the association between the second web application and the target client is realized, and the association between the first web application, the second web application, the target client and the like on the same device is realized.
After the target server associates the first web application, the second web application, the target client and the like, in one or more embodiments, the target server may integrate three of a web browsing record of the user through the first web application, a web browsing record of the user through the second web application, a web browsing record of the user through the target client and the like, comprehensively establish user portrait data according to the three web browsing records, and push information to the first web application, the second web application and/or the target client according to the user portrait data.
Furthermore, during implementation of the present invention, the target client may automatically start the local server each time it is activated (turned on) by the user. The first web application in the first browser may send the identification acquisition request to the started local server (i.e. the terminal device itself) when it first attempts to interact with the target server, in other words, when the first web application does not yet have a corresponding cookie (as shown in fig. 3). Alternatively, the identification acquisition request may be sent to the started local server only in the case that the cookie corresponding to the web application does not contain the client identification (as shown in fig. 3). Therefore, the method can avoid the condition that the web application calls the relevant logic for acquiring the client identifier before sending the request to the target server every time, and is beneficial to improving the interaction efficiency between the web application and the target server.
In the above, the present invention provides a preferred embodiment of a method for associating a web application with a client from three interactive sides, i.e., the web application, the client, and the server. The present invention will now be summarized and/or modified to a different extent from the above-described preferred embodiments, respectively, from each interactive side, in order to propose a plurality of different embodiments under the same inventive concept.
Referring to fig. 5, fig. 5 is a flowchart of a method for associating a web application and a client according to another embodiment of the present invention. The method shown in fig. 5 is a web application side based method, as shown in fig. 5, comprising the steps of:
step S51: the method comprises the steps that a web application in a browser obtains a client identification of a target client, wherein the browser and the target client run in the same device, and the web application and the target client are used for providing the same service for a user.
As mentioned above, or referring to fig. 3, in order for the web application to obtain the client identifier of the target client successfully, step S51 may specifically include the following sub-steps:
the web application in the browser sends an identification acquisition request to a local server; and the web application acquires a client identifier returned by the target client, wherein the client identifier is returned to the web application when the target client monitors that a port of the local server receives the identifier acquisition request.
Wherein the local server may be said target client initiated. As mentioned before, the implication of starting the local server is: the terminal device running the target client is used as a server to receive a request from an internal program (for example, a web application in a browser running in the terminal device) of the terminal device, and the started local server is the terminal device running the target client.
Illustratively, in one or more embodiments, the target client may automatically start the local server and listen to the http port of the local server (i.e., the terminal device itself running the target client) each time it is activated (turned on) by the user.
The web application may send an identifier retrieval request to the local server to retrieve the client identifier of the target client only when the first attempt to interact with the target server is made.
Or, before sending the identifier obtaining request to the local server, the web application may also determine whether the cookie corresponding to the web application contains the client identifier, and send the identifier obtaining request to the local server to obtain the client identifier of the target client when the cookie corresponding to the web application does not contain the client identifier. And after monitoring the identification acquisition request, the target client returns the client identification corresponding to the target client to the web application.
Step S52: and the web application sends the client identification to a target server so as to establish and store the association relationship between the target client and the web application through the target server.
As mentioned above, or referring to fig. 3, in order for the web application to send the client identifier to the target server, step S52 may specifically include the following sub-steps:
the web application stores the obtained client-side identification into a cookie corresponding to the web application; and the web application sends a browser request to the target server, wherein the browser request carries the cookie corresponding to the web application.
The terminal device can enable the web application to send a browser request to the target server side after detecting the request operation of the user. For example, a display device of the terminal device displays a web page corresponding to the web application to the user, and when the user inputs a keyword in a search box of the web page and clicks a search key, the web application may send a browser request to the target server.
It should be noted that: during implementation of the method, the web application can store the client identification in the corresponding cookie, so that the client identification is automatically sent to the target server along with the cookie. The web application may also send the client identifier to the server, specifically via a data packet, after obtaining the client identifier. The invention is not limited as to how the web application sends the client identifier to the target server.
By executing the method including the step S51 and the step S52, the web application running in the browser in the same device as the target client obtains the client identifier of the target client and sends the client identifier to the target server, so that after receiving the client identifier sent by the web application, the target server can determine that the web application and the target client corresponding to the client identifier run in the same device, and further can associate the web application and the target client. In this way, when the target server receives the browser request sent by the web application and the client request sent by the target client, the two requests can be regarded as requests from the same terminal device.
In addition, because the web application and the target client are used for providing the same service for the user, the server can more intelligently process the data generated by the user through the web application and the data generated by the user through the target client, so that the request processing (such as recommendation of information such as advertisement, news, video, music and the like) can be more intelligently performed, the limitation suffered during the request processing can be reduced, and the user experience can be further improved.
As previously described, in one or more embodiments, to protect the security of the client identification given that cookie data is semi-public data, in one or more embodiments the client identification returned by the target client to the web application may be an identification that has undergone data desensitization processing. In other words, the client identification obtained by the web application is the identification after the data desensitization process.
The data desensitization processing may be performed in various ways, but the invention is not limited thereto. The client identity of the target client may be encrypted, for example with a public key, so that the client identity is desensitized. And the private key corresponding to the public key is mastered by the target server. For example, the hash calculation may be performed on the client identifier of the target client to obtain a hash string corresponding to the client identifier, so that the client identifier is desensitized.
In one or more embodiments, while the web application sends the client identifier to the target server, the web application may also send the browser identifier corresponding to the web application to the target server, so as to correspondingly store the browser identifier and the client identifier through the target server, thereby establishing an association relationship between the target client and the web application.
Illustratively, the web application stores the client identifier in a cookie, and transmits the client identifier to the target server through the cookie. As mentioned above, during the interaction of the web application with the target server, the cookie carried in the request includes: the browser identification corresponding to the web application and the client identification obtained by the web application. The client identifier may be an identifier after data desensitization processing.
After verifying the client identifier (for example, hash comparison, decryption by using a private key, etc.), the target server establishes and stores an association relationship. The association relationship includes: and the browser identification corresponding to the web application and the client identification of the target client side, so that the association between the web application and the target client side is realized.
Referring to fig. 6, fig. 6 is a flowchart of a method for associating a web application and a client according to another embodiment of the present invention. The method shown in fig. 6 is a target server side based method, as shown in fig. 6, comprising the steps of:
step S61: the target server receives a client identifier sent by a first web application in a first browser.
As described above, the client identifier may be carried in a cookie corresponding to the first web application, and the first web application sends the client identifier to the target server through the cookie. Alternatively, the client identifier may be specifically sent by the first web application to the target server via a data packet. The invention does not limit the sending mode and the receiving mode of the client terminal identification.
Step S62: and the target server establishes and stores an incidence relation between the first web application and a target client according to the client identifier sent by the first web application, wherein the target client corresponds to the client identifier.
As described above, since the first browser and the target client run in the same device, after the first web application in the first browser obtains the client identifier of the target client in the same device and sends the client identifier to the target server, the target server may determine that the target client corresponding to the first web application and the client identifier runs in the same device, and thus, the first web application and the target client may be associated.
By performing the method including step S61 and step S62, the same or similar effects as those of the method shown in fig. 5 can be achieved, and the present invention is not described in detail herein.
As described in the foregoing examples, the specific manner in which the target server establishes the association relationship according to the client identifier sent by the first web application may be selected in many ways. For example, in some examples, the target server may receive and store a client identification sent by the target client; after the target server receives the client identifier sent by the web application, the client identifier sent by the web application and the client identifier sent by the target client can be compared; and under the condition that the two client identifications are consistent, establishing and storing an incidence relation between the first web application and the target client.
In order to ensure the safety of the client identification, the client identification sent by the first web application is the identification subjected to data desensitization processing. In the invention, the data desensitization processing mode can be hash calculation, public key encryption and the like, and the specific mode of the data desensitization processing is not limited by the invention.
Therefore, when the target server compares the client identifier sent by the web application with the client identifier sent by the target client, the data desensitization processing can be firstly carried out on the client identifier sent by the target client, so as to obtain the client identifier after the data desensitization processing. And the target server compares the two client identifications subjected to data desensitization processing. Taking the data desensitization processing mode of hash calculation as an example, the target server performs hash calculation on the client identifier sent by the target client to obtain a hash string of the client identifier, and then compares the hash string with the hash string sent by the web application.
It should be noted that, the specific way of establishing the association relationship between the target servers is not limited in the present invention.
As described above, while the web application sends the client identifier to the target server, the web application may also send the browser identifier corresponding to the web application to the target server. In this way, when receiving the client identifier sent by the first web application in the first browser, the target server may also receive a browser identifier sent by the first web application, where the browser identifier corresponds to the first web application. In other words, the browser identification is the identification of the first browser.
After receiving the client identifier and the browser identifier sent by the first web application, the server correspondingly stores the client identifier and the browser identifier, so as to establish an association relationship between the first web application and a target client, wherein the association relationship comprises: and the client identification of the target client and the browser identification corresponding to the first web application.
As described above, considering that in some cases, multiple browsers are installed on a terminal device of a user at the same time, the user may access a target server through web applications in different browsers successively within a period of time (for example, a day, a week, or a month). Similarly, when the server is faced with browser requests from different browsers of the same terminal device, the browser requests are regarded as requests from different terminal devices respectively. Thus, the server may need to collect corresponding user data for each browser, maintain a set of user portrait data, and process a browser request of each browser for the user portrait data corresponding to each browser. It can be seen that the server is greatly restricted when processing the request in this situation.
For this purpose, the target server may further receive the client identifier sent by the second web application in the second browser; and the target server side establishes and stores the association relation among the second web application, the first web application and the target client side according to the client side identification sent by the second web application.
For the specific way of establishing the association relationship between the target server and the target server, reference may be made to the description of the preferred embodiment, which is not repeated herein. It should be noted that, the target server may receive not only the client identifier sent by the first web application in the first browser and the client identifier sent by the second web application in the second browser, but also the client identifier sent by the corresponding web application in the nth browser, so as to establish an association relationship between the target client and the multiple web applications.
As previously described, the target server is after establishing the association between the first web application and the target client. During the process of processing the information push request sent by the first web application and/or the target client, the target server side can obtain a webpage browsing record of a user through the first web application and a client browsing record of the user through the target client; and the target server side pushes information to the first web application and/or the target client side according to the web page browsing record, the client side browsing record and the incidence relation between the first web application and the target client side.
Illustratively, the target server may maintain a set of user representation data based on the web browsing records and the client browsing records. During processing of an information push request sent by a first web application and/or a target client, a target server may push information to the first web application and/or the target client according to the set of user portrait data. The information pushed by the target server is generally information in which the user is interested in the image.
Referring to fig. 7, fig. 7 is a flowchart of a method for associating a web application and a client according to still another embodiment of the present invention. As shown in fig. 7, the method comprises the steps of:
step S71: a first web application in a first browser obtains a client identifier of a target client and sends the client identifier to the target server, wherein the first browser and the target client run in the same device, and the first web application and the target client are used for providing the same service for a user;
step S72: the target client sends the client identification of the target client to the target server;
step S73: and after receiving the client identifier sent by the first web application and the client identifier sent by the target client, the target server compares the two client identifiers, and establishes and stores the association relationship between the target client and the first web application under the condition that the two client identifiers are consistent.
For the specific implementation of the above steps S71 to S73, reference is made to the above descriptions, and the present invention is not repeated herein.
Referring to fig. 8, fig. 8 is a flowchart of a method for associating a web application and a client according to still another embodiment of the present invention. The method shown in fig. 8 is a target client side based method, as shown in fig. 8, comprising the steps of:
step S81: the method comprises the steps that a target client transmits a client identification of the target client to a web application in a browser, so that the web application sends the client identification to a target server, wherein the browser and the target client run in the same device, and the web application and the target client are used for providing the same service for a user.
As mentioned above, or referring to fig. 3, in order for the target client to pass the client identifier to the web application in the browser, when step S81 is executed, specifically, the target client starts the local server and listens to a port of the local server; and after monitoring the identification acquisition request sent to the local server by the web application, the target client returns a client identification to the web application.
In particular, the target client may automatically start the local server. Wherein, starting the local server means: the terminal device running the target client is used as a server to receive a request from an internal program (for example, a web application in a browser running in the terminal device) of the terminal device, and the started local server is the terminal device running the target client. After the target client starts the local server, the target client may monitor an http port of the local server (i.e., a terminal device), and aims to monitor an identifier obtaining request sent by the web application to the http port of the local server.
The target client may start the local server at the following time: the target server automatically starts the local server each time it is activated (turned on) by the user.
As previously described, in one or more embodiments, the client identification passed to the web application by the target client is an identification that has undergone data desensitization processing. The data desensitization processing may be performed in various ways, but the invention is not limited thereto. The client identity of the target client may be encrypted, for example with a public key, so that the client identity is desensitized. And the private key corresponding to the public key is mastered by the target server. For example, the hash calculation may be performed on the client identifier of the target client to obtain a hash string corresponding to the client identifier, so that the client identifier is desensitized.
Step S82: and the target client sends the client identification of the target client to the target server, so that the target server compares the client identifications sent by the web application and the client identifications sent by the target client after receiving the client identifications, and establishes and stores the association relationship between the target client and the web application under the condition that the client identifications are consistent.
The target client may send a request, such as a login request, a retrieval request, a media resource acquisition request, an order placement request, a payment request, and the like, to the target server, where the request carries a client identifier.
As described above, in order to protect the security of the client identifier, in one or more embodiments, the client identifier returned by the target client to the Web application may be an identifier subjected to data desensitization, and the Web application sends the desensitized client identifier to the target server as part of cookie data. For example, taking the data desensitization processing on the client identifier by means of hash calculation as an example, as shown in fig. 3 and 4, the target client may carry the client identifier in the request during the interaction with the target server. After receiving the client identifier sent by the target client, the target server may store the client identifier. The target server may also perform hash calculation on the client identifier, and store the calculated hash string (hereinafter, the hash string is referred to as a target hash string).
As shown in FIG. 3, during the interaction of the web application with the target server, the cookie carried in the request includes: and the hash string of the browser identifier and the client identifier of the browser. As shown in fig. 4, after receiving the browser identifier and the hash string, the target server may compare the hash string with each of the pre-calculated and stored target hash strings. Under the condition that the hash string is consistent with a certain target hash string, an association relationship can be established and stored, wherein the association relationship comprises: and the browser identifier of the browser and the client identifier corresponding to the target hash string, so that the association between the web application and the target client is realized.
Or exemplarily, in some embodiments, after obtaining the client identifier of the target client, the web application sends the client identifier and the browser identifier corresponding to the web application to the target server exclusively through a data packet. The web application can send an association request to the local server before sending a data packet to the target server, and the target client sends a client request to the target server immediately after monitoring the association request, wherein the client request carries a client identifier of the target client, and aims to enable the target server to cache the client identifier and set a cache countdown (for example, 20 seconds). Thus, after receiving a data packet sent by the web application, the target server can match the client identifier in the data packet with the cached client identifier, and establish and store an association relationship under the condition that the matching is successful, wherein the association relationship comprises: and the client identification and the browser identification are included in the data packet, so that the association between the web application and the target client is realized.
By performing the method including step S81 and step S82, the same or similar effects as those of the method shown in fig. 5 can be achieved, and the present invention is not described in detail herein.
Based on the same inventive concept, an embodiment of the present invention provides a system for associating a web application and a client. Referring to fig. 9, fig. 9 is a schematic diagram of a system for associating a web application and a client according to an embodiment of the present invention. As shown in the dashed box in fig. 9, the system includes: a first web application 91, a client 92 and a server 93, wherein the first web application 91 runs in a first browser 94, the first browser 94 and the client 92 run in the same device, and the first web application 91 and the client 92 are used for providing the same service for a user; wherein the content of the first and second substances,
the first web application 91 is configured to obtain a client identifier of the client 92;
the first web application 91 is further configured to send the client identifier to the server 93;
the server 93 is configured to establish and store an association relationship between the client 92 and the first web application 91 according to the client identifier sent by the first web application 91.
Optionally, as shown in fig. 9, the system may further include a second web application 95, where the second web application 95 runs in a second browser 96, the second browser 96 runs in the same device as the client 92, and the second web application 95 and the client 92 are used to provide the same service to the user;
the second web application 95, configured to obtain a client identifier of the client 92;
the second web application 95 is further configured to send the client identifier to the server 93;
the server 93 is further configured to establish and store an association relationship among the client 92, the first web application 91, and the second web application 95 according to the client identifier sent by the second web application 95.
Based on the same inventive concept, the embodiment of the invention provides another device for associating the web application and the client. Referring to fig. 10, fig. 10 is a schematic diagram of an apparatus for associating a web application and a client, the apparatus being a web application installed in a browser according to another embodiment of the present invention. As shown in fig. 10, the apparatus includes:
an identifier obtaining module 101, configured to enable a web application in a browser to obtain a client identifier of a target client, where the browser and the target client run in the same device, and the web application and the target client are used to provide the same service to a user;
an identifier sending module 102, configured to enable the web application to send the client identifier to a target server, so as to establish and store an association relationship between the target client and the web application through the target server.
Optionally, the identifier obtaining module 101 is specifically configured to: enabling the web application in the browser to send an identification acquisition request to a local server; and enabling the web application to obtain a client identifier returned by the target client, wherein the client identifier is returned to the web application when the target client monitors that the port of the local server receives the identifier obtaining request.
Optionally, the identifier sending module 102 is specifically configured to: enabling the web application to store the obtained client identification into a cookie corresponding to the web application; and enabling the web application to send a browser request to the target server side, wherein the browser request carries the cookie corresponding to the web application.
Optionally, the identifier obtaining module 101 is specifically configured to: judging whether a cookie corresponding to the web application contains a client identifier in advance; and under the condition that the cookie corresponding to the web application does not contain the client identification, enabling the web application in the browser to acquire the client identification of the target client.
Optionally, the client identifier obtained by the web application is an identifier after data desensitization processing.
Optionally, the identifier sending module 102 is further configured to, while enabling the web application to send the client identifier to a target server, enable the web application to send a browser identifier corresponding to the web application to the target server, so as to correspondingly store the browser identifier and the client identifier through the target server, so as to establish an association relationship between the target client and the web application.
Based on the same inventive concept, another embodiment of the present invention provides another apparatus for associating a web application with a client. Referring to fig. 11, fig. 11 is a schematic diagram of a device for associating a web application with a client according to another embodiment of the present invention, where the device is located at a target server. As shown in fig. 11, the apparatus includes:
a receiving module 111, configured to enable a target server to receive a client identifier sent by a first web application in a first browser;
an association module 112, configured to enable the target server to establish and store an association relationship between the first web application and a target client according to the client identifier sent by the first web application, where the target client corresponds to the client identifier.
Optionally, the receiving module 111 is further configured to: enabling the target server to receive and store the client identification sent by the target client;
the association module 112 is specifically configured to: enabling the target server to compare the client identification sent by the first web application with the client identification sent by the target client; and under the condition that the two client identifications are consistent, establishing and storing an incidence relation between the first web application and the target client.
Optionally, the client identifier sent by the first web application is an identifier subjected to data desensitization processing; the association module 112 is specifically configured to: enabling the target server side to perform data desensitization processing on the client side identification sent by the target client side to obtain the client side identification subjected to data desensitization processing; and comparing the two client identifications subjected to data desensitization by the target server.
Optionally, when the target server receives a client identifier sent by a first web application in a first browser, the receiving module 111 is further configured to cause the target server to receive a browser identifier sent by the first web application, where the browser identifier corresponds to the first web application;
the association module 112 is specifically configured to: enabling the target server to establish and store an association relationship between the first web application and a target client according to the client identifier and the browser identifier sent by the first web application, wherein the association relationship comprises: the client identification of the target client and the browser identification corresponding to the first web application.
Optionally, the receiving module 111 is further configured to: enabling the target server to receive the client identification sent by a second web application in a second browser;
the association module 112 is further configured to: and enabling the target server to establish and store the association relation among the second web application, the first web application and the target client according to the client identifier sent by the second web application.
As shown in fig. 11, optionally, the apparatus may further include:
a browsing record obtaining module 113, configured to enable the target server to obtain a web browsing record of the user through the first web application and a client browsing record of the user through the target client;
an information pushing module 114, configured to enable the target server to push information to the first web application and/or the target client according to the web page browsing record, the client browsing record, and the association relationship between the first web application and the target client.
Based on the same inventive concept, another embodiment of the present invention provides another system for associating a web application with a client. Referring to fig. 12, fig. 12 is a schematic diagram of a system for associating a web application and a client according to another embodiment of the present invention. As shown in the dashed box in fig. 12, the system includes: the system comprises a first web application 1201, a client 1202 and a server 1203, wherein the first web application 1201 runs in a first browser 1204, the first browser 1204 and the client 1202 run in the same device, and the first web application 1201 and the client 1202 are used for providing the same service for a user; wherein the content of the first and second substances,
the first web application 1201 is configured to obtain a client identifier of the client 1202, and send the client identifier to the server 1203;
the client 1202 is configured to send a client identifier of the client 1202 to the server 1203;
the server 1203 is configured to compare the client identifier sent by the first web application 1201 with the client identifier sent by the client 1202 after receiving the client identifier sent by the first web application 1201 and the client identifier sent by the client 1202, and establish and store an association relationship between the client 1202 and the first web application 1201 when the two client identifiers are consistent.
Based on the same inventive concept, another embodiment of the present invention provides another apparatus for associating a web application with a client. Referring to fig. 13, fig. 13 is a schematic diagram of an apparatus for associating a web application with a client according to another embodiment of the present invention, the apparatus being disposed at a target client. As shown in fig. 13, the apparatus includes:
an identifier delivery module 131, configured to enable a target client to deliver a client identifier thereof to a web application in a browser, so that the web application sends the client identifier to a target server, where the browser and the target client run in the same device, and the web application and the target client are used to provide the same service to a user;
a request sending module 132, configured to enable the target client to send a client identifier of the target client to the target server, so that the target server compares the client identifier sent by the web application and the client identifier sent by the target client after receiving the client identifier sent by the target client, and establishes and stores an association relationship between the target client and the web application when the two client identifiers are consistent.
Optionally, the identifier passing module 131 is specifically configured to: enabling the target client to start a local server and monitoring a port of the local server; and after monitoring the identification acquisition request sent to the local server by the web application, the target client returns a client identification to the web application.
Optionally, the client identifier passed by the target client to the web application is an identifier subjected to data desensitization processing.
The embodiment of the present invention further provides a terminal device, as shown in fig. 14, which includes a processor 1401, a communication interface 1402, a memory 1403 and a communication bus 1404, wherein the processor 1401, the communication interface 1402 and the memory 1403 complete communication with each other through the communication bus 1404,
a memory 1403 for storing a computer program;
the processor 1401, when executing the program stored in the memory 1403, implements the following steps:
a web application in a browser obtains a client identifier of a target client, wherein the browser and the target client run in the same device, and the web application and the target client are used for providing the same service for a user;
and the web application sends the client identification to a target server so as to establish and store the association relationship between the target client and the web application through the target server.
Or, the following steps are implemented:
a target client transmits a client identifier of the target client to a web application in a browser so that the web application sends the client identifier to a target server, wherein the browser and the target client run in the same device, and the web application and the target client are used for providing the same service for a user;
and the target client sends the client identification of the target client to the target server, so that the target server compares the client identifications sent by the web application and the client identifications sent by the target client after receiving the client identifications, and establishes and stores the association relationship between the target client and the web application under the condition that the client identifications are consistent.
Further, the processor 1401 may also implement the steps mentioned in the above-mentioned other method embodiments based on the web application side or the target client side during execution of the program stored on the memory 1403.
The communication bus mentioned in the above terminal may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the terminal and other equipment.
The Memory may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
In another embodiment provided by the present invention, a server is further provided, which includes a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
the processor is used for realizing the following steps when executing the program stored in the memory:
a target server receives a client identifier sent by a first web application in a first browser;
and the target server establishes and stores an incidence relation between the first web application and a target client according to the client identifier sent by the first web application, wherein the target client corresponds to the client identifier.
Furthermore, the processor may also implement the steps mentioned in the above-mentioned other method embodiments based on the target service side during execution of the program stored on the memory.
In yet another embodiment of the present invention, a computer-readable storage medium is further provided, which has instructions stored therein, which when run on a computer, cause the computer to perform the method of associating a web application and a client as described in any of the above embodiments.
In yet another embodiment provided by the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the method of associating a web application and a client as described in any of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (26)

1. A method of associating a web application with a client, the method comprising:
a first web application in a first browser obtains a client identifier of a target client, wherein the first browser and the target client run in the same device, and the first web application and the target client are used for providing the same service for a user;
the first web application sends the client identification to a target server;
and the target server side establishes and stores the incidence relation between the target client side and the first web application according to the client side identification sent by the first web application.
2. The method of claim 1, further comprising:
a second web application in a second browser obtains a client identifier of the target client, wherein the second browser and the target client run in the same device, and the second web application and the target client are used for providing the same service for a user;
the second web application sends the client identification to the target server;
and the target server side establishes and stores an incidence relation among the target client side, the first web application and the second web application according to the client side identification sent by the second web application.
3. A method of associating a web application with a client, the method comprising:
a web application in a browser obtains a client identifier of a target client, wherein the browser and the target client run in the same device, and the web application and the target client are used for providing the same service for a user;
and the web application sends the client identification to a target server so as to establish and store the association relationship between the target client and the web application through the target server.
4. The method of claim 3, wherein obtaining, by the web application in the browser, a client identification of the target client comprises:
the web application in the browser sends an identification acquisition request to a local server;
and the web application acquires a client identifier returned by the target client, wherein the client identifier is returned to the web application when the target client monitors that a port of the local server receives the identifier acquisition request.
5. The method of claim 3, wherein the web application sending the client identifier to a target server comprises:
the web application stores the obtained client-side identification into a cookie corresponding to the web application;
and the web application sends a browser request to the target server, wherein the browser request carries the cookie corresponding to the web application.
6. The method of claim 5, wherein before the web application in the browser obtains the client identification of the target client, the method further comprises:
judging whether a cookie corresponding to the web application contains a client identifier;
and under the condition that the cookie corresponding to the web application does not contain the client identification, executing the step that the web application in the browser acquires the client identification of the target client.
7. The method according to any one of claims 3 to 6, wherein the client identification obtained by the web application is an identification subjected to data desensitization processing.
8. The method of any of claims 3 to 6, wherein the web application, while sending the client identifier to the target server, further comprises:
and the web application sends the browser identification corresponding to the web application to the target server, so that the browser identification and the client identification are correspondingly stored through the target server, and the association relationship between the target client and the web application is established.
9. A method of associating a web application with a client, the method comprising:
a target server receives a client identifier sent by a first web application in a first browser;
and the target server establishes and stores an incidence relation between the first web application and a target client according to the client identifier sent by the first web application, wherein the target client corresponds to the client identifier.
10. The method of claim 9, further comprising:
the target server receives and stores the client identifier sent by the target client;
the target server establishes and stores an association relationship between the first web application and a target client according to the client identifier sent by the first web application, and the association relationship comprises the following steps:
the target server compares the client identifier sent by the first web application with the client identifier sent by the target client;
and under the condition that the two client identifications are consistent, establishing and storing an incidence relation between the first web application and the target client.
11. The method of claim 10, wherein the client identifier sent by the first web application is an identifier that has undergone data desensitization processing;
the target server compares the client identifier sent by the first web application with the client identifier sent by the target client, and the method comprises the following steps:
the target server side carries out data desensitization processing on the client side identification sent by the target client side to obtain the client side identification after the data desensitization processing;
and the target server compares the two client identifications subjected to data desensitization processing.
12. The method of claim 9, wherein when the target server receives the client identifier sent by the first web application in the first browser, the method further comprises:
the target server receives a browser identification sent by the first web application, wherein the browser identification corresponds to the first web application;
the target server establishes and stores an association relationship between the first web application and a target client according to the client identifier sent by the first web application, and the association relationship comprises the following steps:
the target server establishes and stores an association relationship between the first web application and a target client according to the client identifier and the browser identifier sent by the first web application, wherein the association relationship comprises: the client identification of the target client and the browser identification corresponding to the first web application.
13. The method according to any one of claims 9 to 12, further comprising:
the target server receives the client identification sent by a second web application in a second browser;
and the target server side establishes and stores the incidence relation among the second web application, the first web application and the target client side according to the client side identification sent by the second web application.
14. The method according to any one of claims 9 to 12, further comprising:
the target server side obtains a webpage browsing record of a user through the first web application and a client side browsing record of the user through the target client side;
and the target server side pushes information to the first web application and/or the target client side according to the webpage browsing record, the client side browsing record and the incidence relation between the first web application and the target client side.
15. A method of associating a web application with a client, the method comprising:
a first web application in a first browser obtains a client identifier of a target client and sends the client identifier to the target server, wherein the first browser and the target client run in the same device, and the first web application and the target client are used for providing the same service for a user;
the target client sends the client identification of the target client to the target server;
and after receiving the client identifier sent by the first web application and the client identifier sent by the target client, the target server compares the two client identifiers, and establishes and stores the association relationship between the target client and the first web application under the condition that the two client identifiers are consistent.
16. A method of associating a web application with a client, the method comprising:
a target client transmits a client identifier of the target client to a web application in a browser so that the web application sends the client identifier to a target server, wherein the browser and the target client run in the same device, and the web application and the target client are used for providing the same service for a user;
and the target client sends the client identification of the target client to the target server, so that the target server compares the client identifications sent by the web application and the client identifications sent by the target client after receiving the client identifications, and establishes and stores the association relationship between the target client and the web application under the condition that the client identifications are consistent.
17. The method of claim 16, wherein the target client passes its client identification to a web application in a browser, comprising:
the target client starts a local server and monitors a port of the local server;
and after monitoring the identification acquisition request sent to the local server by the web application, the target client returns a client identification to the web application.
18. The method according to claim 16 or 17, wherein the client identity passed by the target client to the web application is an identity after data desensitization processing.
19. An apparatus for associating a web application with a client, the web application disposed in a browser, the apparatus comprising:
the identification obtaining module is used for enabling a web application in a browser to obtain a client identification of a target client, wherein the browser and the target client run in the same device, and the web application and the target client are used for providing the same service for a user;
and the identification sending module is used for enabling the web application to send the client identification to a target server so as to establish and store the association relationship between the target client and the web application through the target server.
20. An apparatus for associating a web application with a client, the apparatus being disposed at a target server, the apparatus comprising:
the receiving module is used for enabling the target server to receive the client identification sent by the first web application in the first browser;
and the association module is used for enabling the target server to establish and store an association relation between the first web application and a target client according to the client identifier sent by the first web application, wherein the target client corresponds to the client identifier.
21. An apparatus for associating a web application with a client, the apparatus being configured to be provided to a target client, the apparatus comprising:
the identification transfer module is used for enabling a target client to transfer a client identification to a web application in a browser so that the web application can send the client identification to a target server, wherein the browser and the target client run in the same device, and the web application and the target client are used for providing the same service for a user;
and the request sending module is used for enabling the target client to send the client identifier of the target client to the target server, so that the target server compares the two client identifiers after receiving the client identifier sent by the web application and the client identifier sent by the target client, and establishes and stores the association relationship between the target client and the web application under the condition that the two client identifiers are consistent.
22. A system for associating a web application with a client, the system comprising: the system comprises a first web application, a client and a server, wherein the first web application runs in a first browser, the first browser and the client run in the same device, and the first web application and the client are used for providing the same service for a user; wherein the content of the first and second substances,
the first web application is used for obtaining a client identification of the client;
the first web application is further used for sending the client identification to the server;
and the server is used for establishing and storing the association relationship between the client and the first web application according to the client identifier sent by the first web application.
23. A system for associating a web application with a client, the system comprising: the system comprises a first web application, a client and a server, wherein the first web application runs in a first browser, the first browser and the client run in the same device, and the first web application and the client are used for providing the same service for a user; wherein the content of the first and second substances,
the first web application is used for obtaining a client identifier of the client and sending the client identifier to the server;
the client is used for sending the client identification of the client to the server;
and the server is used for comparing the client identifications sent by the first web application and the client identifications sent by the client after receiving the client identifications sent by the first web application, and establishing and storing the association relationship between the client and the first web application under the condition that the two client identifications are consistent.
24. The terminal equipment is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing the communication between the processor and the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any one of claims 3 to 8 or 16 to 18 when executing a program stored in the memory.
25. The server-side equipment is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 9 to 14 when executing a program stored in the memory.
26. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-18.
CN202010121593.2A 2020-02-26 2020-02-26 Method, device, equipment, system and storage medium for associating web application and client Active CN111371868B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010121593.2A CN111371868B (en) 2020-02-26 2020-02-26 Method, device, equipment, system and storage medium for associating web application and client

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010121593.2A CN111371868B (en) 2020-02-26 2020-02-26 Method, device, equipment, system and storage medium for associating web application and client

Publications (2)

Publication Number Publication Date
CN111371868A true CN111371868A (en) 2020-07-03
CN111371868B CN111371868B (en) 2023-02-03

Family

ID=71206351

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010121593.2A Active CN111371868B (en) 2020-02-26 2020-02-26 Method, device, equipment, system and storage medium for associating web application and client

Country Status (1)

Country Link
CN (1) CN111371868B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114339729A (en) * 2020-09-30 2022-04-12 阿里巴巴集团控股有限公司 Method and device for generating equipment identifier, electronic equipment and storage medium

Citations (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101388899A (en) * 2007-09-12 2009-03-18 北京启明星辰信息技术有限公司 Front-background related auditing method and system for Web server
CN101436148A (en) * 2007-11-14 2009-05-20 华为技术有限公司 Integrated client end and method for performing interaction of desktop application and network WEB application
CN102790772A (en) * 2012-07-25 2012-11-21 亿赞普(北京)科技有限公司 Cookie data processing method, server and client
CN103218133A (en) * 2013-03-28 2013-07-24 东莞宇龙通信科技有限公司 Startup method of associated application program and terminal
CN103455632A (en) * 2013-09-22 2013-12-18 金蝶软件(中国)有限公司 Method and client for display web pages
US20140082715A1 (en) * 2012-09-19 2014-03-20 Secureauth Corporation Mobile multifactor single-sign-on authentication
CN103841188A (en) * 2014-02-27 2014-06-04 北京奇虎科技有限公司 Cookie information processing method and device in browser
WO2014118548A1 (en) * 2013-01-30 2014-08-07 Imimobile Europe Ltd Tracking system
CN104065635A (en) * 2013-07-02 2014-09-24 腾讯科技(深圳)有限公司 Web page accessing method and client
CN104144161A (en) * 2014-07-08 2014-11-12 北京彩云动力教育科技有限公司 Interacting method and system for client side and WEB server side
US20150019616A1 (en) * 2011-03-30 2015-01-15 Fujitsu Limited Application providing system, application providing method, and information processing apparatus
CN104468739A (en) * 2014-11-20 2015-03-25 北京安奇智联科技有限公司 Information processing method, client side and mobile terminal
CN104468790A (en) * 2014-12-09 2015-03-25 北京奇虎科技有限公司 Method for processing cookie data and client side
CN104506616A (en) * 2014-12-19 2015-04-08 北京奇虎科技有限公司 Method, device and system for sending information by browser client side
CN104580074A (en) * 2013-10-14 2015-04-29 阿里巴巴集团控股有限公司 Logging method of client end application and corresponding server of logging method
CN106330844A (en) * 2015-07-02 2017-01-11 阿里巴巴集团控股有限公司 Across-terminal login avoiding method and device
CN106850756A (en) * 2016-12-29 2017-06-13 广州凯耀资产管理有限公司 A kind of method and system for realizing web page and locally applied communication
CN107111630A (en) * 2014-11-05 2017-08-29 谷歌公司 Open locally applied from browser
CN108540509A (en) * 2017-03-01 2018-09-14 腾讯科技(深圳)有限公司 A kind of processing method of terminal browser, device and server, intelligent terminal
EP2005712B1 (en) * 2006-04-12 2019-03-06 Citrix Systems, Inc. Systems and methods for accelerating delivery of a computing environment to remote user
CN109587197A (en) * 2017-09-29 2019-04-05 北京京东尚科信息技术有限公司 It is associated with the methods, devices and systems of reported data
CN110166499A (en) * 2018-02-11 2019-08-23 优视科技有限公司 A kind of method and server obtaining user's representation data

Patent Citations (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2005712B1 (en) * 2006-04-12 2019-03-06 Citrix Systems, Inc. Systems and methods for accelerating delivery of a computing environment to remote user
CN101388899A (en) * 2007-09-12 2009-03-18 北京启明星辰信息技术有限公司 Front-background related auditing method and system for Web server
CN101436148A (en) * 2007-11-14 2009-05-20 华为技术有限公司 Integrated client end and method for performing interaction of desktop application and network WEB application
US20150019616A1 (en) * 2011-03-30 2015-01-15 Fujitsu Limited Application providing system, application providing method, and information processing apparatus
CN102790772A (en) * 2012-07-25 2012-11-21 亿赞普(北京)科技有限公司 Cookie data processing method, server and client
US20140082715A1 (en) * 2012-09-19 2014-03-20 Secureauth Corporation Mobile multifactor single-sign-on authentication
WO2014118548A1 (en) * 2013-01-30 2014-08-07 Imimobile Europe Ltd Tracking system
CN103218133A (en) * 2013-03-28 2013-07-24 东莞宇龙通信科技有限公司 Startup method of associated application program and terminal
CN104065635A (en) * 2013-07-02 2014-09-24 腾讯科技(深圳)有限公司 Web page accessing method and client
CN103455632A (en) * 2013-09-22 2013-12-18 金蝶软件(中国)有限公司 Method and client for display web pages
CN104580074A (en) * 2013-10-14 2015-04-29 阿里巴巴集团控股有限公司 Logging method of client end application and corresponding server of logging method
CN103841188A (en) * 2014-02-27 2014-06-04 北京奇虎科技有限公司 Cookie information processing method and device in browser
CN104144161A (en) * 2014-07-08 2014-11-12 北京彩云动力教育科技有限公司 Interacting method and system for client side and WEB server side
CN107111630A (en) * 2014-11-05 2017-08-29 谷歌公司 Open locally applied from browser
CN104468739A (en) * 2014-11-20 2015-03-25 北京安奇智联科技有限公司 Information processing method, client side and mobile terminal
CN104468790A (en) * 2014-12-09 2015-03-25 北京奇虎科技有限公司 Method for processing cookie data and client side
CN104506616A (en) * 2014-12-19 2015-04-08 北京奇虎科技有限公司 Method, device and system for sending information by browser client side
CN106330844A (en) * 2015-07-02 2017-01-11 阿里巴巴集团控股有限公司 Across-terminal login avoiding method and device
CN106850756A (en) * 2016-12-29 2017-06-13 广州凯耀资产管理有限公司 A kind of method and system for realizing web page and locally applied communication
CN108540509A (en) * 2017-03-01 2018-09-14 腾讯科技(深圳)有限公司 A kind of processing method of terminal browser, device and server, intelligent terminal
CN109587197A (en) * 2017-09-29 2019-04-05 北京京东尚科信息技术有限公司 It is associated with the methods, devices and systems of reported data
CN110166499A (en) * 2018-02-11 2019-08-23 优视科技有限公司 A kind of method and server obtaining user's representation data

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
YI LIU; XUANZHE LIU; YUN MA; YUNXIN LIU; ZIBIN ZHENG; GANG HUANG: ""Characterizing RESTful Web Services Usage on Smartphones: A Tale of Native Apps and Web Apps"", 《2015 IEEE INTERNATIONAL CONFERENCE ON WEB SERVICES》 *
马友忠; 孟小峰: ""云数据管理索引技术研究"", 《软件学报》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114339729A (en) * 2020-09-30 2022-04-12 阿里巴巴集团控股有限公司 Method and device for generating equipment identifier, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN111371868B (en) 2023-02-03

Similar Documents

Publication Publication Date Title
US10992682B2 (en) Systems and methods for efficient and secure temporary anonymous access to media content
US8566907B2 (en) Multiple user login detection and response system
CN109951480B (en) System, method, and non-transitory computer-readable storage medium for data storage
US20080270578A1 (en) Method, Device And Data Download System For Controlling Effectiveness Of A Download Transaction
US20150341322A1 (en) User privacy protection method and system
US9258115B2 (en) Securing information exchanged via a network
CN104283903A (en) Downloading method for files and device thereof
US11544357B2 (en) Systems and methods for authentication
CN111371868B (en) Method, device, equipment, system and storage medium for associating web application and client
CN112202813B (en) Network access method and device
WO2014153982A1 (en) Methods and systems for broadcasting pictures
Prasadreddy et al. A threat free architecture for privacy assurance in cloud computing
US10855513B2 (en) Information pushing method, device and computer readable storage medium
KR101978898B1 (en) Web scraping prevention system using characteristic value of user device and the method thereof
US20220255758A1 (en) Systems and methods for protecting data
US9363274B2 (en) Methods and systems for broadcasting pictures
CN114629671B (en) Data detection system
EP4049165B1 (en) Cross-domain frequency filters for fraud detection
CN1741441A (en) A personal information network query method
CN117254942A (en) Data management method, device, electronic equipment and computer readable medium
CN117290892A (en) Method, apparatus, device and computer readable medium for securing data
CN118194355A (en) Distributed file system access method, apparatus, device, medium and program product
JP2022533874A (en) Prevent data manipulation and protect user privacy in telecom network measurements
CN113014973A (en) Audio and video data processing method, system and device, electronic equipment and storage medium
CN116346486A (en) Combined login method, device, equipment and storage medium

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