CN113382061B - Service processing method, device and system based on cloud environment - Google Patents

Service processing method, device and system based on cloud environment Download PDF

Info

Publication number
CN113382061B
CN113382061B CN202110636322.5A CN202110636322A CN113382061B CN 113382061 B CN113382061 B CN 113382061B CN 202110636322 A CN202110636322 A CN 202110636322A CN 113382061 B CN113382061 B CN 113382061B
Authority
CN
China
Prior art keywords
server
service
request
client
position information
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
CN202110636322.5A
Other languages
Chinese (zh)
Other versions
CN113382061A (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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202110636322.5A priority Critical patent/CN113382061B/en
Publication of CN113382061A publication Critical patent/CN113382061A/en
Application granted granted Critical
Publication of CN113382061B publication Critical patent/CN113382061B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • H04L67/63Routing a service request depending on the request content or context

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention discloses a service processing method, a device and a system based on a cloud environment, relating to the field of cloud computing, wherein the method comprises the following steps: receiving a service request from a client, the request comprising: a request name set according to a predetermined rule; determining the position information of the server in the server cluster according to the request name of the service request; determining a server according to the position information based on preset routing information, wherein the routing information indicates the corresponding relation between the static identifier of the server and the position information; and executing the service corresponding to the service request based on the determined server to which the client belongs, and returning a service processing result to the client. The invention can provide an efficient service addressing mechanism, can quickly respond to the service request of the client and improve the experience of the user.

Description

Service processing method, device and system based on cloud environment
Technical Field
The invention relates to the field of cloud computing, in particular to a service processing method, device and system based on a cloud environment.
Background
In recent years, demands of the user market for computing power and storage capacity of application systems have been increasing, and a big data cloud environment capable of providing computing power, storage power, virtual machine services, and the like to users or various application systems on demand from a dynamic virtual resource pool has been brought about, and various services have been deployed in the cloud environment. After a large number of services are deployed in a cloud environment, the services need to be addressed correspondingly, so that the purpose of invoking the services can be achieved. At present, a service registration and discovery mechanism commonly used in the market is realized by taking a zookeeper as a registration center and utilizing a Znode data model of the zookeeper and a watch mechanism. The actual scheduling process of the distributed coordination mechanism is complex, and the most notable application is the distributed RPC framework Dubbo in ali.
Under the prevailing concept of 'micro-service' architecture, a system function is distributed to a plurality of micro-services, and the micro-services are combined to provide functions to the outside, so that when the number of the services is rapidly increased, the service addressing efficiency is low, the user request cannot be quickly responded, and the user cannot enjoy good system use experience.
Disclosure of Invention
In view of the above, the present invention provides a service processing method, apparatus and system based on cloud environment to solve at least one of the above-mentioned problems.
According to a first aspect of the present invention, there is provided a service processing method based on a cloud environment, the method including:
receiving a service request from a client, the request comprising: a request name set according to a predetermined rule;
determining the position information of the server in the server cluster according to the request name of the service request;
determining a server according to the position information based on preset routing information, wherein the routing information indicates the corresponding relation between the static identifier of the server and the position information;
and executing the service corresponding to the service request based on the determined server to which the client belongs, and returning a service processing result to the client.
According to a second aspect of the present invention, there is provided a service processing apparatus based on a cloud environment, the apparatus comprising:
a request receiving unit, configured to receive a service request from a client, where the request includes: a request name set according to a predetermined rule;
the position information determining unit is used for determining the position information of the server in the server cluster according to the request name of the service request;
the server determining unit is used for determining a server according to the position information based on preset routing information, and the routing information indicates the corresponding relation between the static identifier of the server and the position information;
a service execution unit configured to execute a service corresponding to the service request based on the determined server to which the service belongs;
and the service result returning unit is used for returning the service processing result to the client.
According to a third aspect of the present invention, there is provided a service processing system based on a cloud environment, the system comprising: the service processing device comprises a client and a server cluster comprising a plurality of servers, wherein each server side comprises the service processing device based on the cloud environment.
According to a fourth aspect of the invention, there is provided an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the method when executing the program.
According to a fifth aspect of the invention, a computer-readable storage medium is provided, having stored thereon a computer program which, when executed by a processor, carries out the steps of the above-mentioned method.
According to the technical scheme, the position information of the server in the server cluster is determined according to the request name in the received service request, the server is determined according to the position information based on the preset routing information, the service corresponding to the service request is executed based on the determined server, and the service processing result is returned to the client.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a block diagram of a service processing system based on a cloud environment according to an embodiment of the present invention;
fig. 2 is a block diagram of the structure of the service processing apparatus 21 according to the embodiment of the present invention;
FIG. 3 is a schematic diagram of an example system for service processing according to an embodiment of the invention;
FIG. 4 is a schematic diagram of a directed torus model according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a server deployment on a directed torus, according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of a server policing service area directed arc, according to an embodiment of the invention;
FIG. 7 is a graph of a directed circle link point and server static identity routing relationship, according to an embodiment of the present invention;
FIG. 8 is another schematic diagram of an exemplary system for service processing according to an embodiment of the invention;
FIG. 9 is a flow diagram of a service processing method according to an embodiment of the invention;
fig. 10 is a schematic block diagram of a system configuration of an electronic apparatus 600 according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without inventive step based on the embodiments of the present invention, are within the scope of protection of the present invention.
Under the architecture of "microservice", when the number of services is rapidly increased, the service addressing efficiency may be low, and the user request cannot be quickly responded, so that the user cannot enjoy good system use experience. Based on this, the embodiment of the present invention provides a service processing scheme based on a cloud environment, where the scheme has a high-efficiency service addressing mechanism, and can ensure that a service request can always obtain a fast response under the condition that the number of micro services is continuously increased, and a user can enjoy good system use experience, and the experience of the user is good. Embodiments of the present invention are described in detail below with reference to the accompanying drawings.
Fig. 1 is a block diagram of a service processing system based on a cloud environment according to an embodiment of the present invention, and as shown in fig. 1, the system includes: the system comprises a client 1 and a server cluster 2 comprising a plurality of servers, wherein the client initiates a service request to the server cluster, and one server in the server cluster processes the service request and returns a processing result.
Each server side includes a service processing device 21 based on a cloud environment. Fig. 2 is a block diagram of the service processing apparatus 21, and as shown in fig. 2, the service processing apparatus 21 includes: a request receiving unit 211, a location information determining unit 212, a server determining unit 213, a service executing unit 214, and a service result returning unit 215, wherein:
a request receiving unit 211, configured to receive a service request from a client, where the request includes: a request name set according to a predetermined rule.
A location information determining unit 212, configured to determine location information of the server in the server cluster according to the request name of the service request.
A server determining unit 213, configured to determine the server according to the location information based on preset routing information, where the routing information indicates a correspondence between a server static identifier (e.g., a server IP address) and the location information.
A service executing unit 214, configured to execute a service corresponding to the service request based on the determined server to which the server belongs.
In one embodiment, the server may be a group of servers. At this time, the service execution unit may select one server from the group of servers to execute the service corresponding to the service request according to the load balancing policy.
A service result returning unit 215, configured to return the service processing result to the client.
The location information determining unit 212 determines the location information of the affiliated server in the server cluster according to the request name in the service request received by the request receiving unit 211, then the server determining unit 213 determines the affiliated server according to the location information based on the preset routing information, then the service executing unit 214 executes the service corresponding to the service request based on the determined affiliated server, and the service result returning unit 215 returns the service processing result to the client.
In a specific implementation process, the device further comprises: and the routing information setting unit is used for setting the routing information. The routing information setting unit specifically includes: a corresponding relationship establishing module and a routing information generating module, wherein: the corresponding relation establishing module is used for establishing the corresponding relation between the position information of each server in the server cluster and the static identifier of each server based on the directed circular model; and the routing information generating module is used for generating routing information according to the corresponding relation.
In one embodiment, the correspondence establishing module includes: a position setting submodule and a corresponding relation establishing submodule, wherein:
the position setting submodule is used for setting a plurality of positions on the directed circular model according to the number of the servers in the server cluster;
and the corresponding relation establishing submodule is used for determining the corresponding relation between the position information of each server and the static identifier of each server according to the position number and the static identifier of each server.
In one embodiment, the system further comprises: a Domain Name System (DNS) configured to receive a service request from a client and send the request to the service processing apparatus, and to receive a service processing result from the service processing apparatus and send the service processing result to the client.
Accordingly, the request receiving unit 211 may be: receiving a service request of the client directly from the client or receiving the service request of the client forwarded by a domain name system.
In practical operation, the units, modules and sub-modules may be combined or may be arranged singly, and the invention is not limited thereto.
For a better understanding of the present invention, embodiments of the present invention are described in detail below in connection with the exemplary system illustrated in FIG. 3.
As shown in fig. 3, the example system includes: the system comprises a client and a server cluster, wherein the client obtains a service from an access point which initiates a service request to the service, and the access point (namely, one server or one of a group of servers) finds a specific service on the server cluster through a service addressing mechanism and returns the specific service to the client. The service deployment also meets the conditions of service combination, service nesting and the like under the architecture layering concept and the micro-service concept.
The example system realizes the functions of cloud environment service deployment and service addressing based on the directed circular ring model, and the specific realization process comprises the following steps: (1) there is a division principle of address space on the directed torus; (2) Deploying servers of the server cluster on the directed circular ring and determining rules of the jurisdiction range; (3) Establishing a comparison routing table relation between the static server identification and the directed circular ring address space; (4) service deployment and service addressing rules; and (5) a deployment mode of the server cluster network. These five processes are described separately below.
(1) Division principle of address space on directed torus
First, a directed torus model as shown in fig. 4 is built, and the address space is equally divided on the directed torus. The size of the directed torus address space is initially defined as 2 to a certain power of 2 c (e.g. 2) 8 = 64). The default convention ring positive direction is clockwise (clock direction), i.e., 0,1,2, 3. The positioning formula of the key value in the directed circular ring is as follows:
address=hash(key)%2 c (1)
wherein,% represents a remainder operator;
(2) Rules for server deployment of server cluster on directed torus and determining jurisdiction
Assuming there are k servers in the server cluster, each server has a unique static identification (e.g., server IP address) that can be used to provide services. Taking a docker container as an example, as a server, the static IP address of the container may be set as its unique identity. And (3) taking the static IP identification of the server as a key value in the directed ring, and calculating to obtain the position of the server in the address space by using the formula (1).
Assuming that the address value corresponding to each server in the server cluster is calculated by using the static IP of the server as the key value, the results are sequentially arranged from small to large: a. The 1 ,A 2 ,A 3 ,...,A k . The correspondence falls on the directed circle model as shown in fig. 5. Hereinafter, the following will be: a. The 1 ,A 2 ,A 3 ,...,A k Refers to the servers in the cluster and their order.
As shown in FIG. 5, there are k servers A in the directed circle i (i =1,2, 3.., k.) cut into k directed arcs, contract Server A i The administered address range is [ A ] i ,A i+1 ) (left-closed and right-open interval), i.e. directed arcs as shown in FIG. 6
Figure GDA0003805935740000061
(Note that the direction of the directed arc is irreversible, and the reversal is expressed by negative values, i.e. on a circle
Figure GDA0003805935740000062
). Thus, can obtain A i The arc range of jurisdiction of (c) is written as follows:
A i ≤address<A i+1 (2)
(3) Establishment of contrast routing table relation between server static identification and directed ring address space
The static identifier of the server is used as a key value, and the address space position of the server corresponding to the directed circular ring is calculated by using a formula (1). And meanwhile, a cutting principle of the directed circular ring address space is provided, and in order to quickly locate the address position of the server on the directed circular ring, a comparison relation between the static identifier and the address of the server can be established as a routing table in the service deployment stage.
For example, assume that there are 16 servers in the server cluster, and the static IP of the server is selected as the static identifier, and the address space is set to 2 4 The power directed circular model substitutes the IP of each server as a key value into formula (1), and the calculated data is correspondingly filled into a routing information table, as shown in table 1 below:
Figure GDA0003805935740000063
TABLE 1
Based on table 1 above, fig. 7 shows a directed circle link point and server static identification routing relationship diagram.
(4) Service deployment and service addressing rules
Before deploying the service to the server, that is, setting the naming rule of the service in advance, for example:
GroupName
_ServiceName
the service name may be included in the service request, and the GroupName is a group name prefix, and may be set by a service deployed on one (or one group of) servers as needed. For example, services that use a common database data are ascribed to the same packet name. When the calculation service corresponds to the address space position in the directed torus, the GroupName may be substituted into formula (1) as a key value to calculate the address value of the position of the service in the address space. Then, the position of the directed arc in the directed circular ring where the service is located is found according to the formula (2). And finally, determining the address information of the server deployed by the service according to the static server identifier and the routing relation table of the directed ring.
Therefore, a simple service deployment and service addressing ring model on the intranet can be established: the servers on the server cluster are correspondingly deployed on the directed ring according to the steps, the client initiates a service calling request, the access point server on the server cluster acquires the group name GroupName in the service request and calculates to obtain the server address information corresponding to the service, the server on the corresponding server is called to perform request processing, and then the processing result is returned to the client.
In actual operation, if the service includes a self-service or a micro-service, the service addressing can be realized as long as the naming rule and the deployment rule of the service are guaranteed to comply with the above requirements. In addition, each server on the directed ring can be a group of servers, so that high reliability and high availability of multi-activity, load balancing and the like are realized.
(5) Deployment mode of server cluster network
When the client sends a request to a simpler intranet cloud environment service cluster for service calling, deployment can be performed according to the above manner. However, when considering that the client sends the request through a domain name system, an IP, and the like on the public network, the following two-point adaptability adjustment needs to be performed on the deployment of the server cluster on the directed torus.
1. Configuring DNS Domain name Server
The mapping relation between the external domain name and the access point address of the internal actual server is configured on the DNS server, so that the aim that the client on the public network can be communicated with the actual target server through the domain name is fulfilled.
2. Deploying special servers with distribution function
And selecting a plurality of servers on the directed ring with the server cluster as DNS domain name mapping access points. The access point server needs to have two parts of capability: the first one is that the capability of receiving external requests and distributing the requests to the servers belonging to the corresponding services on the ring according to the routing relation table for request processing is required to be provided; and the second is that the system has conventional deployment service and provides the capability of processing service requests.
For example, fig. 8 shows another example system, as shown in fig. 8, it is assumed that K servers in a server cluster form a directed torus according to the above deployment manner to form a server cluster network, and a correspondence between a server IP and a space address on the torus is represented by a routing table (it should be noted that addresses in the routing table are from small to large, which does not mean that the IP is from small to large). One or more servers on the directional ring are selected as access points (the access point itself is also one server on the ring, and multiple servers can be set as access points to realize multi-point access).
The request processing flow based on the example system of fig. 8 includes: the client sends a service request by calling a domain name, and the DNS server processes domain name mapping to send the request to an access point server A on the ring j Access point server A j For group Name _ ServiceNa in service requestme finds the address value in the address space according to the formula (1), and then finds the server A deployed by the service according to the formula (2) and the routing relation table e Access point server A j Call Server A by RPC e And finally returning the processing result to the client side in the original way.
As can be seen from the above description, the embodiment of the present invention constructs a service deployment and service addressing model in a cloud environment based on a directed torus, and provides a novel service deployment manner with high extensibility, a simple and efficient service addressing manner. The embodiment of the invention can be implemented in the Internet industry which assists the concept of 'micro-service' in the future, can ensure that the service can be deployed on a huge server cluster under the condition of rapid increase of the service quantity, can also ensure that the service addressing time is not prolonged along with rapid increase of the service quantity, and can ensure the high-efficiency response capability of an application system.
Based on similar inventive concepts, the embodiment of the present invention further provides a service processing method based on a cloud environment, and the method is preferably applicable to the service processing apparatus described above.
Fig. 9 is a flowchart of the service processing method, as shown in fig. 9, the method including:
step 901, receiving a service request from a client, where the request includes: a request name (GroupName ServiceName as described above) set according to a predetermined rule.
Step 902, determining the location information of the server in the server cluster according to the request name of the service request.
Step 903, determining the server according to the location information based on preset routing information (such as table 1 above), where the routing information indicates a correspondence between a server static identifier (e.g., a server IP address) and the location information.
And 904, executing the service corresponding to the service request based on the determined server to which the service belongs, and returning a service processing result to the client.
In actual operation, the server may be a group of servers.
Preferably, one server from the group of servers may be selected to execute a service corresponding to the service request according to a load balancing policy.
The method comprises the steps of determining the position information of a server in a server cluster according to a request name in a received service request, then determining the server based on preset routing information and the position information, then executing the service corresponding to the service request based on the determined server, and returning a service processing result to a client.
In actual operation, the routing information may be set as follows: firstly, establishing a corresponding relation between position information of each server in a server cluster and a static identifier of each server based on a directed circular model; and then generating routing information according to the corresponding relation.
Specifically, a plurality of positions may be set on the directed torus model according to the number of servers in the server cluster; and then determining the corresponding relation between the position information of each server and the static identifier of each server according to the position number and the static identifier of each server.
In a specific implementation process, step 901 may receive a service request directly from a client; or receive a service request of the client forwarded through the DNS.
For the specific execution flow of each step, reference may be made to the description in the above system/apparatus embodiment, and details are not described herein again.
The present embodiment also provides an electronic device, which may be a desktop computer, a tablet computer, a mobile terminal, and the like, but is not limited thereto. In this embodiment, the electronic device may be implemented with reference to the above method embodiment and the cloud environment-based service processing apparatus/system embodiment, and the contents thereof are incorporated herein, and repeated details are not repeated here.
Fig. 10 is a schematic block diagram of a system configuration of an electronic apparatus 600 according to an embodiment of the present invention. As shown in fig. 10, the electronic device 600 may include a central processor 100 and a memory 140; the memory 140 is coupled to the central processor 100. Notably, this figure is exemplary; other types of structures may also be used in addition to or in place of the structures to implement telecommunications or other functions.
In an embodiment, the service processing functions based on the cloud environment may be integrated into the central processor 100.
The central processor 100 may be configured to perform the following control:
receiving a service request from a client, the request comprising: a request name set according to a predetermined rule;
determining the position information of the server in the server cluster according to the request name of the service request;
determining a server to which the server belongs according to the position information based on preset routing information, wherein the routing information indicates the corresponding relation between the static identifier of the server and the position information;
and executing the service corresponding to the service request based on the determined server to which the client belongs, and returning a service processing result to the client.
As can be seen from the foregoing description, according to the electronic device provided in the embodiment of the present application, the location information of the affiliated server in the server cluster is determined according to the request name in the received service request, then the affiliated server is determined according to the location information based on the preset routing information, then the service corresponding to the service request is executed based on the determined affiliated server, and the service processing result is returned to the client.
In another embodiment, the service processing apparatus/system based on the cloud environment may be configured separately from the central processor 100, for example, the service processing apparatus/system based on the cloud environment may be configured as a chip connected to the central processor 100, and the service processing function based on the cloud environment may be implemented by the control of the central processor.
As shown in fig. 10, the electronic device 600 may further include: communication module 110, input unit 120, audio processing unit 130, display 160, power supply 170. It is noted that the electronic device 600 does not necessarily include all of the components shown in FIG. 10; in addition, the electronic device 600 may further include components not shown in fig. 10, which may be referred to in the prior art.
As shown in fig. 10, the central processor 100, sometimes referred to as a controller or operational control, may include a microprocessor or other processor device and/or logic device, the central processor 100 receiving input and controlling the operation of the various components of the electronic device 600.
The memory 140 may be, for example, one or more of a buffer, a flash memory, a hard drive, a removable media, a volatile memory, a non-volatile memory, or other suitable devices. The information relating to the failure may be stored, and a program for executing the information may be stored. And the central processing unit 100 may execute the program stored in the memory 140 to realize information storage or processing, etc.
The input unit 120 provides input to the cpu 100. The input unit 120 is, for example, a key or a touch input device. The power supply 170 is used to provide power to the electronic device 600. The display 160 is used for displaying display objects such as images and characters. The display may be, for example, an LCD display, but is not limited thereto.
The memory 140 may be a solid state memory such as Read Only Memory (ROM), random Access Memory (RAM), a SIM card, or the like. There may also be a memory that holds information even when power is off, can be selectively erased, and is provided with more data, an example of which is sometimes referred to as an EPROM or the like. The memory 140 may also be some other type of device. Memory 140 includes buffer memory 141 (sometimes referred to as a buffer). The memory 140 may include an application/function storage section 142, and the application/function storage section 142 is used to store application programs and function programs or a flow for executing the operation of the electronic device 600 by the central processing unit 100.
The memory 140 may also include a data store 143, the data store 143 for storing data, such as contacts, digital data, pictures, sounds, and/or any other data used by the electronic device. The driver storage portion 144 of the memory 140 may include various drivers of the electronic device for communication functions and/or for performing other functions of the electronic device (e.g., messaging application, address book application, etc.).
The communication module 110 is a transmitter/receiver 110 that transmits and receives signals via an antenna 111. The communication module (transmitter/receiver) 110 is coupled to the central processor 100 to provide an input signal and receive an output signal, which may be the same as in the case of a conventional mobile communication terminal.
Based on different communication technologies, a plurality of communication modules 110, such as a cellular network module, a bluetooth module, and/or a wireless local area network module, may be provided in the same electronic device. The communication module (transmitter/receiver) 110 is also coupled to a speaker 131 and a microphone 132 via an audio processor 130 to provide audio output via the speaker 131 and receive audio input from the microphone 132 to implement general telecommunications functions. Audio processor 130 may include any suitable buffers, decoders, amplifiers and so forth. In addition, an audio processor 130 is also coupled to the central processor 100, so that recording on the local can be enabled through a microphone 132, and so that sound stored on the local can be played through a speaker 131.
Embodiments of the present invention also provide a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the steps of the service processing method based on the cloud environment.
In summary, the embodiments of the present invention provide an efficient and automatic service deployment and service addressing scheme in a cloud environment, which is suitable for processing a scenario that a large number of services need to be deployed in the cloud environment and it is desirable to obtain a service address quickly and invoke the service quickly. The directed ring deployment-based service of the embodiment of the invention can keep good high reliability under the high pressure of the increasing service quantity, and keep the low-delay, high-efficiency and automatic capability of service addressing, thereby improving the experience of customers.
The preferred embodiments of the present invention have been described above with reference to the accompanying drawings. The many features and advantages of the embodiments are apparent from the detailed specification, and thus, it is intended by the appended claims to cover all such features and advantages of the embodiments which fall within the true spirit and scope thereof. Further, since numerous modifications and changes will readily occur to those skilled in the art, it is not desired to limit the embodiments of the invention to the exact construction and operation illustrated and described, and accordingly, all suitable modifications and equivalents may be resorted to, falling within the scope thereof.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The principle and the implementation mode of the invention are explained by applying specific embodiments in the invention, and the description of the embodiments is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A service processing method based on a cloud environment is characterized by comprising the following steps:
receiving a service request from a client, the request comprising: a request name set according to a predetermined rule;
determining the position information of the server in the server cluster according to the request name of the service request;
determining a server to which the server belongs according to the position information based on preset routing information, wherein the routing information indicates the corresponding relation between the static identifier of the server and the position information;
executing the service corresponding to the service request based on the determined server to which the client belongs, and returning a service processing result to the client;
the routing information is set by:
establishing a corresponding relation between the position information of each server in the server cluster and the static identifier of each server based on the directed circular model;
generating routing information according to the corresponding relation;
establishing a corresponding relation between the position information of each server in the server cluster and the static identifier of each server based on the directed circular model comprises the following steps:
setting a plurality of positions on the directed circular model according to the number of the servers in the server cluster;
determining the corresponding relation between the position information of each server and the static identifier of each server according to the position number and the static identifier of each server;
the size of the directed torus model address space is initially defined as 2 to the power of 2 to the C c C is a positive integer;
taking the static IP identification of the server as a key value in the directed circular model, and calculating by using the following positioning formula to obtain the position of the server in the address space:
address=hash(key)%2 c
where,% represents a remainder operator.
2. The method of claim 1, wherein receiving the service request from the client comprises one of:
receiving a service request directly from a client;
a service request of a client forwarded through a DNS namesystem is received.
3. The method of claim 1, wherein the affiliated server is a group of servers, and wherein performing the service corresponding to the service request based on the determined affiliated server comprises:
and selecting one server from the group of servers to execute the service corresponding to the service request according to the load balancing strategy.
4. An apparatus for processing a service based on a cloud environment, the apparatus comprising:
a request receiving unit, configured to receive a service request from a client, where the request includes: a request name set according to a predetermined rule;
the position information determining unit is used for determining the position information of the server in the server cluster according to the request name of the service request;
the server determining unit is used for determining the server according to the position information based on preset routing information, and the routing information indicates the corresponding relation between the static server identification and the position information;
a service execution unit configured to execute a service corresponding to the service request based on the determined server to which the service belongs;
the service result returning unit is used for returning the service processing result to the client;
the device further comprises:
a routing information setting unit for setting routing information,
the routing information setting unit specifically includes:
the corresponding relation establishing module is used for establishing the corresponding relation between the position information of each server in the server cluster and the static identifier of each server based on the directed circular model;
a routing information generating module for generating routing information according to the corresponding relation;
the corresponding relation establishing module comprises:
the position setting submodule is used for setting a plurality of positions on the directed circular model according to the number of the servers in the server cluster;
the corresponding relation establishing submodule is used for determining the corresponding relation between the position information of each server and the static identification of each server according to the position number and the static identification of each server;
the size of the directed torus model address space is initially defined as 2 to the power of 2 to the C c C is a positive integer;
taking the static IP identification of the server as a key value in the directed circular model, and calculating by using the following positioning formula to obtain the position of the server in the address space:
address=hash(key)%2 c
where,% represents a remainder operator.
5. The apparatus according to claim 4, wherein the request receiving unit is specifically configured to:
receiving a service request directly from a client; or
And receiving a service request of the client forwarded by the domain name system.
6. The apparatus according to claim 4, wherein the server is a group of servers, and the service execution unit is specifically configured to:
and selecting one server from the group of servers to execute the service corresponding to the service request according to the load balancing strategy.
7. A service processing system based on a cloud environment, the system comprising: a client, and a server cluster comprising a plurality of servers, wherein each server side comprises the cloud environment-based service processing apparatus according to any one of claims 4 to 6.
8. The system of claim 7, further comprising:
and the domain name system is used for receiving a service request from a client and sending the request to the service processing device, and receiving a service processing result from the service processing device and sending the service processing result to the client.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method according to any of claims 1 to 3 are implemented when the processor executes the program.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 3.
CN202110636322.5A 2021-06-08 2021-06-08 Service processing method, device and system based on cloud environment Active CN113382061B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110636322.5A CN113382061B (en) 2021-06-08 2021-06-08 Service processing method, device and system based on cloud environment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110636322.5A CN113382061B (en) 2021-06-08 2021-06-08 Service processing method, device and system based on cloud environment

