Game service calling method and device, equipment and storage medium

By registering the service instance of the game server in the registration center, the game server can directly obtain the service address information, solving the problem of cumbersome connection between the game server and the backend website, improving the efficiency of calling service instances, and promoting the expansion and redevelopment of game functions.

CN120343071APending Publication Date: 2025-07-18安徽三七极光网络科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311718453.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-13
Publication Date
2025-07-18

AI Technical Summary

Technical Problem

The docking process between the game server and the backend website is relatively cumbersome, which affects the efficiency of the game server calling service instances. Frequent docking consumes a lot of game time, which is not conducive to the expansion and redevelopment of game functions.

Method used

Register the service instances provided by each game server through the registration center. After subscribing to the service instance through the registration center, the game server can quickly obtain service address information, eliminating the docking process between the game server and the backend website, and directly remotely calling the corresponding service instance.

Benefits of technology

It improves the efficiency of calling service instances by the game server, simplifies the remote call process, reduces the frequent docking between the game server and the background website, and promotes the expansion and redevelopment of game functions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120343071A_ABST
    Figure CN120343071A_ABST
Patent Text Reader

Abstract

The invention discloses a game service calling method and device, equipment and a storage medium, and relates to the technical field of computer games. The method comprises the following steps: receiving a service registration request reported by a first game server, and registering a corresponding service instance in a registration center based on service address information in the service registration request; generating a service list on the basis of the service instances registered by the registration center, and issuing the service list to a second game server, so that the second game server subscribes to the service instances in the service list; receiving a service subscription request sent by the second game suit, and determining a service instance subscribed by the second game suit based on the service subscription request; and sending the service address information corresponding to the service instance to the second game service, so that the second game service remotely calls the service instance of the first game service based on the service address information. By means of the technical means, the problem that in the prior art, the docking process of the game service and the background website is tedious is solved, and the service instance calling efficiency of the game service is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of game technologies, and in particular, to a game service invocation method, apparatus, device, and storage medium. Background Art

[0002] In the current cross-server game experience, it can be roughly divided into two types. The first is a stateless cross-server scenario, which can be designed as an arbitrarily used scenario without being restricted by functions, and only needs to be given a state when applied, with relatively high flexibility. The second is a stateful cross-server scenario, which is given a certain service attribute and can only be used for the functions provided by the business scenario corresponding to the service. Compared with the first cross-server scenario, the second cross-server scenario is easier to implement and has higher reusability.

[0003] In the prior art, the game server obtains the service address of the remote game server through the URL interface provided by the background website, and obtains the service instance provided by the remote game server through remote invocation based on the service address. However, the docking process between the game server and the background website is relatively cumbersome, affecting the invocation efficiency of the service instance by the game server. Summary of the Invention

[0004] This application provides a game service invocation method, apparatus, device, and storage medium, which register the service instances provided by each game server through a registration center. When any game server subscribes to a service instance through the registration center, it can quickly obtain the service address information of the corresponding service instance, and remotely invokes the corresponding service instance based on the service address information, eliminating the docking process between the game server and the background website, solving the problem that the docking process between the game server and the background website in the prior art is relatively cumbersome, and improving the invocation efficiency of the service instance by the game server.

[0005] In a first aspect, this application provides a game service invocation method, including:

[0006] Receiving a service registration request reported by a first game server, and registering a corresponding service instance in a registration center based on the service address information in the service registration request;

[0007] Generating a service list based on the service instances registered in the registration center, and sending the service list to a second game server, so that the second game server subscribes to the service instances in the service list;

[0008] Receiving a service subscription request sent by the second game server, and determining the service instance subscribed by the second game server based on the service subscription request;

[0009] Sending the service address information corresponding to the service instance to the second game server, so that the second game server remotely invokes the service instance of the first game server based on the service address information.

[0010] In a second aspect, the present application provides a game service invocation device, including:

[0011] A service registration module, configured to receive a service registration request reported by a first game server, and register a corresponding service instance in a registration center based on service address information in the service registration request;

[0012] A service list distribution module, configured to generate a service list based on the service instances registered in the registration center, and distribute the service list to a second game server, so that the second game server subscribes to the service instances in the service list;

[0013] A service subscription module, configured to receive a service subscription request sent by the second game server, and determine the service instances subscribed by the second game server based on the service subscription request;

[0014] A service invocation module, configured to send service address information corresponding to the service instances to the second game server, so that the second game server remotely invokes the service instances of the first game server based on the service address information.

[0015] In a third aspect, the present application provides a game service invocation device, including:

[0016] One or more processors;

[0017] A memory, storing one or more programs, which when executed by the one or more processors, cause the one or more processors to implement the game service invocation method as described in the first aspect.

[0018] In a fourth aspect, the present application provides a storage medium containing computer-executable instructions, where the computer-executable instructions are used to execute the game service invocation method as described in the first aspect when executed by a computer processor.

