CN112671913B - Service registration method and device - Google Patents

Service registration method and device Download PDF

Info

Publication number
CN112671913B
CN112671913B CN202011562509.7A CN202011562509A CN112671913B CN 112671913 B CN112671913 B CN 112671913B CN 202011562509 A CN202011562509 A CN 202011562509A CN 112671913 B CN112671913 B CN 112671913B
Authority
CN
China
Prior art keywords
service
registration
address
server
global
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011562509.7A
Other languages
Chinese (zh)
Other versions
CN112671913A (en
Inventor
周启立
姚双喜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhuhai Kingsoft Digital Network Technology Co Ltd
Original Assignee
Zhuhai Kingsoft Digital Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhuhai Kingsoft Digital Network Technology Co Ltd filed Critical Zhuhai Kingsoft Digital Network Technology Co Ltd
Priority to CN202011562509.7A priority Critical patent/CN112671913B/en
Publication of CN112671913A publication Critical patent/CN112671913A/en
Application granted granted Critical
Publication of CN112671913B publication Critical patent/CN112671913B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Telephonic Communication Services (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application provides a service registration method and a device, wherein the service registration method is applied to a service server and comprises the following steps: receiving a service registration instruction submitted by a user; starting a service process based on the service registration instruction, and sending a registration request to a registration server through the service process, wherein the registration request carries an internet protocol address of the service process; receiving a registration address determined by the registration server based on the internet protocol address, wherein the registration address is registered in the registration server in advance through a scheduling process; and calling the service process and the scheduling process to establish service connection based on the registration address.

Description

Service registration method and device
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a service registration method and apparatus, a computing device, and a computer-readable storage medium.
Background
With the development of services, service members are increasing continuously, and most of the service members need to deploy their own service servers in order to develop or maintain the service services.
Disclosure of Invention
In view of this, embodiments of the present application provide a service registration method and apparatus, a computing device, and a computer-readable storage medium, so as to solve technical defects in the prior art.
According to a first aspect of the embodiments of the present application, a service registration method is provided, which is applied to a service server, and includes:
receiving a service registration instruction submitted by a user;
starting a service process based on the service registration instruction, and sending a registration request to a registration server through the service process, wherein the registration request carries an internet protocol address of the service process;
receiving a registration address determined by the registration server based on the internet protocol address, wherein the registration address is registered in the registration server in advance through a scheduling process;
and calling the service process and the scheduling process to establish service connection based on the registration address.
Optionally, before sending the registration request to the registration server through the service process, the method further includes:
receiving a global registration instruction submitted by a user;
starting the scheduling process based on the global registration instruction, and sending a global registration request to the registration server through the scheduling process, wherein the global registration request carries a registration address of the scheduling process;
and receiving the global service identification returned by the registration server based on the registration address.
Optionally, after sending the global registration request to the registration server through the scheduling process, the method further includes:
based on the global service identification, calling the scheduling process to send a global service registration request to a login server;
and receiving a registration result returned by the login server based on the global service registration request.
Optionally, the service registration method further includes:
receiving a service request sent by a login server, wherein the service request carries the global service identifier;
calling the scheduling process based on the global service identification;
selecting a target service process from the service process pool through the scheduling process according to the connection number of the service processes in the service process pool;
and sending the service address of the target service process to the login server.
Optionally, after sending the service address of the target service process to the login server, the method further includes:
receiving a service connection request sent by a user terminal, wherein the service address carried in the service connection request;
connecting the target service process based on the service address;
and returning a connection result to the user terminal.
Optionally, the starting a service process based on the service registration instruction, and sending a registration request to a registration server through the service process includes:
starting the service process based on the process identification carried in the service registration instruction;
and sending a registration request to the registration server through the service process based on the preset address of the registration server.
Optionally, the registration address includes an internet protocol address and a port number of the scheduling process.
According to a second aspect of the embodiments of the present application, there is provided another service registration method, applied to a registration server, including:
receiving a registration request sent by a service process in a service server, wherein the registration request carries an internet protocol address of the service process;
acquiring a registration address corresponding to the internet protocol address based on the internet protocol address, wherein the registration address is registered in advance by a scheduling process in the service server;
and returning the registration address to the service process.
Optionally, before the step of receiving the registration request sent by the service process in the service server, the method further includes:
receiving a global registration request sent by the scheduling process, wherein the global registration request carries a registration address of the scheduling process;
registering the scheduling process based on the registration address;
and returning the global service identifier allocated for the registration address to the scheduling process.
According to a third aspect of the embodiments of the present application, there is provided a service registration apparatus, configured in a service server, including:
the system comprises a receiving instruction module, a service registration instruction module and a service registration instruction module, wherein the receiving instruction module is configured to receive a service registration instruction submitted by a user;
a sending module, configured to start a service process based on the service registration instruction, and send a registration request to a registration server through the service process, where the registration request carries an internet protocol address of the service process;
a receive address module configured to receive a registration address determined by the registration server based on the internet protocol address, wherein the registration address is pre-registered with the registration server through a scheduling process;
and the establishing module is configured to call the service process to establish service connection with the scheduling process based on the registration address.
According to a fourth aspect of the embodiments of the present application, there is provided another service registration apparatus, configured in a registration server, including:
the system comprises a receiving request module, a registration request module and a service processing module, wherein the receiving request module is configured to receive a registration request sent by a service process in a service server, and the registration request carries an internet protocol address of the service process;
an address obtaining module, configured to obtain, based on the internet protocol address, a registration address corresponding to the internet protocol address, where the registration address is registered in advance by a scheduling process in the service server;
a return module configured to return the registration address to the service process.
According to a fifth aspect of embodiments herein, there is provided a computing device comprising a memory, a processor and computer instructions stored on the memory and executable on the processor, the processor implementing the steps of the service registration method when executing the instructions.
According to a sixth aspect of embodiments herein, there is provided a computer readable storage medium storing computer instructions which, when executed by a processor, implement the steps of the service registration method.
The service registration method provided by the embodiment of the application is applied to a business server, is matched with a registration server, and receives a service registration instruction submitted by a user; starting a service process based on the service registration instruction, and sending a registration request to a registration server through the service process, wherein the registration request carries an internet protocol address of the service process; receiving a registration address determined by the registration server based on the internet protocol address, wherein the registration address is registered in the registration server in advance through a scheduling process; and calling the service process and the scheduling process to establish service connection based on the registration address, so that the service process is in service connection with the scheduling process under the condition of acquiring the registration address pre-registered in the registration server by the scheduling process, and the service process can provide service through service connection.
Drawings
FIG. 1 is a block diagram of a computing device provided by an embodiment of the present application;
fig. 2 is a flowchart of a service registration method according to an embodiment of the present application;
fig. 3 is a flowchart of another service registration method provided in an embodiment of the present application;
FIG. 4 is a flowchart of a service registration method applied to a game scenario according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a service registration apparatus according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of another service registration apparatus according to an embodiment of the present application.
Detailed Description
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application. This application is capable of implementation in many different ways than those herein set forth and of similar import by those skilled in the art without departing from the spirit of this application and is therefore not limited to the specific implementations disclosed below.
The terminology used in the one or more embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of the present application. As used in one or more embodiments of the present application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used in one or more embodiments of the present application refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It will be understood that, although the terms first, second, etc. may be used herein in one or more embodiments of the present application to describe various information, these information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, a first aspect may be termed a second aspect, and, similarly, a second aspect may be termed a first aspect, without departing from the scope of one or more embodiments of the present application. The word "if," as used herein, may be interpreted as "at … …" or "at … …" or "in response to a determination," depending on the context.
In the present application, a service registration method and apparatus, a computing device, and a computer-readable storage medium are provided, which are described in detail in the following embodiments one by one.
FIG. 1 shows a block diagram of a computing device 100 according to an embodiment of the application. The components of the computing device 100 include, but are not limited to, memory 110 and processor 120. The processor 120 is coupled to the memory 110 via a bus 130 and a database 150 is used to store data.
Computing device 100 also includes access device 140, access device 140 enabling computing device 100 to communicate via one or more networks 160. Examples of such networks include the Public Switched Telephone Network (PSTN), a Local Area Network (LAN), a Wide Area Network (WAN), a Personal Area Network (PAN), or a combination of communication networks such as the internet. Access device 140 may include one or more of any type of network interface (e.g., a Network Interface Card (NIC)) whether wired or wireless, such as an IEEE802.11 Wireless Local Area Network (WLAN) wireless interface, a worldwide interoperability for microwave access (Wi-MAX) interface, an ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a bluetooth interface, a Near Field Communication (NFC) interface, and so forth.
In one embodiment of the application, the above components of the computing device 100 and other components not shown in fig. 1 may also be connected to each other, for example, by a bus. It should be understood that the block diagram of the computing device architecture shown in FIG. 1 is for purposes of example only and is not limiting as to the scope of the present application. Those skilled in the art may add or replace other components as desired.
Computing device 100 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., tablet, personal digital assistant, laptop, notebook, netbook, etc.), a mobile phone (e.g., smartphone), a wearable computing device (e.g., smartwatch, smartglasses, etc.), or other type of mobile device, or a stationary computing device such as a desktop computer or PC. Computing device 100 may also be a mobile or stationary server.
Wherein the processor 120 may perform the steps of one of the service registration methods shown in fig. 2. Fig. 2 shows a flowchart of a service registration method provided in an embodiment of the present application, which is applied to a service server, and specifically includes the following steps:
step 202: and receiving a service registration instruction submitted by a user.
The execution main body of the method embodiment of the present specification is a service server, and the execution main body of another method embodiment of the present specification is a registration server, and the present specification completes registration of a service process in the service server by cooperation of the service server and the registration server, thereby solving a problem of configuration disorder which may occur in a process of configuring the service server by a service member.
The registration server is a server for providing registration service for a process or a server, and the user refers to a service member of a service, specifically, the service may be a game service, a video service, a forum service, and the like, without limitation, and correspondingly, the user may be a developer of the game service, a maintainer of the video service, a developer of the forum, and the like, without limitation.
The service registration instruction refers to a registration instruction issued by a service process in the service server, so that a subsequent service process can register with the registration server and a scheduling process in the service server based on the registration instruction, and further service is provided.
In practical application, a service server includes at least one service process and at least one scheduling process, where the service process is used to provide service, the scheduling process is used to schedule the service process, and in order to make the service services provided by the service processes balanced with each other, it is necessary to perform service connection between the service process and the scheduling process, and schedule the service process having service connection with the scheduling process from the perspective of load balancing through the scheduling process, so that the service processes provide service in a balanced manner.
Taking the game service as an example, in the game service, most developers of the game service need to deploy their own game servers to develop or test the game service, so that a unified registration script can be established on the game servers, so that the developers can submit service registration instructions of the game by clicking the registration script, and the game service process can register the service based on the service registration instructions.
Step 204: and starting a service process based on the service registration instruction, and sending a registration request to a registration server through the service process.
Wherein, the registration request carries an Internet Protocol Address (IP Address) of the service process; in specific implementation, in order to enable the service process to provide the service on the basis of correct connection, the service process needs to be started to register with the registration server first, so that the service process obtains correct service connection information from the registration server.
Specifically, in the case that there are multiple service processes, in a service scenario, the same or different service services may be provided according to the needs of an actual service or each service member, which is not limited herein, for example, in a game service, the multiple service processes may be a friend service process, a property service process, a federation service process, and the like, and in this case, the scheduling process may schedule the service processes from the perspective of service types.
In specific implementation, the service process and the scheduling process are registered to the registration server by establishing the registration server, so that service connection among the processes is realized on the basis of registration.
In a specific implementation, in an optional implementation manner provided in this embodiment of the present application, the starting of the service process based on the service registration instruction and the sending of the registration request to the registration server are specifically implemented by:
starting the service process based on the process identification carried in the service registration instruction;
and sending a registration request to the registration server through the service process based on the preset address of the registration server.
Specifically, the process identifier is an identifier capable of uniquely identifying one process, and a service process corresponding to the process identifier is designated to be started through the process identifier; the preset address refers to an access address of a certain process in the registration server, and the access address includes: the IP address and port number of the process, so that the service process sends a registration request to the corresponding process in the registration server to register.
According to the embodiment of the application, the corresponding service process is started through the service registration instruction, and the started service process is registered with the registration server, so that the service process obtains information required for providing the service from the registration server.
Step 206: receiving a registration address determined by the registration server based on the internet protocol address.
The registration address is registered in the registration server in advance through a scheduling process.
Optionally, the registration address includes an internet protocol address and a port number of the scheduling process, and in practical application, an access address may be determined based on the IP address and the port number, so as to access the process in the server based on the access address.
In specific implementation, the scheduling process is often used for load balancing or information interaction on access to each service process connected to the scheduling process, and taking a game service as an example, the scheduling process may be understood as a central server in the game service, and is used for connecting to each game server and scheduling the game server based on a game request.
In practical application, a scheduling process of a service server is registered in advance in a registration server, so that the registration server stores a registration address of the scheduling process, so that the service process receives the registration address of the scheduling process (having the same IP address as the service process) returned by the registration server and is further connected with the scheduling process under the condition that the service process registers with the registration server, that is, the scheduling process registers in the registration server, so that a subsequent service process obtains a corresponding registration address, and service connection between the service process and the scheduling process is realized.
Step 208: and calling the service process to establish service connection with the scheduling process based on the registration address.
Specifically, the service process sends a connection request to the scheduling process based on the registration address, the scheduling process connects with the service process based on the connection request and returns a connection result to the service process, and in specific implementation, after the service process establishes service connection with the scheduling process, the service process can provide service for the outside.
In practical application, in an optional implementation manner provided by the embodiment of the present application, before sending the registration request to the registration server through the service process, the method further includes:
receiving a global registration instruction submitted by a user;
starting the scheduling process based on the global registration instruction, and sending a global registration request to the registration server through the scheduling process, wherein the global registration request carries a registration address of the scheduling process;
and receiving the global service identification returned by the registration server based on the registration address.
The global service identifier is used for globally dividing service services, taking a game service as an example, the global service identifier is an identifier corresponding to a regional service in the game service, for example, a regional service identifier corresponding to a telecommunications first region, a telecommunications second region, and the like, and in addition, in other services, the service may be divided by a region, and the global service identifier may be an identifier corresponding to a service area of the service, for example, a regional identifier corresponding to beijing, shanghai, and the like, and is not described herein again.
In practical application, a global registration request is sent to the registration server through the scheduling process, so that the registration server stores an IP address and a port number of the scheduling process (namely, registers the scheduling process), and allocates a global service identifier for the scheduling process, so that a subsequent login server accesses the scheduling process through the global service identifier, wherein the login server is used for accessing the corresponding scheduling process based on the global service identifier selected by a user terminal (service member or intelligent equipment used by a user for accessing service, including a mobile phone, a computer and the like).
Further, in an optional implementation manner provided by the embodiment of the present application, after sending the global registration request to the registration server through the scheduling process, the method further includes:
based on the global service identification, calling the scheduling process to send a global service registration request to a login server;
and receiving a registration result returned by the login server based on the global service registration request.
The registration result may include a successful registration or a failed registration, and in specific implementation, if the login server successfully stores the global service identifier corresponding to the scheduling process, the registration is successful, and if the login server does not successfully store the global service identifier corresponding to the scheduling process, the registration is failed.
Specifically, the purpose of calling the scheduling process to send a global service registration request to the login server is to enable the login server to perform global service registration on the scheduling process based on the global service identifier, and further store the global service identifier of the scheduling process, so that the login server selects the corresponding scheduling process based on the global service identifier.
In practical application, under the condition that the performance of the service server is good, a plurality of scheduling processes and a plurality of service processes can be started in one service server, so that the login server accesses the scheduling processes based on the global service identifiers corresponding to the scheduling processes under the condition that the registration of the scheduling processes in the login server is successful.
In addition, on the basis of establishing a connection between the service process and the scheduling process, in an optional implementation manner provided in an embodiment of the present application, the service registration method further includes:
receiving a service request sent by a login server, wherein the service request carries the global service identifier;
calling the scheduling process based on the global service identification;
selecting a target service process from the service process pool through the scheduling process according to the connection number of the service processes in the service process pool;
and sending the service address of the target service process to the login server.
Specifically, the service request refers to a service request sent to a service server by a login server based on an access request of a user terminal; the service process pool is a set of service processes in service connection with the scheduling process; the connection number refers to the number of connections that are connected to the user terminal and provide service for the user terminal, for example, there are 3 service processes in the service process pool, and the connection number of the user terminal in the 3 service processes is 5, 3, and 2, respectively.
In specific implementation, the scheduling process can select the service process with the least connection number as the target service process based on the connection number of the service processes connected with the scheduling process, so as to avoid the situation that the service is blocked due to too many connection numbers of some service processes, and avoid the situation that the server resources are wasted due to less connection numbers of some service processes and idle process resources.
In practical application, on the basis that the scheduling process selects the target service process based on the connection number of the service processes, the service address (the IP address and the port number of the target service process) of the target service process is sent to the login server, so that the login server sends the service address to the user terminal, and the user terminal can conveniently access the target service process based on the service address.
Further, on the basis that the scheduling process sends the service address of the target service process to the login server, and the login server forwards the service address to the user terminal, in an optional implementation manner provided in this application embodiment, after sending the service address of the target service process to the login server, the method further includes:
receiving a service connection request sent by a user terminal, wherein the service address carried in the service connection request;
connecting the target service process based on the service address;
and returning a connection result to the user terminal.
Specifically, the connection result includes: and the user terminal can enjoy the service provided by the target service process through service connection under the condition of successful connection or failed connection, and can send the service connection request again under the condition of failed connection.
In specific implementation, the user terminal sends a service connection request to a target service process in the service server through a service address returned by the login server, so that the user terminal is connected to the target service process, and obtains a service provided by the target service process based on service connection.
To sum up, the service registration method provided by the embodiment of the present application is applied to a service server, and is matched with a registration server to receive a service registration instruction submitted by a user; starting a service process based on the service registration instruction, and sending a registration request to a registration server through the service process, wherein the registration request carries an internet protocol address of the service process; receiving a registration address determined by the registration server based on the internet protocol address, wherein the registration address is registered in the registration server in advance through a scheduling process; and calling the service process and the scheduling process to establish service connection based on the registration address, so that the service process is in service connection with the scheduling process under the condition that the service process acquires the registration address pre-registered in the registration server, and the service process provides service through service connection.
Further, the processor 120 may also perform the steps of another service registration method shown in fig. 3. Another method embodiment provided by the present application corresponds to the above method embodiment, where an execution main body of the present embodiment is a registration server, and an execution main body of the above method embodiment is a service server, and the two embodiments cooperate with each other to complete registration of a service process in the service server, and when reading the present embodiment, it may correspond to the above method embodiment. Fig. 3 is a flowchart illustrating another service registration method provided in an embodiment of the present specification, which is applied to a registration server and specifically includes the following steps:
step 302: receiving a registration request sent by a service process in a service server, wherein the registration request carries an internet protocol address of the service process.
According to the embodiment of the application, the registration of the service process and the registration process in the registration server is realized by the interaction of the registration server and the service process and the scheduling process in the service server, so that the service process provides service on the basis of correct registration.
Step 304: and acquiring a registration address corresponding to the internet protocol address based on the internet protocol address, wherein the registration address is registered in advance by a scheduling process in the service server.
Step 306: and returning the registration address to the service process.
In an optional implementation manner provided by the embodiment of the present application, before the step of receiving a registration request sent by a service process in a service server, the method further includes:
receiving a global registration request sent by the scheduling process, wherein the global registration request carries a registration address of the scheduling process;
registering the scheduling process based on the registration address;
and returning the global service identifier allocated to the registration address to the scheduling process.
To sum up, the other service registration method provided in the embodiment of the present application is applied to a registration server, and receives a registration request sent by a service process in a service server by cooperating with the service process in the service server, where the registration request carries an internet protocol address of the service process. Acquiring a registration address corresponding to the internet protocol address based on the internet protocol address, wherein the registration address is registered in advance by a scheduling process in the service server; and returning the registration address to the service process, so that the registration address pre-registered in a registration server by the scheduling process is provided for the service process, the service connection is carried out between the registration address and the scheduling process, and the service is provided.
In the following, with reference to fig. 4, the service registration method is further described by taking an application of the service registration method in a game scene as an example. Fig. 4 shows a flowchart of a service registration method applied to a game scenario according to an embodiment of the present application, which specifically includes the following steps:
in step 402, a game scheduling process in a game server receives a global registration instruction submitted by a user.
In step 404, the game scheduling process sends a global registration request to a registration server based on the global registration instruction.
And the global registration request carries a registration address of the game scheduling process.
And step 406, the registration server registers the game scheduling process based on the registration address carried in the global registration request.
Specifically, the registration server registers the game scheduling process based on the registration address, which means that the registration server registers address information (i.e., an IP address and a port number) of the game scheduling process to generate a registration address.
Step 408, the registration server allocates a global service identifier to the registration address.
Step 410, the registration server returns the global service identifier to the game scheduling process.
In step 412, the game scheduling process sends a global service registration request to the login server based on the global service identifier.
And 414, the login server performs global service registration on the game scheduling process based on the global service identifier carried in the global service registration request, and returns a global service registration result to the game scheduling process.
Specifically, the login server performs global service registration on the game scheduling process based on the global service identifier carried in the global service registration request, which means that the login server records the global service identifier of the game scheduling process.
At step 416, the game service process in the game server receives the service registration instruction submitted by the user.
Step 418, the game service process sends a registration request to the registration server based on the service registration instruction.
Wherein, the registration request carries the internet protocol address of the game service process.
Step 420, the registration server obtains a registration address corresponding to the internet protocol address based on the internet protocol address carried in the registration request.
At step 422, the registration server returns the registration address to the gaming service process.
Step 424, the game service process sends a connection request to the game scheduling process based on the registration address.
And 426, the game scheduling process establishes a service connection with the game service process based on the connection request and returns a connection result to the game service process.
In step 428, the user terminal sends a login request to the login server.
Step 430, the login server sends a service request to the game scheduling process corresponding to the global service identifier based on the global service identifier carried in the login request.
And step 432, selecting the game service process from the service process pool by the game scheduling process according to the connection number of each game service process in the game service process pool based on the service request.
In step 434, the game scheduling process sends the service address of the game service process to the login server.
Step 436, the login service process returns the service address to the user terminal.
Step 438, the user terminal sends a game connection request to the game service process based on the service address.
Step 440, the game server establishes a connection with the user terminal based on the connection request, and returns a game connection result to the user terminal.
To sum up, the service registration method provided by the embodiment of the application receives a service registration instruction submitted by a user through interaction between a game service process and a game scheduling process in a game server and a registration server; starting a game service process based on the service registration instruction, and sending a registration request to a registration server through the game service process, wherein the registration request carries an internet protocol address of the game service process; receiving a registration address determined by the registration server based on the internet protocol address, wherein the registration address is registered in the registration server in advance through a game scheduling process; and calling the game service process to establish game connection to the game scheduling process based on the registration address, so that the game service process obtains the registration address of the game scheduling process registered in the registration server in advance and performs service connection with the game scheduling process, and the game service process provides game service.
Corresponding to the foregoing embodiment of the service registration method, the present application further provides an embodiment of a service registration apparatus, and fig. 5 shows a schematic structural diagram of a service registration apparatus provided in an embodiment of the present application, and is configured in a service server, as shown in fig. 5, the apparatus includes:
a receive instruction module 502 configured to receive a service registration instruction submitted by a user;
a sending module 504, configured to start a service process based on the service registration instruction, and send a registration request to a registration server through the service process, where the registration request carries an internet protocol address of the service process;
a receive address module 506 configured to receive a registration address determined by the registration server based on the internet protocol address, wherein the registration address is pre-registered with the registration server through a scheduling process;
an establishing module 508 configured to invoke the service process to establish a service connection with the scheduling process based on the registration address.
Optionally, the service registration apparatus further includes:
the global registration instruction receiving module is configured to receive a global registration instruction submitted by a user;
a global registration request sending module configured to start the scheduling process based on the global registration instruction, and send a global registration request to the registration server through the scheduling process, where the global registration request carries a registration address of the scheduling process;
a receiving identification module configured to receive a global service identification returned by the registration server based on the registration address.
Optionally, the service registration apparatus further includes:
a global service registration request sending module configured to call the scheduling process to send a global service registration request to a login server based on the global service identifier;
and the registration result receiving module is configured to receive a registration result returned by the login server based on the global service registration request.
Optionally, the service registration apparatus further includes:
a service request receiving module configured to receive a service request sent by a login server, wherein the service request carries the global service identifier;
a calling process module configured to call the scheduling process based on the global service identification;
the selecting module is configured to select a target service process from the service process pool through the scheduling process according to the connection number of the service processes in the service process pool;
an address sending module configured to send a service address of the target service process to the login server.
Optionally, the service registration apparatus further includes:
a connection request receiving module configured to receive a service connection request sent by a user terminal, wherein the service address is carried in the service connection request;
a connection process module configured to connect the target service process based on the service address;
and the connection result returning module is configured to return a connection result to the user terminal.
Optionally, the sending module 504 includes:
the starting submodule is configured to start the service process based on the process identification carried in the service registration instruction;
a sending request module configured to send a registration request to the registration server through the service process based on a preset address of the registration server.
Optionally, the registration address includes an internet protocol address and a port number of the scheduling process.
To sum up, the service registration apparatus provided in the embodiment of the present application receives a service registration instruction submitted by a user; starting a service process based on the service registration instruction, and sending a registration request to a registration server through the service process, wherein the registration request carries an internet protocol address of the service process; receiving a registration address determined by the registration server based on the internet protocol address, wherein the registration address is registered in the registration server in advance through a scheduling process; and calling the service process and the scheduling process to establish service connection based on the registration address, so that the service process is in service connection with the scheduling process under the condition that the service process acquires the registration address pre-registered in the registration server, and the service process provides service through service connection.
The above is an exemplary scheme of a service registration apparatus of this embodiment. It should be noted that the technical solution of the service registration apparatus belongs to the same concept as the technical solution of the service registration method described above, and details of the technical solution of the service registration apparatus, which are not described in detail, can be referred to the description of the technical solution of the service registration method described above.
Corresponding to the above another embodiment of the service registration method, the present application further provides another embodiment of a service registration apparatus, fig. 6 shows a schematic structural diagram of another service registration apparatus provided in the present application, and the apparatus is configured in a registration server, as shown in fig. 6, and the apparatus includes:
a receiving request module 602, configured to receive a registration request sent by a service process in a service server, where the registration request carries an internet protocol address of the service process;
an address obtaining module 604, configured to obtain, based on the ip address, a registration address corresponding to the ip address, where the registration address is registered in advance in a scheduling process in the service server;
a return module 608 configured to return the registration address to the service process.
Optionally, the service registration apparatus further includes:
a global registration request receiving module configured to receive a global registration request sent by the scheduling process, where the global registration request carries a registration address of the scheduling process;
a registration module configured to register the scheduling process based on the registration address;
and the allocation module is configured to return the global service identifier allocated for the registration address to the scheduling process.
To sum up, the other service registration apparatus provided in the embodiment of the present application is applied to a registration server, and receives a registration request sent by a service process in a service server through cooperation with a service in the service server, where the registration request carries an internet protocol address of the service process. Acquiring a registration address corresponding to the internet protocol address based on the internet protocol address, wherein the registration address is registered in advance by a scheduling process in the service server; and returning the registration address to the service process, so that the registration address pre-registered in a registration server by the scheduling process is provided for the service process, the service connection is carried out between the registration address and the scheduling process, and the service is provided.
The above is an exemplary scheme of another service registration apparatus of the present embodiment. It should be noted that the technical solution of the service registration apparatus and the technical solution of the another service registration method belong to the same concept, and for details that are not described in detail in the technical solution of the service registration apparatus, reference may be made to the description of the technical solution of the another service registration method.
There is also provided in an embodiment of the present application a computing device comprising a memory, a processor, and computer instructions stored on the memory and executable on the processor, the processor implementing the steps of the service registration method when executing the instructions.
An embodiment of the present application further provides a computer readable storage medium storing computer instructions, which when executed by a processor, implement the steps of the service registration method as described above.
The above is an illustrative scheme of a computer-readable storage medium of the present embodiment. It should be noted that the technical solution of the storage medium belongs to the same concept as the technical solution of the service registration method described above, and details that are not described in detail in the technical solution of the storage medium can be referred to the description of the technical solution of the service registration method described above.
The foregoing description of specific embodiments of the present application has been presented. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The computer instructions comprise computer program code which may be in the form of source code, object code, an executable file or some intermediate form, or the like. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, read-Only Memory (ROM), random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
It should be noted that, for the sake of simplicity, the above-mentioned method embodiments are described as a series of acts or combinations, but those skilled in the art should understand that the present application is not limited by the described order of acts, as some steps may be performed in other orders or simultaneously according to the present application. Further, those skilled in the art will appreciate that the embodiments described in this specification are presently considered to be preferred embodiments and that acts and modules are not required in the present application.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
The preferred embodiments of the present application disclosed above are intended only to aid in the explanation of the application. Alternative embodiments are not exhaustive and do not limit the invention to the precise embodiments described. Obviously, many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to best explain the principles of the application and its practical applications, to thereby enable others skilled in the art to best understand and utilize the application. The application is limited only by the claims and their full scope and equivalents.

Claims (13)

1. A service registration method is applied to a service server, and is characterized by comprising the following steps:
receiving a service registration instruction submitted by a user;
starting a service process based on the service registration instruction, and sending a registration request to a registration server through the service process, wherein the registration request carries an internet protocol address of the service process;
receiving a registration address determined by the registration server based on the internet protocol address, wherein the registration address is registered in the registration server in advance through a scheduling process;
and calling the service process to establish service connection with the scheduling process based on the registration address.
2. The service registration method of claim 1, wherein before sending the registration request to the registration server through the service process, the method further comprises:
receiving a global registration instruction submitted by a user;
starting the scheduling process based on the global registration instruction, and sending a global registration request to the registration server through the scheduling process, wherein the global registration request carries a registration address of the scheduling process;
and receiving the global service identification returned by the registration server based on the registration address.
3. The service registration method of claim 2, wherein after sending the global registration request to the registration server through the scheduling process, further comprising:
based on the global service identification, calling the scheduling process to send a global service registration request to a login server;
and receiving a registration result returned by the login server based on the global service registration request.
4. The service registration method of claim 1, further comprising:
receiving a service request sent by a login server, wherein the service request carries a global service identifier;
calling the scheduling process based on the global service identification;
selecting a target service process from the service process pool through the scheduling process according to the connection number of the service processes in the service process pool;
and sending the service address of the target service process to the login server.
5. The service registration method of claim 4, wherein after sending the service address of the target service process to the login server, further comprising:
receiving a service connection request sent by a user terminal, wherein the service address carried in the service connection request;
connecting the target service process based on the service address;
and returning a connection result to the user terminal.
6. The service registration method of claim 1, wherein the initiating a service process based on the service registration instruction, sending a registration request to a registration server through the service process, comprises:
starting the service process based on the process identification carried in the service registration instruction;
and sending a registration request to the registration server through the service process based on the preset address of the registration server.
7. The service registration method of claim 1, wherein the registration address comprises an internet protocol address and a port number of the scheduling process.
8. A service registration method is applied to a registration server, and is characterized by comprising the following steps:
receiving a registration request sent by a service process in a service server, wherein the registration request carries an internet protocol address of the service process;
acquiring a registration address corresponding to the internet protocol address based on the internet protocol address, wherein the registration address is registered in advance by a scheduling process in the service server;
and returning the registration address to the service process.
9. The service registration method of claim 8, wherein before the step of receiving the registration request sent by the service process in the service server, the method further comprises:
receiving a global registration request sent by the scheduling process, wherein the global registration request carries a registration address of the scheduling process;
registering the scheduling process based on the registration address;
and returning the global service identifier allocated for the registration address to the scheduling process.
10. A service registration apparatus configured in a service server, comprising:
the receiving instruction module is configured to receive a service registration instruction submitted by a user;
a sending module, configured to start a service process based on the service registration instruction, and send a registration request to a registration server through the service process, where the registration request carries an internet protocol address of the service process;
a receive address module configured to receive a registration address determined by the registration server based on the internet protocol address, wherein the registration address is pre-registered with the registration server through a scheduling process;
and the establishing module is configured to call the service process to establish service connection with the scheduling process based on the registration address.
11. A service registration apparatus configured in a registration server, comprising:
the system comprises a receiving request module, a registration request module and a service processing module, wherein the receiving request module is configured to receive a registration request sent by a service process in a service server, and the registration request carries an internet protocol address of the service process;
an address acquisition module configured to acquire a registration address corresponding to the internet protocol address based on the internet protocol address, wherein the registration address is registered in advance by a scheduling process in the service server;
a return module configured to return the registration address to the service process.
12. A computing device comprising a memory, a processor, and computer instructions stored on the memory and executable on the processor, wherein the processor implements the steps of the method of any of claims 1-7 or 8-9 when executing the instructions.
13. A computer-readable storage medium storing computer instructions, which when executed by a processor, perform the steps of the method of any one of claims 1-7 or 8-9.
CN202011562509.7A 2020-12-25 2020-12-25 Service registration method and device Active CN112671913B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011562509.7A CN112671913B (en) 2020-12-25 2020-12-25 Service registration method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011562509.7A CN112671913B (en) 2020-12-25 2020-12-25 Service registration method and device

Publications (2)

Publication Number Publication Date
CN112671913A CN112671913A (en) 2021-04-16
CN112671913B true CN112671913B (en) 2022-11-08

Family

ID=75409172

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011562509.7A Active CN112671913B (en) 2020-12-25 2020-12-25 Service registration method and device

Country Status (1)

Country Link
CN (1) CN112671913B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001049003A2 (en) * 1999-12-23 2001-07-05 Solutioninc. Ltd. Server and method provide access to a network
CN104601702A (en) * 2015-01-19 2015-05-06 迈普通信技术股份有限公司 Cluster remote procedure call method and system
WO2017206422A1 (en) * 2016-05-28 2017-12-07 华为技术有限公司 Method for calling remote procedure in network device, and network device
CN107948215A (en) * 2018-01-17 2018-04-20 广州汇智通信技术有限公司 A kind of remote invocation method and device based on UDP communications
CN108881965A (en) * 2017-12-29 2018-11-23 北京视联动力国际信息技术有限公司 A kind of server processes operating method and device
CN109274734A (en) * 2018-09-07 2019-01-25 海信集团有限公司 A kind of service processes call method and device based on Internet of Things cloud platform
CN112114979A (en) * 2020-08-31 2020-12-22 厦门安胜网络科技有限公司 Remote procedure call method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001049003A2 (en) * 1999-12-23 2001-07-05 Solutioninc. Ltd. Server and method provide access to a network
CN104601702A (en) * 2015-01-19 2015-05-06 迈普通信技术股份有限公司 Cluster remote procedure call method and system
WO2017206422A1 (en) * 2016-05-28 2017-12-07 华为技术有限公司 Method for calling remote procedure in network device, and network device
CN108881965A (en) * 2017-12-29 2018-11-23 北京视联动力国际信息技术有限公司 A kind of server processes operating method and device
CN107948215A (en) * 2018-01-17 2018-04-20 广州汇智通信技术有限公司 A kind of remote invocation method and device based on UDP communications
CN109274734A (en) * 2018-09-07 2019-01-25 海信集团有限公司 A kind of service processes call method and device based on Internet of Things cloud platform
CN112114979A (en) * 2020-08-31 2020-12-22 厦门安胜网络科技有限公司 Remote procedure call method and device

Also Published As

Publication number Publication date
CN112671913A (en) 2021-04-16

Similar Documents

Publication Publication Date Title
US11876856B2 (en) Method for computational-power sharing and related device
US11057827B1 (en) Provisioning an embedded universal integrated circuit card (eUICC) of a mobile communication device
CN106453349A (en) An account number login method and apparatus
CN105763545B (en) A kind of BYOD method and device
CN112671913B (en) Service registration method and device
CN113301005B (en) Data acquisition method and device
CN114416485A (en) Data processing method and device
CN106255074A (en) Method and device for establishing a group
CN114221836A (en) Data processing method and device
CN113204395A (en) Service processing method and device
CN109962834B (en) Information processing method, system, terminal and computer storage medium
CN109639629A (en) Data access processing method, device, computer equipment and storage medium
CN109548411A (en) A kind of method and device controlling controllable equipment access network
CN111163237B (en) Call service flow control method and related device
CN115551104A (en) Service processing method, device, equipment and storage medium
CN114697888A (en) 5G message processing method, device and storage medium
CN112587922A (en) Model display method and device
CN113114670A (en) Multi-protocol connection method, equipment and storage medium of block chain network
CN117176781B (en) Point-to-point networking method and device
CN103167601A (en) Control method and control device for achieving user registration through multiple terminals
CN112532509A (en) Cross-application communication method and related device
CN115361277B (en) Method, device, equipment and medium for deploying general cluster system
CN114422456B (en) Task processing method and device
CN114978702B (en) Account management method, platform and system, computing device and readable storage medium
WO2022226756A1 (en) Methods, apparatuses, and computer readable media for charging in telecommunication network

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 519000 Room 102, 202, 302 and 402, No. 325, Qiandao Ring Road, Tangjiawan Town, high tech Zone, Zhuhai City, Guangdong Province, Room 102 and 202, No. 327 and Room 302, No. 329

Applicant after: Zhuhai Jinshan Digital Network Technology Co.,Ltd.

Address before: 519000 Room 102, 202, 302 and 402, No. 325, Qiandao Ring Road, Tangjiawan Town, high tech Zone, Zhuhai City, Guangdong Province, Room 102 and 202, No. 327 and Room 302, No. 329

Applicant before: ZHUHAI KINGSOFT ONLINE GAME TECHNOLOGY Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant