Information processing method and related equipment

By introducing a dynamic weight management mechanism in gRPC technology, and adjusting the server weight according to the response, the low reliability problem caused by static access policies in the existing technology is solved, and the stability and exception handling capabilities of the service are improved.

CN119155336APending Publication Date: 2024-12-17MASHANG CONSUMER FINANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411218380.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2024-12-17

AI Technical Summary

Technical Problem

In the existing gRPC technology, the access policy is globally centrally configured, which causes the client to be unable to dynamically adjust when accessing services, resulting in access exceptions and low service reliability.

Method used

By introducing a dynamic weight management mechanism between the client and the server, adjusting the weight of the server according to the response, dynamically adjusting the access policy and selecting the optimal server for requests.

Benefits of technology

It improves the reliability of the client to obtain services, reduces abnormal situations during access, and improves the stability of the service.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119155336A_ABST
    Figure CN119155336A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an information processing method and related equipment, and the method comprises the steps that a first client determines a first server in a plurality of servers based on a plurality of first weights; the plurality of servers are in one-to-one correspondence with a plurality of first weights, and the first weights are used for representing the weight of the first client requesting the first service through the servers; the first weight corresponding to the first server is greater than the first preset weight; sending a first request for requesting a first service to a first server; receiving a first response for the first request; and adjusting a first weight corresponding to the first server according to the first response. By adopting the method provided by the invention, the weight of accessing the server by the client is dynamically managed, so that the client can dynamically adjust the access strategy according to the size of the weight, the abnormal condition in the access process is reduced, and the reliability of acquiring the service by the client is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of information processing technology, and in particular to an information processing method, apparatus, computer equipment, storage medium and computer program product. Background Art

[0002] Remote procedure call (RPC) refers to the process in which a client accesses a server interface through a network request, and the server returns the request result data to the client. gRPC is an open source RPC implementation that uses protobuf (protocol buffers) to define interfaces and data structures. The relevant gRPC process includes starting the server process; configuring service policies through the service configuration platform, including configuration of circuit breaker policies, downgrade policies, access policies, etc.; the client accesses the service configuration platform to query server information; and the client accesses the server through server information and access policies.

[0003] The disadvantage of this process is that the access policy is globally and centrally configured, and all clients execute the same static access policy. The static policy is not the best policy in practice and will cause clients to encounter more access exceptions, thereby reducing the reliability of the service. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide an information processing method, apparatus, computer equipment, storage medium and computer program product.

[0005] In a first aspect, an information processing method provided by an embodiment of the present application is applied to a first client in an information processing system, and the information processing system also includes multiple server terminals; the method includes: based on multiple first weights, determining a first server terminal among multiple server terminals; the multiple server terminals correspond one-to-one to the multiple first weights, and the first weight is used to characterize the weight of the first client requesting a first service through the server terminal; the first weight corresponding to the first server terminal is greater than the first preset weight; sending a first request for requesting a first service to the first server terminal; receiving a first response to the first request; and adjusting the first weight corresponding to the first server terminal according to the first response.

[0006] In the embodiment of the present application, the first client selects to request the first service from the first server according to the first weight corresponding to the request to the first client, and then adjusts the first weight according to the first response of the first client to the request. This process dynamically manages the weight of the client accessing the server, so that the client can dynamically adjust the access policy according to the size of the weight, reduce abnormal situations in the access process, and improve the reliability of the client obtaining services.

[0007] In a second aspect, an embodiment of the present application provides an information processing device, the device comprising:

[0008] A determination unit is used to determine a first server among multiple server ends based on multiple first weights; the multiple server ends correspond one-to-one to the multiple first weights, and the first weight is used to characterize the weight of the first client requesting a first service through the server end; the first weight corresponding to the first server end is greater than the first preset weight; a transceiver unit is used to send a first request for requesting the first service to the first server end; and receive a first response to the first request; a processing unit is used to adjust the first weight corresponding to the first server end according to the first response.

[0009] In a third aspect, an embodiment of the present application provides a computer device, the device comprising:

[0010] A processor; and a memory arranged to store computer executable instructions, the executable instructions being configured to be executed by the processor, the executable instructions comprising instructions for executing the steps in the method as described in the first aspect.

[0011] In a fourth aspect, an embodiment of the present application provides a storage medium, wherein the storage medium is used to store computer-executable instructions, and the executable instructions enable a computer to execute the steps in the method described in the first aspect.