[0019] In this application, by receiving a service registration request reported by a first game server, a corresponding service instance is registered in a registration center based on the service address information in the service registration request; a service list is generated based on the service instances registered in the registration center, and the service list is sent to a second game server so that the second game server subscribes to the service instances in the service list; a service subscription request sent by the second game server is received, and the service instances subscribed by the second game server are determined based on the service subscription request; the service address information corresponding to the service instances is sent to the second game server so that the second game server remotely invokes the service instances of the first game server based on the service address information. Through the above technical means, the service instances provided by each game server can be registered in the registration center. When any game server subscribes to a service instance through the registration center, it can quickly obtain the service address information of the corresponding service instance and remotely invoke the corresponding service instance based on the service address information, eliminating the docking process between the game server and the background website, solving the problem that the docking process between the game server and the background website is relatively cumbersome in the prior art, and improving the invocation efficiency of the game server for service instances. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 is a flowchart of a game service invocation method provided by an embodiment of this application;

[0021] Figure 2 is a schematic diagram of the registration and remote invocation of service instances provided by an embodiment of this application;

[0022] Figure 3 is a flowchart of sending the service list to the second game server provided by an embodiment of this application;

[0023] Figure 4 is a flowchart of determining the service instances subscribed by the second game server provided by an embodiment of this application;

[0024] Figure 5 is a schematic diagram of a player requesting to enter a combat dungeon provided by an embodiment of this application;

[0025] Figure 6 is a flowchart of removing an event server provided by an embodiment of this application;

[0026] Figure 7 is a flowchart of adding an event server provided by an embodiment of this application;

[0027] Figure 8 is a schematic diagram of the structure of a game service invocation device provided by an embodiment of this application;

[0028] Figure 9 is a schematic diagram of the structure of a game service invocation device provided by an embodiment of this application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0029] To make the objectives, technical solutions, and advantages of this application clearer, the following provides a more detailed description of specific embodiments of this application with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are merely for explaining this application and not for limiting it. Additionally, it should be noted that for ease of description, only parts related to this application rather than all content are shown in the drawings. Before discussing exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe operations (or steps) as sequential processes, many of the operations can be implemented in parallel, concurrently, or simultaneously. In addition, the order of the operations can be rearranged. The process can be terminated when its operations are completed, but it can also have additional steps not included in the drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.

[0030] The terms "first", "second", etc. in the description and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of this application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of the same category, and the number of objects is not limited. For example, the first object can be one or multiple. In addition, "and / or" in the description and claims indicates at least one of the connected objects, and the character " / ", generally represents an "or" relationship between the associated objects before and after.

[0031] In a relatively common existing implementation, the game server obtains the service address of the remote game server through the URL interface provided by the background website, and obtains the service instance provided by the remote game server through remote call based on this service address. However, the docking process between the game server and the background website is relatively cumbersome, affecting the call efficiency of the service instance by the game server. Moreover, whenever a new function is added to the remote game server, the background website is equivalent to adding the service address of the new remote game server. If the game server wants to remotely call the service instance of the newly added function, it needs to dock with the background website again. Frequent docking consumes a lot of game time, which is not conducive to the expansion and redevelopment of game functions.

[0032] To solve the above problems, this embodiment provides a game service calling method, which registers the service instances provided by each game server through the registration center. When any game server subscribes to the service instance through the registration center, it can quickly obtain the service address information of the corresponding service instance, and remotely call the corresponding service instance based on the service address information, eliminating the docking process between the game server and the backend website, and improving the efficiency of the game server calling the service instance. Even if the game server adds new functions, the corresponding service instance can be quickly registered in the registration center, avoiding the frequent docking between the game server and the backend website, improving the efficiency of launching new functions of the game server, and facilitating the expansion and redevelopment of game functions.

[0033] The game service calling method provided in this embodiment can be executed by a game service calling device, which can be implemented by software and / or hardware, and can be composed of two or more physical entities, or one physical entity. For example, the game service calling device can be a server or a game system, and the game system includes a server and multiple game servers, and the server establishes a communication connection with multiple game servers, and the game server is a client that provides services and / or calls services, that is, a game server can provide corresponding services and can also call services provided by other game servers.

[0034] The game service calling device is installed with at least one type of operating system, wherein the operating system includes but is not limited to Android system, Linux system and Windows system. The game service calling device can install at least one application based on the operating system, and the application can be an application that comes with the operating system or an application downloaded from a third-party device or server. In this embodiment, the game service calling device has at least an application that can execute the game service calling method.

[0035] For ease of understanding, this embodiment is described by taking the server as the subject that executes the game service calling method as an example.

[0036] Figure 1 A flowchart of a game service calling method provided by an embodiment of the present application is given. Figure 1 , the game service calling method specifically includes:

[0037] S110: Receive a service registration request reported by the first game server, and register a corresponding service instance in a registration center based on the service address information in the service registration request.

