Functional service response method, system, device, terminal and medium

By classifying and processing client request messages between the game server's regional server and the message system server, it solves the problem of low processing efficiency caused by server pressure in massively multiplayer online games, achieves more efficient game server processing, and improves Player experience.

CN112121413BActive Publication Date: 2024-10-15TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202011057592.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-30
Publication Date
2024-10-15
Estimated Expiration
2040-09-30

AI Technical Summary

Technical Problem

In massively multiplayer online games, due to the high pressure on the server and the high complexity of communication links when adding servers, the processing efficiency is reduced. It is difficult to effectively improve the processing efficiency of the game server with existing technology.

Method used

By classifying and processing the client's request message between the regional server and the message system server, and sending the request message to the message system server or function server respectively according to the service request type of the request message, the classification processing of the request message is realized and the processing efficiency of the game server is improved.

Benefits of technology

By classifying and processing request messages, the complexity of communication between servers is reduced, the processing efficiency of the game server is improved, memory consumption is reduced, and the player's gaming experience is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112121413B_ABST
    Figure CN112121413B_ABST
Patent Text Reader

Abstract

The present application is about a method, system, device, terminal and medium for responding to a functional service, and belongs to the field of server architecture. The method includes: receiving a request message sent by a client, the request message is used to request to provide a functional service to the client; determining the service request type of the functional service corresponding to the request message; in response to the service request type meeting the first request type, sending a request message to a message system server, the message system server is used to interact with the functional server according to the service response capability of the functional server to complete the functional service; in response to the service request type meeting the second request type, sending a request message to the functional server, the functional server is used to provide the functional service to the client. The present application solves the problem of reduced processing efficiency caused by too many request messages, and achieves the effect of classified processing of request messages through the application of cloud technology in the server architecture, thereby improving the processing efficiency of the game server.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of server architecture, and in particular to a method, system, device, terminal and medium for responding to a functional service. Background Art

[0002] Massive Multiplayer Online Game (MMOG) is a game in which a server can provide a large number of players online at the same time. Due to the large number of players online at the same time, the server is under great pressure.

[0003] In the related technology, when the server's carrying capacity reaches the upper limit, in addition to solving the problem by setting up more physical servers or cloud servers, different functional modules are split up, and the same modules are distributed to one server for processing. The server of the service module is composed of multiple groups of server clusters, and all processes related to database interaction are connected to the database server for proxy processing, forming a complete game server.

[0004] As each additional level of server is added, the number of communication links that need to be established increases, resulting in high complexity of communication between modules and high memory consumption. In the process of processing client messages, the server of the functional module needs to poll each established communication link to obtain the message status, and the processing efficiency will be relatively reduced. Summary of the invention

[0005] The present application provides a method, system, device, terminal and medium for responding to a functional service, which can improve the processing efficiency of a game server. The technical solution is as follows:

[0006] On the one hand, a function service response method is provided, which is applied to a regional server, and the method includes:

[0007] Receiving a request message sent by a client, wherein the request message is used to request to provide a functional service to the client;

[0008] Determine a service request type of the functional service corresponding to the request message;

[0009] In response to the service request type conforming to the first request type, sending the request message to the message system server, the message system server being used to interact with the function server according to the service response capability of the function server to complete the function service;

[0010] In response to the service request type conforming to the second request type, the request message is sent to the function server, and the function server is used to provide the function service to the client.

[0011] On the other hand, a function service response method is provided, which is applied to a message system server, and the method includes:

[0012] receiving a request message sent by a regional server, the request message being used to request provision of a functional service to a client, the request message being a message sent by the regional server to a message system server when a corresponding service request type conforms to a first request type;

[0013] Determine a corresponding function server according to the request message;

[0014] The request message is sent to the function server, and the function server is used to respond to the function service according to the request message.

[0015] On the other hand, a response system for a functional service is provided, the system comprising:

[0016] A regional server is configured to receive a request message sent by a client, wherein the request message is used to request to provide a functional service to the client; determine a service request type of the functional service corresponding to the request message; in response to the service request type conforming to a first request type, send the request message to a message system server; in response to the service request type conforming to a second request type, send the request message to the functional server;

[0017] The message system server is used to receive the request message sent by the regional server; interact with the functional server according to the service response capability of the functional server;

[0018] The functional server is used to receive the request message sent by the message system server and complete the functional service.

[0019] On the other hand, a device for responding to a functional service is provided, the device comprising:

[0020] A first receiving module, used to receive a request message sent by a client, wherein the request message is used to request to provide a functional service to the client;

[0021] A first determining module, used to determine a service request type of the functional service corresponding to the request message;

[0022] A first sending module, configured to send the request message to a message system server in response to the service request type conforming to a first request type, wherein the message system server is configured to interact with the function server according to the service response capability of the function server to complete the function service;

[0023] The first sending module is further used to send the request message to the function server in response to the service request type being consistent with the second request type, and the function server is used to provide the function service to the client.

[0024] On the other hand, a device for responding to a functional service is provided, the device comprising:

[0025] A second receiving module is used to receive a request message sent by the regional server, wherein the request message is used to request to provide a functional service to the client, and the request message is a message sent by the regional server to the message system server when the corresponding service request type meets the first request type;

[0026] A second determination module, used to determine a corresponding function server according to the request message;

[0027] The second sending module is used to send the request message to the function server, and the function server is used to respond to the function service according to the request message.

[0028] On the other hand, a computer device is provided, which includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement a response method for the functional service as described in any of the above-mentioned embodiments of the present application.

[0029] On the other hand, a computer-readable storage medium is provided, in which at least one instruction, at least one program, a code set or an instruction set is stored, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement a response method for a functional service as described in any of the above-mentioned embodiments of the present application.

[0030] On the other hand, a computer program product or a computer program is provided, the computer program product or the computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the response method of the functional service described in any of the above embodiments.

[0031] The beneficial effects brought by the technical solution provided by the embodiment of the present application include at least:

[0032] The regional server will receive the request message sent by the client and, according to the different service request types corresponding to the request messages, send the request message corresponding to the first request type to the message system server and send the request message corresponding to the second request type to the function server, thereby achieving the effect of classified processing of request messages and improving the processing efficiency of the game server. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0034] Figure 1 It is a schematic diagram of an implementation environment provided by an exemplary embodiment of the present application;

[0035] Figure 2 It is a schematic diagram of a method for local communication of a function server provided by an exemplary embodiment of the present application;

[0036] Figure 3 It is a schematic diagram of a method for cross-machine communication of a functional server provided by an exemplary embodiment of the present application;

[0037] Figure 4 is a network topology diagram provided by an exemplary embodiment of the present application;

[0038] Figure 5 is a flow chart of a response method for a functional service of a regional server provided by an exemplary embodiment of the present application;

[0039] Figure 6 is a flow chart of a response method for a functional service of a regional server provided by another exemplary embodiment of the present application;

[0040] Figure 7 is a flow chart of a response method for a functional service of a message system server provided by an exemplary embodiment of the present application;

[0041] Figure 8 It is a functional server node theme schematic diagram provided by an exemplary embodiment of the present application;

[0042] Fig. 9 is a structural block diagram of a response system for a functional service provided by an exemplary embodiment of the present application;

[0043] Fig.10 is a structural block diagram of a response device for a functional service of a regional server provided by an exemplary embodiment of the present application;

[0044] Fig.11 It is a structural block diagram of a response device for a functional service of a message system server provided by an exemplary embodiment of the present application;

[0045] Fig.12 It is a structural block diagram of a server provided by an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0046] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below in conjunction with the accompanying drawings.

[0047] First, a brief introduction is given to the terms involved in the embodiments of the present application:

[0048] Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model. It can form a resource pool, which can be used on demand and is flexible and convenient. Cloud computing technology will become an important support. The backend services of the technical network system require a large amount of computing and storage resources, such as video websites, picture websites and more portal websites. With the rapid development and application of the Internet industry, in the future, each item may have its own identification mark, which needs to be transmitted to the backend system for logical processing. Data of different levels will be processed separately. All kinds of industry data need strong system backing support, which can only be achieved through cloud computing.

[0049] Among them, since the stability and business continuity of the server are required to be high in the process of building the game server, cloud servers based on cloud technology can be selected for operation. At the same time, the use of cloud servers can also well achieve server expansion and reduction.

[0050] Cloud storage is a new concept that extends and develops from the concept of cloud computing. A distributed cloud storage system (hereinafter referred to as storage system) refers to a storage system that uses cluster applications, grid technology, and distributed storage file systems to bring together a large number of different types of storage devices (storage devices are also called storage nodes) in the network through application software or application interfaces to work together and provide external data storage and business access functions.

[0051] At present, the storage method of the storage system is: create a logical volume, and when creating a logical volume, allocate physical storage space for each logical volume. The physical storage space may be composed of disks of a storage device or several storage devices. The client stores data on a logical volume, that is, stores the data on the file system. The file system divides the data into many parts, each of which is an object. The object contains not only data but also additional information such as data identification (ID, ID entity). The file system writes each object into the physical storage space of the logical volume, and the file system records the storage location information of each object, so that when the client requests to access the data, the file system can allow the client to access the data according to the storage location information of each object.

[0052] The process of the storage system allocating physical storage space to a logical volume is as follows: based on the estimated capacity of the objects stored in the logical volume (this estimate often has a large margin relative to the actual capacity of the objects to be stored) and the grouping of independent redundant disk arrays (RAID, Redundant Array of Independent Disks), the physical storage space is pre-divided into stripes. A logical volume can be understood as a stripe, thereby allocating physical storage space to the logical volume.

[0053] Database (DB), in short, can be regarded as an electronic filing cabinet - a place to store electronic files, where users can add, query, update, delete, and other operations on the data in the files. The so-called "database" is a collection of data that is stored together in a certain way, can be shared with multiple users, has as little redundancy as possible, and is independent of the application. In the background construction process of the game server, multiple databases are required to store game resources. According to different usage scenarios, they are mainly divided into player databases, logical databases, statistical queue databases, and full-server databases. These databases can be implemented in physical servers or in cloud servers based on cloud storage.

[0054] A database management system (DBMS) is a computer software system designed for managing databases. It generally has basic functions such as storage, retrieval, security, and backup. Database management systems can be classified according to the database model it supports, such as relational, XML (Extensible Markup Language); or according to the type of computer it supports, such as server clusters, mobile phones; or according to the query language used, such as SQL (Structured Query Language), XQuery; or according to the performance focus, such as maximum scale, maximum operating speed; or other classification methods. Regardless of the classification method used, some DBMS can cross categories, for example, supporting multiple query languages ​​at the same time.

[0055] In combination with the above-mentioned noun introduction, the implementation environment of the embodiments of the present application is explained.

[0056] For illustration, please refer to Figure 1 The implementation environment includes a client 101, a gateway service 102, a regional server 103, a message system server 104, a function server 105, a database server 106 and a game server 107.

[0057] The client 101 is a program that provides local game services for players, which is installed and runs on a client, which can be a smart phone, tablet computer, laptop computer, desktop computer, etc. Optionally, the client 101 is an application (Application, APP) or a web client. The client 101 is used to send and receive communication messages to the game server 107.

[0058] The gateway service 102 is a transfer station for the client 101 to communicate with the game server 107. It is responsible for isolating the game server 107 from the network connection, playing a certain protective role, making it impossible for the outside to directly access the game server 107, ensuring the security of the game server 107, and reducing the attack of plug-ins. Optionally, the gateway service 102 can be set up in the gateway server, and the client 101 establishes a connection with the gateway server and completes the communication with the game server 107 through the gateway server.