[0012] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes: a computer program code, and when the computer program code is executed by a computer, the computer executes the method shown in the above-mentioned first aspect or any possible implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0014] Figure 1 A schematic diagram of a communication architecture provided for an embodiment of the present application.

[0015] Figure 2A A flowchart of an information processing method provided in an embodiment of the present application.

[0016] Figure 2B A schematic diagram of a client management weight provided in an embodiment of the present application.

[0017] Figure 2CA flow chart of a method for accessing services based on dynamic weight management provided in an embodiment of the present application.

[0018] Figure 3A A flowchart of another information processing method provided in an embodiment of the present application.

[0019] Figure 3B A schematic diagram of a method for obtaining weights corresponding to function services provided in an embodiment of the present application.

[0020] Figure 4A A flowchart of another information processing method provided in an embodiment of the present application.

[0021] Figure 4B A schematic diagram of a process for managing weights based on the sending status of third information provided in an embodiment of the present application.

[0022] Figure 5 A schematic diagram of the module composition of the information processing device provided in an embodiment of the present application.

[0023] Figure 6 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0024] In order to enable those skilled in the art to better understand the technical solutions in one or more of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only one or more partial embodiments of the present application, rather than all embodiments. Based on one or more embodiments of the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0025] It should be noted that, in the absence of conflict, one or more embodiments and features in the embodiments of the present application may be combined with each other. The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0026] First, the prior art of the embodiments of the present application is introduced with reference to the drawings.

[0027] like Figure 1 As shown, it is a schematic diagram of a communication architecture provided by an embodiment of the present application. Figure 1As shown, the communication architecture includes one or more clients (Client) 110, one or more servers (Sever) 120, and a service configuration platform 130. The client is used to obtain the services that the server can provide through the service configuration platform, and access the corresponding policies of each service; the server is used to provide services; the service configuration platform is used to manage services and access service policies to implement the gRPC process.

[0028] Specifically, the gRPC implementation process may include the following steps:

[0029] 1. After the server process is started, register the service and report its own server information to the service configuration platform. The information includes but is not limited to: service identifier (ID), service endpoint information (IP and port), service supported capabilities and interfaces, etc.

[0030] 2. Execute service policy configuration through the service configuration platform to configure client access service policies, such as circuit breaker policies, downgrade policies, access policies, etc.

[0031] 3. After the client is started, service discovery is performed, that is, the client accesses the service configuration platform to query the server information, including the service-related information in steps 1 and 2. Finally, the client uses this service information and access policy to send requests to the server through RPC for data interaction.

[0032] In the prior art, access policies are globally and centrally configured on the service configuration platform. All clients execute the same static access policy, and no reasonable dynamic adjustment is made based on the client's own resources or network resources. That is, the service configuration platform does not know the network and hardware resource conditions of the client and server, and can only configure a unified access policy or make special access policies for certain instances. These are all static policies. Static policies are not the best policies in practice, and will cause clients to encounter more access anomalies, thereby reducing the reliability of the service.

[0033] For example, the client side includes C1 and C2; the server side includes S1, S2 and S3; the computer room includes DC1 and DC2;

[0034] Deployment: C1 and S1 are deployed in DC1, and C2, S2, and S3 are deployed in DC2;

[0035] The physical distance between DC1 and DC2 is relatively far, and the network latency is high;

[0036] The service configuration platform configures C1 and C2 to access the services of DC1 and DC2 without distinction.

[0037] However, when C1 accesses DC2's service (S2 or S3) or C2 accesses DC1's service (S1), RPC timeout may occur. In this case, the client is a static strategy, and a fixed ratio of cross-data center access exceptions will occur, resulting in low reliability of the client's service acquisition process.

[0038] Based on this, see Figure 2A , Figure 2A A flowchart of an information processing method provided in an embodiment of the present application, such as Figure 2A As shown, the method comprises the following steps:

[0039] 201. A first client determines a first server among multiple servers based on multiple first weights.

[0040] Among them, multiple servers correspond one-to-one to multiple first weights, and the first weight is used to represent the weight of the first client requesting the first service through the server; the first weight corresponding to the first server is greater than the first preset weight.

[0041] The first weight corresponding to each server indicates the probability of the first client requesting the first service through the server.

