CN114553433B - Third party platform access method and device, electronic equipment and medium - Google Patents

Third party platform access method and device, electronic equipment and medium Download PDF

Info

Publication number
CN114553433B
CN114553433B CN202210139168.5A CN202210139168A CN114553433B CN 114553433 B CN114553433 B CN 114553433B CN 202210139168 A CN202210139168 A CN 202210139168A CN 114553433 B CN114553433 B CN 114553433B
Authority
CN
China
Prior art keywords
access token
token information
party platform
target
historical
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210139168.5A
Other languages
Chinese (zh)
Other versions
CN114553433A (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.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network 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 Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN202210139168.5A priority Critical patent/CN114553433B/en
Publication of CN114553433A publication Critical patent/CN114553433A/en
Application granted granted Critical
Publication of CN114553433B publication Critical patent/CN114553433B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/321Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving a third party or a trusted authority
    • H04L9/3213Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving a third party or a trusted authority using tickets or tokens, e.g. Kerberos
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/30Interconnection arrangements between game servers and game devices; Interconnection arrangements between game devices; Interconnection arrangements between game servers
    • A63F13/35Details of game servers
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/60Generating or modifying game content before or while executing the game program, e.g. authoring tools specially adapted for game development or game-integrated level editor
    • 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/10Network architectures or network communication protocols for network security for controlling access to devices or network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to devices or network resources
    • H04L63/108Network architectures or network communication protocols for network security for controlling access to devices or network resources when the policy decisions are valid for a limited amount of time
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The embodiment of the invention provides a third party platform access method, a device, electronic equipment and a readable storage medium, wherein the method comprises the following steps: responding to an access instruction aiming at a target third party platform, and generating a first access token application request aiming at the target third party platform; sending the first access token application request to the game server; receiving one of first historical access token information, second historical access token information and latest access token information which are returned by the game server and are aimed at the target third-party platform; and accessing the target third party platform by adopting the first historical access token information or the second historical access token information or the latest access token information. According to the embodiment of the invention, the game client is directly accessed to the third party platform and is optimized to access the third party platform through the central server, so that the access frequency to the third party platform can be greatly reduced.

Description

Third party platform access method and device, electronic equipment and medium
Technical Field
The present invention relates to the field of internet technologies, and in particular, to a third party platform access method, a third party platform access device, an electronic device, and a computer readable storage medium.
Background
Game development can be generally divided into a server and a client, and in game development, the client often needs to access a third party platform, for example, to access a third party live platform in a game, or to access a third party paymate platform, etc. The current access method is that a client directly calls a third party platform interface to be in butt joint with a third party platform server, and the method is suitable for most situations, but if the access frequency of a third party platform is limited, when the number of game players increases, the client used by each game player needs to call the third party platform interface, so that the access frequency of the third party platform can reach the upper limit, and the third party service can not be normally used.
Disclosure of Invention
In view of the foregoing, embodiments of the present invention have been made to provide a third party platform access method and corresponding third party platform access device, an electronic device, and a computer-readable storage medium that overcome or at least partially solve the foregoing problems.
The embodiment of the invention discloses a third party platform access method which is applied to a game client, wherein the game client is in communication connection with a game server, the game server is in communication connection with a central server, and the method comprises the following steps:
Responding to an access instruction aiming at a target third party platform, and generating a first access token application request aiming at the target third party platform;
sending the first access token application request to the game server;
receiving one of first historical access token information, second historical access token information and latest access token information which are returned by the game server and are aimed at the target third-party platform; the first historical access token information is stored by the game server; the second historical access token information is stored by the central server; the latest access token information is acquired from the target third party platform through the central server under the condition that the first historical access token information and the second historical access token information are not in accordance with the requirements;
and accessing the target third party platform by adopting the first historical access token information or the second historical access token information or the latest access token information.
Optionally, the receiving one of the first historical access token information, the second historical access token information and the latest access token information returned by the game server for the target third party platform includes:
If the first historical access token information aiming at the target third party platform in the first local cache data of the game server is queried to be in an effective period, receiving the first historical access token information aiming at the target third party platform, which is sent by the game server; and the game server inquires the first historical access token information aiming at the target third party platform in the first local cache data, and the first historical access token information is sent after the first historical access token information is in an effective period.
Optionally, the receiving one of the first historical access token information, the second historical access token information and the latest access token information returned by the game server for the target third party platform includes:
if the first historical access token information aiming at the target third party platform in the first local cache data of the game server is inquired not to be in the valid period, and the second historical access token information aiming at the target third party platform in the second local cache data of the central server is inquired to be in the valid period, receiving the second historical access token information aiming at the target third party platform and forwarded by the game server; and the central server inquires the second historical access token information aiming at the target third party platform in the second local cache data, and the second historical access token information is sent after the second historical access token information is in an effective period.
Optionally, the receiving one of the first historical access token information, the second historical access token information and the latest access token information returned by the game server for the target third party platform includes:
if the first historical access token information aiming at the target third party platform in the first local cache data of the game server is inquired to be not in the valid period, and the second historical access token information aiming at the target third party platform in the second local cache data of the central server is inquired to be not in the valid period, receiving the latest access token information aiming at the target third party platform and forwarded by the game server; the latest access token information is provided for the target third-party platform according to the received second access token application request; and the second access token application request is generated and sent after the second historical access token information aiming at the target third party platform in the second local cache data is inquired by the central server and is not in the valid period.
Optionally, the generating, in response to the access instruction for the target third party platform, a first access token application request for the target third party platform includes:
Determining an access type of the target third party platform in response to the access instruction for the target third party platform;
if the access type is a first access type, generating a first access token application request aiming at the target third party platform; the first access type is a type having access frequency restrictions.
The embodiment of the invention also discloses a third party platform access method which is applied to the game server, wherein the game server is in communication connection with a plurality of game clients, and the game server is in communication connection with the central server, and the method comprises the following steps:
receiving a first access token application request aiming at a target third party platform, which is sent by the game client; the first access token application request is generated by the game client in response to an access instruction for the target third party platform;
inquiring first historical access token information aiming at the target third party platform in first local cache data of the game server according to the first access token application request, and judging whether the first historical access token information is in an effective period or not;
returning one of first historical access token information, second historical access token information and latest access token information aiming at the target third party platform to the game client according to a first judging result so that the game client accesses the target third party platform by adopting the first historical access token information or the second historical access token information or the latest access token information; the first historical access token information is stored by the game server; the second historical access token information is stored by the central server; and the latest access token information is acquired from the target third party platform through the central server under the condition that the first historical access token information and the second historical access token information are not satisfactory.
Optionally, the returning, to the game client, one of the first historical access token information, the second historical access token information and the latest access token information for the target third party platform according to the first determination result includes:
and if the first historical access token information is in the validity period, sending the first historical access token information aiming at the target third party platform to the game client.
Optionally, the returning, to the game client, one of the first historical access token information, the second historical access token information and the latest access token information for the target third party platform according to the first determination result includes:
if the first historical access token information is not in the valid period, forwarding the first access token application request to the central server;
receiving one of the second historical access token information and the latest access token information which are returned by the central server and are aimed at the target third-party platform;
forwarding one of the second historical access token information and the latest access token information for the target third party platform to the game client.
Optionally, the receiving one of the second historical access token information and the latest access token information returned by the central server for the target third party platform includes:
if the second historical access token information aiming at the target third party platform in the second local cache data of the central server is queried to be in an effective period, receiving the second historical access token information aiming at the target third party platform, which is sent by the central server; and the central server inquires the second historical access token information aiming at the target third party platform in the second local cache data, and the second historical access token information is sent after the second historical access token information is in an effective period.
Optionally, the receiving one of the second historical access token information and the latest access token information returned by the central server for the target third party platform includes:
if the second historical access token information aiming at the target third party platform in the second local cache data of the central server is inquired and is not in the valid period, receiving the latest access token information aiming at the target third party platform and forwarded by the central server; the latest access token information is provided for the target third-party platform according to the received second access token application request; and the second access token application request is generated and sent after the second historical access token information aiming at the target third party platform in the second local cache data is inquired by the central server and is not in the valid period.
Optionally, after receiving the latest access token information for the target third party platform forwarded by the central server, the method further includes:
and updating the latest access token information into the first local cache data.
The embodiment of the invention also discloses a third party platform access method which is applied to a central server, wherein the central server is in communication connection with a game server, and the game server is in communication connection with a plurality of game clients, and the method comprises the following steps:
receiving a first access token application request which is forwarded by the game server and aims at a target third-party platform; the first access token application request is generated by the game client in response to an access instruction aiming at the target third party platform, and the game server inquires that first historical access token information aiming at the target third party platform in first local cache data is not forwarded after the validity period;
inquiring second historical access token information aiming at the target third party platform in second local cache data of the central server according to the first access token application request, and judging whether the second historical access token information is in an effective period or not;
Returning one of second historical access token information and latest access token information aiming at the target third-party platform to the game server according to a second judging result, so that after the game server forwards the second historical access token information or the latest access token information to the game client, the game client accesses the target third-party platform by adopting the second historical access token information or the latest access token information; the first historical access token information is stored by the game server; the second historical access token information is stored by the central server; and the latest access token information is acquired from the target third party platform through the central server under the condition that the first historical access token information and the second historical access token information are not satisfactory.
Optionally, the returning, to the game server, one of the second historical access token information and the latest access token information for the target third party platform according to the second determination result includes:
and if the second historical access token information is in the validity period, sending the second historical access token information aiming at the target third-party platform to the game server.
Optionally, the returning, to the game server, one of the second historical access token information and the latest access token information for the target third party platform according to the second determination result includes:
if the second historical access token information is not in the valid period, generating and sending a second access token application request aiming at the target third party platform to the target third party platform;
and receiving the latest access token information which is returned by the target third-party platform and is applied for the second access token, and forwarding the latest access token information which is applied for the target third-party platform to the game server.
Optionally, after receiving the latest access token information for the second access token application request returned by the target third party platform, the method further includes:
and updating the latest access token information into the second local cache data, and recording the updating time.
The embodiment of the invention also discloses a third party platform access device which is applied to the game client, wherein the game client is in communication connection with the game server, the game server is in communication connection with the central server, and the device comprises:
The generation module is used for responding to an access instruction aiming at a target third party platform and generating a first access token application request aiming at the target third party platform;
the sending module is used for sending the first access token application request to the game server;
the first receiving module is used for receiving one of first historical access token information, second historical access token information and latest access token information which are returned by the game server and are aimed at the target third-party platform; the first historical access token information is stored by the game server; the second historical access token information is stored by the central server; the latest access token information is acquired from the target third party platform through the central server under the condition that the first historical access token information and the second historical access token information are not in accordance with the requirements;
and the access module is used for accessing the target third party platform by adopting the first historical access token information or the second historical access token information or the latest access token information.
Optionally, the first receiving module includes:
the first receiving sub-module is used for receiving the first historical access token information which is sent by the game server and aims at the target third party platform if the first historical access token information which aims at the target third party platform in the first local cache data of the game server is queried to be in an effective period; and the game server inquires the first historical access token information aiming at the target third party platform in the first local cache data, and the first historical access token information is sent after the first historical access token information is in an effective period.
Optionally, the first receiving module includes:
a second receiving sub-module, configured to receive, if the first historical access token information for the target third party platform in the first local cache data of the game server is queried to be not in an effective period, and the second historical access token information for the target third party platform in the second local cache data of the central server is queried to be in an effective period, the second historical access token information for the target third party platform forwarded by the game server; and the central server inquires the second historical access token information aiming at the target third party platform in the second local cache data, and the second historical access token information is sent after the second historical access token information is in an effective period.
Optionally, the first receiving module includes:
a third receiving sub-module, configured to receive, if the first historical access token information for the target third party platform in the first local cache data of the game server is queried to be not in an effective period, and the second historical access token information for the target third party platform in the second local cache data of the central server is queried to be not in an effective period, the latest access token information for the target third party platform forwarded by the game server; the latest access token information is provided for the target third-party platform according to the received second access token application request; and the second access token application request is generated and sent after the second historical access token information aiming at the target third party platform in the second local cache data is inquired by the central server and is not in the valid period.
Optionally, the generating module includes:
a determining submodule for determining an access type of the target third party platform in response to the access instruction for the target third party platform;
the generation sub-module is used for generating a first access token application request aiming at the target third-party platform if the access type is a first access type; the first access type is a type having access frequency restrictions.
The embodiment of the invention also discloses a third party platform access device which is applied to a game server, wherein the game server is in communication connection with a plurality of game clients, and the game server is in communication connection with a central server, and the device comprises:
the second receiving module is used for receiving a first access token application request aiming at a target third party platform, which is sent by the game client; the first access token application request is generated by the game client in response to an access instruction for the target third party platform;
the first query module is used for querying first historical access token information aiming at the target third party platform in first local cache data of the game server according to the first access token application request, and judging whether the first historical access token information is in an effective period or not;
The first return module is used for returning one of first historical access token information, second historical access token information and latest access token information aiming at the target third party platform to the game client according to a first judging result so that the game client accesses the target third party platform by adopting the first historical access token information, the second historical access token information or the latest access token information; the first historical access token information is stored by the game server; the second historical access token information is stored by the central server; and the latest access token information is acquired from the target third party platform through the central server under the condition that the first historical access token information and the second historical access token information are not satisfactory.
Optionally, the first return module includes:
and the first sending submodule is used for sending the first historical access token information aiming at the target third party platform to the game client if the first historical access token information is in the valid period.
Optionally, the first return module includes:
The second sending submodule is used for forwarding the first access token application request to the central server if the first historical access token information is not in the valid period;
a fourth receiving sub-module, configured to receive one of the second historical access token information and the latest access token information returned by the central server for the target third party platform;
and a third sending sub-module, configured to forward, to the game client, one of the second historical access token information and the latest access token information for the target third party platform.
Optionally, the fourth receiving sub-module includes:
the first receiving unit is used for receiving the second historical access token information which is sent by the central server and aims at the target third party platform if the second historical access token information which aims at the target third party platform in the second local cache data of the central server is queried to be in an effective period; and the central server inquires the second historical access token information aiming at the target third party platform in the second local cache data, and the second historical access token information is sent after the second historical access token information is in an effective period.
Optionally, the fourth receiving sub-module includes:
the second receiving unit is used for receiving the latest access token information which is forwarded by the central server and aims at the target third party platform if the second historical access token information which aims at the target third party platform in the second local cache data of the central server is not in the valid period; the latest access token information is provided for the target third-party platform according to the received second access token application request; and the second access token application request is generated and sent after the second historical access token information aiming at the target third party platform in the second local cache data is inquired by the central server and is not in the valid period.
Optionally, the apparatus further comprises:
and the first updating module is used for updating the latest access token information into the first local cache data.
The embodiment of the invention also discloses a third party platform access device which is applied to a central server, wherein the central server is in communication connection with a game server, the game server is in communication connection with a plurality of game clients, and the device comprises:
A third receiving module, configured to receive a first access token application request for a target third party platform forwarded by the game server; the first access token application request is generated by the game client in response to an access instruction aiming at the target third party platform, and the game server inquires that first historical access token information aiming at the target third party platform in first local cache data is not forwarded after the validity period;
the second query module is used for querying second historical access token information aiming at the target third party platform in second local cache data of the central server according to the first access token application request, and judging whether the second historical access token information is in an effective period or not;
the second return module is used for returning one of second historical access token information and latest access token information aiming at the target third-party platform to the game server according to a second judging result, so that after the game server forwards the second historical access token information or the latest access token information to the game client, the game client accesses the target third-party platform by adopting the second historical access token information or the latest access token information; the first historical access token information is stored by the game server; the second historical access token information is stored by the central server; and the latest access token information is acquired from the target third party platform through the central server under the condition that the first historical access token information and the second historical access token information are not satisfactory.
Optionally, the second return module includes:
and the fourth sending submodule is used for sending the second historical access token information aiming at the target third party platform to the game server if the second historical access token information is in the valid period.
Optionally, the second return module includes:
a fifth sending sub-module, configured to generate and send a second access token application request for the target third party platform to the target third party platform if the second historical access token information is not in the validity period;
and a fifth receiving sub-module, configured to receive the latest access token information for the second access token application request returned by the target third party platform, and forward the latest access token information for the target third party platform to the game server.
Optionally, the apparatus further comprises:
and the second updating module is used for updating the latest access token information into the second local cache data and recording the updating time.
The embodiment of the invention also discloses an electronic device, which comprises: a processor, a memory and a computer program stored on the memory and capable of running on the processor, which when executed by the processor implements the steps of a third party platform access method as described above.
The embodiment of the invention also discloses a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program realizes the steps of a third party platform access method when being executed by a processor.
The embodiment of the invention has the following advantages:
in the embodiment of the invention, when the game client needs to access the third party platform, the first historical access token information aiming at the third party platform can be obtained from the game server which is in communication connection with the game client, or the second historical access token information aiming at the third party platform can be obtained from the central server which is in communication connection with the game server, and under the condition that the first historical access token information and the second historical access token information are not in accordance with the requirements, the latest access token information is obtained from the third party platform through the central server. By adopting the method, the access strategy of the third party platform based on the game server and the central server is provided, a caching mechanism of the two layers of servers is provided, the game client side is directly accessed to the third party platform to be accessed to the third party platform through the central server, all accesses to the third party platform are initiated by the central server, the access frequency to the third party platform can be greatly reduced, and the pressure of the third party platform server is lightened.
Drawings
FIG. 1 is a schematic illustration of access frequency restrictions for a third party platform;
FIG. 2 is a flowchart illustrating steps of a third party platform access method according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating steps of another third party platform access method according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating steps of a third party platform access method according to an embodiment of the present invention;
FIG. 5 is a block diagram of a third party platform access device according to an embodiment of the present invention;
FIG. 6 is a block diagram of another third party platform access device according to an embodiment of the present invention;
fig. 7 is a block diagram of a third party platform access device according to an embodiment of the present invention.
Detailed Description
So that the manner in which the above recited objects, features and advantages of the present invention can be understood in detail, a more particular description of the invention, briefly summarized above, may be had by reference to the embodiments, some of which are illustrated in the appended drawings, and some, but not all of which are illustrated in the appended drawings. All other embodiments, which are derived by a person skilled in the art based on the embodiments of the invention, fall within the scope of protection of the invention.
Game development can be generally divided into a server and a client, and in game development, the client often needs to access a third party platform, for example, to access a third party live platform in a game, or to access a third party payment platform, etc., so as to embed an application of the third party platform in the game. The current access method is that a client directly calls a third party platform interface to be in butt joint with a third party platform server, and the method is suitable for most situations, but if the access frequency of a third party platform is limited, when the number of game players increases, the client used by each game player needs to call the third party platform interface, so that the access frequency of the third party platform can reach the upper limit, and the third party service can not be normally used.
Referring to fig. 1, a schematic diagram of access frequency limitation for a third party platform is shown. For the token acquisition interface of item 3 in the figure, the access frequency limit of the third party platform is limited to 500 times a day, that is, the third party platform has access frequency limit of 500 times a day, for example, in game development, when a certain game is accessed to the third party platform, an enterprise developer exclusive account needs to be applied to the third party platform, all players of the game share the account to access the third party platform, and the number of accesses to the third party platform through the account is at most 500 times a day.
The third party platform interface has access frequency limitation, and if logic of accessing token (token, computer term) is implemented at the game client side when the game developer develops, when more game players exist and the request concurrency number of the game player client side is higher, the upper limit of the access frequency of the third party platform may be exceeded, so that the third party platform interface is easily caused to return abnormality or error, and the third party service is not available.
One of the core ideas of the embodiment of the invention is that when a game client needs to access a third party platform, first historical access token information aiming at the third party platform can be obtained from a game server which is in communication connection with the game client, or second historical access token information aiming at the third party platform can be obtained from a central server which is in communication connection with the game server, and the latest access token information is obtained from the third party platform through the central server under the condition that the first historical access token information and the second historical access token information are not in accordance with requirements. By adopting the method, the access strategy of the third party platform based on the game server and the central server is provided, a caching mechanism of the two layers of servers is provided, the game client side is directly accessed to the third party platform to be accessed to the third party platform through the central server, all accesses to the third party platform are initiated by the central server, the access frequency to the third party platform can be greatly reduced, and the pressure of the third party platform server is lightened.
The third party platform access method provided by the application is described in detail below from the perspective of a game client.
Referring to fig. 2, a step flow chart of a third party platform access method provided by an embodiment of the present application is applied to a game client, where the game client is communicatively connected to a game server, and the game server is communicatively connected to a central server, and may specifically include the following steps:
step 201, in response to an access instruction for a target third party platform, generating a first access token application request for the target third party platform.
The third party platform access method can be applied to a scene that a game development game client accesses a third party platform. The types of games may be role playing games, action games, adventure games, strategy games, etc. The game client may be a client used by a game player. The game server may be a server for the creation of rules for play and the corresponding code writing. The game client may be communicatively coupled to the game server. Preferably, one game client is communicatively connected to only one game server, and one game server may be communicatively connected to a plurality of game clients.
In the embodiment of the application, a central server is also arranged, the central server can be in communication connection with the game server, the central server is a globally unique server, and all accesses to the third party platform are initiated through the central server.
The third party platform may include a third party live platform, a third party payment platform, a third party video service platform, and the like, and accessing the game client to the third party platform may cause the game client to call a third party service provided by a third party platform API (Application Programming Interface, application program interface). For example, for a third party payment platform, an interface document may be provided to merchants that need to cooperate, and then the merchants may dock the interface document into their own applications, enabling the merchant applications to invoke functions of online payment of the third party payment platform, and the like.
In the game development, a game client needs to access a third party platform through a unified pre-applied developer account, and when the game client needs to call a target third party platform interface, a request is sent to a connected game server, namely a first access token application request for applying an access token for the target third party platform can be generated and sent according to an access instruction of a user.
In an alternative embodiment of the application, the following sub-steps may be performed for step 201:
and a substep S11, wherein the access type of the target third party platform is determined in response to the access instruction for the target third party platform.
And step S12, if the access type is a first access type, generating a first access token application request aiming at the target third-party platform.
Wherein the first access type is a type having an access frequency limitation.
In a specific implementation, after determining that the access type of the target third party platform is the type with the access frequency limitation, a corresponding first access token application request is generated. When the game development is accessed to the third party platform, whether the access frequency limitation exists or not is clearly described in the technical document of the third party platform. Thus, the access type of the target third party platform may be determined by querying the technical document of the target third party platform.
In addition, if the access type of the target third party platform is not the first access type and does not have access frequency limitation, the target third party platform interface can be directly called to access the target third party platform.
Step 202, sending the first access token application request to the game server.
In the embodiment of the invention, after generating the first access token application request, the game client may send the first access token application request to the game server. Unlike the prior art, the game client side does not directly access the target third party platform through the target third party platform interface, but firstly sends a first access token application request to the game server to inquire whether a valid access token exists.
And 203, receiving one of the first historical access token information, the second historical access token information and the latest access token information which are returned by the game server and are aimed at the target third-party platform.
Wherein the first historical access token information is stored by the game server; the second historical access token information is stored by the central server; the latest access token information is acquired from the target third party platform through the central server under the condition that the first historical access token information and the second historical access token information are not satisfactory.
In the embodiment of the invention, the game client can receive the access token information returned by the game server, and specifically comprises three cases, namely, the first historical access token information stored in the game server; one is second history access token information stored in the central server; and the current central server applies the acquired latest access token information to the target third party platform.
It will be appreciated that prior to the current user's game client applying for an access token to a target third party platform, the game clients of other users also apply for an access token to the target third party platform and cache the obtained access token information in the game server or central server. Therefore, when the game client of the current user applies for the access token aiming at the target third-party platform, whether the first history access token information or the second history access token information meets the requirement or not can be firstly inquired from the game server or the central server, and specifically, whether the inquiry is effective or not can be inquired. And under the condition of no meeting the requirements, acquiring the latest access token information from the target third-party platform through the central server.
In an alternative embodiment of the application, the following sub-steps may be performed for step 203:
and S21, if the first historical access token information aiming at the target third party platform in the first local cache data of the game server is found to be in the valid period, receiving the first historical access token information aiming at the target third party platform, which is sent by the game server.
The game server inquires first historical access token information aiming at a target third-party platform in first local cache data, and the first historical access token information is sent after the validity period.
And a substep S22, wherein if it is queried that the first historical access token information aiming at the target third party platform in the first local cache data of the game server is not in the valid period, and the second historical access token information aiming at the target third party platform in the second local cache data of the central server is queried that the second historical access token information aiming at the target third party platform is in the valid period, the second historical access token information aiming at the target third party platform forwarded by the game server is received.
And the central server inquires second historical access token information aiming at the target third-party platform in the second local cache data, and the second historical access token information is sent after the validity period.
And a substep S23, wherein if it is queried that the first historical access token information aiming at the target third party platform in the first local cache data of the game server is not in the valid period, and the second historical access token information aiming at the target third party platform in the second local cache data of the central server is queried that the second historical access token information aiming at the target third party platform is not in the valid period, the latest access token information aiming at the target third party platform and forwarded by the game server is received.
The latest access token information is provided by the target third-party platform according to the received second access token application request; the second access token application request is generated and sent after the second historical access token information aiming at the target third party platform in the second local cache data is not in the validity period.
In a specific embodiment, after receiving the first access token application request, the game server firstly queries whether the first historical access token information in the local cache is within the validity period, and if so, the first historical access token information is directly returned to the game client. If the first historical access token information in the game server is not within the validity period, the game server sends the request to the central server. After receiving the request sent by the game server, the central server inquires whether the second historical access token information in the local cache is in the validity period, and if so, the central server directly returns the second historical access token information to the requested game server. And if the second historical access token information in the central server is not in the validity period, the central server requests the latest token data from the target third party platform, updates the local cache after obtaining the latest access token information provided by the target third party platform, and returns the latest access token information to the game server. And after receiving the latest access token information returned by the central server, the game server returns the latest access token information to the game client.
And 204, accessing the target third party platform by adopting the first historical access token information or the second historical access token information or the latest access token information.
In the embodiment of the invention, the game client can use one of the valid first historical access token information or the second historical access token information or the latest access token information for access.
In summary, in the embodiment of the present invention, when a game client needs to access a third party platform, first historical access token information for the third party platform may be obtained from a game server that is in communication connection with the game client, or second historical access token information for the third party platform may be obtained from a central server that is in communication connection with the game server, where the first historical access token information and the second historical access token information do not meet the requirements, and then the latest access token information is obtained from the central server to the third party platform. By adopting the method, the access strategy of the third party platform based on the game server and the central server is provided, a caching mechanism of the two layers of servers is provided, the game client side is directly accessed to the third party platform to be accessed to the third party platform through the central server, all accesses to the third party platform are initiated by the central server, the access frequency to the third party platform can be greatly reduced, and the pressure of the third party platform server is lightened. The game client is not directly connected with the third party platform, but accesses the platform interface through the server middle layer, and because the number of game servers of a game is also possibly very large, in order to prevent the game servers from exceeding the upper limit of the access frequency, a globally unique central server is added, and all accesses to the third party platform are initiated by the central server.
In order to avoid repetition, only a simple description will be provided herein, and the specific implementation process of the method may refer to the process described from the perspective of the game client.
Referring to fig. 3, a flowchart illustrating steps of another third party platform access method provided by an embodiment of the present application is applied to a game server, where the game server is communicatively connected to a plurality of game clients, and the game server is communicatively connected to a central server, and may specifically include the following steps:
step 301, receiving a first access token application request sent by the game client for a target third party platform.
Wherein the first access token application request is generated by the game client in response to an access instruction to the target third party platform.
Step 302, inquiring first historical access token information aiming at the target third party platform in first local cache data of the game server according to the first access token application request, and judging whether the first historical access token information is in a valid period.
And step 303, returning one of first historical access token information, second historical access token information and latest access token information aiming at the target third party platform to the game client according to a first judging result so that the game client accesses the target third party platform by adopting the first historical access token information or the second historical access token information or the latest access token information.
Wherein the first historical access token information is stored by the game server; the second historical access token information is stored by the central server; the latest access token information is acquired from the target third party platform through the central server under the condition that the first historical access token information and the second historical access token information are not satisfactory.
The first judgment result is a judgment result of whether the first history access token information is in the validity period.
In an alternative embodiment of the invention, the following steps may be performed for step 303:
and if the first historical access token information is in the validity period, sending the first historical access token information aiming at the target third party platform to the game client.
If the first historical access token information is not in the valid period, forwarding the first access token application request to the central server; receiving one of the second historical access token information and the latest access token information which are returned by the central server and are aimed at the target third-party platform; forwarding one of the second historical access token information and the latest access token information for the target third party platform to the game client.
In an alternative embodiment of the present invention, the receiving one of the second historical access token information and the latest access token information returned by the central server for the target third party platform includes:
and if the second historical access token information aiming at the target third party platform in the second local cache data of the central server is queried to be in the valid period, receiving the second historical access token information aiming at the target third party platform, which is sent by the central server.
And the central server inquires second historical access token information aiming at the target third-party platform in the second local cache data, and the second historical access token information is sent after the validity period.
And if the second historical access token information aiming at the target third-party platform in the second local cache data of the central server is inquired and is not in the valid period, receiving the latest access token information aiming at the target third-party platform and forwarded by the central server.
The latest access token information is provided by the target third-party platform according to the received second access token application request; the second access token application request is generated and sent after the second historical access token information aiming at the target third party platform in the second local cache data is not in the validity period.
In an optional embodiment of the present invention, after receiving the latest access token information forwarded by the central server for the target third party platform, the method further includes:
and updating the latest access token information into the first local cache data.
By caching the latest access token information obtained, the number of communications between the game server and the central server can be reduced, and the game client can directly obtain the valid token from the connected game server without the game server having to obtain from the central server each time.
In summary, in the embodiment of the present invention, when a game client needs to access a third party platform, first historical access token information for the third party platform may be obtained from a game server that is in communication connection with the game client, or second historical access token information for the third party platform may be obtained from a central server that is in communication connection with the game server, where the first historical access token information and the second historical access token information do not meet the requirements, and then the latest access token information is obtained from the central server to the third party platform. By adopting the method, the access strategy of the third party platform based on the game server and the central server is provided, a caching mechanism of the two layers of servers is provided, the game client side is directly accessed to the third party platform to be accessed to the third party platform through the central server, all accesses to the third party platform are initiated by the central server, the access frequency to the third party platform can be greatly reduced, and the pressure of the third party platform server is lightened.
In order to avoid repetition, only a simple description will be provided herein, and the specific implementation of the method may refer to the process described from the perspective of the game client or the game server.
Referring to fig. 4, a flowchart illustrating steps of a third party platform access method according to an embodiment of the present application is applied to a central server, where the central server is communicatively connected to a game server, and the game server is communicatively connected to a plurality of game clients, and may specifically include the following steps:
step 401, receiving a first access token application request for a target third party platform forwarded by the game server.
The first access token application request is generated by the game client in response to the access instruction aiming at the target third-party platform, and the game server inquires that the first historical access token information aiming at the target third-party platform in the first local cache data is not forwarded after the validity period.
Step 402, inquiring second historical access token information aiming at the target third party platform in second local cache data of the central server according to the first access token application request, and judging whether the second historical access token information is in a valid period.
Step 403, returning one of second historical access token information and latest access token information for the target third party platform to the game server according to a second judging result, so that after the game server forwards the second historical access token information or the latest access token information to the game client, the game client accesses the target third party platform by adopting the second historical access token information or the latest access token information.
Wherein the first historical access token information is stored by the game server; the second historical access token information is stored by the central server; the latest access token information is acquired from the target third party platform through the central server under the condition that the first historical access token information and the second historical access token information are not satisfactory.
The second judgment result is a judgment result of whether the second history access token information is in the validity period.
In an alternative embodiment of the invention, the following steps may be performed for step 403:
and if the second historical access token information is in the validity period, sending the second historical access token information aiming at the target third-party platform to the game server.
If the second historical access token information is not in the valid period, generating and sending a second access token application request aiming at the target third party platform to the target third party platform; and receiving the latest access token information which is returned by the target third-party platform and is applied for the second access token, and forwarding the latest access token information which is applied for the target third-party platform to the game server.
In an optional embodiment of the present invention, after receiving the latest access token information for the second access token application request returned by the target third party platform, the method further includes:
and updating the latest access token information into the second local cache data, and recording the updating time.
In the embodiment of the invention, the acquired latest access token information can be cached in the central server.
In summary, in the embodiment of the present invention, when a game client needs to access a third party platform, first historical access token information for the third party platform may be obtained from a game server that is in communication connection with the game client, or second historical access token information for the third party platform may be obtained from a central server that is in communication connection with the game server, where the first historical access token information and the second historical access token information do not meet the requirements, and then the latest access token information is obtained from the central server to the third party platform. By adopting the method, the access strategy of the third party platform based on the game server and the central server is provided, a caching mechanism of the two layers of servers is provided, the game client side is directly accessed to the third party platform to be accessed to the third party platform through the central server, all accesses to the third party platform are initiated by the central server, the access frequency to the third party platform can be greatly reduced, and the pressure of the third party platform server is lightened.
It should be noted that, for simplicity of description, the method embodiments are shown as a series of acts, but it should be understood by those skilled in the art that the embodiments are not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred embodiments, and that the acts are not necessarily required by the embodiments of the invention.
Referring to fig. 5, a block diagram of a third party platform access device provided by an embodiment of the present invention is applied to a game client, where the game client is communicatively connected to a game server, and the game server is communicatively connected to a central server, and may specifically include the following modules:
a generating module 501, configured to generate a first access token application request for a target third party platform in response to an access instruction for the target third party platform;
a sending module 502, configured to send the first access token application request to the game server;
a first receiving module 503, configured to receive one of first historical access token information, second historical access token information, and latest access token information returned by the game server for the target third party platform; the first historical access token information is stored by the game server; the second historical access token information is stored by the central server; the latest access token information is acquired from the target third party platform through the central server under the condition that the first historical access token information and the second historical access token information are not in accordance with the requirements;
An access module 504, configured to access the target third party platform using the first historical access token information or the second historical access token information or the latest access token information.
In an embodiment of the present invention, the first receiving module includes:
the first receiving sub-module is used for receiving the first historical access token information which is sent by the game server and aims at the target third party platform if the first historical access token information which aims at the target third party platform in the first local cache data of the game server is queried to be in an effective period; and the game server inquires the first historical access token information aiming at the target third party platform in the first local cache data, and the first historical access token information is sent after the first historical access token information is in an effective period.
In an embodiment of the present invention, the first receiving module includes:
a second receiving sub-module, configured to receive, if the first historical access token information for the target third party platform in the first local cache data of the game server is queried to be not in an effective period, and the second historical access token information for the target third party platform in the second local cache data of the central server is queried to be in an effective period, the second historical access token information for the target third party platform forwarded by the game server; and the central server inquires the second historical access token information aiming at the target third party platform in the second local cache data, and the second historical access token information is sent after the second historical access token information is in an effective period.
In an embodiment of the present invention, the first receiving module includes:
a third receiving sub-module, configured to receive, if the first historical access token information for the target third party platform in the first local cache data of the game server is queried to be not in an effective period, and the second historical access token information for the target third party platform in the second local cache data of the central server is queried to be not in an effective period, the latest access token information for the target third party platform forwarded by the game server; the latest access token information is provided for the target third-party platform according to the received second access token application request; and the second access token application request is generated and sent after the second historical access token information aiming at the target third party platform in the second local cache data is inquired by the central server and is not in the valid period.
In an embodiment of the present invention, the generating module includes:
a determining submodule for determining an access type of the target third party platform in response to the access instruction for the target third party platform;
The generation sub-module is used for generating a first access token application request aiming at the target third-party platform if the access type is a first access type; the first access type is a type having access frequency restrictions.
In summary, in the embodiment of the present invention, when a game client needs to access a third party platform, first historical access token information for the third party platform may be obtained from a game server that is in communication connection with the game client, or second historical access token information for the third party platform may be obtained from a central server that is in communication connection with the game server, where the first historical access token information and the second historical access token information do not meet the requirements, and then the latest access token information is obtained from the central server to the third party platform. By adopting the method, the access strategy of the third party platform based on the game server and the central server is provided, a caching mechanism of the two layers of servers is provided, the game client side is directly accessed to the third party platform to be accessed to the third party platform through the central server, all accesses to the third party platform are initiated by the central server, the access frequency to the third party platform can be greatly reduced, and the pressure of the third party platform server is lightened.
Referring to fig. 6, a block diagram of another third party platform access device according to an embodiment of the present invention is shown, and the block diagram is applied to a game server, where the game server is communicatively connected to a plurality of game clients, and the game server is communicatively connected to a central server, and may specifically include the following modules:
a second receiving module 601, configured to receive a first access token application request for a target third party platform sent by the game client; the first access token application request is generated by the game client in response to an access instruction for the target third party platform;
a first query module 602, configured to query, according to the first access token application request, first historical access token information for the target third party platform in first local cache data of the game server, and determine whether the first historical access token information is in a validity period;
a first returning module 603, configured to return, to the game client, one of first historical access token information, second historical access token information, and latest access token information for the target third party platform according to a first determination result, so that the game client accesses the target third party platform using the first historical access token information, the second historical access token information, or the latest access token information; the first historical access token information is stored by the game server; the second historical access token information is stored by the central server; and the latest access token information is acquired from the target third party platform through the central server under the condition that the first historical access token information and the second historical access token information are not satisfactory.
In an embodiment of the present invention, the first return module includes:
and the first sending submodule is used for sending the first historical access token information aiming at the target third party platform to the game client if the first historical access token information is in the valid period.
In an embodiment of the present invention, the first return module includes:
the second sending submodule is used for forwarding the first access token application request to the central server if the first historical access token information is not in the valid period;
a fourth receiving sub-module, configured to receive one of the second historical access token information and the latest access token information returned by the central server for the target third party platform;
and a third sending sub-module, configured to forward, to the game client, one of the second historical access token information and the latest access token information for the target third party platform.
In an embodiment of the present invention, the fourth receiving sub-module includes:
the first receiving unit is used for receiving the second historical access token information which is sent by the central server and aims at the target third party platform if the second historical access token information which aims at the target third party platform in the second local cache data of the central server is queried to be in an effective period; and the central server inquires the second historical access token information aiming at the target third party platform in the second local cache data, and the second historical access token information is sent after the second historical access token information is in an effective period.
In an embodiment of the present invention, the fourth receiving sub-module includes:
the second receiving unit is used for receiving the latest access token information which is forwarded by the central server and aims at the target third party platform if the second historical access token information which aims at the target third party platform in the second local cache data of the central server is not in the valid period; the latest access token information is provided for the target third-party platform according to the received second access token application request; and the second access token application request is generated and sent after the second historical access token information aiming at the target third party platform in the second local cache data is inquired by the central server and is not in the valid period.
In an embodiment of the present invention, the apparatus further includes:
and the first updating module is used for updating the latest access token information into the first local cache data.
In summary, in the embodiment of the present invention, when a game client needs to access a third party platform, first historical access token information for the third party platform may be obtained from a game server that is in communication connection with the game client, or second historical access token information for the third party platform may be obtained from a central server that is in communication connection with the game server, where the first historical access token information and the second historical access token information do not meet the requirements, and then the latest access token information is obtained from the central server to the third party platform. By adopting the method, the access strategy of the third party platform based on the game server and the central server is provided, a caching mechanism of the two layers of servers is provided, the game client side is directly accessed to the third party platform to be accessed to the third party platform through the central server, all accesses to the third party platform are initiated by the central server, the access frequency to the third party platform can be greatly reduced, and the pressure of the third party platform server is lightened.
Referring to fig. 7, a block diagram of still another third party platform access device according to an embodiment of the present invention is shown, where the block diagram is applied to a central server, where the central server is communicatively connected to a game server, and the game server is communicatively connected to a plurality of game clients, and may specifically include the following modules:
a third receiving module 701, configured to receive a first access token application request for a target third party platform forwarded by the game server; the first access token application request is generated by the game client in response to an access instruction aiming at the target third party platform, and the game server inquires that first historical access token information aiming at the target third party platform in first local cache data is not forwarded after the validity period;
a second query module 702, configured to query, according to the first access token application request, second historical access token information for the target third party platform in second local cache data of the central server, and determine whether the second historical access token information is in a validity period;
a second returning module 703, configured to return, to the game server, one of second historical access token information and latest access token information for the target third party platform according to a second determination result, so that after the game server forwards the second historical access token information or the latest access token information to the game client, the game client accesses the target third party platform using the second historical access token information or the latest access token information; the first historical access token information is stored by the game server; the second historical access token information is stored by the central server; and the latest access token information is acquired from the target third party platform through the central server under the condition that the first historical access token information and the second historical access token information are not satisfactory.
In an embodiment of the present invention, the second return module includes:
and the fourth sending submodule is used for sending the second historical access token information aiming at the target third party platform to the game server if the second historical access token information is in the valid period.
In an embodiment of the present invention, the second return module includes:
a fifth sending sub-module, configured to generate and send a second access token application request for the target third party platform to the target third party platform if the second historical access token information is not in the validity period;
and a fifth receiving sub-module, configured to receive the latest access token information for the second access token application request returned by the target third party platform, and forward the latest access token information for the target third party platform to the game server.
In an embodiment of the present invention, the apparatus further includes:
and the second updating module is used for updating the latest access token information into the second local cache data and recording the updating time.
In summary, in the embodiment of the present invention, when a game client needs to access a third party platform, first historical access token information for the third party platform may be obtained from a game server that is in communication connection with the game client, or second historical access token information for the third party platform may be obtained from a central server that is in communication connection with the game server, where the first historical access token information and the second historical access token information do not meet the requirements, and then the latest access token information is obtained from the central server to the third party platform. By adopting the method, the access strategy of the third party platform based on the game server and the central server is provided, a caching mechanism of the two layers of servers is provided, the game client side is directly accessed to the third party platform to be accessed to the third party platform through the central server, all accesses to the third party platform are initiated by the central server, the access frequency to the third party platform can be greatly reduced, and the pressure of the third party platform server is lightened.
For the device embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments for relevant points.
The embodiment of the invention also provides electronic equipment, which comprises: the system comprises a processor, a memory and a computer program stored in the memory and capable of running on the processor, wherein the computer program realizes the processes of the third party platform access method embodiment when being executed by the processor, and can achieve the same technical effects, and the repetition is avoided, and the description is omitted here.
The embodiment of the invention also provides a computer readable storage medium, on which a computer program is stored, which when executed by a processor, implements the processes of the above embodiment of the third party platform access method, and can achieve the same technical effects, so that repetition is avoided, and no further description is given here.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described by differences from other embodiments, and identical and similar parts between the embodiments are all enough to be referred to each other.
It will be apparent to those skilled in the art that embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the invention may take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiment and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it is further noted that relational terms such as first and second, and the like are 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. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal 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 terminal. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or terminal device comprising the element.
The foregoing has described in detail a third party platform access method and a third party platform access device, an electronic device and a computer readable storage medium, and specific examples have been provided herein to illustrate the principles and embodiments of the present invention, the above examples being provided only to assist in understanding the method and core ideas of the present invention; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present invention, the present description should not be construed as limiting the present invention in view of the above.

Claims (20)

1. A third party platform access method, characterized by being applied to a game client, the game client being communicatively connected to a game server, the game server being communicatively connected to a central server, the method comprising:
responding to an access instruction aiming at a target third party platform, and generating a first access token application request aiming at the target third party platform;
sending the first access token application request to the game server;
receiving one of first historical access token information, second historical access token information and latest access token information which are returned by the game server and are aimed at the target third-party platform; the first historical access token information is stored by the game server; the second historical access token information is stored by the central server; the latest access token information is acquired from the target third party platform through the central server under the condition that the first historical access token information and the second historical access token information are not in accordance with the requirements;
and accessing the target third party platform by adopting the first historical access token information or the second historical access token information or the latest access token information.
2. The method of claim 1, wherein the receiving one of the first historical access token information, the second historical access token information, and the latest access token information returned by the game server for the target third party platform comprises:
if the first historical access token information aiming at the target third party platform in the first local cache data of the game server is queried to be in an effective period, receiving the first historical access token information aiming at the target third party platform, which is sent by the game server; and the game server inquires the first historical access token information aiming at the target third party platform in the first local cache data, and the first historical access token information is sent after the first historical access token information is in an effective period.
3. The method of claim 1, wherein the receiving one of the first historical access token information, the second historical access token information, and the latest access token information returned by the game server for the target third party platform comprises:
if the first historical access token information aiming at the target third party platform in the first local cache data of the game server is inquired not to be in the valid period, and the second historical access token information aiming at the target third party platform in the second local cache data of the central server is inquired to be in the valid period, receiving the second historical access token information aiming at the target third party platform and forwarded by the game server; and the central server inquires the second historical access token information aiming at the target third party platform in the second local cache data, and the second historical access token information is sent after the second historical access token information is in an effective period.
4. The method of claim 1, wherein the receiving one of the first historical access token information, the second historical access token information, and the latest access token information returned by the game server for the target third party platform comprises:
if the first historical access token information aiming at the target third party platform in the first local cache data of the game server is inquired to be not in the valid period, and the second historical access token information aiming at the target third party platform in the second local cache data of the central server is inquired to be not in the valid period, receiving the latest access token information aiming at the target third party platform and forwarded by the game server; the latest access token information is provided for the target third-party platform according to the received second access token application request; and the second access token application request is generated and sent after the second historical access token information aiming at the target third party platform in the second local cache data is inquired by the central server and is not in the valid period.
5. The method of claim 1, wherein generating a first access token application request for a target third party platform in response to an access instruction for the target third party platform comprises:
Determining an access type of the target third party platform in response to the access instruction for the target third party platform;
if the access type is a first access type, generating a first access token application request aiming at the target third party platform; the first access type is a type having access frequency restrictions.
6. A third party platform access method, characterized by being applied to a game server, the game server being communicatively connected to a plurality of game clients, the game server being communicatively connected to a central server, the method comprising:
receiving a first access token application request aiming at a target third party platform, which is sent by the game client; the first access token application request is generated by the game client in response to an access instruction for the target third party platform;
inquiring first historical access token information aiming at the target third party platform in first local cache data of the game server according to the first access token application request, and judging whether the first historical access token information is in an effective period or not;
returning one of first historical access token information, second historical access token information and latest access token information aiming at the target third party platform to the game client according to a first judging result so that the game client accesses the target third party platform by adopting the first historical access token information or the second historical access token information or the latest access token information; the first historical access token information is stored by the game server; the second historical access token information is stored by the central server; and the latest access token information is acquired from the target third party platform through the central server under the condition that the first historical access token information and the second historical access token information are not satisfactory.
7. The method of claim 6, wherein the returning one of the first historical access token information, the second historical access token information, and the latest access token information for the target third party platform to the game client according to the first determination result comprises:
and if the first historical access token information is in the validity period, sending the first historical access token information aiming at the target third party platform to the game client.
8. The method of claim 6, wherein the returning one of the first historical access token information, the second historical access token information, and the latest access token information for the target third party platform to the game client according to the first determination result comprises:
if the first historical access token information is not in the valid period, forwarding the first access token application request to the central server;
receiving one of the second historical access token information and the latest access token information which are returned by the central server and are aimed at the target third-party platform;
forwarding one of the second historical access token information and the latest access token information for the target third party platform to the game client.
9. The method of claim 8, wherein the receiving one of the second historical access token information and the latest access token information returned by the central server for the target third party platform comprises:
if the second historical access token information aiming at the target third party platform in the second local cache data of the central server is queried to be in an effective period, receiving the second historical access token information aiming at the target third party platform, which is sent by the central server; and the central server inquires the second historical access token information aiming at the target third party platform in the second local cache data, and the second historical access token information is sent after the second historical access token information is in an effective period.
10. The method of claim 8, wherein the receiving one of the second historical access token information and the latest access token information returned by the central server for the target third party platform comprises:
if the second historical access token information aiming at the target third party platform in the second local cache data of the central server is inquired and is not in the valid period, receiving the latest access token information aiming at the target third party platform and forwarded by the central server; the latest access token information is provided for the target third-party platform according to the received second access token application request; and the second access token application request is generated and sent after the second historical access token information aiming at the target third party platform in the second local cache data is inquired by the central server and is not in the valid period.
11. The method of claim 10, wherein after receiving the latest access token information for the target third party platform forwarded by the central server, further comprising:
and updating the latest access token information into the first local cache data.
12. A third party platform access method, applied to a central server, the central server communicatively connected to a game server, the game server communicatively connected to a plurality of game clients, the method comprising:
receiving a first access token application request which is forwarded by the game server and aims at a target third-party platform; the first access token application request is generated by the game client in response to an access instruction aiming at the target third party platform, and the game server inquires that first historical access token information aiming at the target third party platform in first local cache data is not forwarded after the validity period;
inquiring second historical access token information aiming at the target third party platform in second local cache data of the central server according to the first access token application request, and judging whether the second historical access token information is in an effective period or not;
Returning one of second historical access token information and latest access token information aiming at the target third-party platform to the game server according to a second judging result, so that after the game server forwards the second historical access token information or the latest access token information to the game client, the game client accesses the target third-party platform by adopting the second historical access token information or the latest access token information; the first historical access token information is stored by the game server; the second historical access token information is stored by the central server; and the latest access token information is acquired from the target third party platform through the central server under the condition that the first historical access token information and the second historical access token information are not satisfactory.
13. The method of claim 12, wherein the returning one of the second historical access token information and the latest access token information for the target third party platform to the game server according to the second determination result comprises:
and if the second historical access token information is in the validity period, sending the second historical access token information aiming at the target third-party platform to the game server.
14. The method of claim 12, wherein the returning one of the second historical access token information and the latest access token information for the target third party platform to the game server according to the second determination result comprises:
if the second historical access token information is not in the valid period, generating and sending a second access token application request aiming at the target third party platform to the target third party platform;
and receiving the latest access token information which is returned by the target third-party platform and is applied for the second access token, and forwarding the latest access token information which is applied for the target third-party platform to the game server.
15. The method of claim 14, wherein after receiving the latest access token information for the second access token application request returned by the target third party platform, further comprises:
and updating the latest access token information into the second local cache data, and recording the updating time.
16. A third party platform access device for use with a game client, the game client being communicatively coupled to a game server, the game server being communicatively coupled to a central server, the device comprising:
The generation module is used for responding to an access instruction aiming at a target third party platform and generating a first access token application request aiming at the target third party platform;
the sending module is used for sending the first access token application request to the game server;
the first receiving module is used for receiving one of first historical access token information, second historical access token information and latest access token information which are returned by the game server and are aimed at the target third-party platform; the first historical access token information is stored by the game server; the second historical access token information is stored by the central server; the latest access token information is acquired from the target third party platform through the central server under the condition that the first historical access token information and the second historical access token information are not in accordance with the requirements;
and the access module is used for accessing the target third party platform by adopting the first historical access token information or the second historical access token information or the latest access token information.
17. A third party platform access device for use with a game server, the game server being communicatively coupled to a plurality of game clients, the game server being communicatively coupled to a central server, the device comprising:
The second receiving module is used for receiving a first access token application request aiming at a target third party platform, which is sent by the game client; the first access token application request is generated by the game client in response to an access instruction for the target third party platform;
the first query module is used for querying first historical access token information aiming at the target third party platform in first local cache data of the game server according to the first access token application request, and judging whether the first historical access token information is in an effective period or not;
the first return module is used for returning one of first historical access token information, second historical access token information and latest access token information aiming at the target third party platform to the game client according to a first judging result so that the game client accesses the target third party platform by adopting the first historical access token information, the second historical access token information or the latest access token information; the first historical access token information is stored by the game server; the second historical access token information is stored by the central server; and the latest access token information is acquired from the target third party platform through the central server under the condition that the first historical access token information and the second historical access token information are not satisfactory.
18. A third party platform access device for use with a central server, the central server being communicatively coupled to a game server, the game server being communicatively coupled to a plurality of game clients, the device comprising:
a third receiving module, configured to receive a first access token application request for a target third party platform forwarded by the game server; the first access token application request is generated by the game client in response to an access instruction aiming at the target third party platform, and the game server inquires that first historical access token information aiming at the target third party platform in first local cache data is not forwarded after the validity period;
the second query module is used for querying second historical access token information aiming at the target third party platform in second local cache data of the central server according to the first access token application request, and judging whether the second historical access token information is in an effective period or not;
the second return module is used for returning one of second historical access token information and latest access token information aiming at the target third-party platform to the game server according to a second judging result, so that after the game server forwards the second historical access token information or the latest access token information to the game client, the game client accesses the target third-party platform by adopting the second historical access token information or the latest access token information; the first historical access token information is stored by the game server; the second historical access token information is stored by the central server; and the latest access token information is acquired from the target third party platform through the central server under the condition that the first historical access token information and the second historical access token information are not satisfactory.
19. An electronic device, comprising: a processor, a memory and a computer program stored on the memory and capable of running on the processor, which when executed by the processor performs the steps of a third party platform access method according to any one of claims 1-5 or 6-11 or 12-15.
20. A computer readable storage medium, characterized in that it has stored thereon a computer program which, when executed by a processor, implements the steps of a third party platform access method according to any of claims 1 to 5 or 6 to 11 or 12 to 15.
CN202210139168.5A 2022-02-15 2022-02-15 Third party platform access method and device, electronic equipment and medium Active CN114553433B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210139168.5A CN114553433B (en) 2022-02-15 2022-02-15 Third party platform access method and device, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210139168.5A CN114553433B (en) 2022-02-15 2022-02-15 Third party platform access method and device, electronic equipment and medium

Publications (2)

Publication Number Publication Date
CN114553433A CN114553433A (en) 2022-05-27
CN114553433B true CN114553433B (en) 2023-09-08

Family

ID=81675233

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210139168.5A Active CN114553433B (en) 2022-02-15 2022-02-15 Third party platform access method and device, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN114553433B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116248762A (en) * 2022-12-02 2023-06-09 中山市可讯科技有限公司 Cache system and method based on unstable request

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8504824B1 (en) * 2012-05-30 2013-08-06 Bank Of America Corporation One-time rotating key for third-party authentication
CN106453414A (en) * 2016-11-29 2017-02-22 迈普通信技术股份有限公司 Third party login authentication method and system, proxy server and client
WO2017067227A1 (en) * 2015-10-22 2017-04-27 乐视控股(北京)有限公司 Third party account number authorisation method, device, server, and system
CN111182321A (en) * 2019-12-31 2020-05-19 广州博冠信息科技有限公司 Method, device and system for processing information
CN112491778A (en) * 2019-09-11 2021-03-12 北京京东尚科信息技术有限公司 Authentication method, device, system and medium
CN112738805A (en) * 2020-12-30 2021-04-30 青岛海尔科技有限公司 Device control method and apparatus, storage medium, and electronic device
CN113271289A (en) * 2020-12-15 2021-08-17 全芯智造技术有限公司 Method, system and computer storage medium for resource authorization and access
CN113312653A (en) * 2021-06-25 2021-08-27 中国农业银行股份有限公司 Open platform authentication and authorization method, device and storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130144755A1 (en) * 2011-12-01 2013-06-06 Microsoft Corporation Application licensing authentication
US10771463B2 (en) * 2017-10-30 2020-09-08 International Business Machines Corporation Third-party authorization of access tokens
US11645375B2 (en) * 2018-09-27 2023-05-09 International Business Machines Corporation Authorization of resource access
US11582218B2 (en) * 2020-06-15 2023-02-14 Charter Communications Operating, Llc Management of access credentials
US20220029808A1 (en) * 2020-07-26 2022-01-27 Akeyless Secuirity LTD. System, Product and Method for Providing Secured Access to Data

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8504824B1 (en) * 2012-05-30 2013-08-06 Bank Of America Corporation One-time rotating key for third-party authentication
WO2017067227A1 (en) * 2015-10-22 2017-04-27 乐视控股(北京)有限公司 Third party account number authorisation method, device, server, and system
CN106453414A (en) * 2016-11-29 2017-02-22 迈普通信技术股份有限公司 Third party login authentication method and system, proxy server and client
CN112491778A (en) * 2019-09-11 2021-03-12 北京京东尚科信息技术有限公司 Authentication method, device, system and medium
CN111182321A (en) * 2019-12-31 2020-05-19 广州博冠信息科技有限公司 Method, device and system for processing information
CN113271289A (en) * 2020-12-15 2021-08-17 全芯智造技术有限公司 Method, system and computer storage medium for resource authorization and access
CN112738805A (en) * 2020-12-30 2021-04-30 青岛海尔科技有限公司 Device control method and apparatus, storage medium, and electronic device
CN113312653A (en) * 2021-06-25 2021-08-27 中国农业银行股份有限公司 Open platform authentication and authorization method, device and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
棋牌类网络游戏客户端架构设计;王小勇;郑世宝;袁江海;;信息技术(第04期);全文 *

Also Published As

Publication number Publication date
CN114553433A (en) 2022-05-27

Similar Documents

Publication Publication Date Title
US11245770B2 (en) Locality based content distribution
US20180167444A1 (en) Content delivery reconciliation
US10491534B2 (en) Managing resources and entries in tracking information in resource cache components
US11546447B2 (en) Systems and methods for processing requests for content of a content distribution network
US7797432B2 (en) Sharing state information between dynamic web page generators
US10764355B2 (en) Network address resolution
US11463401B2 (en) Systems and methods for processing requests for content of a content distribution network
CN110557284A (en) data aggregation method and device based on client gateway
CN114553433B (en) Third party platform access method and device, electronic equipment and medium
CN105357175B (en) The querying method and device of source address domain name safety
CN115733666A (en) Password management method and device, electronic equipment and readable storage medium
CN115422145A (en) Digital asset processing method, device, electronic equipment and storage medium
CN110807040B (en) Method, device, equipment and storage medium for managing data
CN114519082A (en) Data processing method and related device
US9280384B2 (en) Method, server and system for processing task data
CN108197256A (en) Access the method and system of specified network service platform
CN105635747A (en) Video cache method and device

Legal Events

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