CN111614747A - Information processing method and device - Google Patents

Information processing method and device Download PDF

Info

Publication number
CN111614747A
CN111614747A CN202010418307.9A CN202010418307A CN111614747A CN 111614747 A CN111614747 A CN 111614747A CN 202010418307 A CN202010418307 A CN 202010418307A CN 111614747 A CN111614747 A CN 111614747A
Authority
CN
China
Prior art keywords
service
service node
value
node
security value
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.)
Granted
Application number
CN202010418307.9A
Other languages
Chinese (zh)
Other versions
CN111614747B (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.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN202010418307.9A priority Critical patent/CN111614747B/en
Publication of CN111614747A publication Critical patent/CN111614747A/en
Application granted granted Critical
Publication of CN111614747B publication Critical patent/CN111614747B/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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers

Abstract

The embodiment of the invention provides an information processing method and device, wherein the method comprises the following steps: receiving a service request to be processed sent by a user; the method comprises the steps of obtaining a security value of each service node in a target service cluster, wherein the target service cluster is used for providing service requested by a service request to be processed, and the security value of each service node represents the capability of each service node for responding to the service request; and according to the obtained security value, selecting a service node for responding to the service request to be processed from the service nodes in the target service cluster and responding to the service request to be processed. When the scheme provided by the embodiment is applied to information processing, the efficiency of responding to the user service request can be improved.

Description

Information processing method and device
Technical Field
The present invention relates to the field of computer technologies, and in particular, to an information processing method and apparatus.
Background
When a user needs to obtain a service provided by a service provider, a service request is generally sent to a front load node, after the front load node receives the service request of the user, the service node is selected from a service cluster corresponding to the server request according to a load balancing principle, a service interface of the service cluster is called to load the service request to the selected service node, and the selected service node responds to the service request.
However, network fluctuation may occur in the service nodes in the service cluster, or the number of service requests that need to be responded is large, and the like, and at this time, the service nodes are abnormal, and it is difficult to respond to the service requests in time, so that the efficiency of responding to the service requests of the users is low.
Disclosure of Invention
An object of the embodiments of the present invention is to provide an information processing method and apparatus, so as to improve efficiency of responding to a service request of a user. The specific technical scheme is as follows:
in a first aspect, the present invention provides an information processing method, including:
receiving a service request to be processed sent by a user;
the method comprises the steps of obtaining a security value of each service node in a target service cluster, wherein the target service cluster is used for providing service requested by the service request to be processed, and the security value of each service node represents the capability of each service node for responding to the service request;
and according to the obtained security value, selecting a service node for responding to the service request to be processed from the service nodes in the target service cluster and responding to the service request to be processed.
In an embodiment of the present invention, the method further includes:
adjusting the security value of each service node in real time according to the following modes:
when the time length of the service node responding to the service request exceeds the preset time length or the residual available resources of the service node reach the preset resource threshold value or the service node fails to respond to the service request, reducing the safety value of the service node;
and when the time length of the service node responding to the service request does not exceed the preset time length, increasing the safety value of the service node.
In an embodiment of the present invention, after the adjusting the security value of each service node, the method further includes:
when the adjusted safety value of the service node is smaller than a preset safety value threshold value, removing the service node from the service cluster;
and adding the removed service nodes into the service cluster again according to the preset interval duration until the addition is successful.
In an embodiment of the present invention, after the adjusting the security value of each service node, the method further includes:
when the adjusted security value of the service node exceeds a preset security value range, normalizing the security value of each service node according to the following expression:
Figure BDA0002495858890000021
wherein i is a serial number of the service node, w (i) is a security value of the ith service node, sum is a sum of the security values of the service nodes, B is a maximum value of a preset security value range, and a (i) is a security value obtained by normalizing the ith service node.
In an embodiment of the present invention, the obtaining a security value of each service node in the target service cluster includes:
and acquiring the security value of each service node from the path of each service node registered in the distributed coordination service.
In a second aspect, the present invention provides an information processing apparatus comprising:
the request receiving module is used for receiving a service request to be processed sent by a user;
a security value obtaining module, configured to obtain a security value of each service node in a target service cluster, where the target service cluster is configured to provide a service requested by the service request to be processed, and the security value of each service node indicates a capability of each service node to respond to the service request;
and the service node selection module is used for selecting a service node for responding to the service request to be processed from the service nodes in the target service cluster according to the obtained security value and responding to the service request to be processed.
In an embodiment of the present invention, the apparatus further includes: a security value adjustment module comprising:
the safety value reduction submodule is used for reducing the safety value of the service node when the time length of the service node responding to the service request exceeds the preset time length, or the residual available resources of the service node reach the preset resource threshold value, or the service node fails to respond to the service request;
and the safety value increasing submodule is used for increasing the safety value of the service node when the time length of the service node responding to the service request does not exceed the preset time length.
In an embodiment of the present invention, the apparatus further includes:
the service node removing module is used for removing the service node from the registration path after the safety value adjusting module and when the adjusted safety value of the service node is smaller than a preset safety value threshold value;
and the service node registration module is used for registering the removed service node under the registration path again according to the preset interval duration until the registration is successful.
In an embodiment of the present invention, the apparatus further includes:
the safety value processing module is used for normalizing the safety value of each service node according to the following expression when the adjusted safety value of the service node exceeds a preset safety value range:
Figure BDA0002495858890000031
wherein i is a serial number of the service node, w (i) is a security value of the ith service node, sum is a sum of the security values of the service nodes, B is a maximum value of a preset security value range, and a (i) is a security value obtained by normalizing the ith service node.
In an embodiment of the present invention, the security value obtaining module is specifically configured to obtain the security value of each service node from a path where each service node registers in the distributed coordination service.
In a third aspect, the present invention provides an electronic device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus;
a memory for storing a computer program;
a processor configured to implement the method steps of the first aspect when executing the program stored in the memory.
In a fourth aspect, the present invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the method steps of the first aspect described above.
As can be seen from the above, when the scheme provided by the embodiment is applied to information processing, a service request to be processed sent by a user is received; and acquiring the security value of each service node in the target service cluster, selecting a service node for responding to the service request to be processed from the service nodes in the target service cluster according to the acquired security value, and responding to the service request to be processed. The safety value of each service node can represent the capability of each service node for responding to the service request, so that the determined service node for responding to the service request to be processed is determined according to the capability of each service node for responding to the service request, the determined service node can timely respond to the service request, and the efficiency of responding to the service request of the user is improved.
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 described below.
Fig. 1 is a schematic flowchart of an information processing method according to an embodiment of the present invention;
FIG. 2 is a block diagram of an information handling system according to an embodiment of the present invention;
fig. 3 is a schematic flow chart illustrating a process of adjusting a security value according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an information processing apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention.
In response to a service request of a user, because the prior art has a problem of low efficiency in responding to the service request of the user, embodiments of the present invention provide an information processing method and apparatus to solve the technical problem.
In one embodiment of the present invention, there is provided an information processing method including:
receiving a service request to be processed sent by a user;
the method comprises the steps of obtaining a security value of each service node in a target service cluster, wherein the target service cluster is used for providing service requested by a service request to be processed, and the security value of each service node represents the capability of each service node for responding to the service request;
and according to the obtained security value, selecting a service node for responding to the service request to be processed from the service nodes in the target service cluster and responding to the service request to be processed.
As can be seen from the above, when the scheme provided by the embodiment is applied to information processing, a service request to be processed sent by a user is received; and acquiring the security value of each service node in the target service cluster, selecting a service node for responding to the service request to be processed from the service nodes in the target service cluster according to the acquired security value, and responding to the service request to be processed. The safety value of each service node can represent the capability of each service node for responding to the service request, so that the determined service node for responding to the service request to be processed is determined according to the capability of each service node for responding to the service request, the determined service node can timely respond to the service request, and the efficiency of responding to the service request of the user is improved.
Referring to fig. 1, fig. 1 is a schematic flow chart of an information processing method according to an embodiment of the present invention, where the method includes S101 to S103.
S101: and receiving a service request to be processed sent by a user.
The service request is used to request a service. For example: the service request may be: for requesting video playing services, page browsing services, etc.
The execution subject of the embodiment of the present invention may be a front management node, where the front management node is: and the management node is arranged between the terminal equipment and each service cluster. The front load node can be a front server nginx. The preposed management node is used for carrying out unified management on each service cluster.
The executing agent of the embodiment of the present invention may also be a management node in each service cluster. The management node in the service cluster is used for managing each service node in the service cluster where the management node is located.
S102: and obtaining the security value of each service node in the target service cluster.
The target service cluster is used for providing the service requested by the service request to be processed. The target service cluster may include a plurality of service nodes, each for providing a service. The service node may correspond to one server or a plurality of servers.
The security value of each service node represents the capability of each service node to respond to the service request. Specifically, the security value of each service node may be positively correlated with the capability of each service node to respond to the service request, for example: when the service node has higher capability of responding to the service request, the security value of the service node is also higher; when the service node has a low ability to respond to service requests, the security value of the service node is also low.
Because the service nodes are affected by network fluctuation, the number of service requests to be responded by the service nodes, the remaining available resources of the service nodes and other factors when responding to the service requests, the capability of each service node responding to the service requests, that is, the security value of each service node, is different.
Specifically, when the network fluctuation is large, the capability of the service node responding to the service request is weak, and when the capability of the service node responding to the service request is weak, the security value of the service node is correspondingly low; when the network fluctuation is small, the service node has strong capability of responding to the service request, and when the service node has strong capability of responding to the service request, the security value of the service node is correspondingly high.
When the number of the service requests to be responded by the service node is large, the service node has weaker capability of responding to the service requests, and when the service node has weaker capability of responding to the service requests, the security value of the service node is correspondingly lower; when the number of the service requests to be responded by the service node is small, the service node has strong capability of responding to the service requests, and when the service node has strong capability of responding to the service requests, the security value of the service node is correspondingly high.
Since the above security value may be recorded in each service node, it may also be recorded in a management node for managing each service node. Therefore, each service node in the service cluster for providing the service requested by the service request to be processed can be determined according to the service identifier carried in the service request to be processed, and the security value of each service node can be obtained from the security value of each service node recorded by each service node or the management node.
S103: and according to the obtained security value, selecting a service node for responding to the service request to be processed from the service nodes in the target service cluster and responding to the service request to be processed.
Since the security value of each node is used to indicate the capability of each service node to respond to the service request. Therefore, in order to respond to the service request of the user in time, a service node of a security value reflecting the capability of the service node to respond to the service request in time can be selected as the service node responding to the service request to be processed from the obtained security values.
Specifically, when selecting a service node for responding to the pending service request, assuming that the security value of each service node is positively correlated with the capability of each service node to respond to the service request, a service node with a higher security value may be selected as the service node responding to the pending service request, for example, the service node with the highest security value is selected as the service node responding to the pending service request.
For example: assume that there are 3 service nodes in the service cluster, which are: the service node a can be determined as a service node responding to the pending service request.
And when receiving the service requests to be processed sent by the N users, sequentially taking the service nodes with the highest safety values as the service nodes responding to the service requests to be processed. For example: assuming that the service requests to be processed sent by 3 users are received, the service nodes may be arranged in the order of security value from large to small, and the service nodes arranged in the first 3 may be used as the service nodes responding to the service requests to be processed.
After determining the service node for responding to the pending service request, the service node may send an instruction for responding to the pending service request to the selected service node, and after receiving the instruction, the service node responds to the pending service request.
As can be seen from the above, when the scheme provided by the embodiment is applied to information processing, a service request to be processed sent by a user is received; and acquiring the security value of each service node in the target service cluster, selecting a service node for responding to the service request to be processed from the service nodes in the target service cluster according to the acquired security value, and responding to the service request to be processed. The safety value of each service node can represent the capability of each service node for responding to the service request, so that the service node determined for responding to the service request to be processed is determined according to the capability of each service node for responding to the service request, the determined service node can timely respond to the service request, and the efficiency of responding to the service request of the user is improved.
The service node used for responding to the user pending service request is determined according to the security value of the service node. Therefore, in order to determine the service node for responding to the service request more accurately, the security value of the service node may be adjusted according to the operation condition, parameter data, and the like of each service node.
In an embodiment of the present invention, the security value of each service node may be adjusted in real time in the following manner:
in the first mode, when the time length of the service node responding to the service request exceeds the preset time length, or the remaining available resources of the service node reach the preset resource threshold value, or the service node fails to respond to the service request, the security value of the service node is reduced.
The preset time period may be 1s or 2 s. When the time length of the service node responding to the service request exceeds the preset time length, the service node request is considered to be overtime or abnormal response. In this case, the service node cannot respond to the user request in time, and thus the security value of the service node can be reduced.
When the service node is in the condition of request timeout or abnormal response, a request timeout state code or a specified abnormal code is sent to the user. Therefore, the security value of the service node responding to the user service request can be reduced in real time according to the status code received by the user.
The remaining available resources of the service node may be understood as: the service node is currently able to provide the available resources of the service to the user. The resources of the serving node may include: and resources such as a CPU (central processing unit) and a memory of the service node.
Because the service node is in a working state all the time, if the current service node occupies a large amount of resources, the remaining available resources are small, which may result in failure to respond to the user service request in time, and thus the security value of the service node may be reduced.
The preset resource threshold may be set by a worker according to experience, and when the remaining available resources of the service node reach the preset resource threshold, it may be considered that the current service node cannot respond to the user service request in time.
When the service node fails to respond to the service request, the service node indicates that the current service node cannot provide the service normally. The service node is usually monitored at regular time, and if it is monitored that the memory of the service node is insufficient, overflows, and the frequency of Full GC (Collection of aged refuse) is too high, it can be considered that the service node cannot normally provide service and is in a service false death state. In this case, the security value of the service node can be greatly reduced.
When the security value of the service node is reduced, the corresponding reduction may be performed according to a fixed reduction value. For example: when the time length of the service node responding to the service request exceeds the preset time length, subtracting 5 from the safety value of the service node; when the remaining available resources of the service node reach a preset resource threshold value, subtracting 10 from the security value of the service node; when the service node fails to respond to the service request, the security value of the service node is reduced to 0.
In the second mode, when the time length of the service node responding to the service request does not exceed the preset time length, the safety value of the service node is increased.
The preset time period may be 1s or 2 s. When the time length of the service node responding to the service request does not exceed the preset time length, the service node can be considered to respond normally. In this case, the security value of the service node may be increased.
Therefore, the safety value of each service node is adjusted in real time based on the current service state of each service node, and when the service node used for responding to the service request to be processed of the user is determined according to the safety value of the service node, the service node responding to the service request to be processed is determined more accurately according to the current service state of each service node, so that the service node capable of responding to the service request to be processed of the user in time is determined.
In an embodiment of the present invention, after the adjusting the security value of each service node, the following steps a1 to a2 may be further included.
Step A1: and when the adjusted safety value of the service node is smaller than the preset safety value threshold, removing the service node from the service cluster.
The preset safety value threshold may be set by a worker according to experience.
When the adjusted security value of the service node is smaller than the preset security value threshold, it indicates that the service node cannot provide the service normally. In this case, in order to ensure that the service node can provide the service normally, the service node may be removed from the service cluster, and then the service node may be subjected to fault diagnosis.
Specifically, the service node can be offline processed and restarted, and meanwhile, operation and maintenance personnel are notified by short messages, telephones and the like.
When each service node can register in a registration path under the distributed coordination service, in an embodiment of the present invention, when the adjusted security value of the service node is smaller than the preset security value threshold, the service node may be removed from the registration path.
Step A2: and adding the removed service nodes into the service cluster again according to the preset interval duration until the addition is successful.
The preset interval time may be 1s, 2s, etc.
Specifically, if the adding is successful, an initial security value may be assigned to the newly added service node. If the adding is unsuccessful, the adding is continued according to the preset interval duration until the adding is successful.
When each service node can register in the registration path under the distributed coordination service, in an embodiment of the present invention, the removed service node may be re-registered in the registration path according to a preset interval duration until the registration is successful.
Specifically, if the registration is successful, an initial security value may be assigned to the service node that is newly registered. If the registration is unsuccessful, continuing to register according to the preset interval duration until the registration is successful.
Therefore, the service nodes with the safety values smaller than the preset safety value threshold value in the adjusted service nodes are removed from the service cluster, and the service nodes are added to the service cluster again when the service nodes can work normally, so that the working efficiency of the service nodes for providing services is improved.
On the basis of the foregoing embodiment, after the security value of each service node is adjusted in real time, in an embodiment of the present invention, when the adjusted security value of the service node exceeds a preset security value range, the security value of each service node may be normalized according to the following expression:
Figure BDA0002495858890000101
wherein i is a serial number of the service node, w (i) is a security value of the ith service node, sum is a sum of the security values of the service nodes, B is a maximum value of a preset security value range, and a (i) is a security value obtained by normalizing the ith service node.
The preset safety value range is set by the staff according to experience and can be [0,100 ]. The adjusted security value of the service node can be any value, so that the security value can be managed conveniently and uniformly, subsequent processing can be performed on the security value, and the security value of each service node can be normalized when the adjusted security value of the service node exceeds a preset security value range.
Therefore, the security values of the service nodes are normalized, the security values of the service nodes are unified to a fixed range, the security values can be conveniently and uniformly managed, and subsequent processing is performed on the security values.
In an embodiment of the present invention, each service node may register a path in the distributed coordination service, and in view of this, the obtaining of the security value of each service node in the target service cluster in S102 may be implemented in the following manner.
And acquiring the security value of each service node from the path of each service node registered in the distributed coordination service.
In order to conveniently and uniformly manage each service node, each service node can be registered with a registration path in the distributed coordination service, so that the security value of each service node can be obtained relatively quickly based on the registration path in the distributed coordination service.
Specifically, when the security value of each service node in the target service cluster is obtained in the registration path, all available services and the security value of each service node can be obtained by reading the service nodes in the registration path.
The distributed coordination service may be a Zookeeper, and a path in which each service node registers in the Zookeeper may be a Zookeeper/registration/scoreService.
Specifically, during registration, a load monitor sdk (Software Development Kit) component may be created, where the load monitor sdk is configured to register each service node in a registration path, and specifically, each service node inherits the load monitor sdk component in a jar package reference manner, so that each service node may register in the registration path in the distributed coordination service.
After each service node is registered in the registration path, the worker can assign an initial security value and a security value range to each service node under the registration path according to experience. For example: the safe value range may be [0,100], with an initial safe value of 50. And adjusting the safety value of each service node in real time according to the service state of each service node. And when the adjusted safety value of the service node is lower than the preset threshold value, removing the service node from the registration path.
Therefore, after each service node is registered in the registration path of the distributed coordination service, the security value of each service node can be quickly obtained through the registration path, and the service nodes can be conveniently managed in a unified manner and adjusted in security value.
Referring to fig. 2, fig. 2 is a block diagram of an information processing system according to an embodiment of the present invention. Fig. 2 includes Zookeeper, service node 1, service node 2, and service node 3.
The service node 1, the service node 2, and the service node 3 are registered in the registration path in the Zookeeper.
The Zookeeper is used for receiving the user service request and determining a service node for responding to the user service request.
The service node 1, the service node 2 and the service node 3 are service nodes in the same service cluster and are used for providing services for users.
The process of adjusting the security value of each service node is described in detail below according to a specific example.
Referring to fig. 3, fig. 3 is a schematic diagram illustrating a process for adjusting a security value according to an embodiment of the present invention.
Fig. 3 relates to five conditions, wherein condition 1 is: whether the service node fails to respond to the service request is judged by the condition 2: whether the remaining available resources of the service node reach a preset resource threshold or not is determined as follows in condition 3: whether the time length of the service node responding to the service request exceeds a preset time length or not, wherein the condition 4 is as follows: whether the adjusted security value of the service node is smaller than a preset security value threshold or not, wherein the condition 5 is as follows: whether the adjusted safety value of the service node exceeds a preset safety value range or not.
Specifically, when the determination result that the security value of the service node satisfies any one of the conditions 1, 2, and 3 is yes, the security value of the service node is decreased.
And when the judgment result that the security value of the service node meets any one of the conditions 1 and 2 is negative, the security value of the service node is not changed.
And when the judgment result that the safety value of the service node meets the condition 3 is negative, increasing the safety value of the service node.
And when the judgment result that the adjusted security value of the service node meets the condition 4 is yes, removing the service node from the registration path in which the service node is registered under the distributed coordination service, and re-registering the service node under the registration path according to the preset interval duration.
And when the judgment result that the adjusted security value of the service node meets the condition 5 is yes, normalizing the security value of each service node.
And when the adjusted safety value of the service node meets the judgment result of any one of the conditions 4 and 5, ending the process.
Corresponding to the information processing method, the embodiment of the invention also provides an information processing device.
Referring to fig. 4, fig. 4 is a schematic structural diagram of an information processing apparatus according to an embodiment of the present invention, where the apparatus includes 401 and 403.
A request receiving module 401, configured to receive a service request to be processed sent by a user;
a security value obtaining module 402, configured to obtain a security value of each service node in a target service cluster, where the target service cluster is configured to provide a service requested by the service request to be processed, and the security value of each service node indicates a capability of each service node to respond to the service request;
a service node selecting module 403, configured to select a service node for responding to the to-be-processed service request from the service nodes in the target service cluster according to the obtained security value, and respond to the to-be-processed service request.
As can be seen from the above, when the scheme provided by the embodiment is applied to information processing, a service request to be processed sent by a user is received; and acquiring the security value of each service node in the target service cluster, selecting a service node for responding to the service request to be processed from the service nodes in the target service cluster according to the acquired security value, and responding to the service request to be processed. The safety value of each service node can represent the capability of each service node for responding to the service request, so that the determined service node for responding to the service request to be processed is determined according to the capability of each service node for responding to the service request, the determined service node can timely respond to the service request, and the efficiency of responding to the service request of the user is improved.
In an embodiment of the present invention, the apparatus further includes: a safety value adjusting module for adjusting the safety value of the vehicle,
the security value adjustment module comprises:
the safety value reduction submodule is used for reducing the safety value of the service node when the time length of the service node responding to the service request exceeds the preset time length, or the residual available resources of the service node reach the preset resource threshold value, or the service node fails to respond to the service request;
and the safety value increasing submodule is used for increasing the safety value of the service node when the time length of the service node responding to the service request does not exceed the preset time length.
Therefore, the safety value of each service node is adjusted in real time based on the current service state of each service node, and when the service node used for responding to the service request to be processed of the user is determined according to the safety value of the service node, the service node responding to the service request to be processed is determined more accurately according to the current service state of each service node, so that the service node capable of responding to the service request to be processed of the user in time is determined.
In an embodiment of the present invention, the apparatus further includes:
the service node removing module is used for removing the service node from the registration path after the safety value adjusting module and when the adjusted safety value of the service node is smaller than a preset safety value threshold value;
and the service node registration module is used for registering the removed service node under the registration path again according to the preset interval duration until the registration is successful.
Therefore, the service nodes with the safety values smaller than the preset safety value threshold value in the adjusted service nodes are removed from the service cluster, and the service nodes are added to the service cluster again when the service nodes can work normally, so that the working efficiency of the service nodes for providing services is improved.
In an embodiment of the present invention, the apparatus further includes:
the safety value processing module is used for normalizing the safety value of each service node according to the following expression when the adjusted safety value of the service node exceeds a preset safety value range:
Figure BDA0002495858890000141
wherein i is a serial number of the service node, w (i) is a security value of the ith service node, sum is a sum of the security values of the service nodes, B is a maximum value of a preset security value range, and a (i) is a security value obtained by normalizing the ith service node.
Therefore, the security values of the service nodes are normalized, the security values of the service nodes are unified to a fixed range, the security values can be conveniently and uniformly managed, and subsequent processing is performed on the security values.
In an embodiment of the present invention, the security value obtaining module is specifically configured to obtain the security value of each service node from a path where each service node registers in the distributed coordination service.
Therefore, after each service node is registered in the registration path of the distributed coordination service, the security value of each service node can be quickly obtained through the registration path, and the service nodes can be conveniently managed in a unified manner and adjusted in security value.
Referring to fig. 5, fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, including a processor 501, a communication interface 502, a memory 503 and a communication bus 504, where the processor 501, the communication interface 502 and the memory 503 complete communication with each other through the communication bus 504,
a memory 503 for storing a computer program;
the processor 501 is configured to implement the steps of the information processing method provided in the embodiment of the present invention when executing the program stored in the memory 503.
The communication bus mentioned in the above terminal may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the terminal and other equipment.
The Memory may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
In still another embodiment provided by the present invention, a computer-readable storage medium is further provided, which stores instructions that, when executed on a computer, cause the computer to execute the information processing method provided by the above-described embodiment.
In still another embodiment provided by the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the information processing method provided by the above-mentioned embodiment.
As can be seen from the above, when the scheme provided by the embodiment is applied to information processing, a service request to be processed sent by a user is received; and acquiring the security value of each service node in the target service cluster, selecting a service node for responding to the service request to be processed from the service nodes in the target service cluster according to the acquired security value, and responding to the service request to be processed. The safety value of each service node can represent the capability of each service node for responding to the service request, so that the determined service node for responding to the service request to be processed is determined according to the capability of each service node for responding to the service request, the determined service node can timely respond to the service request, and the efficiency of responding to the service request of the user is improved.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the apparatus, the electronic device and the storage medium embodiment, since they are substantially similar to the method embodiment, the description is relatively simple, and the relevant points can be referred to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (12)

1. An information processing method, characterized in that the method comprises:
receiving a service request to be processed sent by a user;
the method comprises the steps of obtaining a security value of each service node in a target service cluster, wherein the target service cluster is used for providing service requested by the service request to be processed, and the security value of each service node represents the capability of each service node for responding to the service request;
and according to the obtained security value, selecting a service node for responding to the service request to be processed from the service nodes in the target service cluster and responding to the service request to be processed.
2. The method of claim 1, further comprising:
adjusting the security value of each service node in real time according to the following modes:
when the time length of the service node responding to the service request exceeds the preset time length or the residual available resources of the service node reach the preset resource threshold value or the service node fails to respond to the service request, reducing the safety value of the service node;
and when the time length of the service node responding to the service request does not exceed the preset time length, increasing the safety value of the service node.
3. The method of claim 2, further comprising, after the adjusting the security value of each service node:
when the adjusted safety value of the service node is smaller than a preset safety value threshold value, removing the service node from the service cluster;
and adding the removed service nodes into the service cluster again according to the preset interval duration until the addition is successful.
4. The method of claim 2, further comprising, after the adjusting the security value of each service node:
when the adjusted security value of the service node exceeds a preset security value range, normalizing the security value of each service node according to the following expression:
Figure FDA0002495858880000011
wherein i is a serial number of the service node, w (i) is a security value of the ith service node, sum is a sum of the security values of the service nodes, B is a maximum value of a preset security value range, and a (i) is a security value obtained by normalizing the ith service node.
5. The method of claim 1, wherein obtaining the security value of each service node in the target service cluster comprises:
and acquiring the security value of each service node from the path of each service node registered in the distributed coordination service.
6. An information processing apparatus characterized in that the apparatus comprises:
the request receiving module is used for receiving a service request to be processed sent by a user;
a security value obtaining module, configured to obtain a security value of each service node in a target service cluster, where the target service cluster is configured to provide a service requested by the service request to be processed, and the security value of each service node indicates a capability of each service node to respond to the service request;
and the service node selection module is used for selecting a service node for responding to the service request to be processed from the service nodes in the target service cluster according to the obtained security value and responding to the service request to be processed.
7. The apparatus of claim 6, further comprising: a security value adjustment module comprising:
the safety value reduction submodule is used for reducing the safety value of the service node when the time length of the service node responding to the service request exceeds the preset time length, or the residual available resources of the service node reach the preset resource threshold value, or the service node fails to respond to the service request;
and the safety value increasing submodule is used for increasing the safety value of the service node when the time length of the service node responding to the service request does not exceed the preset time length.
8. The apparatus of claim 7, further comprising:
the service node removing module is used for removing the service node from the registration path after the safety value adjusting module and when the adjusted safety value of the service node is smaller than a preset safety value threshold value;
and the service node registration module is used for registering the removed service node under the registration path again according to the preset interval duration until the registration is successful.
9. The apparatus of claim 7, further comprising:
the safety value processing module is used for normalizing the safety value of each service node according to the following expression when the adjusted safety value of the service node exceeds a preset safety value range:
Figure FDA0002495858880000031
wherein i is a serial number of the service node, w (i) is a security value of the ith service node, sum is a sum of the security values of the service nodes, B is a maximum value of a preset security value range, and a (i) is a security value obtained by normalizing the ith service node.
10. The apparatus of claim 7,
the security value obtaining module is specifically configured to obtain a security value of each service node from a path in which each service node registers in the distributed coordination service.
11. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any one of claims 1 to 5 when executing a program stored in the memory.
12. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of the claims 1-5.
CN202010418307.9A 2020-05-18 2020-05-18 Information processing method and device Active CN111614747B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010418307.9A CN111614747B (en) 2020-05-18 2020-05-18 Information processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010418307.9A CN111614747B (en) 2020-05-18 2020-05-18 Information processing method and device

Publications (2)

Publication Number Publication Date
CN111614747A true CN111614747A (en) 2020-09-01
CN111614747B CN111614747B (en) 2023-03-10

Family

ID=72202026

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010418307.9A Active CN111614747B (en) 2020-05-18 2020-05-18 Information processing method and device

Country Status (1)

Country Link
CN (1) CN111614747B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103825785A (en) * 2014-03-24 2014-05-28 北京中电普华信息技术有限公司 Monitoring method and device of service node
EP3084605A1 (en) * 2013-12-18 2016-10-26 Telefonaktiebolaget LM Ericsson (publ) Method and network node for selecting a media processing unit
CN108156252A (en) * 2018-01-04 2018-06-12 北京奇艺世纪科技有限公司 A kind of data access method, device, server and client
CN108206768A (en) * 2016-12-20 2018-06-26 阿里巴巴集团控股有限公司 Cluster monitoring and switching method and device
CN108737573A (en) * 2018-06-28 2018-11-02 郑州云海信息技术有限公司 A kind of distributed storage cluster and its service response control method, device and equipment
CN108809848A (en) * 2018-05-28 2018-11-13 北京奇艺世纪科技有限公司 Load-balancing method, device, electronic equipment and storage medium
CN109274710A (en) * 2015-02-12 2019-01-25 广州神马移动信息科技有限公司 Network load balancing method, device and cluster service system
WO2019212395A1 (en) * 2018-04-30 2019-11-07 Telefonaktiebolaget Lm Ericsson (Publ) Method and network node for handling a service setup for a user equipment
CN110933136A (en) * 2019-10-31 2020-03-27 北京浪潮数据技术有限公司 Service node selection method, device, equipment and readable storage medium
CN111131401A (en) * 2019-12-05 2020-05-08 深圳市优必选科技股份有限公司 Service request response method and system

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3084605A1 (en) * 2013-12-18 2016-10-26 Telefonaktiebolaget LM Ericsson (publ) Method and network node for selecting a media processing unit
CN103825785A (en) * 2014-03-24 2014-05-28 北京中电普华信息技术有限公司 Monitoring method and device of service node
CN109274710A (en) * 2015-02-12 2019-01-25 广州神马移动信息科技有限公司 Network load balancing method, device and cluster service system
CN108206768A (en) * 2016-12-20 2018-06-26 阿里巴巴集团控股有限公司 Cluster monitoring and switching method and device
CN108156252A (en) * 2018-01-04 2018-06-12 北京奇艺世纪科技有限公司 A kind of data access method, device, server and client
WO2019212395A1 (en) * 2018-04-30 2019-11-07 Telefonaktiebolaget Lm Ericsson (Publ) Method and network node for handling a service setup for a user equipment
CN108809848A (en) * 2018-05-28 2018-11-13 北京奇艺世纪科技有限公司 Load-balancing method, device, electronic equipment and storage medium
CN108737573A (en) * 2018-06-28 2018-11-02 郑州云海信息技术有限公司 A kind of distributed storage cluster and its service response control method, device and equipment
CN110933136A (en) * 2019-10-31 2020-03-27 北京浪潮数据技术有限公司 Service node selection method, device, equipment and readable storage medium
CN111131401A (en) * 2019-12-05 2020-05-08 深圳市优必选科技股份有限公司 Service request response method and system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
于天放等: "基于软件定义网络的服务器集群负载均衡技术研究", 《电子与信息学报》 *
何欣等: "混合群智感知中服务节点优化选择机制", 《计算机科学》 *

Also Published As

Publication number Publication date
CN111614747B (en) 2023-03-10

Similar Documents

Publication Publication Date Title
CN112075055B (en) Using self-operating use cases to identify and resolve problems causing network slice reselection
CN108737132B (en) Alarm information processing method and device
US20070168201A1 (en) Formula for automatic prioritization of the business impact based on a failure on a service in a loosely coupled application
CN113067875B (en) Access method, device and equipment based on dynamic flow control of micro-service gateway
WO2019034095A1 (en) Software processing method and apparatus, electronic device and computer-readable storage medium
CN110430070B (en) Service state analysis method, device, server, data analysis equipment and medium
CN111556125A (en) Access request distribution method, load balancing equipment and electronic equipment
CN110069217B (en) Data storage method and device
CN111949421B (en) SDK calling method, device, electronic equipment and computer readable storage medium
CN111614747B (en) Information processing method and device
CN115412609B (en) Service processing method, device, server and storage medium
CN110955587A (en) Method and device for determining equipment to be replaced
CN115037653B (en) Service flow monitoring method, device, electronic equipment and storage medium
CN115296979B (en) Fault processing method, device, equipment and storage medium
KR20110037969A (en) Targeted user notification of messages in a monitoring system
CN114090268B (en) Container management method and container management system
CN113849160B (en) Dynamic migration method and device for compiling tasks, electronic equipment and storage medium
CN112214437B (en) Storage device, communication method and device and computer readable storage medium
CN110851286B (en) Thread management method and device, electronic equipment and storage medium
CN110113187B (en) Configuration updating method and device, configuration server and configuration system
CN114090293A (en) Service providing method and electronic equipment
CN110932926A (en) Container cluster monitoring method, system and device
CN111464357A (en) Resource allocation method and device
CN110955579A (en) Ambari-based large data platform monitoring method
CN112087336B (en) Deployment and management method and device of virtual IP service system and electronic equipment

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