[0038] In this embodiment, the first game server is a game server that provides at least one service in the game system, such as the login server, battle server, chat server, or event server in the game system. The service registration request is an instruction for the first game server to request the server to register an instance of the service it provides. The service address information includes the communication address of the first game server and the port address of the service instance. After the first game server starts the game, a service registration request is generated based on the server identifier and communication address of the first game server, as well as the name and port information of the service instance, and the service registration request is sent to the server. After the server registers the corresponding service instance in the registration center, the second game server can remotely call the service instance to use the service provided by the first game server. Among them, the second game server is a game server that remotely calls services in the game system. Some game servers can both provide services and remotely call services, that is, some game servers can be both the first game server and the second game server. In this embodiment, the first game server can establish a communication connection with the server through a pre-configured remote address and upload the service registration request to the server through this communication connection. When transmitting the service registration request, the first game server can use the http or rpc method for request transmission.

[0039] After the server receives the service registration request reported by the first game server, it registers the corresponding service instance in the registration center based on the server identifier and communication address of the first game server, as well as the name and port information of the service instance. Among them, the registration center is a functional module used by the server to manage service instances. Figure 2 It is a schematic diagram of the registration and remote call of the service instance provided by the embodiment of the present application. As Figure 2 shown, after the first game server completes the registration of the service instance in the registration center, the second game server can obtain the service address information of the registered service instance from the registration center. For example, when the second game server obtains the service address information of service instance A, it can remotely call service instance A of the first game server based on the communication address of the first game server and the port address of the service instance in the service address information.

[0040] It should be noted that to ensure the availability of the game system, the first game server can normally provide corresponding services when the second game server remotely invokes a service instance. Otherwise, data correctness will be lost when processing some game orders, awarding rewards, or deducting items. Therefore, the server needs to monitor whether there are changes in the service instances of the first game server. Exemplarily, when the server receives a service offline request reported by the first game server, it cancels the corresponding service instance in the registry based on the service offline request. Herein, the service offline request is an instruction used by the first game server to notify the corresponding service instance to go offline. Based on the server identifier of the first game server and the name of the service instance in the service offline request, the server deletes the corresponding service instance in the registry to prevent the second game server from remotely invoking the offline service instance. Alternatively, when the server receives a service change request reported by the first game server, it modifies the service address information of the corresponding service instance in the registry based on the service change request. Herein, the service change request is an instruction used by the first game server to notify that the service address information of the service instance has changed. Based on the server identifier, communication address of the first game server, and the name and port address of the service instance in the service change request, the server adjusts the service address information of the corresponding service instance of the first game server in the registry to prevent problems with the remote invocation of the second game server.

[0041] S120. Generate a service list based on the service instances registered in the registry and send the service list to the second game server so that the second game server can subscribe to the service instances in the service list.

[0042] Exemplarily, after the service instance of the first game server is registered in the registry, the registry needs to enable the second game server to discover which service instances it has registered itself, so that it can attempt to remotely invoke the corresponding service instance. To enable the second game server to discover the service instances registered in the registry, the names of the currently registered service instances in the registry can be generated into a service list and the service list can be sent to the second game server. After receiving the service list, the second game server can subscribe to the service instances in the service list based on the player's request. For example, when a player on the login server wants to enter the battle instance of the battle server, the login server can subscribe to the service instance of the battle instance in the service list so that the player can enter the battle instance after the login server remotely invokes the service instance of the battle instance.

[0043] Further, to ensure that the service instances remotely called by the second game server are services that the first game server can normally provide, the service list can be adjusted when the service instances in the registration center change, and the adjusted service list is sent to the second game server. Exemplarily, when a service instance in the registration center goes offline, is newly added, or the service address information changes, the service list in the registration center is adjusted, and the adjusted service list is sent to the second game server, so that the second game server can obtain a service list that accurately covers the normal service instances that each current first game server can provide, ensuring that the second game server can remotely call the accurate service instances to process player requests, thereby improving the running reliability of the game system.

[0044] In another embodiment, the second game server can periodically send heartbeat detection information to the server, so that the server can determine whether the service list saved by the second game server is consistent with the latest service list in the registration center when receiving the heartbeat detection information. In the case of inconsistency, the latest service list is sent to the second game server so that the second game server can obtain a service list that accurately covers the normal service instances that each current first game server can provide. Exemplarily, Figure 3 is a flowchart of sending the service list to the second game server provided by an embodiment of the present application. As Figure 3 shown, the steps of sending the service list to the second game server specifically include S1201 - S1202:

[0045] S1201. Receive the heartbeat detection information uploaded by the second game server based on a preset period, and compare the verification code of the heartbeat detection information with its own verification code.

[0046] S1202. In the case of inconsistent verification codes, send the latest service list to the second game server.

[0047] Exemplarily, the second game server generates heartbeat detection information based on the check code of the currently saved service list, and sends the heartbeat detection information to the server. Among them, the check code of the service list can be the version number of the service list generated by the registration center, which is sent by the server to the second game server together with the service list. When the server receives the heartbeat detection information uploaded by the second game server, it compares the check code in the heartbeat detection information with the check code of the service list currently saved in the registration center. If the two are the same, it indicates that the service list currently saved by the second game server is the same as the version of the service list currently saved in the registration center, that is, the content of the service list is the same, and the second game server does not need to update the service list. If the two are different, it indicates that the content of the service list currently saved by the second game server is different from the service list currently saved in the registration center. Therefore, the service list currently saved in the registration center can be sent to the second game server, so that the second game server can update the service list to the latest state, ensuring that the second game server can remotely call service instances that can provide services normally based on the latest service list. It can be understood that in this embodiment, the second game server actively obtains the latest service list from the server to avoid the problem of missed sending when the server sends the latest service list, improving the operation reliability of the game system.