[0059] The game server 107 includes a regional server 103, a message system server 104, a function server 105 and a database server 106. Optionally, the game server 107 is a multi-process program, which is composed of a server cluster of multiple physical servers, and the regional server 103, the message system server 104 and the function server 105 are all independent physical servers. Optionally, the game server 107 is composed of a physical server, wherein the regional server 103, the message system server 104 and the function server 105 are different modules in the physical server. Optionally, the game server 107 is composed of a combination of a physical server and a cloud server. Schematically, the regional server 103 and the function server 105 are implemented in one or more physical servers, and the message system server 104 is implemented in a cloud server.

[0060] Generally, the game server 107 provides servers for the client 101 according to the region, that is, different regional servers 103 receive request messages from different regional servers logged in by the client 101. Optionally, the regional servers 103 are divided according to geographical regions, such as the regional servers 103 are divided into East China servers, North China servers, South China servers, Central China servers, etc. Optionally, the regional servers 103 are divided according to different service agents, such as the regional servers 103 are divided into telecommunications servers and Netcom servers. Optionally, the regional servers 103 are divided according to the operating system of the client, such as the regional servers 103 are divided into Android servers and IOS (iPhone Operation System, Apple mobile device operating system) servers.

[0061] The regional server 103 receives the communication message from the gateway service 102. Optionally, the communication message may be a request message, requesting a service from the functional server 105. For example, the player sends a copy creation request to the game server 107 through the client 101. The game server 107 receives the request and processes it, switching the character displayed by the player in the client from the current scene to the copy scene. Different request messages have different delay tolerances and request frequencies. Schematically, the action status of the character in the game scene, skill casting, etc., have low delay tolerance and high request frequency, requiring the game server to respond immediately. Too high a delay will affect the player's gaming experience; while scene switching, chat sessions between players, mall opening and transactions, etc., have high delay tolerance and relatively low request frequency, and the response efficiency of the game server does not need to be too high.

[0062] In the embodiment of the present application, the regional server 103 forwards the request message of the client 101 received from the gateway service 102 to the message system server 104 or the function server 105 according to the service request type. Among them, the message system server 104 can realize the reception, transmission, temporary storage and deletion of the request message, and the message system server 104 also stores the mapping relationship between each node and the address of the function server 105. Optionally, the message system server 104 can be a physical server, a server group composed of multiple servers, or a cloud server.

[0063] Functional server 105 is used to process request messages from client 101 and provide functional services for client 101. Optionally, functional server 105 can be divided into two categories, namely, scene server and non-scene server. Scene server is a server specifically responsible for game scene. Generally, after registering, creating characters, and logging in to characters, players enter the scene server. The scene server is responsible for completing the logic of various player operations. After receiving the request message from client 101, the scene server completes the game logic processing corresponding to the request message and selectively broadcasts the processing result back to client 101. The scene server needs a high processing efficiency for game logic processing, otherwise it will directly affect the number of players online at the same time and affect the player's game experience.

[0064] In one example, multiple function servers 105 use a shared memory-based communication component to construct an underlying communication framework. The local communication method includes: Figure 2 , through a third-party tool, the channel information between processes 201 is written into the shared memory (Global Channel Information Map, GCIM) 202 based on the configuration information. The communicating processes are mounted on the corresponding channel 203 according to the information of GCIM202. The message to be sent to the corresponding process is inserted into the corresponding channel. The packet receiving is also traversed through each channel associated with the current process to receive the packet. Among them, GCIM202 is created and maintained by the management tool 204. The cross-machine communication method includes: please refer to Figure 3 First, the information of the channel 303 and the address is written into the shared memory-based table (Global Route Map, GRM) 306 through the writing tool 305. The business process 301 only needs to write the message to the corresponding channel, and the network interconnection protocol corresponding to the channel peer address is forwarded by the communication component 307, where the communication components are connected through the network 308.

[0065] The database server 106 is used to store the relevant data of each server, and can provide functions such as expansion and contraction, automatic server merging, etc. for the game business, and perform scientific research data storage services such as data backup and rollback for the game server. In an example, the network topology of the regional server 103, the functional server 105 and the database server 106 is as follows: Figure 4 As shown, N*M communication links 403 are established between N modules 401 and M processes 402, wherein the N modules 401 are connected to a database 404, and the M processes 402 have multiple ports 405. The module 401 is a module for implementing functional services of the functional server 105, and the process 402 is an operating activity of the regional server 103.

[0066] In combination with the above-mentioned noun introduction and implementation environment, the response method of the functional service provided in the embodiment of the present application is explained. Figure 5 is a flowchart of a function service response method provided by an exemplary embodiment of the present application. The function service response method is applied to Figure 1 Taking the regional server 103 in FIG. 1 as an example, the method includes:

[0067] Step 501: Receive a request message sent by a client, where the request message is used to request to provide a functional service to the client.

[0068] In an embodiment of the present application, the client includes a strongly networked game client. When the status attributes of the player character in the client change, the game server needs to update the character status in the game in real time and broadcast it to the clients of the surrounding players. For example, when the player operates the character to cast a skill, the logic of the attack range, damage value calculation, skill casting result, etc. of the skill casting is completed by the game server. The client only needs to be responsible for the display of skill special effects and real-time data interaction in the process. In the process of the above-mentioned player operating the character to cast a skill, the client sends a request message for skill casting to the game server, and after the game server completes the specific game logic of skill casting, it selectively broadcasts the response message to the client that sent the request and other related clients, that is, completes the functional service.

[0069] Step 502: Determine the service request type of the functional service corresponding to the request message.

[0070] In the embodiment of the present application, different request messages correspond to different requested functional services, so different request messages have different delay tolerances and different request frequencies. Schematically, the action status of the character in the game scene, the casting of skills, etc., have low delay tolerance and high request frequency, and the game server needs to respond immediately. Too high a delay will affect the player's gaming experience; while scene switching, chat sessions between players, mall opening and transactions, etc., have high delay tolerance and relatively low request frequency, and the response efficiency of the game server does not need to be too high. Correspondingly, the service request type of the functional service includes a first request type and a second request type. Corresponding to the first request type and the second request type, the processing efficiency required by the game server is different, and the processing efficiency of the first request type may be lower than that of the second request type.