Publications (2)

Publication Number Publication Date
CN113382061A CN113382061A (en) 2021-09-10
CN113382061B true CN113382061B (en) 2023-02-03

Family

ID=77576508

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110636322.5A Active CN113382061B (en) 2021-06-08 2021-06-08 Service processing method, device and system based on cloud environment

Country Status (1)

Country Link
CN (1) CN113382061B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114615340B (en) * 2022-03-08 2023-10-20 抖音视界有限公司 Request processing method and device, computer equipment and storage device
CN115002027B (en) * 2022-05-26 2024-06-21 中国邮政储蓄银行股份有限公司 Data addressing method and device for in-transit flow
CN115587392B (en) * 2022-11-22 2023-04-07 杭州字节方舟科技有限公司 Method, device, equipment and medium for preventing power loss

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111355816A (en) * 2020-05-22 2020-06-30 支付宝(杭州)信息技术有限公司 Server selection method, device, equipment and distributed service system
CN111600794A (en) * 2020-07-24 2020-08-28 腾讯科技(深圳)有限公司 Server switching method, terminal, server and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111355816A (en) * 2020-05-22 2020-06-30 支付宝(杭州)信息技术有限公司 Server selection method, device, equipment and distributed service system
CN111600794A (en) * 2020-07-24 2020-08-28 腾讯科技(深圳)有限公司 Server switching method, terminal, server and storage medium