[0048] S130. Receive a service subscription request sent by the second game server, and determine the service instance subscribed by the second game server based on the service subscription request.

[0049] Among them, the service subscription request is an instruction for the second game server to request a corresponding service instance from the server. Exemplarily, when the second game server selects a certain service instance in the service list for subscription, a service subscription request is generated based on the name of the service instance, and the service subscription request is uploaded to the server. After the server receives the service subscription request sent by the second game server, it determines the service instance subscribed by the second game server based on the name of the service instance in the service subscription request. In this embodiment, the service list includes the name of the service instance and the identifier of the first game server. The second game server can select a service instance of a certain first game server in the service list for subscription, so that when the server receives the corresponding service subscription request, the service instance of the first game server is determined as the service instance subscribed by the second game server.

[0050] In another embodiment, multiple first game servers can provide service instances of the same service type, so as to share the player load pressure through multiple first game servers. For example, when a festival event gameplay is launched in the game, a large number of players flood into the game system. Multiple first game servers can provide service instances of the corresponding gameplay to allocate multiple players to multiple first game servers, alleviating the load pressure on the first game servers. Correspondingly, the service type of each service instance can be added to the service list. When the second game server selects a certain service type in the service list, a service subscription request is generated based on the service type and sent to the server. When the server receives the service subscription request, it filters out service instances that match the corresponding service type in the registration center according to the service type in the service subscription request, and selects one matching service instance as the service instance subscribed by the second game server. When the server selects a service instance with a matching service type, the service instance subscribed by the second game server can be determined based on the matching relationship between the first game server and the second game server in the pre-configured game server matching data. For example, the matching relationship between login server A and combat server A is recorded in the game server matching data. Based on this matching relationship, it can be determined that when the server receives a request from login server A to subscribe to a service instance of a combat copy, the server determines the service instance of the combat copy provided by combat server A as the service instance subscribed by login server A. Among them, the game server matching data can be configured by the staff or by the server according to the number of each first game server and second game server in the game system.

[0051] In another embodiment, when the server selects a service instance with a matching service type, the service instance subscribed by the second game server can be determined based on the load information of the first game server to balance the load of each first game server. Exemplarily, Figure 4 is a flowchart for determining the service instance subscribed by the second game server provided by the embodiments of the present application. As Figure 4 described, the steps for determining the service instance subscribed by the second game server specifically include S1301 - S1302:

[0052] S1301. Obtain the load information of each first game server sent by the data center server, and determine the target game server among each first game server based on the load information, the service list, and the target service type in the service subscription request.

[0053] Among them, the data center server is a server in the game system used to collect various data or information of each game server. The load information includes the service status, network status, load impact factor, connection number status, etc. of the game server. When the server receives a service subscription request, it obtains the load information of each first game server from the data center server. According to the target service type of the service instance subscribed by the second game server in the service subscription request, the first game servers that provide the target service type of service instances are filtered out in the service list, and the load information such as the service status, network status, load impact factor, and connection number status of these first game servers is weighted to obtain the load pressure value of the first game server, and the first game server with the smallest load pressure value is determined as the target game server.

[0054] S1302. Determine the service instance of the target service type of the target game server as the service instance subscribed by the second game server.

[0055] Exemplarily, the service instance of the target service type of the target game server is determined as the service instance subscribed by the second game server, so that the second game server remotely calls the service instance of the target game server with the smallest load pressure value. Figure 5 It is a schematic diagram of a player's request to enter a combat instance provided by an embodiment of the present application. As Figure 5 shown, the player logs in to the login server and requests to enter the combat instance of the combat server. The login server sends a request to subscribe to the service instance of the combat instance to the registration center of the server based on the service list saved locally. After receiving the request, the registration center obtains the load information of the combat server from the data center server. Among them, the load information is stored across servers in the data center server by the combat server. The registration center determines the service instance of the combat instance provided by the combat server subscribed by the login server based on the load information of the combat server, and sends the service address information of the service instance of the combat instance to the login server. The login server remotely calls the service implementation of the combat instance based on the received service address information, so that the player enters the combat instance of the corresponding combat server.

[0056] In this embodiment, the service instances called by each second game server are allocated through the load information of each first game server, so as to evenly call the service instances of each game server during the actual call process, evenly distribute players among different game servers, avoid excessive pressure on some game servers, affect the stable operation of the game system, and improve the reliability of the game system.

[0057] S140. Send the service address information corresponding to the service instance to the second game server, so that the second game server remotely calls the service instance of the first game server based on the service address information.