[0071] Step 503: In response to the service request type conforming to the first request type, a request message is sent to the message system server.

[0072] In the embodiment of the present application, the processing efficiency required for the request message of the first request type is relatively low, that is, after the client sends the request, if it receives the response message within a certain time interval, it will not affect the game experience of the player. Therefore, the regional server sends the request message to the message system server, and the message system server further processes the request message. Optionally, the message system server is used to interact with the function server according to the service response capability of the function server to complete the function service.

[0073] In an embodiment of the present application, the service request type is determined according to the processing efficiency required by the functional service corresponding to the request message. Optionally, the service request type is determined according to the delay tolerance data, and the request message for requesting a functional service with high delay tolerance is determined to be in compliance with the first request type; Optionally, the service request type is determined according to the frequency data, and the request message for requesting a functional service with low request frequency is determined to be in compliance with the first request type; Optionally, the service request type is determined according to the request frequency of historical request messages within a preset time period, and the request message with less than a preset number of historical request messages within the preset time period is determined to be in compliance with the first request type. For example, if a request message requesting the same functional service as the request message is not received within the preset time period before the moment when the regional service receives the request message, the request message is determined to be in compliance with the first request type; Optionally, the service request type is determined based on the delay tolerance data and the frequency data, and the request for a functional service with high delay tolerance and low request frequency is determined to be in compliance with the first request type.

[0074] Step 504: In response to the service request type conforming to the second request type, a request message is sent to the function server, and the function server is used to provide the function service to the client.

[0075] In an embodiment of the present application, the request message of the second request type requires a higher processing efficiency, that is, after the client sends the request message, it needs to receive a response message in a very short time, such as the status of the character in the game scene and the casting of skills, etc. Therefore, the regional server sends the request message directly to the functional server corresponding to the request message. After the functional server completes the game logic, it feeds back the response message to the client.

[0076] To sum up, in the response method of the functional service provided in the embodiment of the present application, the regional server will receive the request message sent by the client, and according to the different service request types corresponding to the request messages, send the request message corresponding to the first request type to the message system server, and send the request message corresponding to the second request type to the functional server, thereby achieving the effect of classified processing of request messages and improving the processing efficiency of the game server.

[0077] In combination with the above embodiment, taking the delay tolerance data corresponding to the request message as an example, the response method of the functional service provided in the embodiment of the present application is explained, please refer to Figure 6 , which shows a flowchart of a response method for a functional service provided by an exemplary embodiment.

[0078] Step 601: Receive a request message sent by a client, where the request message corresponds to delay tolerance data.

[0079] In an embodiment of the present application, a regional server receives a request message sent by a client. Optionally, delay tolerance data is written in a message header of the request message, and the regional server reads the delay tolerance data in the message header; optionally, the regional server stores a correspondence between a functional service corresponding to the request message and the delay tolerance data. For example, when the request message requests a logical processing service for skill casting, the delay tolerance data corresponding to the request message is 50ms; when the request message requests a processing service for opening a mall, the delay tolerance data corresponding to the request message is 2s. The regional server directly determines the delay tolerance data based on the type of functional service requested by the request message.

[0080] Step 602: Determine the service request type of the functional service corresponding to the request message.

[0081] In an embodiment of the present application, optionally, the regional server determines the service request type of the request message according to the functional service corresponding to the request message request; optionally, the message header of the request message is provided with a type identifier, and the regional server determines the service request type according to the request identifier, for example, when the type identifier is a first type identifier, the regional server determines that the request message corresponding to the first type identifier is a scene request message, and when the type identifier is a second type identifier, the regional server determines that the request message corresponding to the second type identifier is a non-scene request message; optionally, the regional server reads relevant data set in the message header of the request message, and determines the service request type according to the relevant data, and the relevant data may be delay tolerance data, frequency data, historical request data, etc.

[0082] Step 603: Match the delay tolerance data with the tolerance level.

[0083] In an embodiment of the present application, the regional server reads the delay tolerance data set in the message header of the request message, and matches the delay tolerance data with the stored tolerance level. Optionally, the delay tolerance data range corresponds to the tolerance level. For example, the delay tolerance data is greater than 100 ms and matches the first level tolerance. The delay tolerance data is less than or equal to 100 ms and matches the second level tolerance.

[0084] Step 604: In response to the delay tolerance data matching the first level tolerance, determining that the service request type meets the first request type, a request message is sent to the message system server.

[0085] The regional server determines that the service request type corresponding to the request message meets the first request type, that is, the processing efficiency requirement required by the request message is relatively low, and the regional server sends it to the message system server for processing.

[0086] In an embodiment of the present application, the message system server may further process the request message according to the relevant data of the request message. Optionally, the relevant data may be time-limited data, a message identifier, etc. The time-limited data is the effective time of the request message. When batch requests occur, there is a risk of overloading the game server. In order to ensure the experience of the core content of the game, the request messages will be classified and partially discarded. Therefore, each request message is set with time-limited data. If it is not submitted to the function server within the time limit, it will be discarded by the message system server. For example, during the scene switching process, the player has a high tolerance for the loss of session messages in the world channel. The scene switching request causes the channel session message acquisition request to stay in the message system server for a time that exceeds the time limit of the session message acquisition request. The message system server directly discards the request, reduces the processing pressure of the function server, and helps the function server recover from the overload state.

[0087] The message identifier is an identifier that uniquely identifies the request message. The functional server maintains a corresponding identifier for the identifier. When the functional server does not receive the request message, it can use the corresponding identifier to perform a back-tracking query to the message system server to obtain the request message. After the functional server receives the request message, it updates the corresponding identifier maintained in the functional server to receive the next request identifier.

[0088] Step 605: In response to the delay tolerance data matching the second level tolerance, determining that the service request type complies with the second request type, a request message is sent to the function server.

[0089] The regional server determines that the service request type corresponding to the request message conforms to the second request type, that is, the processing efficiency requirement required by the request message is relatively high, and the regional server directly sends it to the function server for processing.