Also Published As

Publication number Publication date
CN113382061A (en) 2021-09-10

Similar Documents

Publication Publication Date Title
CN113382061B (en) Service processing method, device and system based on cloud environment
US20170171496A1 (en) Method and Electronic Device for Screen Projection
CN108282507B (en) Method and device for application release in CaaS environment and electronic equipment
CN113259529B (en) Connection using geographic telephone numbers
US10911378B2 (en) System and method for providing conversational contents
EP3677016A1 (en) Non-dsr distributed load balancer with virtualized vips and source proxy on load balanced connection
US20170171301A1 (en) Method, device and system for load balancing configuration
US20080205327A1 (en) Methods, Apparatuses, and Computer Program Products for Providing Dynamic Assignment of Slot Cycle Index for Network Nodes
JP2022545981A (en) Human-machine interaction processing method
CN101925158A (en) System and method for obtaining number detail
CN113612825A (en) Internet of things message middleware server cluster expansion method and system
CN112468574B (en) Processing method, device and system for application service publishing and subscribing mechanism
CN113300866A (en) Node capacity control method, device, system and storage medium
CN114710548B (en) Message forwarding method and device
CN114710496B (en) Multi-node load balancing method and device
CN104780591B (en) Business interoperability implementation method, device, system and relevant device between terminal device
CN111885664B (en) User equipment routing method and related product
CN114048028A (en) Service calling method and device, storage medium and electronic equipment
CN114567599A (en) Load control method and device
CN110365742A (en) More live load equilibrium application creation methods, device, computer equipment and storage medium
US20240089305A1 (en) Session initiation protocol (sip) based transfer of user information from an inviting user to an invited user
US20230144568A1 (en) Application-aware bgp path selection and forwarding
CN115514760A (en) Message routing method, device and computer readable storage medium
CN114253555A (en) Software service deployment method, electronic device and storage medium
WO2024088593A1 (en) Supporting multiaccess traffic steering in a wireless communication system

Legal Events

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