[0058] Exemplarily, the server obtains the service address information of the service instances subscribed by the second game server from the registration center, and distributes the service address information to the second game server. The second game server remotely invokes the service instances of the corresponding first game server based on the service address information. From the above content, it can be seen that during the process of the game server remotely invoking the service instance, since the server can register and discover the service instance, the game server can obtain the service address information of the service instance it wants to invoke without actively docking with the background website, which simplifies the process of the game server remotely invoking the service instance and improves the efficiency of service remote invocation. Moreover, when the game server changes the service, the server can automatically change the service registered in the registration center and send the latest service list of the registration center to the game server, so that the game server can invoke the newly added or changed service instances, avoiding frequent docking between the game server and the background website, improving the online efficiency of new functions of the game server, and facilitating the expansion and redevelopment of game functions.

[0059] In this embodiment, when the second game server remotely invokes the service instance, the input parameter object of the service instance is serialized to generate data in binary form and given to the service instance for processing, and the binary return value of the service instance is deserialized to generate a data form that can be processed by the second game server. In this embodiment, by converting the remote communication data between the second game server and the first game server into binary form, the number of bytes of the data is reduced, which is beneficial to improving the remote communication efficiency.

[0060] In one embodiment, the event server is a game server that is opened at a fixed time and provides specific event content. The service instances provided by the event server are the applications of the event content. Since the responses of players to different event contents are different, when the game system launches the event server, new event servers may be added due to a large number of players, or some event servers may be removed due to a small number of players. In the prior art, when the game company manually removes or adds an event server, it is necessary to notify the operation and maintenance personnel, programmers, and planners. The operation and maintenance personnel deploy the newly added event server or take offline the useless event server, the planners modify the service information of the background website, and the programmers verify it. Each time an event server is added or removed, multiple staff members need to participate together, resulting in a high deployment cost and low efficiency of the event server. In response to this, this embodiment proposes that the staff can configure the strategy of removing or adding the event server in the data center server, so that the server can automatically transplant the game state data of the event server to other event servers when the event server is removed based on the corresponding strategy, or automatically match the corresponding players when the event server is added, and complete the deployment process of the event server through the cooperation of the server and the data center server, saving human resources and improving the deployment efficiency of the event server.

[0061] In this embodiment, Figure 6 is the flow chart of removing the event server provided by the embodiment of the present application. As Figure 6As shown, the steps for removing the active server specifically include S1501 - S1504:

[0062] S1501. Obtain the removal active server policy, matching data, and service status data of the active server to be removed sent by the data center server; among them, the matching data includes the matching relationship between player accounts and each active server.

[0063] Among them, the removal active server policy can be understood as the policy of the active server to be removed configured by the staff in the data center server. The service status data is the status data of the service instance provided by the active server to be removed. For example, data such as the activity points and activity prizes of the players of the active server to be removed. Only when this data is transplanted to other active servers can the player continue to participate in the activity, otherwise, they need to start over. The matching data can be the matching relationship between player accounts and active servers configured by the staff or the data center server according to player accounts and active servers. The matching relationship is used to restrict players from logging in to the corresponding active server.

[0064] When the staff configures the removal active server policy in the data center server, the data center server obtains the previously collected service status data of the active server to be removed according to the server identifier of the active server to be removed in the removal active server policy, and sends the removal active server policy, matching data, and service status data of the active server to be removed to the server. The server performs removal processing on the active server to be removed based on the received removal active server policy, matching data, and service status data of the active server to be removed.

[0065] S1502. After the active server to be removed is removed, delete the service instance of the active server to be removed in the registration center and update the service list.

[0066] Exemplarily, when the staff takes the active server to be removed offline, the server deletes the service instance of the active server to be removed in the registration center and updates the service list based on the server identifier of the active server to be removed in the removal active server policy, and distributes the updated service list to each second game server to avoid the second game server remotely calling the service instance of the active server to be removed and ensure the reliability of the game system operation.

[0067] S1503. Send the service status data to the first active server so that the first active server updates the status of the corresponding service instance based on the service status data.

[0068] Among them, the first active server can be understood as the active server responsible for the players of the active server to be removed in the future. The first active server can be determined among each active server based on the load information of each active server. Send the service status data of the active server to be removed to the first active server, and the first active server updates the status of its own service instance based on the received service status data so that the players of the active server to be removed can continue to participate in the activity in the first active server subsequently.

[0069] S1504. Modify the matching relationship between the corresponding player accounts and the activity servers in the matching data based on the activity server to be removed and the first activity server, and save the modified matching data.

[0070] Exemplarily, the server modifies the matching relationship between the activity server to be removed and the corresponding player account in the original matching data to the matching relationship between the first activity server and the player account, and the server saves the modified matching data. For example, player A was originally a player in charge of the activity server to be removed. After the matching data is modified, player A becomes a player in charge of the first activity server. When player A wants to enter the activity server, when player A sends a request to enter the activity server to the corresponding login server, the login server sends a request to subscribe to the service instance of the activity server to the server based on the service list and player A's player account. The server determines that there is a matching relationship between the player account and the first activity server in the locally saved matching data based on the player account and the service type of the service instance in the request, and then sends the service address information of the service instance of the first activity server to the login server. The login server remotely invokes the service instance of the first activity server based on the service address information to enable player A to enter the first activity server, and the first activity server allows player A to continue participating in the activity based on the service status data transplanted from the activity server to be removed.