[0090] Optionally, the request message also corresponds to frequency data, and the frequency data is used to determine whether the request message is sent to the message system server or the function server. The regional server receives the request message sent by the client, and the request message corresponds to frequency data. The service request type of the function service corresponding to the request message is determined based on the frequency data. For example, the function service corresponding to the request message is combat logic calculation, and the frequency data is 10 times / s. The regional server determines that the request message is a high-frequency request and sends it directly to the function server for processing. The function service corresponding to the request message is a mall opening request, and the frequency is 10 times / min. The regional server determines that the request message is a low-frequency request and sends it to the message system server for preprocessing, and then sends it to the function server for logic processing.

[0091] Optionally, the request message also corresponds to a historical request count, which is the number of request messages historically requesting the same functional service within a preset time period before the regional server receives the current request message. For example, the regional server receives a request message requesting to provide combat logic calculations. Within 5 seconds before receiving the request message, the regional server has also received 10 request messages requesting to provide combat logic calculations. In this case, the regional server directly sends the request message to the functional server for processing. If the regional server receives a request message requesting to open a mall, and within 5 seconds before receiving the request message, the regional server has not received any request message requesting to open a mall. In this case, the regional server sends the request message to the message system server.

[0092] Optionally, the regional server determines whether to send the request message to the message system server or the function server based on the delay tolerance data and frequency data corresponding to the request message. In one example, the delay tolerance data and the frequency data have different weights, for example, the delay tolerance data has a weight of 0.8, and the frequency data has a weight of 0.2. The regional server calculates the weights of the above two types of data and sends the corresponding function service to the message system server for request messages with high delay tolerance and low request frequency, and sends the request messages with low delay tolerance and high request frequency to the function server.

[0093] To sum up, in the response method of the functional service provided in the embodiment of the present application, the regional server will receive the request message sent by the client, and according to the different delay tolerance data corresponding to the request message, send a request message with high delay tolerance to the message system server and send a request message with low delay tolerance to the functional server, thereby achieving the effect of classified processing of request messages and improving the processing efficiency of the game server.

[0094] Please refer to Figure 7 , which shows a flow chart of a response method for a functional service provided by an exemplary embodiment. The embodiment of the present application uses a response method for a functional service to be applied to Figure 1 The method is illustrated by way of example in the message system server 104 in FIG. 1 , wherein the method comprises:

[0095] Step 701: Receive a request message sent by a regional server.

[0096] The request message is used to request to provide a functional service to the client, and the request message is a message sent by the regional server to the message system server when the corresponding service request type conforms to the first request type.

[0097] In an embodiment of the present application, the message system server receives a request message forwarded from a regional server, and the service request type corresponding to the request message meets the first request type, that is, the processing efficiency requirement of the request message is relatively low. Optionally, the message system server receives a request message whose delay tolerance data sent by the regional server matches the first tolerance. The message system server can perform attribute judgment, forwarding, storage, deletion, and other operations on the request message.

[0098] Step 702: determine the corresponding function server according to the request message.

[0099] The message system server determines the function server corresponding to the function service requested by the request message. Optionally, the message system server verifies that the service request type of the function service corresponding to the request message conforms to the first request type based on the delay tolerance data. Optionally, the request message is provided with a function identifier, and the message system server determines the function server to which the request message is delivered based on the function identifier. Optionally, the request message is provided with the address of the target function server to which the request message is delivered, and the message system server stores a mapping relationship between function server nodes and addresses, and the message system server determines the function server to which the request message is delivered based on the address.

[0100] Step 703: Send a request message to the function server.

[0101] In an embodiment of the present application, the above-mentioned function server is used to respond to the function service according to the request message. The message system server performs preset processing on the request message according to the relevant data. Optionally, the request message corresponds to time-limited data, and the message system server determines whether the time-limited data is within the time-limited range. In response to the time-limited data being within the time-limited range, the request message is sent to the function server; in response to the time-limited data not being within the time-limited range, that is, the message has expired, the request message is deleted, that is, the expired request message is not responded to. In the case of an overload on the game server, deleting the expired request message can help the game server recover from the overloaded state.

[0102] Optionally, the request message corresponds to a request identifier, and the request identifier corresponds to at least two of the functional servers. The message system server sends the request message to at least two functional servers, and the at least two functional servers are used to process the request message according to the load evaluation result. The message system server sends the request message to at least two of the functional servers, and the at least two functional servers are used to process the request message according to the load evaluation result. In an example, please refer to Figure 8 , the node mapping addresses of multiple functional servers are organized into a group, and these nodes 801 jointly subscribe to the same topic 803 in the message system server 802.

[0103] The above-mentioned at least two functional servers may be different nodes or servers of functional servers that complete the same functional service. The message system server stores the mapping relationship between each node instance and the address of each functional server, and the mapping relationship can be modified accordingly according to the addition and reduction of functional servers. Optionally, after receiving the request message, the message system server determines the functional service corresponding to the request message, queries the functional server and each functional service node that can implement the functional service, sends a load query command to each node, makes a judgment based on the load status of each node obtained by the query, and sends the request message to the functional server node with a good load status; Optionally, after receiving the request message, the message system server determines the functional service corresponding to the request message, queries the functional server and each functional service node that can implement the functional service, and sends the request message to these functional service nodes. Each functional service node determines the functional service node that processes the request message based on its own load status and the load status of other nodes.

[0104] In an embodiment of the present application, the message system server also responds to the timed message sent by the function server, and the method includes: receiving the timed message sent by the function server, the timed message is used to provide a timed function service to the client, and the timed time is set in the timed message; in response to the system time reaching the timed time, the timed message is sent to the regional server. In one example, the game official sets up a holiday event, and the developer modifies the style of the map in the map server and sets the holiday tasks in the task server in advance. The map server delivers the timed message of modifying the map style to the message system server, and the task server delivers the timed message of adding the holiday task to the message system server. Before the holiday day arrives, the game map style of the client remains unchanged, and no new holiday tasks appear. When the holiday day arrives, the message system server delivers the above two timed messages to each regional server, and then the regional server sends them to the client through the gateway service, changes the map display style in the client, and adds holiday tasks.