[0042] In an embodiment of the present application, the client manages the weights corresponding to each service accessed through each server. The larger the weight value, the greater the probability (or possibility, reliability, etc.) of requesting (or accessing) the service through the server; the smaller the weight value, the smaller the probability of accessing the service through the server.

[0043] For example, see Figure 2B , Figure 2B A schematic diagram of a client management weight provided in an embodiment of the present application, such as Figure 2B As shown in , the first client requests a service through a certain server, which can be called an access path. Each access path corresponds to a first weight. For example, the first weight corresponding to the first client requesting the first service (access path 1) through the first server is w1, and the first weight corresponding to the requesting the first service (access path 2) through the second server is w5, and so on. The first client cannot request the third service through the second server, so there is no corresponding weight setting.

[0044] Assuming w1>w5, it means that the probability that the first client requests the first service through the first server is higher than the probability that the first client requests the first service through the second server.

[0045] Optionally, in the initial state, the first client can generate an initial weight corresponding to the service requested through each server based on the service related information obtained from the service configuration platform. The service related information includes: which servers can provide each service, the capabilities and interfaces supported by the service, etc.

[0046] Optionally, the initial setting of the first weight is related to the communication distance between the first client and multiple servers, the communication mode (such as unicast communication or broadcast communication, etc.), the service provision mode (direct communication or transit communication, etc.), etc.

[0047] Optionally, the initial first weight is an indifferent default weight, such as 0.

[0048] The first weight corresponding to the first server is greater than the first preset weight. Exemplarily, the number of access paths corresponding to the first client accessing the first service is not limited. As long as the first weight of the access path is greater than the first preset weight, the first client accesses the first service through the path. The first weight corresponding to the first server is greater than the first preset weight, and accessing the first service through the first server is one of the access paths for the first client to access the first service.

[0049] Optionally, the first weight corresponding to the first server is one of the K largest values ​​among multiple first weights corresponding to multiple servers, K≥1 (ie, K is an integer greater than or equal to 1). Alternatively, the first weight corresponding to the first server is greater than the first preset weight.

[0050] For example, the first client needs to obtain the first service from K servers at the same time, so the first client sends the first information to the K servers with the largest first weight values ​​to request the first service. When selecting the K servers, the first weights of the N servers corresponding to the first service are sorted from large to small, and the first K servers are the largest first weights. The first weight corresponding to the first server is one of the K largest first weights.

[0051] In the case of K=1, the first weight corresponding to the first server is the one with the largest value. The first client obtains the first service only by accessing the first server.

[0052] 202. The first client sends a first request for a first service to the first server. Correspondingly, the first server receives the first request.

[0053] 203. The first server sends a first response according to the first information. Correspondingly, the first client receives the first response.

[0054] The first server receives the first request sent by the first client, and may send a first response to the first client in response to the first request.

[0055] Optionally, the first response includes data of the first service, or the first response indicates that the first service cannot be provided.

[0056] For example, after receiving the first information, the first server may send data of the first service to the first client according to the first service requested by the first client. Alternatively, assuming that the first server cannot provide data of the first service to the first client, the first response may indicate to the first server that the request for the first service has failed.

[0057] 204. The first client adjusts the first weight corresponding to the first server according to the first response.

[0058] After receiving the first response, the first client may determine how to adjust the first weight according to the content of the first response.

[0059] Optionally, if the first response includes data information corresponding to the first service, the first weight corresponding to the first server is adjusted to a second weight, and the second weight is greater than the first weight.

[0060] Optionally, if the first response does not include data information corresponding to the first service, the first weight corresponding to the first server is adjusted to a third weight, and the third weight is smaller than the first weight.

[0061] For example, assuming that the first response includes data information corresponding to the first service, it means that the first server can normally provide the first service to the first client, and the weight of the first client accessing the first service through the first server can be increased, so as to increase the probability of the first client requesting the first service through this path.

[0062] Assuming that the first response does not include data information corresponding to the first service, it may include prompt information such as "service request failed" or "service currently unavailable". In this case, the first server fails to provide the first service to the first client normally (access abnormality), and the weight of the first client accessing the first service through the first server can be reduced, so as to reduce the probability of the first client requesting the first service through this path.

[0063] Optionally, the first weight corresponding to the first server is adjusted according to the first response, including: if the delay of the first response is less than the first preset delay, the first weight corresponding to the first server is adjusted to a fourth weight, and the fourth weight is greater than the first weight; if the delay of the first response is greater than or equal to the first preset delay, the first weight corresponding to the first server is adjusted to a fifth weight, and the fifth weight is less than the first weight.

[0064] Exemplarily, if the first client receives the first response, there are two ways for the first client to adjust the first weight corresponding to the first server:

[0065] The first one: assuming that the delay of receiving the first response is less than the first preset delay, it means that the first server responds quickly, and the first weight corresponding to the first server is increased to the fourth weight with a larger amplitude.

[0066] The second type: assuming that the delay in receiving the first response is not less than (greater than or equal to) the first preset delay, it means that the first server responds slowly, and the first weight corresponding to the first server is increased to the fifth weight with a smaller amplitude.

[0067] Optionally, the delay of the first client receiving the first response is not less than the first preset delay, including the case where the first client does not receive the first response. In other words, if the first server does not receive the first response after the first preset delay, it can be assumed that the first client cannot receive the first response, and the first client no longer continues to wait for receiving the first response.

[0068] That is to say, the first client determines the adjustment method of the first weight corresponding to the first server according to the response delay of the first server, so that when the first client selects a server to access according to the first weight of the server, it has the opportunity to select a server with a faster response speed to request the first service.

[0069] Optionally, the impact of delay on the first weight corresponding to the first server may exist separately, for example, the fourth weight w14=w1+w4', the fifth weight w15=w1+w5', where w4' and w5' are related to whether the delay of the first response is greater than the first preset delay.

[0070] Optionally, the first delay of the first client receiving the first response may affect the first weight in combination with the factor of whether the first response includes data of the first service. 01 , the fifth weight w15=w1+w5'*w 01 , where w 01 Indicates the coefficient for increasing the weight when the first response includes data of the first service.

[0071] In the case where the first response does not include data of the first service, the fourth weight w14=w1+w4″*w 02 , the fifth weight w15=w1+w5″*w 02 , where w 02 represents the coefficient for reducing the weight when the first response does not include the data of the first service. 02 is a negative number. Alternatively, w4" or w5" is a negative number.

[0072] Optionally, the method further includes: determining a first preset delay based on a delay of at least one second response, the second response being a response fed back by the first server after the first client requests the first service through the first server before sending the first request.

[0073] Specifically, the first preset delay can be determined by the distribution ratio of historical delays. First, obtain the historical delay corresponding to the first historical response received by the first client. Assume that there are a total of 5 historical delays, namely 2ms, 3ms, 5ms, 1ms, and 2ms. The smaller the value, the higher the difficulty of achieving it. Therefore, being able to achieve a certain delay value means being less than the delay value. Then obtain the first preset ratio, assuming it is 80%. The delay that can be achieved with the first preset ratio refers to a delay that is less than or equal to the first 80%. In this example, it means that the first preset delay must be at least the first 5*80%=4 delays among the 5 historical delays. The first preset delay is 3ms.

[0074] Or, optionally, the first preset delay may be an absolute value that is directly set, such as 1s (second), 2ms (millisecond), 5ns (nanosecond), etc.

[0075] Optionally, the method further includes: the first client requests the first service from the first server based on the second weight / third weight / fourth weight / fifth weight. That is, the first client initiates a request to the first server to access the first service based on the adjusted weight.

[0076] In the above embodiment, the client selects the server to access based on the dynamic weight management strategy. The complete flowchart can be found in Figure 2C , Figure 2C A flow chart of a method for accessing services based on dynamic weight management provided in an embodiment of the present application, such as Figure 2C As shown in , the method includes the process in the figure.

[0077] Among them, the client initiates an RPC request, which means that the client requests the first service (data) from the server. Selecting the server according to the weight ratio means determining the probability of selecting a certain server to request the first service according to the weight value. Request duration refers to the delay for the client to receive the first response. A normal request result refers to the situation where the client receives the first response and the first response includes service data. Abnormal request results include the two situations that the first response received by the client does not include service data and the client does not receive the first response within the specified time.

[0078] It can be seen that in the embodiment of the present application, the first client selects to request the first service from the first server according to the first weight corresponding to the request to the first client, and then adjusts the first weight according to the first response of the first client to the request. This process dynamically manages the weight of the client accessing the server, so that the client can dynamically adjust the access policy according to the size of the weight, reduce abnormal situations in the access process, and improve the reliability of the client obtaining services.

[0079] The above embodiment describes the corresponding weight dynamic adjustment method when the first service is accessed as a whole. In other cases, the first service may include multiple functions, and differentiated weight management can be performed for each function. This is described in detail in the embodiments of this application.

[0080] See also Figure 3A , Figure 3A A flowchart of another information processing method provided in an embodiment of the present application, the method comprising the following steps:

[0081] 301. A first client sends a first request for calling a first function to a first server.

[0082] The first function is one of multiple functions corresponding to the first service.

[0083] The first weight is used to represent the weight of the first client requesting the first function through the server. The first weight corresponding to the first server is greater than the first preset weight.

[0084] In some cases, a service consists of multiple functions, and the functions are independent of each other. The same server may have different reliability for different functions. For example, assuming that the first service includes function A (first function) and function B (second function), for function A, the first server can provide a response with a delay of less than 1ms, while for function B, the first server can only provide a response with a delay of less than 10ms. If the first service of the first client requests the first server, it may slow down the process of the entire first service. In this case, if other servers can provide services with lower latency for function B, the first client can request the service of function B from other servers. Therefore, optionally, the method may also include the following step 302:

[0085] 302. The first client sends a second request to the second server for calling a second function.

[0086] Exemplarily, in this embodiment, the first client can call the second function through the second server and the first server, and calling the second function through each server corresponds to the sixth weight. Among multiple sixth weights, the sixth weight corresponding to the second server is the largest, indicating that the reliability of calling the second function through the second server is higher. Therefore, the first client can request to call the first function from the first server and request to call the second function from the second server.

[0087] 303. The first server sends a first response to the first client. Correspondingly, the first client receives the first response.

[0088] The first response includes service data of the first function, or the first response indicates that the service data of the first function cannot be provided.

[0089] 304. The first client adjusts the first weight corresponding to the first server according to the first response.

[0090] Corresponding to step 302, the method may further include the following steps 305-306:

[0091] 305. The second server sends a fourth response to the first client, and correspondingly, the first client receives the fourth response.

[0092] The fourth response includes the service data of the second function, or the fourth response indicates that the service data of the second function cannot be provided.

[0093] 306. The first client adjusts the sixth weight corresponding to the second server according to the fourth response.

[0094] Consistent with the above description, the first client can adjust the weight corresponding to calling the second function through a certain client according to the received response information. For example, the weight of the first client calling the second function through each server corresponds to the sixth weight (in order to distinguish the first weight of calling the first function). Then the first client can adjust the sixth weight corresponding to the second server based on the fourth response from the second server. So that the next time the second function needs to be called, the access path is selected according to the adjusted sixth weight. So as to always maintain high reliability of the client calling the second function.

[0095] There is no obvious sequence between the above steps 301 and 302, and between steps 303-304 and steps 305-306. The execution order of the corresponding steps can be swapped in the embodiment of the present application.

[0096] By adopting the method of the embodiment of the present application, for the request of the first service, the first client can perform weight management on a function basis, and then select the service path of the requested function according to the weight of each function. This can avoid the problem that the reliability of the access process of the entire first service is low due to the low reliability of a certain function in the process of requesting the first service. With a smaller granularity, the reliability of the access process is further improved.

[0097] Optionally, the method also includes: the first client receives feedback information from at least one second client, the feedback information including latency information of at least one second client calling the first function; and determines a first weight corresponding to the first client calling the first function based on the latency information of at least one second client calling the first function.

[0098] See also Figure 3B , Figure 3BA schematic diagram of a method for obtaining a weight corresponding to a function service provided in an embodiment of the present application, such as Figure 3B As shown, in the initial state, the first client may not know the first weight corresponding to calling the first function (and the second function) in the first service through multiple servers. At this time, the first client can receive feedback information from the second client. The feedback information includes the latency information corresponding to other clients calling the first function (and the second function) in the first service through each server. Figure 3B The second client includes client 02 and client 03, and the feedback information includes the corresponding delay information T11 and T12 when client 02 calls the first function and the second function, and the corresponding delay information T21 and T22 when client 03 calls the first function and the second function. The first client determines the first weight of the second client calling the first function (and the second function) through each server based on these delay information. The method of converting delay and weight can be specifically referred to the relevant description of step 204 of the aforementioned embodiment, which will not be repeated here.

[0099] By using the method of the embodiment of the present application, the first client can obtain the weight of calling each function in the first service through each server through communication with other clients, and then select the access path of each function separately according to the weight of each function. In this way, when calling each function in the first service, it is possible to call it through an access path with a larger weight, avoiding causing an imbalance in the system load and ensuring the overall reliability of the first service.

[0100] The above two embodiments describe methods for adjusting the weight of an access path when a first client requests a first service. In some possible examples, the weight of an access path may also be adjusted when the first client is in an idle state.

[0101] See also Figure 4A , Figure 4A A flowchart of another information processing method provided in an embodiment of the present application, the method comprising the following steps:

[0102] 401. A first client sends third information to a first server at a preset time interval, where the third information is used to detect a service status of the first server.

[0103] In this embodiment, the first client is in an idle state, that is, the first client does not request services from the server. At this time, the first client sends information to one or more servers (including the first server) for health check to obtain status information of the server.

[0104] Typically, health checks can use a heartbeat mechanism, that is, periodically sending information to the server at a preset time interval. The preset time interval can be set by the client itself, or specified by the protocol, or indicated by the server.

[0105] 402. If the third information is sent successfully and a third response is received, and the third response indicates a service status of the first server, the first client increases a first weight corresponding to the first server.

[0106] 403. If the third information is sent successfully and no response indicating the service status of the first server is received, the first client increases the first weight corresponding to the first server.

[0107] 404. If the third information fails to be sent, the first client reduces the first weight corresponding to the first server.

[0108] The first client sends the third information to the first server, including three situations:

[0109] (1) The information is sent successfully, and the first client receives the third response.

[0110] This indicates that the first client successfully establishes a connection with the first server, and the first client and the first server can communicate normally.

[0111] (2) The information is sent successfully, but the first client does not receive the third response.

[0112] This indicates that the first client successfully establishes a connection with the first server, but the first client cannot communicate with the first server normally.

[0113] (3) The first client fails to send the third information to the first server.

[0114] Among them, the first client accessing the first service through the first server corresponds to the first weight, and the first client accessing the second service through the first server corresponds to the seventh weight. Similarly, the first client accessing different services through the first server corresponds to different weights.

[0115] For the above three situations, in the first and second situations, the weight of each service requested by the first client through the first server can be increased. Including when requesting the first service, the first weight corresponding to the first server can be increased. Optionally, because the first situation will have a better effect on the access of the first client, it can be increased by a larger amplitude (first value); in the second situation, the weight is increased according to the second value. The first value is greater than the second value. In the third situation, the weight of each service requested through the first server needs to be reduced. Specifically, it can be reduced according to the third value. Please refer to Figure 4B , Figure 4B A schematic diagram of a process for managing weights according to the sending status of third information provided in an embodiment of the present application, such as Figure 4B As shown in , the initial weight of the first client accessing each service through the first server is w0, and w0 increases or decreases with the sending of the third information. Among them, the above situations (1), (2), and (3) can exist simultaneously in the same embodiment, or only one of them can exist. That is, the above steps 402 to 404 can be performed in combination or separately.

[0116] Optionally, the third value is greater than the second value, that is, in the case of failure to connect, the reduction of the weight is greater than the increase of the weight when the connection is possible but communication is not possible.

[0117] It can be seen that in the embodiment of the present application, in the case where the first client does not request services from the first server, the first client maintains the weight for accessing the first server by means of health detection. This avoids the possibility that the weight of the access policy is continuously reduced due to long-term non-maintenance (because no response is received, or the response delay continues to increase), which eventually leads to the starvation of the access process of the first client. This improves the reliability of network access.

[0118] Corresponding to the above FIG. 2A to FIG. 4B The information processing method described above is based on the same technical concept, and the embodiment of the present application also provides an information processing device, Figure 5 A schematic diagram of the module composition of an information processing device provided in an embodiment of the present application, the device is used to execute FIG. 2A to FIG. 4B Describes information processing methods such as Figure 5 As shown, the device comprises:

[0119] A determination unit 501 is used to determine a first server among multiple servers based on multiple first weights; the multiple servers correspond to the multiple first weights one by one, and the first weight is used to represent the weight of the first client requesting the first service through the server; the first weight corresponding to the first server is greater than the first preset weight;

[0120] The transceiver unit 502 is configured to send a first request for a first service to a first server and receive a first response to the first request.

[0121] The adjusting unit 503 is configured to adjust the first weight corresponding to the first server according to the first response.