[0071] In this embodiment, Figure 7 is the flowchart of adding a new activity server provided by the embodiment of the present application. As Figure 7 shown, the steps of adding the new activity server specifically include S1601 - S1602:

[0072] S1601. Obtain the new activity server policy sent by the data center server, and determine the player accounts allocated to the new activity server based on the player accounts corresponding to each activity server in the matching data.

[0073] Among them, the new activity server policy can be understood as the policy for adding a new activity server configured by the staff in the data center server. When the staff configures the new activity server policy in the data center server, the data center server sends the new activity server policy to the server. When the server receives the new activity server policy, it can determine the number of player accounts corresponding to each activity server and the new activity server when evenly distributing players based on the number of player accounts corresponding to each activity server in the locally saved matching data, determine the number of player accounts transferred from each activity server to the new activity server based on the evenly distributed number, and determine the player accounts allocated to the new activity server from each activity server based on the transferred number.

[0074] S1602. Modify the matching relationship between the corresponding player accounts and the activity servers in the matching data based on the player accounts allocated to the new activity server, and save the modified matching data.

[0075] Exemplarily, modify the player accounts assigned to the newly added active server in the matching data to those having a matching relationship with the newly added active server, and save the modified matching data for subsequent assignment of corresponding players to the newly added active server. It should be noted that if the newly added active server wants the assigned players to continue participating in the event, it is necessary to transplant the service status data of the player in the original active server to the newly added active server. Therefore, after determining the player accounts corresponding to the newly added active server, based on the service identification of the active server corresponding to the player account in the unmodified matching data and the player account, obtain the service status data of the corresponding player in the original active server in the data center server, and send the obtained service status data to the newly added active server so that the newly added active server can update the status of the service instance.

[0076] In summary, for the game service call method provided in the embodiment of the present application, by receiving the service registration request reported by the first game server, registering the corresponding service instance in the registration center based on the service address information in the service registration request; generating a service list based on the service instance registered in the registration center and sending the service list to the second game server so that the second game server subscribes to the service instances in the service list; receiving the service subscription request sent by the second game server and determining the service instance subscribed by the second game server based on the service subscription request; sending the service address information corresponding to the service instance to the second game server so that the second game server remotely calls the service instance of the first game server based on the service address information. Through the above technical means, the service instances provided by each game server can be registered in the registration center. When any game server subscribes to a service instance through the registration center, it can quickly obtain the service address information of the corresponding service instance and remotely call the corresponding service instance based on the service address information, eliminating the docking process between the game server and the background website, solving the problem that the docking process between the game server and the background website in the prior art is relatively cumbersome, and improving the call efficiency of the game server for the service instance.

[0077] Based on the above embodiment, Figure 8 is a schematic structural diagram of a game service call device provided in an embodiment of the present application. Refer to Figure 8 This embodiment provides a game service call device specifically including: a service registration module 21, a service list sending module 22, a service subscription module 23, and a service call module 24.

[0078] Among them, the service registration module 21 is configured to receive the service registration request reported by the first game server and register the corresponding service instance in the registration center based on the service address information in the service registration request;

[0079] The service list sending module 22 is configured to generate a service list based on the service instance registered in the registration center and send the service list to the second game server so that the second game server subscribes to the service instances in the service list;

[0080] A service subscription module 23, configured to receive a service subscription request sent by a second game server, and determine a service instance subscribed by the second game server based on the service subscription request;

[0081] A service invocation module 24, configured to send service address information corresponding to the service instance to the second game server, so that the second game server remotely invokes the service instance of the first game server based on the service address information.

[0082] Based on the above embodiments, the service registration module 21 includes: a service instance cancellation unit, configured to, after receiving a service registration request reported by the first game server and registering a corresponding service instance in the registration center based on the service address information in the service registration request, receive a service offline request reported by the first game server, and cancel the corresponding service instance in the registration center based on the service offline request; and / or, a service instance change unit, configured to, after receiving a service registration request reported by the first game server and registering a corresponding service instance in the registration center based on the service address information in the service registration request, receive a service change request reported by the first game server, and modify the service address information of the corresponding service instance in the registration center based on the service change request.

[0083] Based on the above embodiments, the service list distribution module 22 includes: a first list distribution unit, configured to, after sending the service address information corresponding to the service instance to the second game server, adjust the service list in the case of a change in the service instance in the registration center, and distribute the adjusted service list to the second game server.

[0084] Based on the above embodiments, the service list distribution module 22 includes: a heartbeat reception unit, configured to receive heartbeat detection information uploaded by the second game server based on a preset period, and compare the check code of the heartbeat detection information with its own check code; a second list distribution unit, configured to, in the case where the check codes are inconsistent, distribute the latest service list to the second game server.