[0105] In summary, in the response method of the functional service provided in the embodiment of the present application, the message system server receives the request message with high delay tolerance sent by the regional server, and forwards, stores or deletes it according to the characteristics corresponding to the request message, thereby reducing the complexity of communication between the regional server and the functional server, reducing the memory consumption of the shared memory, and improving the processing efficiency of the game server.

[0106] Please refer to Fig. 9 , which shows a structural block diagram of a response system for a functional service provided by an exemplary embodiment, the system comprising:

[0107] The regional server 910 is used to receive a request message 911 sent by a client, where the request message is used to request to provide a functional service to the client; determine a service request type 912 of the functional service corresponding to the request message; in response to the service request type conforming to a first request type, send a request message 913 to a message system server; in response to the service request type conforming to a second request type, send a request message 914 to a functional server.

[0108] Optionally, the request message corresponds to delay tolerance data, and the regional server 910 is also used to match the delay tolerance data with the tolerance level; in response to the delay tolerance data matching the first level tolerance, determine that the service request type meets the first request type; send a request message to the message system server; in response to the delay tolerance data matching the second level tolerance, determine that the service request type meets the second request type; and send a request message to the function server.

[0109] Optionally, the regional server 910 is also used to receive a timing message sent by the message system server. The timing message is used to provide a timing function service to the client. The timing message is set with a timing time, and the timing message is a message sent when the system time in the message system server reaches the timing time; the timing message is sent to the client.

[0110] The message system server 920 is used to receive the request message 921 sent by the regional server and interact with the function server according to the service response capability of the function server 922.

[0111] Optionally, the request message corresponds to time-limited data, and the message system server 920 is also used to determine whether the time-limited data is within the time limit; in response to the time limit data being within the time limit, a request message is sent to the functional server; in response to the time limit data not being within the time limit, the request message is deleted.

[0112] Optionally, the message system server 920 is also used to receive a timing message sent by a function server, where the timing message is used to provide a timing function service to the client, and a timing time is set in the timing message; in response to the system time reaching the timing time, the timing message is sent to the regional server.

[0113] Optionally, the request message corresponds to a request identifier, and the request identifier corresponds to at least two of the functional servers. The message system server 920 is also used to send the request message to at least two functional servers, and the at least two functional servers are used to process the request message according to the load evaluation result.

[0114] The function server 930 is used to receive the request message 931 sent by the regional server or the message system server; and complete the function service 932.

[0115] In summary, the response system of the functional service provided by the embodiment of the present application, the regional server will receive the request message sent by the client, and according to the different service request types corresponding to the request message, send the request message corresponding to the first request type to the message system server, and send the request message corresponding to the second request type to the functional server, so as to achieve the effect of classified processing of the request message, and improve the processing efficiency of the game server. Due to the existence of the message system server, dynamic service expansion and contraction and load balancing can be achieved through the message system server; when the functional server has a process-level fault or a machine fault, the message system server can realize automatic fault isolation; by caching the request message by the message system server, the problem of request message loss caused by the adaptation of the processing capacity of the regional server and the functional server can be solved; because the mapping relationship between the functional node and the address is stored in the message system server, when a new service module needs to be launched, there is no need to connect the functional service module with the regional server one by one, and only the mapping relationship in the message system server needs to be increased to realize non-intrusive function launch; at the same time, the establishment of the message system can reduce the development cost of the game server.

[0116] Please refer to Fig.10 , is a structural block diagram of a response device for a functional service provided by an exemplary embodiment of the present application, the device is applied to a regional server, and the device includes:

[0117] The first receiving module 1001 is used to receive a request message sent by a client, where the request message is used to request to provide a functional service to the client;

[0118] A first determining module 1002 is used to determine a service request type of a functional service corresponding to a request message;

[0119] The first sending module 1003 is used to send a request message to the message system server in response to the service request type conforming to the first request type, and the message system server is used to interact with the function server according to the service response capability of the function server to complete the function service;

[0120] The first sending module 1003 is further used to send a request message to the function server in response to the service request type conforming to the second request type, and the function server is used to provide the function service to the client.

[0121] Optionally, the request message corresponds to delay tolerance data, and the first receiving module 1001 is also used to match the delay tolerance data with the tolerance level; the first sending module 1003 is also used to respond to the delay tolerance data matching the first level tolerance, determine that the service request type meets the first request type; and send the request message to the message system server.

[0122] Optionally, the first sending module 1003 is further used to respond to the delay tolerance data matching the second level tolerance, determine that the service request type complies with the second request type; and send a request message to the function server.

[0123] Optionally, the first receiving module 1001 is also used to receive a scheduled message sent by the message system server. The scheduled message is used to provide a scheduled function service to the client. The scheduled message is set with a scheduled time, and the scheduled message is a message sent when the system time in the message system server reaches the scheduled time; the first sending module 1003 is also used to send the scheduled message to the client.

[0124] To sum up, in the response device of the functional service provided in the embodiment of the present application, the regional server will receive the request message sent by the client, and according to the different service request types corresponding to the request messages, send the request message corresponding to the first request type to the message system server and send the request message corresponding to the second request type to the functional server, thereby achieving the effect of classified processing of request messages and improving the processing efficiency of the game server.

[0125] Please refer to Fig.11 , is a structural block diagram of a response device for a functional service provided by an exemplary embodiment of the present application, the device is applied to a message system server, and the device includes:

[0126] The second receiving module 1101 is used to receive a request message sent by the regional server, where the request message is used to request to provide a functional service to the client, and the request message is a message sent by the regional server to the message system server when the corresponding service request type meets the first request type;

[0127] The second determination module 1102 is used to determine the corresponding function server according to the request message;

[0128] The second sending module 1103 is used to send a request message to the function server, and the function server is used to respond with a function service according to the request message.

