CN113476831A - Cross-service method, system and related device - Google Patents

Cross-service method, system and related device Download PDF

Info

Publication number
CN113476831A
CN113476831A CN202110849293.0A CN202110849293A CN113476831A CN 113476831 A CN113476831 A CN 113476831A CN 202110849293 A CN202110849293 A CN 202110849293A CN 113476831 A CN113476831 A CN 113476831A
Authority
CN
China
Prior art keywords
data
server
cross
gateway
target database
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.)
Pending
Application number
CN202110849293.0A
Other languages
Chinese (zh)
Inventor
上官业云
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Guoren Interactive Technology Co ltd
Original Assignee
Beijing Guoren Interactive Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Guoren Interactive Technology Co ltd filed Critical Beijing Guoren Interactive Technology Co ltd
Priority to CN202110849293.0A priority Critical patent/CN113476831A/en
Publication of CN113476831A publication Critical patent/CN113476831A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • A63F13/352Details of game servers involving special game server arrangements, e.g. regional servers connected to a national server or a plurality of servers managing partitions of the game world
    • 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/33Interconnection arrangements between game servers and game devices; Interconnection arrangements between game devices; Interconnection arrangements between game servers using wide area network [WAN] connections
    • 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/70Game security or game management aspects
    • A63F13/77Game security or game management aspects involving data related to game devices or game servers, e.g. configuration data, software version or amount of memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2358Change logging, detection, and notification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/50Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by details of game servers
    • A63F2300/51Server architecture
    • A63F2300/513Server architecture server hierarchy, e.g. local, regional, national or dedicated for different tasks, e.g. authenticating, billing
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/50Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by details of game servers
    • A63F2300/53Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by details of game servers details of basic data processing
    • A63F2300/531Server assignment
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/50Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by details of game servers
    • A63F2300/55Details of game data or player data management
    • A63F2300/5526Game data structure
    • A63F2300/554Game data structure by saving game or status data

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Computing Systems (AREA)
  • Business, Economics & Management (AREA)
  • Computer Security & Cryptography (AREA)
  • General Business, Economics & Management (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application provides a cross-service method, a system and a related device, wherein the method applied to a gateway comprises the following steps: the method comprises the steps of receiving first data sent by a first server, storing the first data in a target database, responding to an acquisition request of a second server for the first data after a client requests to cross the second server from the first server, acquiring the first data from the target database, and sending the acquired first data to the second server. In the cross-server method applied to the gateway, the first data are data which are generated by the first server aiming at the client and are sent to the gateway in real time after being generated, so that the first data stored in the target database by the gateway are always the latest data, the first data acquired from the target database by the second server are the latest data, and the situation that the data structure of the acquired first data is not matched with the self-analysis mode can be avoided.

Description

Cross-service method, system and related device
Technical Field
The present application relates to the field of computer technology, and in particular, to a method, system, and related apparatus for crossing garments.
Background
In a large multiplayer online network game, a player needs to select a server before entering the game and play the game in the selected server, and players on different servers are not visible. However, with the opening of the server group, the players are not willing to be limited to the own server, but need to conquer players on other servers, compete for more game resources, and take effect in a cross-service manner.
Currently, each server corresponds to a database, and after the server generates data for a client where a player is located, the generated data can be stored in the database corresponding to the server. In the existing cross-server method, when a client requests to cross a game from a first server to a second server, the first server generates a character string or a byte stream according to a certain sequence from data stored in a corresponding database of the first server and stores the character string or the byte stream in a certain shared database, and after the client crosses the second server from the first server, the second server can take out the character string or the byte stream from the shared database according to the id of the client and deserialize the character string or the byte stream in the same way, so that the obtained data can be stored in the database corresponding to the second server.
However, the existing crossing clothes method has the following disadvantages: after the game versions are updated by the first server and the second server at the same time, the data of the new version generated by the first server is stored in the corresponding database, but the first server may not be capable of timely storing the data of the new version into the shared database.
Disclosure of Invention
In view of this, the present application provides a service crossing method, system and related device, so as to solve the problem that data under an old version acquired by a second server is not matched with a new analysis mode in the prior art during service crossing, and a technical scheme thereof is as follows:
a cross-service method is applied to a gateway and comprises the following steps:
receiving first data sent by a first server, wherein the first data is data which is generated by the first server aiming at a client and is sent to a gateway in real time after being generated;
storing the first data to a target database;
after the client requests to cross the second server from the first server, responding to an acquisition request of the second server for the first data, acquiring the first data from the target database, and sending the acquired first data to the second server.
Optionally, the first data is partial data in data generated by the first server for the client, the second data is data except the first data in the data generated by the first server for the client, and the importance degree of the first data is higher than that of the second data;
the cross-service method further comprises the following steps:
after a client requests to cross a second server from a first server, second data generated by the first server is obtained;
storing the second data to a target database;
and responding to an acquisition request of the second server for the second data, acquiring the second data from the target database, and sending the acquired second data to the second server.
Optionally, the obtaining the second data generated by the first server includes:
forwarding the cross-server request of the client to a first server so that the first server can verify the cross-server request of the client;
if indication information of a first server for successfully verifying a cross-server request of a client is received, establishing connection with a second server, and sending cross-server information to the second server so that the second server can verify the cross-server information, wherein the cross-server information is used for representing the first server;
if receiving indication information that the second server successfully verifies the cross-service information, sending the indication information for determining cross-service to the first server;
and receiving second data sent by the first server.
Optionally, the method further includes:
receiving updated first data sent by a second server, wherein the updated first data is data which is updated by the second server and is sent to a gateway in real time after being updated;
and storing the updated first data to a target database.
Optionally, the method further includes:
after the client requests to cross back to the first server from the second server, acquiring updated second data sent by the second server, wherein the updated second data is obtained by updating the second data by the second server;
and storing the updated second data to the target database.
A cross-server method is applied to a first server and comprises the following steps:
when first data are generated aiming at a client, the first data are sent to a gateway in real time so that the gateway can store the first data to a target database, and after the client requests to cross a second server from a first server, the first data acquired from the target database are sent to the second server in response to an acquisition request of the second server aiming at the first data.
Optionally, the first data is partial data in data generated by the first server for the client, the second data is data except the first data in the data generated by the first server for the client, and the importance degree of the first data is higher than that of the second data;
the cross-service method further comprises the following steps:
and after the client requests to cross the second server from the first server, the generated second data is sent to the gateway so that the gateway can store the second data to the target database, and when the second server requests to acquire the second data, the second data acquired from the target database is sent to the second server.
A cross-server system includes a gateway and a first server;
the first server is used for sending the first data to the gateway in real time when the first data are generated aiming at the client;
the gateway is used for receiving the first data sent by the first server and storing the first data to a target database; after the client requests to cross the second server from the first server, responding to an acquisition request of the second server for the first data, acquiring the first data from the target database, and sending the acquired first data to the second server.
A cross-clothing device applied to a gateway, comprising: the device comprises a first data receiving module, a first data storage module and a first data acquisition module;
the first data receiving module is used for receiving first data sent by a first server, wherein the first data is data which is generated by the first server aiming at a client and is sent to a gateway in real time after being generated;
the first data storage module is used for storing the first data to a target database;
the first data acquisition module is used for responding to an acquisition request of the second server for the first data after the client requests to cross the second server from the first server, acquiring the first data from the target database and sending the acquired first data to the second server.
A cross-server device applied to a first server comprises: a first data transmission module;
the first data sending module is used for sending the first data to the gateway in real time when the first data are generated aiming at the client, so that the gateway can store the first data to the target database, and after the client requests to cross the second server from the first server, responding to an acquisition request of the second server aiming at the first data, and sending the first data acquired from the target database to the second server.
According to the technical scheme, the method for crossing the servers applied to the gateway comprises the steps of firstly receiving first data sent by a first server, storing the first data in a target database, responding to an acquisition request of a second server for the first data after a client requests to cross the first server from the first server to the second server, acquiring the first data from the target database, and sending the acquired first data to the second server. In the cross-server method applied to the gateway, the first data are data which are generated by the first server aiming at the client and are sent to the gateway in real time after being generated, so that the first data stored in the target database by the gateway are always the latest data, the first data acquired from the target database by the second server are the latest data, and the situation that the data structure of the acquired first data is not matched with the self-analysis mode can be avoided.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a schematic flowchart of a cross-service method according to an embodiment of the present disclosure;
fig. 2 is a schematic flow chart of another cross-service method provided in the embodiment of the present application;
fig. 3 is a schematic diagram of a process of sending and storing second data according to an embodiment of the present application;
fig. 4 is a schematic diagram of another process for sending and storing second data according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a cross-server apparatus applied to a gateway according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of a cross-server apparatus applied to a first server according to an embodiment of the present disclosure;
fig. 7 is a block diagram of a hardware structure of a cross-server device applied to a gateway according to an embodiment of the present application;
fig. 8 is a block diagram of a hardware structure of a cross-server device applied to a first server according to an embodiment of the present disclosure.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In view of the problems of the background art, the present inventors have conducted extensive studies to finally provide a service crossing method, a system and a related device, and first, the service crossing method provided in the present application will be described in detail by the following embodiments.
According to the cross-server method, the gateway can be used as a transfer station between the first server and the client and is responsible for message forwarding, so that the client does not interact with the first server directly. In addition, the gateway interacts with the target database to store the data generated by the first server to the target database through the gateway. Referring to fig. 1, a schematic flow chart of a cross-service method provided in an embodiment of the present application is shown, where the method may include:
step S101, when the first server generates first data aiming at the client, the first data is sent to the gateway in real time.
In this embodiment, the first server refers to a home server where the player is located, which is also referred to as a home server or a game server, and the gateway refers to a home gateway where the player is located.
The first server can generate data aiming at the client, wherein the data refers to game data which is generated by a game player in the process of playing the game and needs to be persisted, and the data comprises attributes, such as gold coins, diamonds, prop data, pet data, the position of a game character in a map, and the like. For convenience of the following description, the embodiment may refer to the data as the first data, that is, the first server may generate the first data for the client. It should be noted that the first data in this embodiment may be all data generated by the first server for the client, or may be part of data in the data generated by the first server for the client.
In this step, the first server may send the first data to the gateway in real time when generating the first data, where "real time" means that the first server sends the first data to the gateway immediately as long as the first server generates the first data. In the step, the first server sends the first data in real time, so that the probability of losing the first data is reduced, and the player experience is better.
It should be noted that, in this embodiment, the gateway and the first server belong to the same process (the gateway and the first server in the same process are referred to as a server group, in this application, one server group corresponds to one set of virtual machines, when the pressure of the first server is small, multiple sets of virtual machines may be started on one physical machine, that is, multiple server groups are deployed on one physical machine at the same time, and the process can be completed under the same engineering project, so that the first data is sent from the first server to the gateway and stored in the target database, and it is necessary to ensure that the first data is consistent in terms of reading and writing, for example, the data format, the type, and the sequence are consistent. In order to achieve the consistency, the inventor designs an Executable class, which includes a top packet function and an execute function, wherein the top packet function is a data input function and can be called in a first server to package first data; the execute function is an output processing function and can be executed at the gateway to store the first data sent to the gateway into the target database, and the problem of code consistency of the first data storage is solved through the two functions.
In this step, the first server may write the first data into the data format packet through the data input function, and then write the data format packet into the gateway through the data packet writing function, so that the first server may send the first data to the gateway.
For example, when the Player level is raised, the new promotion level data generated by the first server needs to be sent to the gateway, at this time, the changeLevel function of the first server layer class calls the savelevelexecutor topace function (i.e., the above-mentioned data input function) to write the new promotion level data into the transmittable writeack data format packet, and then writes the data format packet corresponding to the new promotion level data into the gateway through the writeack function (i.e., the data packet writing function) of the Player class.
And S102, the gateway stores the first data to a target database.
Here, the target database is a local database to which the first server belongs.
It can be understood that, when the gateway interacts with the first server, the first server sends the interactive data to the gateway, and at the same time, after the first server generates the first data, the first data is also sent to the gateway in real time, so that the data format packet sent by the gateway receiving the first server includes the data format packet corresponding to the interactive data and the data format packet corresponding to the first data. In this step, the gateway may analyze the data type of the data format packet through the type parsing function, determine which of the received data format packets are the data format packet corresponding to the first data based on the data type, and then may read the first data from the data format packet corresponding to the first data through the output processing function and store the first data in the target database, so that the gateway may store the first data in the target database.
Still by way of example in the above step, after receiving the data format packet, the gateway parses the type of the data format packet through a type function (i.e., a type parsing function) of the Game2gateway type, and calls an excete function (i.e., the above output processing function) to read the first data from the data format packet corresponding to the first data and store the first data in the target database.
It should be noted that, when the target database stores the first data, the format of the first data is not changed, but the first data is stored according to the original format, and the first data in one system (for example, a prop system, a pet system, etc.) is stored in one table, or the first data in a plurality of systems is stored in one table.
Step S103, after the client requests to cross the second server from the first server, the gateway responds to an acquisition request of the second server for the first data, acquires the first data from the target database, and sends the acquired first data to the second server.
In this step, the second server is the server where the cross-server activity is located when the player cross-servers.
After a client requests to cross from a first server to a second server, the second server needs to initialize based on first data generated by the first server, the second server needs to request a gateway to acquire the first data, the gateway responds to the acquisition request after receiving the acquisition request, inquires the first data from a target database, receives the first data fed back by the target database, and then sends the first data to the second server.
It should be noted that the attribute of the first data in the target database may be queried by the gateway, that is, when the gateway queries the first data from the target database, the attribute included in the first data may also be found, so that the attribute included in the first data may also be obtained when the second server obtains the first data, and then the attribute may be changed.
In this step, after the initialization based on the first data is completed, the second server may send initialization completion information to the gateway, so that the gateway disconnects from the first server, and feeds back information of successful cross-server to the client. In the embodiment of the application, the gateway is disconnected from the first server after the crossing of the server is completed, so that the gateway can normally receive other information sent by the first server before the crossing of the server is completed. In addition, the connection between the gateway and the second server is carried out in an intranet, so that the connection reliability and transmission performance are greatly improved.
According to the server crossing method, when the first server generates the first data aiming at the client, the first data can be sent to the gateway in real time, the gateway stores the first data to the target database, and after the client requests to cross from the first server to the second server, the gateway can respond to the acquisition request of the second server aiming at the first data, acquire the first data from the target database and send the acquired first data to the second server. In the service crossing method provided by the application, the first data are data which are generated by the first server aiming at the client and are sent to the gateway in real time after being generated, so that the first data stored in the target database by the gateway are the latest data all the time, and the first data acquired from the target database by the second server are the latest data, so that the situation that the data structure of the acquired first data is not matched with the self analysis mode can be avoided.
Meanwhile, the cross-service method provided by the application bears all functions including a hall, a network manager and a battle, for developers, only one set of same codes is maintained, and functional servers such as a hall server, a gateway server and a combat server are not subdivided, so that the development efficiency is greatly improved.
In an optional embodiment, referring to fig. 2, the method for crossing clothes provided by the present application may further include the following steps:
and step S104, after updating the first data, the second server sends the updated first data to the gateway in real time.
In this step, the second server updates the first data and then sends the updated first data to the gateway in real time, that is, the second server sends the updated first data to the gateway when the update of the first data is completed. Here, the process of updating the first data by the second server includes: the second server updates the attribute contained in the first data, for example, the attribute contained in the first data is gold coins, and the client can spend the gold coins to purchase the items when playing the game on the second server, at which time the gold coins will change.
In this step, the process of sending the updated first data to the gateway by the second server may refer to the process of sending the first data to the gateway by the first server in step S101, and details are not repeated here.
And step S105, the gateway stores the updated first data to a target database.
In this step, after the gateway stores the updated first data in the target database, the first server may read the updated first data in the target database through the gateway, and perform initialization based on the updated first data.
In this step, the process of saving the updated first data to the target database by the gateway may refer to the process of saving the first data to the target database by the gateway in step S102, and details are not repeated here.
In the embodiment of the application, the second server can update the attribute of the first data, and the update of the attribute can also be stored in the target database, that is, the update of the attribute of the first data in the cross-server process can be stored, so that after the client crosses back to the first server, the client can play games on the first server based on the updated attribute, and compared with the situation that the attribute change in the cross-server process cannot be stored due to the fact that the attribute in the shared database in the prior art cannot be checked, the game experience of the application is better.
It can be understood that, in the data generated by the first server for the client, a part of the data is more important, and another part of the data is less important, for example, the data corresponding to the attributes of gold coins, diamonds, props newly obtained by a prop system, pets newly obtained by a pet system, and the like for purchasing equipment is more important, while the data corresponding to the attributes of the steps, positions, and the like of the game character in the game map is less important.
In an alternative embodiment, the more important data generated by the first server for the client may be used as the first data, and the less important data generated by the first server for the client may be used as the second data, that is, the first data is a part of the data generated by the first server for the client, the second data is data of the data generated by the first server for the client except the first data, and the importance degree of the first data is higher than that of the second data. Optionally, in an actual application scenario, the importance degree of the first server for the data generated by the client may be set according to an actual situation.
The inventor thinks that the first server can send the first data to the gateway in real time and send the second data to the gateway at set time intervals or send the second data to the gateway when the client requests off-line after considering the importance degree of the first server for the data generated by the client, for example, the first server sends the second data to the gateway when the client requests cross-service.
Therefore, in the cross-server method, after the first server generates the first data, the first data is sent to the gateway in real time, and then is stored in the target database by the gateway, and details of the sending and storing processes of the first data may refer to the description in the previous embodiment, and are not described herein again in detail. The following focuses on the process of sending and saving the second data, and referring to fig. 3 in detail, a schematic diagram of the process of sending and saving the second data provided by the embodiment of the present application is shown, where the process may include:
step S301, after the client requests to cross the second server from the first server, the first server sends the generated second data to the gateway.
In this embodiment, the first server does not send the second data to the gateway in real time after generating the second data, but waits for the client to request the first server to cross the second server, and then sends the second data to the gateway. Here, a process of the first server sending the second data to the gateway is the same as the process of the first server sending the first data to the gateway in step S101, and reference may be made to the description in step S101 for details, which is not repeated herein.
Optionally, in this embodiment of the application, before the first server sends the generated second data to the gateway, the first server and the second server need to verify the cross-server request (the cross-server request refers to that the client requests to cross from the first server to the second server) and the cross-server information respectively, and after the cross-server request and the cross-server information are both successfully verified, the first server sends the generated second data to the gateway.
The detailed process for verifying the cross-service request and the cross-service information may include: when a client requests to cross from a first server to a second server, a cross-server request is generated, and the cross-server request can be forwarded to the first server by a gateway; the first server verifies the cross-server request when receiving the cross-server request, and feeds back a cross-server request verification result to the gateway; the gateway reads a cross-server request verification result, if the cross-server request verification result is indication information of cross-server request verification failure of the first server to the client, the cross-server request verification result is sent to the client, if the cross-server request verification result is indication information of cross-server request verification success of the first server to the client, connection with the second server is established, and cross-server information is sent to the second server; the second server verifies the cross-service information and feeds back a cross-service information verification result to the gateway; the gateway reads the cross-server information verification result, if the cross-server information verification result is indicating information of the second server for the cross-server information verification failure, the cross-server information verification failure is sent to the client, and if the cross-server information verification result is indicating information of the second server for the cross-server information verification success, the cross-server determining indicating information is sent to the first server, so that the first server sends second data to the gateway after receiving the cross-server determining indicating information.
Here, the cross-server information is used to characterize the first server, e.g., the cross-server information may be an identification of the first server. In this step, the cross-service information may be stored in the cross-service request verification result, and when the gateway reads the cross-service request verification result, the cross-service information may be obtained, and then the cross-service information may be sent to the second server. Correspondingly, the process of the second server verifying the cross-service information may include: the second server verifies the identification of the first server based on the pre-stored server identification, if the pre-stored server identification comprises the identification of the first server, the cross-server information verification is determined to be successful, and if the pre-stored server identification does not comprise the identification of the first server, the cross-server information verification is determined to be failed.
And step S302, the gateway stores the second data to a target database.
In this step, the process of the gateway storing the second data in the target database is the same as the process of the gateway storing the first data in the target database in step S102, and reference may be made to the description in step S102 for details, which is not repeated herein.
Optionally, after the first server sends all the second data to the gateway, the first server may send the notification preparation completion information to the gateway, so that the gateway determines that the first server has completely sent all the second data.
Step S303, the gateway responds to the second server request for acquiring the second data, acquires the second data from the target database, and sends the acquired second data to the second server.
In this step, a process of the gateway responding to the second server 'S request for acquiring the second data, acquiring the second data from the target database, and sending the acquired second data to the second server is the same as a process of the gateway responding to the second server' S request for acquiring the first data in step S103, acquiring the first data from the target database, and sending the acquired first data to the second server, and the details may refer to the description in step S103, and are not repeated here.
It should be noted that the second server needs to wait for the second data to be completely sent before initializing based on the first data and the second data, and therefore, after receiving the notification preparation completion information sent by the first server, the gateway sends the login information to the second server, so that the second server logs in based on the login information, sends the acquisition request for the second data to the gateway after logging in, and then, the gateway responds to the acquisition request for the second data by the second server, acquires the second data from the target database, and sends the acquired second data to the second server.
It should be further noted that, in a possible implementation manner, the obtaining request sent by the second server to the gateway may be used to obtain the first data and the second data simultaneously, that is, the second server may send the obtaining request of the first data and the second data to the gateway, and the gateway responds to the obtaining request of the second server for the first data and the second data, obtains the first data and the second data from the target database, and sends the obtained first data and the obtained second data to the second server.
According to the cross-server method, when the first server generates the first data aiming at the client, the first data can be sent to the gateway in real time, the gateway stores the first data to the target database, after the client requests the first server to cross the second server, the first server can send the second data to the gateway, and the gateway stores the second data to the target database. The gateway may then respond to an acquisition request of the second server for the first data, acquire the first data from the target database, send the acquired first data to the second server, respond to an acquisition request of the second server for the second data, acquire the second data from the target database, and send the acquired second data to the second server. In the cross-server method provided by the application, the first data is data which is generated by the first server aiming at the client and is sent to the gateway in real time after being generated, the second data is sent to the gateway by the first server after the client sends the cross-server request, and the first server can not generate new second data under the normal condition after the cross-server request is generated, so that the first data and the second data which are stored in the target database by the gateway are always latest data, and therefore the first data and the second data which are acquired from the target database by the second server are latest data, and the situation that the data structures of the acquired first data and the acquired second data are not matched with the self-analysis mode can not occur.
In an optional embodiment, referring to fig. 4, the sending and storing process of the second data in the cross-service method provided in the embodiment of the present application may further include the following steps:
step S304, after the client requests the second server to span back to the first server, the second server sends the updated second data obtained by updating the second data to the gateway.
In this step, after the client requests to stride from the second server to the first server, the second server can send the updated second data to the gateway, that is, the second server does not directly send the updated second data to the gateway, but waits for the client to request to stride from the second server to the first server, and then sends the updated second data to the gateway. Here, the process of updating the second data by the second server includes: the second server updates the attribute contained in the second data, for example, the attribute contained in the second data is the position of the game character in the map, and when the client plays the game on the second server, the game character can move on the map, and the position of the game character in the map changes.
In this step, the process of sending the updated second data to the gateway by the second server may refer to the process of sending the second data to the gateway by the first server in step S301, and details are not repeated here.
And step S305, the gateway saves the updated second data to a target database.
In this step, the process of saving the updated second data to the target database by the gateway may refer to the process of saving the second data to the target database by the gateway in step S302, and is not repeated here.
In the embodiment of the application, the second server may update the attributes contained in the first data and the second data, and the update of the attributes may also be stored in the target database, that is, the update of the attributes contained in the first data and the second data in the cross-server process may be stored, so that after the client crosses back to the first server, the client may play a game on the first server based on the updated attributes, and compared with the prior art in which the attribute change in the cross-server process cannot be stored due to the unrepeatability of the attributes in the shared database, the game experience of the application is better.
The following describes the cross-clothing device applied to the gateway, and the cross-clothing device applied to the gateway described below and the cross-clothing method applied to the gateway described above may be referred to correspondingly.
Referring to fig. 5, a schematic structural diagram of a cross-server apparatus applied to a gateway according to an embodiment of the present application is shown, and as shown in fig. 5, the cross-server apparatus applied to the gateway may include: a first data receiving module 501, a first data saving module 502 and a first data obtaining module 503.
The first data receiving module 501 is configured to receive first data sent by a first server, where the first data is data that is generated by the first server for a client and is sent to a gateway in real time after being generated.
The first data saving module 502 is configured to save the first data to the target database.
The first data obtaining module 503 is configured to, after the client requests to cross from the first server to the second server, respond to a first data obtaining request from the second server, obtain first data from the target database, and send the obtained first data to the second server.
The cross-server device applied to the gateway receives first data sent by a first server, stores the first data in a target database, responds to an acquisition request of a second server for the first data after a client requests to cross the second server from the first server, acquires the first data from the target database, and sends the acquired first data to the second server. The cross-clothing device applied to the gateway, provided by the application, the first data are data which are generated by the first server aiming at the client and are sent to the gateway in real time after being generated, so that the first data stored into the target database by the gateway are the latest data all the time, the first data acquired from the target database by the second server are the latest data, and the situation that the data structure of the acquired first data is not matched with the self-analysis mode can be avoided.
In a possible implementation manner, the first data may be a part of data in the data generated by the first server for the client, and the second data is data other than the first data in the data generated by the first server for the client, where the first data is more important than the second data.
On this basis, the cross-clothing device that applies to gateway that this application provided can also include: the device comprises a second data acquisition module, a second data storage module and a second data sending module.
The second data acquisition module is used for acquiring second data generated by the first server after the client requests to cross the second server from the first server.
The second data storage module is used for storing the second data to the target database;
and the second data sending module is used for responding to an acquisition request of the second server for the second data, acquiring the second data from the target database and sending the acquired second data to the second server.
In a possible implementation manner, the second data obtaining module may include: the system comprises a cross-service request forwarding module, a cross-service information sending module, a cross-service determining module and a second data receiving module.
The cross-server request forwarding module is used for forwarding the cross-server request of the client to the first server so that the first server can verify the cross-server request of the client.
And the cross-server information sending module is used for establishing connection with the second server and sending the cross-server information to the second server so that the second server can verify the cross-server information if indication information that the cross-server request of the first server to the client is verified successfully is received, wherein the cross-server information is used for representing the first server.
And the cross-server determining module is used for sending the cross-server determining indication information to the first server if the indication information that the second server successfully verifies the cross-server information is received.
And the second data receiving module is used for receiving second data sent by the first server.
In a possible implementation manner, the cross-clothing device applied to the gateway provided by the embodiment of the present application may further include: a third data receiving module and a third data saving module.
The third data receiving module is used for receiving third data sent by the second server, wherein the third data is data which is updated by the second server on the first data and is sent to the gateway in real time after being updated. That is, in the embodiment of the present application, the third data is the updated first data.
And the third data storage module is used for storing the third data to the target database.
In a possible implementation manner, the cross-clothing device applied to the gateway provided by the embodiment of the present application may further include: a fourth data acquisition module and a fourth data storage module.
The fourth data acquisition module is used for acquiring fourth data sent by the second server after the client requests to stride back to the first server from the second server, wherein the fourth data is obtained by updating the second data by the second server. That is, in the embodiment of the present application, the fourth data is the updated second data.
And the fourth data storage module is used for storing the updated second data to the target database.
The following description is provided for the cross-server apparatus applied to the first server, and the cross-server apparatus applied to the first server described below and the cross-server method applied to the first server described above may be referred to correspondingly.
Referring to fig. 6, a schematic structural diagram of a cross-server apparatus applied to a first server according to an embodiment of the present application is shown, and as shown in fig. 6, the cross-server apparatus applied to the first server may include: a first data sending module 601.
The first data sending module 601 is configured to send first data to the gateway in real time when the first data is generated for the client, so that the gateway stores the first data to the target database, and sends the first data acquired from the target database to the second server in response to an acquisition request for the first data by the second server after the client requests to cross from the first server to the second server.
The server crossing device applied to the first server sends the first data to the gateway in real time when the first data are generated for the client, so that the gateway can store the first data to the target database, responds to an acquisition request of the second server for the first data after the client requests the first server to cross to the second server, and sends the first data acquired from the target database to the second server. According to the cross-clothing device applied to the first server, after the first server generates the first data, the first data can be sent to the gateway in real time, and therefore the first data stored in the target database by the gateway are the latest data all the time, the first data acquired from the target database by the second server are the latest data, and the situation that the data structure of the acquired first data is not matched with the self-analysis mode cannot occur.
In a possible implementation manner, the first data is part of data in the data generated by the first server for the client, the second data is data other than the first data in the data generated by the first server for the client, and the importance degree of the first data is higher than that of the second data.
On this basis, the cross-clothing device that applies to gateway that this application provided can also include: and a second data transmission module.
And the second data transmission module is used for sending the generated second data to the gateway after the client requests to cross the second server from the first server, so that the gateway can store the second data to the target database, and sending the second data acquired from the target database to the second server when the second server requests to acquire the second data.
The embodiment of the application also provides a cross-server system, which comprises a gateway and a first server.
The first server is used for sending the first data to the gateway in real time when the first data are generated aiming at the client.
The gateway is used for receiving the first data sent by the first server and storing the first data to a target database; and after the client requests to cross the second server from the first server, responding to an acquisition request of the second server for the first data, acquiring the first data from the target database, and sending the acquired first data to the second server.
The service crossing system provided by the present application may correspond to the service crossing method, the service crossing device applied to the gateway, and the service crossing device applied to the first server provided by the foregoing embodiments, and details may be introduced with reference to the foregoing embodiments, and thus, details are not repeated herein.
The embodiment of the application also provides a cross-service device applied to the gateway. Optionally, fig. 7 is a block diagram illustrating a hardware structure of a cross-server device applied to a gateway, and referring to fig. 7, the hardware structure of the cross-server device applied to the gateway may include: at least one processor 701, at least one communication interface 702, at least one memory 703 and at least one communication bus 704;
in the embodiment of the present application, the number of the processor 701, the communication interface 702, the memory 703 and the communication bus 704 is at least one, and the processor 701, the communication interface 702 and the memory 703 complete mutual communication through the communication bus 704;
the processor 701 may be a central processing unit CPU, or an application Specific Integrated circuit (asic), or one or more Integrated circuits configured to implement embodiments of the present invention, or the like;
the memory 703 may include a high-speed RAM memory, and may further include a non-volatile memory (non-volatile memory) or the like, such as at least one disk memory;
wherein the memory 703 stores a program, and the processor 701 may call the program stored in the memory 703, the program being configured to:
receiving first data sent by a first server, wherein the first data is data which is generated by the first server aiming at a client and is sent to a gateway in real time after being generated;
storing the first data to a target database;
after the client requests to cross the second server from the first server, responding to an acquisition request of the second server for the first data, acquiring the first data from the target database, and sending the acquired first data to the second server.
Alternatively, the detailed function and the extended function of the program may be as described above.
The embodiment of the application also provides cross-server equipment applied to the first server. Alternatively, fig. 8 is a block diagram illustrating a hardware structure of a cross-server device applied to a first server, and referring to fig. 8, the hardware structure of the cross-server device applied to the first server may include: at least one processor 801, at least one communication interface 802, at least one memory 803, and at least one communication bus 804;
in the embodiment of the present application, the number of the processor 801, the communication interface 802, the memory 803, and the communication bus 804 is at least one, and the processor 801, the communication interface 802, and the memory 803 complete communication with each other through the communication bus 804;
the processor 801 may be a central processing unit CPU, or an application Specific Integrated circuit asic, or one or more Integrated circuits configured to implement embodiments of the present invention, or the like;
the memory 803 may include a high-speed RAM memory, and may further include a non-volatile memory (non-volatile memory) or the like, such as at least one disk memory;
wherein the memory 803 stores a program and the processor 801 may invoke the program stored in the memory 803 for:
when first data are generated aiming at a client, the first data are sent to a gateway in real time so that the gateway can store the first data to a target database, and after the client requests to cross a second server from a first server, the first data acquired from the target database are sent to the second server in response to an acquisition request of the second server aiming at the first data.
Alternatively, the detailed function and the extended function of the program may be as described above.
The embodiment of the present application further provides a readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the method for implementing a cross-service method applied to a gateway as described above is implemented.
Alternatively, the detailed function and the extended function of the program may be as described above.
Embodiments of the present application further provide a readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the cross-server method applied to the first server is implemented as described above.
Alternatively, the detailed function and the extended function of the program may be as described above.
Finally, it is further noted that, herein, relational terms such as, for example, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A cross-service method is applied to a gateway and comprises the following steps:
receiving first data sent by a first server, wherein the first data is data which is generated by the first server aiming at a client and is sent to a gateway in real time after being generated;
saving the first data to a target database;
and after the client requests to cross a second server from the first server, responding to an acquisition request of the second server for the first data, acquiring the first data from the target database, and sending the acquired first data to the second server.
2. The cross-server method according to claim 1, wherein the first data is part of data in the data generated by the first server for the client, the second data is data except the first data in the data generated by the first server for the client, and the importance degree of the first data is higher than that of the second data;
the service crossing method further comprises the following steps:
after the client requests to cross to the second server from the first server, acquiring the second data generated by the first server;
saving the second data to the target database;
and responding to an acquisition request of the second server for the second data, acquiring the second data from the target database, and sending the acquired second data to the second server.
3. The cross-server method of claim 2, wherein the obtaining the second data generated by the first server comprises:
forwarding the cross-server request of the client to the first server so that the first server can verify the cross-server request of the client;
if indication information that cross-server request verification of the client side by the first server is successful is received, connection with the second server is established, and cross-server information is sent to the second server so that the second server can verify the cross-server information, wherein the cross-server information is used for representing the first server;
if receiving indication information that the cross-service information verification of the second server is successful, sending indication information for determining cross-service to the first server;
and receiving the second data sent by the first server.
4. The method of claim 1, further comprising:
receiving updated first data sent by the second server, wherein the updated first data is data which is updated by the second server and is sent to the gateway in real time after being updated;
and storing the updated first data to the target database.
5. The method of claim 2, further comprising:
after the client requests to stride back to the first server from the second server, acquiring updated second data sent by the second server, wherein the updated second data is obtained by updating the second data by the second server;
and storing the updated second data to the target database.
6. A cross-server method applied to a first server comprises the following steps:
when first data are generated aiming at a client, the first data are sent to a gateway in real time so that the gateway can store the first data to a target database, and after the client requests to cross from a first server to a second server, the first data acquired from the target database are sent to the second server in response to an acquisition request of the second server aiming at the first data.
7. The cross-server method according to claim 6, wherein the first data is part of data in the data generated by the first server for the client, the second data is data except the first data in the data generated by the first server for the client, and the importance degree of the first data is higher than that of the second data;
the service crossing method further comprises the following steps:
and after the client requests to cross the second server from the first server, sending the generated second data to the gateway so that the gateway can store the second data to the target database, and sending the second data acquired from the target database to the second server when the second server requests to acquire the second data.
8. A cross-server system is characterized by comprising a gateway and a first server;
the first server is used for sending first data to the gateway in real time when the first data are generated aiming at a client;
the gateway is used for receiving the first data sent by the first server and storing the first data to a target database; and after the client requests to cross a second server from the first server, responding to an acquisition request of the second server for the first data, acquiring the first data from the target database, and sending the acquired first data to the second server.
9. A cross-server device applied to a gateway comprises: the device comprises a first data receiving module, a first data storage module and a first data acquisition module;
the first data receiving module is used for receiving first data sent by a first server, wherein the first data is data which is generated by the first server aiming at a client and is sent to the gateway in real time after being generated;
the first data storage module is used for storing the first data to a target database;
the first data acquisition module is configured to respond to an acquisition request for the first data from the second server after the client requests to cross from the first server to the second server, acquire the first data from the target database, and send the acquired first data to the second server.
10. A cross-server apparatus applied to a first server includes: a first data transmission module;
the first data sending module is used for sending first data to a gateway in real time when the first data are generated aiming at a client, so that the gateway can store the first data to a target database, and after the client requests to cross from a first server to a second server, the first data obtained from the target database are sent to the second server in response to an obtaining request of the second server aiming at the first data.
CN202110849293.0A 2021-07-27 2021-07-27 Cross-service method, system and related device Pending CN113476831A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110849293.0A CN113476831A (en) 2021-07-27 2021-07-27 Cross-service method, system and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110849293.0A CN113476831A (en) 2021-07-27 2021-07-27 Cross-service method, system and related device

Publications (1)

Publication Number Publication Date
CN113476831A true CN113476831A (en) 2021-10-08

Family

ID=77943965

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110849293.0A Pending CN113476831A (en) 2021-07-27 2021-07-27 Cross-service method, system and related device

Country Status (1)

Country Link
CN (1) CN113476831A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020059425A1 (en) * 2000-06-22 2002-05-16 Microsoft Corporation Distributed computing services platform
CN102694806A (en) * 2012-05-30 2012-09-26 北京像素软件科技股份有限公司 System and method for obtaining copy information of cross-server match
US20140101331A1 (en) * 2012-10-05 2014-04-10 Aaa Internet Publishing, Inc. Method and System for Managing, Optimizing, and Routing Internet Traffic from a Local Area Network (LAN) to Internet Based Servers
CN112156475A (en) * 2020-10-29 2021-01-01 腾讯科技(深圳)有限公司 Business data processing method and device, electronic equipment and storage medium
CN112245904A (en) * 2020-11-06 2021-01-22 网易(杭州)网络有限公司 Method, system, storage medium and computer device for supporting cross-server game
CN112604270A (en) * 2020-12-29 2021-04-06 北京冰封互娱科技有限公司 Cross-server method, device and equipment for online game

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020059425A1 (en) * 2000-06-22 2002-05-16 Microsoft Corporation Distributed computing services platform
CN102694806A (en) * 2012-05-30 2012-09-26 北京像素软件科技股份有限公司 System and method for obtaining copy information of cross-server match
US20140101331A1 (en) * 2012-10-05 2014-04-10 Aaa Internet Publishing, Inc. Method and System for Managing, Optimizing, and Routing Internet Traffic from a Local Area Network (LAN) to Internet Based Servers
CN112156475A (en) * 2020-10-29 2021-01-01 腾讯科技(深圳)有限公司 Business data processing method and device, electronic equipment and storage medium
CN112245904A (en) * 2020-11-06 2021-01-22 网易(杭州)网络有限公司 Method, system, storage medium and computer device for supporting cross-server game
CN112604270A (en) * 2020-12-29 2021-04-06 北京冰封互娱科技有限公司 Cross-server method, device and equipment for online game

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
胡力木;: "浅谈网络游戏的改进与创新", 通讯世界, no. 08 *

Similar Documents

Publication Publication Date Title
CN106528224B (en) Content updating method, server and system for Docker container
US10628294B2 (en) Mock services for software infrastructures
US8756694B2 (en) Prevention of exploitation of update rollback
CN107158705B (en) The update method and device of service
CN106075911B (en) A kind of generation method and device at the micro- end of web game
CN108379845B (en) Information processing method, device and storage medium
CN110180177B (en) Maintenance method, device and medium of online game and electronic equipment
CN104133825A (en) Method and device for matching client user
CN113127133B (en) Cross-platform virtual machine hot migration method, device, equipment and medium
CN109499069B (en) Operation result checking method and device, storage medium and electronic device
CN102468906A (en) Interactive logic fault-tolerance method in online games and online game fault-tolerance system
JP2023523242A (en) DATA PROCESSING METHOD, DATA PROCESSING APPARATUS, COMPUTER DEVICE, AND COMPUTER PROGRAM
US20240152496A1 (en) Model ml registry and model serving
CN110113414B (en) Method, device, server and storage medium for managing copies
CN111290965A (en) Test method, test device, computer equipment and storage medium
CN108829495B (en) Verification method, device, equipment and storage medium for multi-database modification transaction
CN112131240B (en) Dirty data processing method and device, storage medium and electronic equipment
CN113476831A (en) Cross-service method, system and related device
CN112138372B (en) Data synchronization method in distributed system and related equipment
US10891125B2 (en) Videogame patch data compilation system
CN104683310A (en) Beginner guiding implementation method for online game
CN111399890A (en) Game hot updating method, device and system and electronic equipment
CN114327896A (en) Micro-service-based activity calling method and platform
KR102367570B1 (en) Method for parallel block processing method in blockchain, blockcahin node device and program using the same
CN109701275B (en) Operation interaction method and device based on network game shadow role

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