[0085] Based on the above embodiments, the service subscription module 23 includes: a game server determination unit, configured to obtain the load information of each first game server sent by the data center server, and determine a target game server among the first game servers based on the load information, the service list, and the target service type in the service subscription request; a service subscription unit, configured to determine the service instance of the target service type of the target game server as the service instance subscribed by the second game server.

[0086] On the basis of the above embodiments, the game service calling device further includes an active server removal module, and the active server removal module includes: a first policy acquisition unit configured to acquire a policy for removing an active server, matching data, and service status data of the active server to be removed sent by the data center server; wherein the matching data includes the matching relationship between player accounts and each active server; a service instance deletion unit configured to delete the service instance of the active server to be removed in the registration center and update the service list after the active server to be removed is removed; a service status update unit configured to send the service status data to the first active server so that the first active server updates the status of the corresponding service instance based on the service status data; a first matching data modification unit configured to modify the matching relationship between the corresponding player account and the active server in the matching data based on the active server to be removed and the first active server, and save the modified matching data.

[0087] On the basis of the above embodiments, the game service calling device further includes an active server addition module, and the active server addition module includes: a second policy acquisition unit configured to acquire a policy for adding an active server sent by the data center server, and determine the player accounts allocated to the newly added active server based on the player accounts corresponding to each active server in the matching data; a second matching data modification unit configured to modify the matching relationship between the corresponding player account and the active server in the matching data based on the player accounts allocated to the newly added active server, and save the modified matching data.

[0088] As described above, the game service calling device provided in the embodiments of the present application receives a service registration request reported by the first game server, registers a corresponding service instance in the registration center based on the service address information in the service registration request; generates a service list based on the service instances registered in the registration center, and sends the service list to the second game server so that the second game server subscribes to the service instances in the service list; receives a service subscription request sent by the second game server, and determines the service instance subscribed by the second game server based on the service subscription request; sends the service address information corresponding to the service instance to the second game server so that the second game server remotely calls the service instance of the first game server based on the service address information. Through the above technical means, the service instances provided by each game server can be registered in the registration center. When any game server subscribes to a service instance through the registration center, it can quickly obtain the service address information of the corresponding service instance, and remotely call the corresponding service instance based on the service address information, saving the docking process between the game server and the background website, solving the problem that the docking process between the game server and the background website in the prior art is relatively cumbersome, and improving the calling efficiency of the game server for the service instance.

[0089] The game service calling device provided in the embodiments of the present application can be used to execute the game service calling method provided in the above embodiments, and has corresponding functions and beneficial effects.

[0090] Figure 9 It is a schematic structural diagram of a game service calling device provided by an embodiment of the present application. Refer to Figure 9 , the game service calling device includes: a processor 31, a memory 32, a communication device 33, an input device 34, and an output device 35. The number of processors 31 in the game service calling device may be one or more, and the number of memories 32 in the game service calling device may be one or more. The processor 31, memory 32, communication device 33, input device 34, and output device 35 of the game service calling device may be connected through a bus or other means.

[0091] The memory 32, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as program instructions / modules corresponding to the game service calling method of any embodiment of the present application (for example, the service registration module 21, service list distribution module 22, service subscription module 23, and service calling module 24 in the game service calling device). The memory 32 mainly includes a storage program area and a storage data area. Among them, the storage program area can store an operating system and application programs required for at least one function; the storage data area can store data created according to the use of the device. In addition, the memory 32 can include high-speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage devices. In some instances, the memory can further include a memory remotely set relative to the processor, and these remote memories can be connected to the device through a network. Examples of the above network include but are not limited to the Internet, enterprise intranet, local area network, mobile communication network, and their combinations.

[0092] The communication device 33 is used for data transmission.

[0093] The processor 31 executes various functional applications and data processing of the device by running the software programs, instructions, and modules stored in the memory 32, that is, implements the above-mentioned game service calling method.

[0094] The input device 34 can be used to receive input digital or character information, and generate key signal inputs related to the user settings and function control of the device. The output device 35 may include a display device such as a display screen.

[0095] The above-provided game service calling device can be used to execute the game service calling method provided by the above embodiment, and has corresponding functions and beneficial effects.

[0096] The embodiment of the present application further provides a storage medium containing computer-executable instructions. The computer-executable instructions are used to execute a game service invocation method when executed by a computer processor. The game service invocation method includes: receiving a service registration request reported by a first game server, registering a corresponding service instance in a registration center based on the service address information in the service registration request; generating a service list based on the service instance registered in the registration center, and sending the service list to a second game server so that the second game server subscribes to the service instances in the service list; receiving a service subscription request sent by the second game server, and determining the service instance subscribed by the second game server based on the service subscription request; sending the service address information corresponding to the service instance to the second game server so that the second game server remotely invokes the service instance of the first game server based on the service address information.