[0129] Optionally, the request message corresponds to delay tolerance data, and the second receiving module 1101 is further used to verify, based on the delay tolerance data, that the service request type of the functional service corresponding to the request message conforms to the first request type.

[0130] Optionally, the request message corresponds to time-limited data, and the second determination module 1102 is also used to determine whether the time-limited data is within the time limit; the second sending module 1103 is also used to send the request message to the functional server in response to the time limit data being within the time limit; and delete the request message in response to the time limit data not being within the time limit.

[0131] Optionally, the second receiving module 1101 is also used to receive a timing message sent by the function server, the timing message is used to provide a timing function service to the client, and the timing message is set with a timing time; the second sending module 1103 is also used to send a timing message to the regional server in response to the system time reaching the timing time.

[0132] Optionally, the request message corresponds to a request identifier, and the request identifier corresponds to at least two functional servers; the second sending module 1103 is also used to send the request message to at least two functional servers, and the at least two functional servers are used to process the request message according to the load evaluation result.

[0133] To sum up, in the response device of the functional service provided in the embodiment of the present application, the message system server receives the request message with high delay tolerance sent by the regional server, and forwards, stores or deletes it according to the characteristics corresponding to the request message, thereby reducing the complexity of communication between the regional server and the functional server, reducing the memory consumption of the shared memory, and improving the processing efficiency of the game server.

[0134] Fig.12 The following is a schematic diagram showing the structure of a server provided by an exemplary embodiment of the present application. Specifically:

[0135] The server 1200 includes a central processing unit (CPU) 1201, a system memory 1204 including a random access memory (RAM) 1202 and a read only memory (ROM) 1203, and a system bus 1205 connecting the system memory 1204 and the central processing unit 1201. The server 1200 also includes a mass storage device 1206 for storing an operating system 1213, application programs 1214, and other program modules 1215.

[0136] The mass storage device 1206 is connected to the central processing unit 1201 through a mass storage controller (not shown) connected to the system bus 1205. The mass storage device 1206 and its associated computer-readable media provide non-volatile storage for the server 1200. That is, the mass storage device 1206 may include a computer-readable medium (not shown) such as a hard disk or a compact disc read only memory (CD-ROM) drive.