[0122] In a possible example, adjusting the first weight corresponding to the first server according to the first response includes: if the first response includes data information corresponding to the first service, adjusting the first weight corresponding to the first server to a second weight, the second weight being greater than the first weight; if the first response does not include data information corresponding to the first service, adjusting the first weight corresponding to the first server to a third weight, the third weight being less than the first weight.

[0123] In a possible example, the first weight corresponding to the first server is adjusted according to the first response, including: if the delay of the first response is less than the first preset delay, the first weight corresponding to the first server is adjusted to a fourth weight, and the fourth weight is greater than the first weight; if the delay of the first response is greater than or equal to the first preset delay, the first weight corresponding to the first server is adjusted to a fifth weight, and the fifth weight is less than the first weight.

[0124] In a possible example, if the first service includes multiple functions, the first information is used to request the first service, including: the first information is used to request to call the first function, and the multiple functions include the first function.

[0125] In a possible example, the determination unit 501 is also used to: receive feedback information from at least one second client, the feedback information including latency information of at least one second client calling the first function; and determine a first weight corresponding to the first client calling the first function based on the latency information of at least one second client calling the first function.

[0126] In a possible example, the transceiver unit 502 is also used to send third information to the first server, and the third information is used to detect the service status of the first server; the adjustment unit 503 is also used to: if the third information is sent successfully and a second response is received, and the second response indicates the service status of the first server, then the first weight corresponding to the first server is increased; or if the third information is sent successfully and no response indicating the service status of the first server is received, then the first weight corresponding to the first server is reduced; or if the third information fails to be sent, then the first weight corresponding to the first server is reduced.

[0127] It should be noted that the embodiments of the information processing device in the present application and the embodiments of the information processing method in the present application are based on the same inventive concept, so the specific implementation of this embodiment can refer to the implementation of the corresponding information processing method mentioned above, and the repeated parts will not be repeated.

[0128] Furthermore, corresponding to the above FIG. 2A to FIG. 4B Based on the same technical concept, the present application also provides a computer device for executing the above information processing method. Figure 6 shown.

[0129] Computer devices may have relatively large differences due to different configurations or performances, and may include one or more processors 901 and memory 902, and the memory 902 may store one or more storage applications or data. Among them, the memory 902 may be a short-term storage or a persistent storage. The application stored in the memory 902 may include one or more modules (not shown in the figure), and each module may include a series of computer executable instructions in the computer device. Furthermore, the processor 901 may be configured to communicate with the memory 902 to execute a series of computer executable instructions in the memory 902 on the computer device. The computer device may also include one or more power supplies 903, one or more wired or wireless network interfaces 904, one or more input and output interfaces 905, one or more keyboards 906, etc.

[0130] In a specific embodiment, the semi-computer device includes a memory and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer-executable instructions in the computer device, and the one or more programs are configured to be executed by one or more processors, including computer-executable instructions for performing the following:

[0131] Based on multiple first weights, determining a first server among multiple servers; the multiple servers correspond to the multiple first weights one by one, and the first weight is used to represent the weight of the first client requesting the first service through the server; the first weight corresponding to the first server is greater than the first preset weight;

[0132] Sending a first request for a first service to a first server;

[0133] receiving a first response to the first request;

[0134] A first weight corresponding to the first server is adjusted according to the first response.

[0135] It should be noted that the embodiment of the computer device in the present application and the embodiment of the information processing method in the present application are based on the same inventive concept, so the specific implementation of this embodiment can refer to the implementation of the corresponding information processing method mentioned above, and the repeated parts will not be repeated.

[0136] Furthermore, corresponding to the above FIG. 2A to FIG. 4BThe method shown is based on the same technical concept. The embodiment of the present application also provides a storage medium for storing computer executable instructions. In a specific embodiment, the storage medium can be a USB flash drive, an optical disk, a hard disk, etc. When the computer executable instructions stored in the storage medium are executed by the processor, the following process can be implemented:

[0137] Sending first information to the first server, where the first information is used to request a first service, wherein requesting the first service through the first server corresponds to a first weight, and the first weight indicates a probability of requesting the first service through the first server;

[0138] A first response to the first information is received, and the first weight is adjusted according to the first response.

[0139] In addition, in another specific embodiment, when the computer executable instructions stored in the storage medium are executed by the processor, the following process can be implemented:

[0140] Receiving first information from a first client, the first information being used to request a first service, wherein requesting the first service through the first server corresponds to a first weight, and the first weight indicates a probability of requesting the first service through the first server;

[0141] A first response is sent to the first client in response to the first information, wherein the first response includes data of the first service, or the first response indicates that the first service cannot be provided; the first response is used to adjust the first weight by any one of the methods of claims 1-8.

[0142] It should be noted that the embodiments of the storage medium in the present application and the embodiments of the information processing method in the present application are based on the same inventive concept, so the specific implementation of this embodiment can refer to the implementation of the corresponding information processing method mentioned above, and the repeated parts will not be repeated.

[0143] The above describes specific embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0144] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the embodiments of the present application may adopt the form of complete hardware embodiments, complete software embodiments, or embodiments in combination with software and hardware. Moreover, the application may adopt the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0145] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0146] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0147] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0148] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0149] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0150] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0151] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0152] Embodiments of the present application may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. One or more embodiments of the present application may also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0153] Each embodiment in this application is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0154] The above description is only an embodiment of this document and is not intended to limit this document. For those skilled in the art, this document may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this document should be included in the scope of the claims of this document.

Claims

1. An information processing method, characterized in that: The method is applied to a first client in an information processing system, wherein the information processing system further comprises a plurality of service terminals; the method comprises: Based on a plurality of first weights, determining a first server among the plurality of servers; the plurality of servers correspond one-to-one to the plurality of first weights, the first weight being used to characterize a weight of the first client requesting a first service through the server; the first weight corresponding to the first server being greater than a first preset weight; Sending a first request for requesting the first service to the first server; receiving a first response to the first request; A first weight corresponding to the first server is adjusted according to the first response.

2. The method according to claim 1, characterized in that The adjusting the first weight corresponding to the first server according to the first response includes: If the first response includes data information corresponding to the first service, adjusting the first weight corresponding to the first server to a second weight, where the second weight is greater than the first weight; If the first response does not include data information corresponding to the first service, the first weight corresponding to the first server is adjusted to a third weight, and the third weight is smaller than the first weight.

3. The method according to claim 1, characterized in that The adjusting the first weight corresponding to the first server according to the first response includes: If the delay of the first response is less than the first preset delay, adjusting the first weight corresponding to the first server to a fourth weight, where the fourth weight is greater than the first weight; If the delay of the first response is greater than or equal to the first preset delay, the first weight corresponding to the first server is adjusted to a fifth weight, and the fifth weight is less than the first weight.

4. The method according to claim 1, characterized in that: If the first service includes multiple functions, the first information is used to request the first service, including: the first information is used to request to call a first function, and the multiple functions include the first function.

5. The method according to claim 4, characterized in that The method further comprises: receiving feedback information from at least one second client, wherein the feedback information includes delay information of the at least one second client calling the first function; A first weight corresponding to the first client calling the first function is determined according to the latency information of the at least one second client calling the first function.

6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: Sending third information to the first server, where the third information is used to detect a service status of the first server; If the third information is sent successfully and a third response is received, and the third response indicates the service status of the first server, then the first weight corresponding to the first server is increased; or If the third information is sent successfully and no response indicating the service status of the first server is received, reducing the first weight corresponding to the first server; or If the third information fails to be sent, the first weight corresponding to the first server is reduced.

7. An information processing device, characterized in that: The device comprises: A determination unit, configured to determine a first server among the multiple server ends based on multiple first weights; the multiple server ends correspond to the multiple first weights one by one, the first weight being used to represent a weight of the first client requesting a first service through the server end; the first weight corresponding to the first server end is greater than a first preset weight; a transceiver unit, configured to send a first request for requesting the first service to the first server; and receive a first response to the first request; A processing unit is used to adjust a first weight corresponding to the first server according to the first response.

8. A computer device, characterized in that: The device comprises: Processor; and A memory arranged to store computer executable instructions, the executable instructions being configured to be executed by the processor, the executable instructions comprising instructions for executing the steps in the method according to any one of claims 1 to 6.

9. A computer storage medium, characterized in that The computer storage medium is used to store computer executable instructions, and the executable instructions enable a computer to execute the method according to any one of claims 1 to 6.

10. A computer program product, characterized in that The computer program product comprises: a computer program code, and when the computer program code is executed by a computer, the computer executes the method according to any one of claims 1 to 6.