[0097] Storage medium - Any of various types of memory devices or storage devices. The term "storage medium" is intended to include: installation media such as CD-ROM, floppy disk or magnetic tape devices; computer system memory or random access memory such as DRAM, DDR RAM, SRAM, EDO RAM, Rambus RAM, etc.; non-volatile memory such as flash memory, magnetic media (such as hard disk or optical storage); registers or other similar types of memory elements, etc. The storage medium may also include other types of memory or combinations thereof. Additionally, the storage medium may be located in a first computer system in which the program is executed, or may be located in a different second computer system that is connected to the first computer system through a network (such as the Internet). The second computer system may provide program instructions to the first computer for execution. The term "storage medium" may include two or more storage media residing in different locations (such as in different computer systems connected through a network). The storage medium may store program instructions executable by one or more processors (such as specifically implemented as a computer program).

[0098] Of course, for a storage medium containing computer-executable instructions provided by the embodiment of the present application, the computer-executable instructions are not limited to the above game service invocation method, and may also execute related operations in the game service invocation methods provided by any embodiment of the present application.

[0099] The game service invocation device, storage medium, and game service invocation equipment provided in the above embodiments can execute the game service invocation methods provided by any embodiment of the present application. For technical details not described in detail in the above embodiments, reference can be made to the game service invocation methods provided by any embodiment of the present application.

[0100] The above is only the preferred embodiment of the present application and the technical principles applied. The present application is not limited to the specific embodiments here, and various obvious changes, re-adjustments and substitutions that can be made by those skilled in the art will not depart from the protection scope of the present application. Therefore, although the present application has been described in more detail through the above embodiments, the present application is not limited to the above embodiments. Without departing from the concept of the present application, it may also include more other equivalent embodiments, and the scope of the present application is determined by the scope of the claims.

Claims

1. A game service invocation method, characterized in that, Including: Receiving a service registration request reported by a first game server, and registering a corresponding service instance in a registration center based on the service address information in the service registration request; Generating a service list based on the service instances registered in the registration center, and sending the service list to a second game server so that the second game server subscribes to the service instances in the service list; Receiving a service subscription request sent by the second game server, and determining the service instances subscribed by the second game server based on the service subscription request; Sending the service address information corresponding to the service instance to the second game server so that the second game server remotely invokes the service instance of the first game server based on the service address information.

2. The game service calling method according to claim 1, wherein After registering the corresponding service instance in the registration center based on the service address information in the service registration request, it further includes: Receiving a service offline request reported by the first game server, and canceling the corresponding service instance in the registration center based on the service offline request; and / or Receiving a service change request reported by the first game server, and modifying the service address information of the corresponding service instance in the registration center based on the service change request.

3. The game service call method according to claim 2, wherein, After sending the service address information corresponding to the service instance to the second game server, it further includes: In the case of a change in the service instance in the registration center, adjusting the service list and sending the adjusted service list to the second game server.

4. The game service call method according to claim 1, wherein, After sending the service address information corresponding to the service instance to the second game server, it further includes: Receiving the heartbeat detection information uploaded by the second game server based on a preset period, and comparing the verification code of the heartbeat detection information with its own verification code; In the case of inconsistent verification codes, sending the latest service list to the second game server.

5. The game service call method according to claim 1, wherein Determining the service instances subscribed by the second game server based on the service subscription request includes: Obtaining the load information of each of the first game servers sent by a data center server, and determining a target game server among the first game servers based on the load information, the service list, and the target service type in the service subscription request; Determining the service instances of the target service type of the target game server as the service instances subscribed by the second game server.

6. The game service call method according to claim 1, wherein The method further includes: Obtaining a removal active server policy, matching data, and service status data of a to-be-removed active server sent by a data center server; wherein, the matching data includes the matching relationship between player accounts and each active server; After removing the to-be-removed active server, deleting the service instance of the to-be-removed active server in the registration center and updating the service list; Sending the service status data to a first active server so that the first active server updates the status of the corresponding service instance based on the service status data; Modifying the matching relationship between the corresponding player accounts and active servers in the matching data based on the to-be-removed active server and the first active server, and saving the modified matching data.

7. The game service call method according to claim 6, characterized in that The method further includes: Obtain the new active server policy sent by the data center server, and determine the player accounts assigned to the new active server based on the player accounts corresponding to each active server in the matching data; Based on the player accounts assigned to the new active server, modify the matching relationship between the corresponding player accounts and the active servers in the matching data, and save the modified matching data.

8. A game service call device, characterized in that, Including: A service registration module, configured to receive a service registration request reported by a first game server, and register a corresponding service instance in a registration center based on the service address information in the service registration request; A service list distribution module, configured to generate a service list based on the service instances registered in the registration center, and distribute the service list to a second game server, so that the second game server subscribes to the service instances in the service list; A service subscription module, configured to receive a service subscription request sent by the second game server, and determine the service instances subscribed to by the second game server based on the service subscription request; A service invocation module, configured to send the service address information corresponding to the service instance to the second game server, so that the second game server remotely invokes the service instance of the first game server based on the service address information.

9. A game service calling device, characterized in that, Including: One or more processors; A memory that stores one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the game service invocation method according to any one of claims 1-7.

10. A storage medium containing computer-executable instructions, characterized in that, The computer-executable instructions are used to execute the game service invocation method according to any one of claims 1-7 when executed by a computer processor.