[0137] Without loss of generality, computer-readable media may include computer storage media and communication media. Computer storage media include volatile and non-volatile, removable and non-removable media implemented by any method or technology for storing information such as computer-readable instructions, data structures, program modules or other data. Computer storage media include RAM, ROM, Erasable Programmable Read Only Memory (EPROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other solid-state storage technologies, CD-ROM, Digital Versatile Disc (DVD) or other optical storage, cassettes, tapes, disk storage or other magnetic storage devices. Of course, those skilled in the art will appreciate that computer storage media are not limited to the above. The above-mentioned system memory 1204 and mass storage device 1206 can be collectively referred to as memory.

[0138] According to various embodiments of the present application, the server 1200 can also be connected to a remote computer on the network through a network such as the Internet. That is, the server 1200 can be connected to the network 1212 through the network interface unit 1211 connected to the system bus 1205, or the network interface unit 1211 can be used to connect to other types of networks or remote computer systems (not shown).

[0139] The above-mentioned memory also includes one or more programs, and the one or more programs are stored in the memory and configured to be executed by the CPU.

[0140] The embodiment of the present application also provides a computer device, which includes a processor and a memory, wherein at least one instruction, at least one program, code set or instruction set is stored in the memory, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by the processor to implement the response method of the functional service provided by the above-mentioned method embodiments. Optionally, the computer device can be a terminal or a server.

[0141] An embodiment of the present application also provides a computer-readable storage medium, on which is stored at least one instruction, at least one program, code set or instruction set, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by a processor to implement a response method for the functional services provided by the above-mentioned method embodiments.

[0142] The embodiments of the present application also provide a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the response method of the functional service described in any of the above embodiments.

[0143] Optionally, the computer readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a solid state drive (SSD), or an optical disk. Among them, the random access memory may include a resistance random access memory (ReRAM) and a dynamic random access memory (DRAM). The serial numbers of the above embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments.

[0144] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

[0145] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A response method for a functional service, characterized in that: Applied to a regional server, wherein a message system server is provided between the regional server and the function server, the method comprising: Receiving a request message sent by a client, wherein the request message is used to request to provide a functional service to the client; Determine a service request type of the functional service corresponding to the request message; In response to the service request type conforming to the first request type, sending the request message to the message system server so that The message system server performs the following processing: in response to the request message being within the time limit, determining the function server to which the request message is delivered according to the function identifier set in the request message, sending the request message to the function server to which the request message is delivered, and interacting with the function server according to the service response capability of the function server so that the function server completes the function service; in response to the request message not being within the time limit, deleting the request message; The message system server records a message identifier corresponding to the request message, and in response to the function server receiving the request message through the message system server, the function server updates and maintains a corresponding identifier of the message identifier, and the function server performs a backtracking query on the request message in the message system server through the corresponding identifier; In response to the service request type conforming to the second request type, sending the request message to the function server, the function server being configured to provide the function service to the client; Receive a timing message sent by the message system server, the timing message is used to provide the client with a timing function service triggered at a timing moment, the timing message is indicated by the function server to the message system server, the timing moment is set in the timing message, and the timing message is a message sent when the system time in the message system server reaches the timing moment; Sending the timing message to the client; Among them, the request frequency of the first request type is lower than that of the second request type, and the request delay tolerance of the first request type is higher than that of the second request type.

2. The method according to claim 1, characterized in that: The request message corresponds to delay tolerance data; In response to the service request type conforming to the first request type, sending the request message to the message system server comprises: Matching the delay tolerance data with the tolerance level; In response to the delay tolerance data matching the first level tolerance, determining that the service request type complies with the first request type; The request message is sent to the message system server.

3. The method according to claim 2, characterized in that The sending the request message to the function server in response to the service request type conforming to the second request type comprises: Matching the delay tolerance data with the tolerance level; In response to the delay tolerance data matching the second level tolerance, determining that the service request type conforms to the second request type; Send the request message to the function server.

4. A response method for a functional service, characterized in that: Applied to a message system server, the method comprises: receiving a request message sent by a regional server, the request message being used to request provision of a functional service to a client, the request message being a message sent by the regional server to the message system server when the corresponding service request type conforms to the first request type, and the request message corresponding to time-limited data and a message identifier; In response to the request message being within the time limit, determining the function server to which the request message is delivered according to the function identifier set in the request message; sending the request message to the function server determined to be delivered, and interacting with the function server according to the service response capability of the function server, so that the function server completes the function service; In response to the request message being out of time, deleting the request message; Wherein, when the function server receives the request message through the message system server, the corresponding identifier of the message identifier is updated and maintained in the function server, and the function server performs a backtracking query on the request message in the message system server through the corresponding identifier; receiving a timing message sent by the function server, wherein the timing message is used to provide the client with a timing function service triggered at a timing moment, and the timing moment is set in the timing message; In response to the system time reaching the timing time, the timing message is sent to the regional server, and the regional server is used to send the timing message to the client.

5. The method according to claim 4, characterized in that The request message corresponds to delay tolerance data; The determining the corresponding function server according to the request message also includes: Verify, according to the delay tolerance data, that the service request type of the functional service corresponding to the request message conforms to the first request type.

6. The method according to claim 4, characterized in that The request message corresponds to a request identifier, and the request identifier corresponds to at least two of the function servers; The sending the request message to the function server further includes: The request message is sent to at least two of the function servers, and the at least two function servers are used to process the request message according to the load evaluation result.

7. A response system for a functional service, characterized in that: The system comprises: A regional server is configured to receive a request message sent by a client, wherein the request message is used to request provision of a functional service to the client; determine a service request type of the functional service corresponding to the request message; in response to the service request type conforming to a first request type, send the request message to a message system server; in response to the service request type conforming to a second request type, send the request message to the functional server; The frequency of the first request type is lower than that of the second request type, and the delay tolerance of the first request type is higher than that of the second request type; The message system server is used to receive the request message sent by the regional server, the request message corresponding to time-limit data and a message identifier; in response to the request message being within the time limit, determine the function server to which the request message is delivered according to the function identifier set in the request message; send the request message to the function server determined to be delivered, interact with the function server according to the service response capability of the function server, so that the function server completes the function service; in response to the request message not being within the time limit, delete the request message; The functional server is used to receive the request message sent by the regional server or the message system server; and complete the functional service; The functional server is further used to update and maintain the corresponding identifier of the message identifier; and perform a backtracking query on the request message in the message system server through the corresponding identifier; The function server is further used to send a timing message to the message system server, wherein the timing message is used to provide the client with a timing function service triggered at a timing moment, and the timing moment is set in the timing message; The message system server is further configured to receive the timing message sent by the function server; in response to the system time reaching the timing time, send the timing message to the regional server; The regional server is further configured to send the timing message to the client.

8. A response device for a functional service, characterized in that: Applied to a regional server, wherein a message system server is provided between the regional server and the function server, and the device comprises: A first receiving module, used to receive a request message sent by a client, wherein the request message is used to request to provide a functional service to the client; A first determining module, used to determine a service request type of the functional service corresponding to the request message; A first sending module is used for sending the request message to the message system server in response to the service request type conforming to the first request type; the message system server determines the function server to which the request message is delivered according to the function identifier set in the request message in response to the request message being within a time limit, sends the request message to the function server to which the request message is delivered, interacts with the function server according to the service response capability of the function server to complete the function service, and deletes the request message in response to the request message not being within the time limit; wherein the message system server records the message identifier corresponding to the request message, updates and maintains the corresponding identifier of the message identifier in the function server in response to the function server receiving the request message through the message system server, and the function server performs a backtracking query on the request message in the message system server through the corresponding identifier; The first sending module is further configured to send the request message to the function server in response to the service request type conforming to the second request type, and the function server is configured to provide the function service to the client; The first receiving module is further used to receive a timing message sent by the message system server, wherein the timing message is used to provide the client with a timing function service triggered at a timing moment, wherein the timing message is indicated by the function server to the message system server, wherein the timing moment is set in the timing message, and the timing message is a message sent when the system moment in the message system server reaches the timing moment; The first sending module is further used to send the timing message to the client; Among them, the request frequency of the first request type is lower than that of the second request type, and the request delay tolerance of the first request type is higher than that of the second request type.

9. A response device for a functional service, characterized in that: Applied to a message system server, the device comprises: A second receiving module is used to receive a request message sent by a regional server, wherein the request message is used to request to provide a functional service to a client, and the request message is a message sent by the regional server to the message system server when the corresponding service request type meets the first request type, and the request message corresponds to time-limited data and a message identifier; A second determining module, used to determine the function server to which the request message is delivered according to the function identifier set in the request message; The second sending module sends the request message to the function server determined to be delivered in response to the request message being within the time limit, interacts with the function server according to the service response capability of the function server, so that the function server completes the function service; in response to the request message not being within the time limit, deletes the request message; Wherein, when the function server receives the request message through the message system server, the corresponding identifier of the message identifier is updated and maintained in the function server, and the function server performs a backtracking query on the request message in the message system server through the corresponding identifier; The second receiving module is further used to receive a timing message sent by the function server, wherein the timing message is used to provide the client with a timing function service triggered at a timing moment, and the timing moment is set in the timing message; The second sending module is further configured to send the timing message to the regional server in response to the system time reaching the timing time, and the regional server is configured to send the timing message to the client.

10. A computer device, characterized in that: The computer device includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the response method of the functional service as described in any one of claims 1 to 6.

11. A computer-readable storage medium, characterized in that: The storage medium stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the response method of the functional service as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Service information processing system and method

    CN103347065A

  • Method and device for processing service access

    CN103763343A

  • Real-time message synchronizing method and container wharf operation system

    CN104079599A

  • Intelligent converged communication system

    CN104796482A

  • Message transmission method and device and storage medium

    CN107682255A