Service calling method, node, network, device, medium and product

By obtaining service node attribute information from the service registration center in a distributed system and determining the target service node based on routing rules, the problem of difficulty in specifying suitable service nodes is solved, flexible and efficient service call and traffic management are achieved, development and testing efficiency is improved, and operation and maintenance work is reduced.

CN119966988AActive Publication Date: 2025-05-09INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202411856802.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-17
Publication Date
2025-05-09
Estimated Expiration
2044-12-17

AI Technical Summary

Technical Problem

In distributed systems, it is difficult to determine the appropriate service node downstream of the call link starting point, making it difficult to achieve flexible and efficient routing management during service calls.

Method used

By obtaining the attribute information of the service node in the service registration center and determining the target service node based on the pre-stored routing rules, the designation and call of the first target service node are realized. The method includes, in response to receiving a call instruction carrying service information, obtaining attribute information of N service nodes from the service registration center, determining a first target service node from the N service nodes based on the target routing rules and attribute information, and calling the service node to process the service information.

Benefits of technology

It realizes flexible designation and management of service nodes located downstream of the call link starting point, simplifies the development environment deployment of distributed systems, improves development and testing efficiency, and provides the ability to dynamically control the traffic allocation ratio, reducing operation and maintenance workload.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119966988A_ABST
    Figure CN119966988A_ABST
Patent Text Reader

Abstract

The invention provides a service calling method which can be applied to the distributed technical field and the financial science and technology field. The service calling method comprises the following steps: in response to a received calling instruction carrying service information, obtaining attribute information of N service nodes from a service registration center, N being an integer greater than 1; based on the service information, determining a target routing rule from pre-stored M routing rules, M being an integer greater than 1; determining a first target service node from the N service nodes based on the target routing rule and the attribute information of the N service nodes; and calling the first target service node to process the service information. The disclosure also provides a service node, a distributed node network, a device, a medium and a program product.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the fields of distributed technology and financial technology, and specifically to a service calling method, node, distributed node network, device, medium and program product. Background Art

[0002] In a distributed system, a service usually has multiple service nodes for providing services. Each time a service is called, the distributed system automatically selects a service node to provide the service. If the service is located at the starting point of the call link, the developer or tester can directly specify the service node for providing the service.

[0003] However, in the process of implementing the inventive concept of the present disclosure, the inventors found that it is difficult to determine a suitable service node when the service node is located downstream of the starting point of the call link. Summary of the invention

[0004] In view of the above problems, the present disclosure provides a service invocation method, a node, a distributed node network, a device, a medium and a program product.

[0005] According to a first aspect of the present disclosure, a service calling method is provided, comprising: in response to receiving a calling instruction carrying service information, obtaining attribute information of N service nodes from a service registration center, where N is an integer greater than 1; based on the service information, determining a target routing rule from M pre-stored routing rules, where M is an integer greater than 1; based on the target routing rule and the attribute information of the N service nodes, determining a first target service node from the N service nodes; and calling the first target service node to process the service information.

[0006] According to an embodiment of the present disclosure, the target routing rules include attribute information screening rules and monitoring indicator screening rules; based on the target routing rules and the attribute information of the N service nodes, determining the first target service node from the N service nodes, including: based on the attribute information screening rules and the attribute information of the N service nodes, determining J candidate service nodes from the N service nodes, J is an integer greater than 1 and less than or equal to N; based on the attribute information of the J candidate service nodes, obtaining the monitoring indicator information of the J candidate service nodes from the monitoring center; and based on the monitoring indicator screening rules and the monitoring indicator information of the J candidate service nodes, determining the first target service node from the J candidate service nodes.

[0007] According to an embodiment of the present disclosure, there are K attribute information screening rules, where K is an integer greater than 1; based on the attribute information screening rules and the attribute information of the N service nodes, J candidate service nodes are determined from the N service nodes, including: for the nth service node, in response to detecting that the k-1th attribute verification result indicates that the verification has passed, the attribute information of the nth service node is verified using the kth attribute information screening rule to obtain the kth attribute verification result, where n is a positive integer less than or equal to N, and k is an integer greater than 1 and less than or equal to K; when the kth attribute verification result indicates that the verification has not passed, the nth service node is determined as the second target service node; and when all K attribute verification results indicate that the verification has passed, the nth service node is determined as a candidate service node.

[0008] According to an embodiment of the present disclosure, a monitoring indicator screening rule includes Q screening condition fields, the Q screening condition fields are separated by logical operators, the type information of the logical operators corresponds to the type information of the parsing handler of the first service node, and Q is an integer greater than 1; based on the monitoring indicator screening rule and the monitoring indicator information of J candidate service nodes, the first target service node is determined from the J candidate service nodes, including: based on the logical operation mode of the logical operator and the Q screening condition fields, the monitoring indicator information of the jth candidate service node is verified to obtain the jth indicator verification result, j is a positive integer less than or equal to J; and when the jth indicator verification result indicates that the verification is passed, the jth candidate service node is determined as the first target service node.

[0009] According to an embodiment of the present disclosure, the above-mentioned service calling method also includes: in response to receiving a start instruction, running a communication thread to communicate with the configuration center via the communication thread; receiving changed routing rules from the configuration center through the communication thread; and updating the routing rules in the storage space based on the changed routing rules.

[0010] According to an embodiment of the present disclosure, based on service information, a target routing rule is determined from M pre-stored routing rules, including: reading M routing rules from a storage space, wherein each routing rule is associated with pre-stored service information; determining matching service information from the pre-stored service information associated with the M routing rules by matching the service information with the pre-stored service information associated with the M routing rules; and determining the routing rule associated with the matching service information as the target routing rule.

[0011] According to an embodiment of the present disclosure, the above-mentioned service calling method also includes: in response to a start instruction, by sending attribute information to the service registration center, so that the service registration center registers the service node based on the received attribute information; and in response to a close instruction, by sending a deregistration request to the service registration center, so that the service registration center deregisters the service node corresponding to the deregistration request.

[0012] According to an embodiment of the present disclosure, there are E first target service nodes, where E is an integer greater than 1; calling the first target service nodes to process service information includes: utilizing a load balancing strategy to determine e first target service nodes from the E first target service nodes, where e is a positive integer less than E; and calling the e first target service nodes to process service information.

[0013] A second aspect of the present disclosure provides a service node, including: an acquisition module, used to obtain attribute information of N service nodes from a service registration center in response to receiving a call instruction carrying service information, where N is an integer greater than 1; a first determination module, used to determine a target routing rule from M pre-stored routing rules based on the service information, where M is an integer greater than 1; a second determination module, used to determine a first target service node from the N service nodes based on the target routing rule and the attribute information of the N service nodes; and a calling module, used to call the first target service node to process the service information.

[0014] A third aspect of the present disclosure provides a distributed node network, which includes B service nodes as described above, where B is an integer greater than N.

[0015] A fourth aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the above method.

[0016] The fifth aspect of the present disclosure further provides a computer-readable storage medium on which a computer program or instruction is stored, and the steps of the above method are implemented when the above computer program or instruction is executed by a processor.

[0017] The sixth aspect of the present disclosure further provides a computer program product, including a computer program or instructions, which implement the steps of the above method when the above computer program or instructions are executed by a processor.

[0018] According to an embodiment of the present disclosure, when a call instruction carrying service information is received, the attribute information of N service nodes is obtained from the service registration center, and the target routing rule is determined from M pre-stored routing rules based on the service information. Thus, based on the target routing rule and the attribute information of the second service node, the first target service node that meets the target routing rule can be screened from the N service nodes, thereby realizing the designation of the first target service node located downstream of the starting point of the call link, so as to use the first target service node to process the service. Therefore, during the development and testing process, the debugging environment can be deployed only on the first target service node, which simplifies the deployment of the distributed system development environment and improves the development efficiency. In addition, it provides the ability for the distributed system to dynamically, flexibly and efficiently specify downstream service providers, thereby improving the testing efficiency of the test service node.

[0019] Furthermore, in an actual production environment, since the service nodes used to provide services can be specified, the distribution ratio of traffic between the service nodes used to provide services can be controlled. Thus, the present disclosure provides a distributed system with the ability to control the distribution ratio of traffic between the service nodes used to provide services, thereby reducing the workload of operation and maintenance. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The above contents and other purposes, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:

[0021] Figure 1 The application scenario diagram schematically shows the service invocation method, node, distributed node network, device, medium and program product according to the embodiment of the present disclosure;

[0022] Figure 2 A flowchart of a service calling method according to a first embodiment of the present disclosure is schematically shown;

[0023] Figure 3 A schematic diagram of calling a service node according to an embodiment of the present disclosure is schematically shown;

[0024] Figure 4 A schematic diagram schematically shows a service calling method according to a second embodiment of the present disclosure;

[0025] Figure 5 A structural block diagram of a service node according to an embodiment of the present disclosure is schematically shown; and

[0026] Figure 6 A block diagram of an electronic device suitable for implementing a service calling method according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION

[0027] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.

[0028] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.

[0029] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.

[0030] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).

[0031] In the technical solution of the present disclosure, the user information (including but not limited to user personal information, user image information, user device information, such as location information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved are all information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with relevant laws, regulations and standards, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0032] In the scenario of using personal information for automated decision-making, the methods, devices, and systems provided by the embodiments of the present disclosure provide users with corresponding operation portals for users to choose to agree or reject the automated decision-making results; if the user chooses to reject, the expert decision-making process will be entered. The expression "automated decision-making" here refers to the activity of automatically analyzing and evaluating a person's behavioral habits, interests and hobbies, or economic, health, credit status, etc. through computer programs, and making decisions. The expression "expert decision-making" here refers to the activity of making decisions by people who specialize in a certain field, have specialized experience, knowledge and skills, and have reached a certain level of professionalism.

[0033] According to the embodiments of the present disclosure, during the development and testing process, if a service node located downstream of the starting point of the call link can be specified to provide services, the development and testing efficiency will be greatly improved. For example, when debugging the code, if a service node can be specified to provide services, it is only necessary to deploy the debugging environment on this service node, which greatly reduces the workload of debugging; during stress testing, if a service node can be specified to provide services, all traffic can be directed to this service node, thereby quickly exposing performance problems and performance bottlenecks.

[0034] In an actual production environment, if you can specify a service node located downstream of the starting point of the call link to provide services, you can control the traffic distribution ratio among the service nodes used to provide services, thereby achieving the capabilities of version grayscale upgrades and function grayscale launches.

[0035] However, the routing capabilities of current distributed systems are coarse-grained and not flexible enough, making it difficult to specify service nodes downstream of the starting point of the call link.

[0036] In view of this, the present invention provides a method for implementing custom routing based on a configuration center. It only needs to set custom routing rules for the service in the configuration center. When the service is called, the custom routing rules will be used to filter out qualified service nodes for providing the service, thereby implementing custom routing.

[0037] Specifically, an embodiment of the present disclosure provides a service calling method, including: in response to receiving a calling instruction carrying service information, based on the service information, obtaining attribute information of N service nodes from a service registration center, where N is an integer greater than 1; based on the service information, determining a target routing rule from M pre-stored routing rules, where M is an integer greater than 1; based on the target routing rule and the attribute information of the N service nodes, determining a first target service node from the N service nodes; and calling the first target service node to process the service information.

[0038] Furthermore, the embodiment of the present disclosure further provides a service node for executing the service calling method. Furthermore, the embodiment of the present disclosure further provides a distributed node network, comprising B of the above service nodes, where B is an integer greater than N.

[0039] Figure 1 The application scenario diagram of the service calling method, node, distributed node network, device, medium and program product according to the embodiment of the present disclosure is schematically shown.

[0040] like Figure 1 As shown, the application scenario 100 according to this embodiment may include a configuration center 110, a distributed node network 120, a service registration center 130, and a monitoring center 140. The distributed node network 120 includes B service nodes 121_1...121_B. The network is used to provide a medium for a communication link between the configuration center 110, the node network 120, the service registration center 130, and the monitoring center 140, and may also be used to provide a medium for a communication link between the B service nodes 121_1...121_B. The network may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.

[0041] The configuration center 110 may be a platform for configuring the information of each service node in the distributed node network 120. Each of the B service nodes 121_1...121_B may be used to provide services or to initiate service calls. In the disclosed embodiment, the service node that initiates a service call is referred to as a consumer node; the node that provides services is referred to as a provider node. Consumers and providers are relative, and a consumer node of one service may be a provider node of another service. Specifically, any of the B service nodes 121_1...121_B may act as a consumer node to initiate calls to other service nodes.

[0042] The service registration center 130 may be used to register and store information of each service node among the B service nodes 121_1 . . . 121_B.

[0043] The monitoring center 140 may be used to monitor and store the indicator information of each service node among the B service nodes 121_1 . . . 121_B.

[0044] The service node may be a server that provides various services, such as a backend management server that provides support for websites browsed by users using terminal devices (for example only). The backend management server may analyze and process the received data such as user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device. Similarly, the configuration center 110, the service registration center 130, and the monitoring center 140 may also be constructed based on servers, which will not be described in detail here.

[0045] The user can use the terminal device to interact with the configuration center 110, the service node, the service registration center 130 or the monitoring center 140 through the network to receive or send messages, etc. Various communication client applications can be installed on the terminal device, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples). The terminal device can be various electronic devices with a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, etc.

[0046] It should be noted that the service calling method provided in the embodiment of the present disclosure can generally be executed by at least one service node in the distributed node network 120 .

[0047] It should be understood that Figure 1 The number of configuration centers 110, service nodes, service registration centers 130, and monitoring centers 140 in FIG. 1 is merely illustrative. Any number of configuration centers 110, service nodes, service registration centers 130, and monitoring centers 140 may be provided as required.

[0048] The following will be based on Figure 1 The scene described by Figure 2~Figure 4 The service calling method of the disclosed embodiment is described in detail.

[0049] Figure 2 The flowchart of the service calling method according to the first embodiment of the present disclosure is schematically shown.

[0050] like Figure 2 As shown, the service calling method of this embodiment includes operations S210 to S240.

[0051] In operation S210, in response to receiving a call instruction carrying service information, attribute information of N service nodes is obtained from a service registration center, where N is an integer greater than 1.

[0052] In operation S220, based on the service information, a target routing rule is determined from M pre-stored routing rules, where M is an integer greater than 1.

[0053] In operation S230, a first target service node is determined from the N service nodes based on the target routing rule and attribute information of the N service nodes.

[0054] In operation S240, the first target service node is called to process the service information.

[0055] According to an embodiment of the present disclosure, service information may be attribute information of a service to be called by a consumer node. Service information may include, but is not limited to, an identifier of a service and information about the type of service, etc. The identifier of a service may be a unique identifier jointly determined based on an interface identifier, a version identifier, and a method identifier of the service. A service registration center may store attribute information of each service node in a node network. The attribute information of a service node may include, but is not limited to, an address identifier and port information of a service node, etc. Thus, the service registration center may be used to send attribute information of other service nodes to a consumer node based on the attribute information of the service node, so that the consumer node calls other service nodes to process services.

[0056] The routing rule may be a custom rule for selecting a service node that provides a service. For example, the routing rule may include an identifier of a service. The identifier of a service in the routing rule is used to characterize the service corresponding to the routing rule. That is, when a service is called, the routing rule corresponding to the service may be determined based on the identifier of the service. The routing rule may be customizable based on demand and may be stored in a configuration center. The configuration center may be a platform for configuring routing rules. Routing rules may be added, modified, or deleted in the configuration center.

[0057] According to an embodiment of the present disclosure, when a service node receives a call instruction carrying service information, the service node can act as a consumer node and send the service information to a service registration center, so that the service registration center can provide the service node with attribute information of the service node based on the service identifier in the service information, that is, the attribute information of the above-mentioned N service nodes.

[0058] The consumer node can read and parse the pre-stored routing rules in the local storage space. The consumer node can match the identifier of the service in the routing rule with the identifier of the service in the service information to determine whether the service to be called has a custom routing rule corresponding to the service. In the case where there is a routing rule that matches the identifier of the service in the service information among the M routing rules, the matching routing rule can be determined as the target routing rule. In the case where there is no routing rule that matches the identifier of the service in the service information among the M routing rules, the load balancing strategy can be directly used to select a unique service node from the N service nodes to provide the service. The load balancing strategy may include but is not limited to random, polling, weighted polling, minimum number of connections, and hashing.

[0059] The consumer node can analyze the attribute information of N service nodes based on the target routing rules to select a first target service node that meets the target routing rules from the N service nodes, thereby calling the first target service node. In one embodiment of the present disclosure, after filtering N service nodes based on the routing rules, if the first target service node is not obtained, an exception information can be generated, and an error is reported based on the exception information. In another embodiment of the present disclosure, after filtering N service nodes based on the routing rules, if only one first target service node is obtained, the one first target service node can be directly called to provide services.

[0060] According to an embodiment of the present disclosure, when a call instruction carrying service information is received, the attribute information of N service nodes is obtained from the service registration center, and the target routing rule is determined from M pre-stored routing rules based on the service information. Thus, based on the target routing rule and the attribute information of the second service node, the first target service node that meets the target routing rule can be screened from the N service nodes, thereby realizing the designation of the first target service node located downstream of the starting point of the call link, so as to use the first target service node to process the service. Therefore, during the development and testing process, the debugging environment can be deployed only on the first target service node, which simplifies the deployment of the distributed system development environment and improves the development efficiency. In addition, it provides the ability for the distributed system to dynamically, flexibly and efficiently specify downstream service providers, thereby improving the testing efficiency of the test service node.

[0061] Furthermore, in an actual production environment, since the service nodes used to provide services can be specified, the distribution ratio of traffic between the service nodes used to provide services can be controlled. Thus, the present disclosure provides a distributed system with the ability to control the distribution ratio of traffic between the service nodes used to provide services, thereby reducing the workload of operation and maintenance.

[0062] According to an embodiment of the present disclosure, based on service information, a target routing rule is determined from M pre-stored routing rules, including: reading M routing rules from a storage space, wherein each routing rule is associated with pre-stored service information; determining matching service information from the pre-stored service information associated with the M routing rules by matching the service information with the pre-stored service information associated with the M routing rules; and determining the routing rule associated with the matching service information as the target routing rule.

[0063] In one embodiment of the present disclosure, the pre-stored service information associated with the routing rule may include the identifier of the service in the above-mentioned routing rule. However, the embodiment of the present disclosure is not limited thereto. In another embodiment of the present disclosure, the routing rule may be stored in association with the pre-stored service information in the storage space. The pre-stored service information may include the pre-stored identifier of the service.

[0064] According to an embodiment of the present disclosure, the identifier of the pre-stored service can be matched with the identifier of the service in the received service information to determine matching service information that matches the received service information from the pre-stored service information associated with M routing rules, so that the routing rule associated with the matching service information can be determined as the target routing rule.

[0065] According to an embodiment of the present disclosure, by matching service information with pre-stored service information, matching service information is determined from the pre-stored service information in the storage space, so that the routing rule associated with the matching service information can be determined as the target routing rule, thereby improving the accuracy of determining the target routing rule.

[0066] According to an embodiment of the present disclosure, the target routing rules include attribute information screening rules and monitoring indicator screening rules; based on the target routing rules and the attribute information of the N service nodes, determining the first target service node from the N service nodes, including: based on the attribute information screening rules and the attribute information of the N service nodes, determining J candidate service nodes from the N service nodes, J is an integer greater than 1 and less than or equal to N; based on the attribute information of the J candidate service nodes, obtaining the monitoring indicator information of the J candidate service nodes from the monitoring center; and based on the monitoring indicator screening rules and the monitoring indicator information of the J candidate service nodes, determining the first target service node from the J candidate service nodes.

[0067] According to an embodiment of the present disclosure, an attribute information screening rule can be used to screen N service nodes according to the attribute information of the N service nodes, so as to obtain candidate service nodes whose attribute information satisfies the target routing rule. For example, the attribute information screening rule may include one or more screening conditions. The screening conditions in the attribute information screening rule may be static conditions, such as IP (Internet Protocol, Network Interconnection Protocol) address identifier, label, system environment variable, etc.

[0068] According to an embodiment of the present disclosure, the monitoring center can monitor the data indicators of the service nodes in the distributed node network in real time, thereby obtaining and storing the monitoring indicator information of the service nodes. The monitoring indicator information may include but is not limited to CPU (Central Processing Unit) usage, memory usage, disk IO (Input Output) times, network uplink and downlink traffic, number of network connections, number of processes, number of threads, GC (Garbage Collection) times of virtual machines, etc.

[0069] The monitoring indicator screening rule can be used to screen N service nodes according to the monitoring indicator information of the N service nodes, so as to obtain candidate service nodes whose monitoring indicator information meets the target routing rule. For example, the monitoring indicator screening rule may include one or more screening conditions. The screening conditions in the monitoring indicator screening rule may be dynamic conditions, such as CPU usage, number of threads, number of GC times of virtual machines, etc.

[0070] In the embodiment of the present disclosure, in addition to the above-mentioned attribute information screening rules and monitoring indicator screening rules, the target routing rules may also include request message screening rules. For example, the screening conditions of the request message screening rules may include but are not limited to whether a certain field exists in the request message received from the service node and whether a certain field of the message is a specific value, etc.

[0071] Based on this, the routing rules in the present disclosure are relatively rich. Therefore, it is possible to implement custom static routing based on static information such as host environment variables, tags, system variables, etc., and to implement custom dynamic routing based on dynamic information such as performance indicators.

[0072] According to the embodiment of the present disclosure, by filtering candidate service nodes from N service nodes based on static attribute information filtering rules and attribute information of service nodes, and then filtering rules based on dynamic monitoring indicators, the first target service node is filtered out from the candidate service nodes. Based on this, since the service nodes are screened in multiple dimensions and multiple levels through static routing rules and dynamic routing rules, the accuracy of determining the first target service node is improved.

[0073] According to an embodiment of the present disclosure, there are K attribute information screening rules, where K is an integer greater than 1; based on the attribute information screening rules and the attribute information of the N service nodes, J candidate service nodes are determined from the N service nodes, including: for the nth service node, in response to detecting that the k-1th attribute verification result indicates that the verification has passed, the attribute information of the nth service node is verified using the kth attribute information screening rule to obtain the kth attribute verification result, where n is a positive integer less than or equal to N, and k is an integer greater than 1 and less than or equal to K; when the kth attribute verification result indicates that the verification has not passed, the nth service node is determined as the second target service node; and when all K attribute verification results indicate that the verification has passed, the nth service node is determined as a candidate service node.

[0074] According to the embodiment of the present disclosure, the routing rule has a short-circuit property, that is, when the attribute information or monitoring indicator information of the service node does not satisfy at least one rule, the service node is determined to be the second target service node. The second target service node is a service node that is not used to provide services based on the above service information.

[0075] For example, when the kth attribute verification result indicates that the verification has not passed, the nth service node can be determined as the second target service node, and there is no need to determine whether the attribute information of the nth service node satisfies the Kk attribute information screening rules after the kth attribute information screening rule. Correspondingly, in the case of multiple monitoring indicator screening rules, the verification logic of multiple detection indicator screening rules is the same as the verification logic of the attribute information screening rules, and the verification logic of the attribute information screening rules can be referred to, which will not be repeated here.

[0076] According to an embodiment of the present disclosure, by using K attribute information screening rules to verify the attribute information of the nth service node in turn, the nth service node can be determined as a candidate service node when the K attribute verification results obtained by verification all indicate that the verification has passed, thereby improving the accuracy of determining the candidate service node.

[0077] According to an embodiment of the present disclosure, a monitoring indicator screening rule includes Q screening condition fields, and the Q screening condition fields are separated by logical operators, where Q is an integer greater than 1; based on the monitoring indicator screening rule and the monitoring indicator information of J candidate service nodes, a first target service node is determined from the J candidate service nodes, including: based on the logical operation method of the logical operator and the Q screening condition fields, the monitoring indicator information of the jth candidate service node is verified to obtain the jth indicator verification result, where j is a positive integer less than or equal to J; and when the jth indicator verification result indicates that the verification is passed, the jth candidate service node is determined as the first target service node.

[0078] According to an embodiment of the present disclosure, multiple screening conditions in a rule are connected by logical operators. Keywords such as OR and NOT can be used as logical operators, and symbols such as || and ! can also be used as logical operators. No matter which logical operator is used, as long as the logical operator is consistent with the parsing handler of the consumer node, that is, the type information of the logical operator corresponds to the type information of the parsing handler of the consumer node. The format of the routing rule includes but is not limited to json, xml, yaml or pkl, etc. Examples of routing rules may include: age==20 || age==22. Among them, age represents age, || represents a logical operator, and age==20 and age==22 represent screening condition fields.

[0079] In the disclosed embodiment, the attribute information screening rules are similar to the monitoring indicator screening rules in the way they are constructed, including screening condition fields and logical operators. On this basis, the verification method of each screening condition field in a single attribute information screening rule is the same as the verification method of the above-mentioned single monitoring indicator screening rule, and the verification method of the above-mentioned single monitoring indicator screening rule can be referred to, and will not be repeated here.

[0080] According to the embodiments of the present disclosure, by combining the logical operator with the screening condition field as the routing rule, the scalability of the routing rule is improved, the content of the routing rule is more flexible and rich, and the service nodes can be screened more accurately. On this basis, the monitoring indicator information of the service node is verified by combining the logical operator with the screening condition field, which improves the accuracy and flexibility of determining the first target service node.

[0081] According to an embodiment of the present disclosure, the above-mentioned service calling method also includes: in response to receiving a start instruction, running a communication thread to communicate with the configuration center via the communication thread; receiving changed routing rules from the configuration center through the communication thread; and updating the routing rules in the storage space based on the changed routing rules.

[0082] According to the embodiments of the present disclosure, the configuration center centrally manages all routing rules. Development, testing, and operation and maintenance personnel can create, modify, and delete routing rules in the routing configuration center. The configuration center can obtain the attribute information of all consumer nodes of the service from the service registration center, and then synchronize the routing rules of the service to all consumer nodes of the service in real time based on the obtained attribute information.

[0083] After startup, each service node will run a communication thread in the background to communicate with the configuration center in real time through the communication thread, and be ready to receive pushes from the routing configuration center at any time. The communication thread can be a daemon thread. Once the service node receives the routing rules pushed by the configuration center, it will immediately cache the routing rules.

[0084] In the disclosed embodiment, when the routing rules of a service are changed, the configuration center will immediately obtain the consumer list of the service from the service registration center, and then push the changed routing rules to all consumer nodes of the service. When the consumer node receives the changed routing rules, it can query the original routing rules corresponding to the changed routing rules from the storage space based on the service identifier in the changed routing rules, and then replace the original routing rules to complete the update of the routing rules.

[0085] According to the embodiments of the present disclosure, by maintaining communication with the configuration center through a communication thread after startup, the routing rules synchronized in real time by the configuration center can be received in a timely manner, so that the routing rules stored in the local storage space can be updated in a timely manner, thereby improving the timeliness of the routing rules, making the routing rules effective in real time, realizing flexible and efficient custom routing functions, eliminating development and testing pain points, and improving production and operation efficiency.

[0086] According to an embodiment of the present disclosure, the above-mentioned service calling method also includes: in response to a start instruction, by sending attribute information to the service registration center, so that the service registration center registers the service node based on the received attribute information; and in response to a close instruction, by sending a deregistration request to the service registration center, so that the service registration center deregisters the service node corresponding to the deregistration request.

[0087] According to an embodiment of the present disclosure, the service registration center is used to maintain the consumer list and provider list of each recorded service. After the service node is started, it will immediately register itself with the service registration center. For example, the service node can add a record consisting of its own IP address identifier, port identifier and other information to the consumer list and provider list of the service. Before the service node is shut down, it will cancel the registration from the service registration center. For example, the service node can delete the record added when it is started from the consumer list and provider list of the service.

[0088] Based on this, the consumer node can obtain all service nodes that can be used to provide a certain service from the service registration center, and the configuration center can obtain all consumer nodes of a certain service from the service registration center.

[0089] According to an embodiment of the present disclosure, when a service node is started or shut down, registration and deregistration are performed at a service registration center respectively, so that attribute information of the service node from the service registration center and routing rules from the configuration center can be received in a timely manner, thereby improving the timeliness of receiving information.

[0090] According to an embodiment of the present disclosure, there are E first target service nodes, where E is an integer greater than 1; calling the first target service nodes to process service information includes: utilizing a load balancing strategy to determine e first target service nodes from the E first target service nodes, where e is a positive integer less than E; and calling the e first target service nodes to process service information.

[0091] According to an embodiment of the present disclosure, when there are E first target service nodes, the E first target service nodes need to be screened. A load balancing strategy can be used to select e first target service nodes from E to provide services. When e is 1, only one first target service node can be used to provide services based on service information.

[0092] According to an embodiment of the present disclosure, e first target service nodes are obtained by screening from E first target service nodes using a load balancing strategy, thereby controlling the distribution of traffic among service nodes used to provide services, thereby reducing the operation and maintenance workload.

[0093] According to an embodiment of the present disclosure, information in a service call request message that needs to be transmitted in the entire link can be stored in the thread context. For example, each time a request comes in, the above information is immediately stored in the thread context, so that when a remote call to other services is requested, the information in the thread context can be spliced ​​into the message. Thus, the thread context will store the above information of each call request, so that the call link can be tracked based on the information.

[0094] Figure 3 A schematic diagram of calling a service node according to an embodiment of the present disclosure is schematically shown.

[0095] like Figure 3 As shown, after the development, testing or operation and maintenance personnel change the routing rules of service A stored in the configuration center 110, the configuration center 110 can obtain the consumer list for providing service A from the service registration center 130. Before this, after the service node 121_b is started, it can send attribute information to the service registration center 130 to register its own information in the consumer list of the service registration center 130, where b is a positive integer less than or equal to B. As a result, the consumer list will include the service node 121_b information.

[0096] Based on this, after obtaining the consumer list, the configuration center 110 can push the routing rules of service A to the consumers of service A in the list. The consumers of service A are service nodes 121_b.

[0097] After receiving the routing rule, the service node 121_b can obtain the provider list of service A from the service registration center 130. Since the monitoring center 140 stores monitoring information collected from each service node, the service node 121_b can obtain the monitoring information of each service node in the provider list from the monitoring center 140.

[0098] Service node 121_b may use routing rules to determine service node 121_b+1 as the first target service node based on the acquired monitoring information and attribute information of the service nodes in the provider list, and thus may call service node 121_b+1 to process the service.

[0099] Figure 4 The following is a schematic diagram of a service calling method according to a second embodiment of the present disclosure.

[0100] like Figure 4 As shown, the service calling method of this embodiment includes operations S410 to S470.

[0101] In operation S410, a changed routing rule is received from a configuration center through a communication thread.

[0102] In operation S420, the routing rules in the storage space are updated based on the changed routing rules.

[0103] In operation S430, in response to receiving a call instruction carrying service information, attribute information of N service nodes is obtained from a service registration center.

[0104] In operation S440, a target routing rule is determined from among the M pre-stored routing rules based on the service information.

[0105] In operation S450, a first target service node is determined from the N service nodes based on the target routing rule and attribute information of the N service nodes.

[0106] In operation S460, e first target service nodes are determined from the E first target service nodes by using a load balancing strategy.

[0107] In operation S470, e first target service nodes are called to process service information.

[0108] Based on the above service calling method, the present disclosure also provides a service node. Figure 5 The service node is described in detail.

[0109] Figure 5 The structural block diagram of a service node according to an embodiment of the present disclosure is schematically shown.

[0110] like Figure 5 As shown, the service calling device 500 of this embodiment includes an acquisition module 510 , a first determination module 520 , a second determination module 530 and a calling module 540 .

[0111] The acquisition module 510 is used to obtain attribute information of N service nodes from the service registration center in response to receiving a call instruction carrying service information, where N is an integer greater than 1. In one embodiment, the acquisition module 510 can be used to perform the operation S210 described above, which will not be repeated here.

[0112] The first determination module 520 is used to determine a target routing rule from M pre-stored routing rules based on the service information, where M is an integer greater than 1. In one embodiment, the first determination module 520 can be used to perform the operation S220 described above, which will not be described in detail herein.

[0113] The second determination module 530 is used to determine the first target service node from the N service nodes based on the target routing rule and the attribute information of the N service nodes. In one embodiment, the second determination module 530 can be used to perform the operation S230 described above, which will not be described in detail here.

[0114] The calling module 540 is used to call the first target service node to process the service information. In one embodiment, the calling module 540 can be used to perform the operation S240 described above, which will not be described in detail here.

[0115] According to an embodiment of the present disclosure, the second determination module 530 includes a first determination submodule, an acquisition submodule, and a second determination submodule. The first determination submodule is used to determine J candidate service nodes from N service nodes based on the attribute information screening rule and the attribute information of the N service nodes, where J is an integer greater than 1 and less than or equal to N; the acquisition submodule is used to obtain the monitoring indicator information of the J candidate service nodes from the monitoring center based on the attribute information of the J candidate service nodes; the second determination submodule is used to determine the first target service node from the J candidate service nodes based on the monitoring indicator screening rule and the monitoring indicator information of the J candidate service nodes.

[0116] According to an embodiment of the present disclosure, the first determination submodule includes a first verification unit, a first determination unit, and a second determination unit. The first verification unit is used for, for the nth service node, in response to detecting that the k-1th attribute verification result represents a passed verification, to verify the attribute information of the nth service node using the kth attribute information screening rule to obtain the kth attribute verification result, where n is a positive integer less than or equal to N, and k is an integer greater than 1 and less than or equal to K; the first determination unit is used for determining the nth service node as the second target service node when the kth attribute verification result represents a failed verification; the second determination unit is used for determining the nth service node as a candidate service node when all K attribute verification results represent a passed verification.

[0117] According to an embodiment of the present disclosure, the second determination submodule includes a second verification unit and a third determination unit. The second verification unit is used to verify the monitoring indicator information of the jth candidate service node based on the logical operation mode of the logical operator and Q screening condition fields to obtain the jth indicator verification result, where j is a positive integer less than or equal to J; the third determination unit is used to determine the jth candidate service node as the first target service node when the jth indicator verification result indicates that the verification is passed.

[0118] According to an embodiment of the present disclosure, the service node further includes an operation module, a receiving module and an updating module. The operation module is used to respond to receiving a start instruction and run a communication thread to communicate with a configuration center via the communication thread; the receiving module is used to receive a changed routing rule from the configuration center via the communication thread; and the updating module is used to update the routing rule in the storage space based on the changed routing rule.

[0119] According to an embodiment of the present disclosure, the first determination module 520 includes a reading submodule, a matching submodule and a third determination submodule. The reading submodule is used to read M routing rules from the storage space, wherein each routing rule is associated with pre-stored service information; the matching submodule is used to determine matching service information from the pre-stored service information associated with the M routing rules by matching the service information with the pre-stored service information associated with the M routing rules; and the third determination submodule is used to determine the routing rule associated with the matching service information as the target routing rule.

[0120] According to an embodiment of the present disclosure, the service node further includes a first sending module and a second sending module. The first sending module is used to respond to a startup instruction by sending attribute information to a service registration center, so that the service registration center registers the service node based on the received attribute information; the second sending module is used to respond to a shutdown instruction by sending a deregistration request to the service registration center, so that the service registration center deregisters the service node corresponding to the deregistration request.

[0121] According to an embodiment of the present disclosure, the calling module 540 includes a fourth determining submodule and a calling submodule. The fourth determining submodule is used to determine e first target service nodes from E first target service nodes using a load balancing strategy, where e is a positive integer less than E; and the calling submodule is used to call the e first target service nodes to process service information.

[0122] According to an embodiment of the present disclosure, any multiple modules among the acquisition module 510, the first determination module 520, the second determination module 530 and the call module 540 can be combined into one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the acquisition module 510, the first determination module 520, the second determination module 530 and the call module 540 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware and firmware or in a suitable combination of any of them. Alternatively, at least one of the acquisition module 510, the first determination module 520, the second determination module 530 and the calling module 540 may be at least partially implemented as a computer program module, and when the computer program module is executed, a corresponding function may be performed.

[0123] Figure 6 A block diagram of an electronic device suitable for implementing a service calling method according to an embodiment of the present disclosure is schematically shown.

[0124] like Figure 6As shown, the electronic device 600 according to an embodiment of the present disclosure includes a processor 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage part 608 to a random access memory (RAM) 603. The processor 601 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset and / or a dedicated microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 601 may also include an onboard memory for caching purposes. The processor 601 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.

[0125] In RAM 603, various programs and data required for the operation of electronic device 600 are stored. Processor 601, ROM 602 and RAM 603 are connected to each other via bus 604. Processor 601 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 602 and / or RAM 603. It should be noted that the program can also be stored in one or more memories other than ROM 602 and RAM 603. Processor 601 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in the one or more memories.

[0126] According to an embodiment of the present disclosure, the electronic device 600 may further include an input / output (I / O) interface 605, which is also connected to the bus 604. The electronic device 600 may further include one or more of the following components connected to the input / output (I / O) interface 605: an input portion 606 including a keyboard, a mouse, etc.; an output portion 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 608 including a hard disk, etc.; and a communication portion 609 including a network interface card such as a LAN card, a modem, etc. The communication portion 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the input / output (I / O) interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed, so that a computer program read therefrom is installed into the storage portion 608 as needed.

[0127] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.

[0128] According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, it may include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, an apparatus or a device. For example, according to an embodiment of the present disclosure, the computer-readable storage medium may include the ROM 602 and / or RAM 603 described above and / or one or more memories other than ROM 602 and RAM 603.

[0129] The embodiment of the present disclosure also includes a computer program product, which includes a computer program, and the computer program contains program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the service calling method provided by the embodiment of the present disclosure.

[0130] The above functions defined in the system / device of the embodiment of the present disclosure are performed when the computer program is executed by the processor 601. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.

[0131] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices, magnetic storage devices, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of signals on a network medium, and downloaded and installed through the communication part 609, and / or installed from a removable medium 611. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0132] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 609, and / or installed from the removable medium 611. When the computer program is executed by the processor 601, the above functions defined in the system of the embodiment of the present disclosure are performed. According to the embodiment of the present disclosure, the system, device, apparatus, module, unit, etc. described above can be implemented by a computer program module.

[0133] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect through the Internet).

[0134] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0135] It will be appreciated by those skilled in the art that the features described in the various embodiments of the present disclosure may be combined and / or combined in a variety of ways, even if such combinations or combinations are not explicitly described in the present disclosure. In particular, without departing from the spirit and teachings of the present disclosure, the features described in the various embodiments of the present disclosure may be combined and / or combined in a variety of ways. All of these combinations and / or combinations fall within the scope of the present disclosure.

[0136] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.

Claims

1. A service calling method, characterized in that: The method comprises: In response to receiving a call instruction carrying service information, obtaining attribute information of N service nodes from a service registration center, where N is an integer greater than 1; Based on the service information, determine a target routing rule from M pre-stored routing rules, where M is an integer greater than 1; Determining a first target service node from the N service nodes based on the target routing rule and the attribute information of the N service nodes; and The first target service node is called to process the service information.

2. The method according to claim 1, characterized in that The target routing rules include attribute information screening rules and monitoring indicator screening rules; The determining a first target service node from the N service nodes based on the target routing rule and the attribute information of the N service nodes includes: Based on the attribute information screening rule and the attribute information of the N service nodes, determine J candidate service nodes from the N service nodes, where J is an integer greater than 1 and less than or equal to N; Based on the attribute information of the J candidate service nodes, acquiring monitoring indicator information of the J candidate service nodes from a monitoring center; and Based on the monitoring indicator screening rule and the monitoring indicator information of the J candidate service nodes, the first target service node is determined from the J candidate service nodes.

3. The method according to claim 2, characterized in that The number of attribute information screening rules is K, where K is an integer greater than 1; The determining J candidate service nodes from the N service nodes based on the attribute information screening rule and the attribute information of the N service nodes includes: For the nth service node, In response to detecting that the k-1th attribute verification result indicates that the verification has passed, verifying the attribute information of the nth service node using the kth attribute information screening rule to obtain a kth attribute verification result, where n is a positive integer less than or equal to N, and k is an integer greater than 1 and less than or equal to K; If the k-th attribute verification result indicates that the verification has not passed, determining the n-th service node as a second target service node; and When all K attribute verification results indicate that the verification is passed, the nth service node is determined as the candidate service node.

4. The method according to claim 2, characterized in that: The monitoring indicator screening rule includes Q screening condition fields, the Q screening condition fields are separated by logical operators, type information of the logical operators corresponds to type information of the parsing processing program of the first service node, and Q is an integer greater than 1; The determining the first target service node from the J candidate service nodes based on the monitoring indicator screening rule and the monitoring indicator information of the J candidate service nodes includes: Based on the logical operation mode of the logical operator and the Q screening condition fields, verify the monitoring indicator information of the j-th candidate service node to obtain the j-th indicator verification result, where j is a positive integer less than or equal to J; and When the j-th indicator verification result indicates that the verification is passed, the j-th candidate service node is determined as the first target service node.

5. The method according to any one of claims 1 to 4, characterized in that The method further comprises: In response to receiving the start instruction, running a communication thread to communicate with a configuration center via the communication thread; Receiving the changed routing rule from the configuration center through the communication thread; and Based on the changed routing rules, the routing rules in the storage space are updated.

6. The method according to any one of claims 1 to 4, characterized in that The determining, based on the service information, a target routing rule from the pre-stored M routing rules comprises: Reading the M routing rules from the storage space, wherein each routing rule is associated with the pre-stored service information; By matching the service information with the pre-stored service information associated with the M routing rules, matching service information is determined from the pre-stored service information associated with the M routing rules; and A routing rule associated with the matching service information is determined as the target routing rule.

7. The method according to any one of claims 1 to 4, characterized in that The method further comprises: In response to the start instruction, by sending attribute information to the service registration center, the service registration center registers the service node based on the received attribute information; and In response to the closing instruction, a deregistration request is sent to the service registration center, so that the service registration center deregisters the service node corresponding to the deregistration request.

8. The method according to any one of claims 1 to 4, characterized in that The number of the first target service nodes is E, where E is an integer greater than 1; The calling the first target service node to process the service information includes: Determine e first target service nodes from E first target service nodes by using a load balancing strategy, where e is a positive integer less than E; as well as The e first target service nodes are called to process the service information.

9. A service node, characterized in that: The service node includes: An acquisition module, configured to acquire attribute information of N service nodes from a service registration center in response to receiving a call instruction carrying service information, where N is an integer greater than 1; A first determination module, configured to determine a target routing rule from M pre-stored routing rules based on the service information, where M is an integer greater than 1; a second determining module, configured to determine a first target service node from the N service nodes based on the target routing rule and the attribute information of the N service nodes; and A calling module is used to call the first target service node to process the service information.

10. A distributed node network, characterized in that: The distributed node network includes B service nodes as described in claim 9, where B is an integer greater than N.

11. An electronic device, comprising: one or more processors; a memory for storing one or more computer programs, It is characterized in that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 8.

12. A computer-readable storage medium having a computer program or instruction stored thereon, characterized in that: When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

13. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.

Citation Information

Patent Citations

  • Service selection method and system of wireless sensor network

    CN104540199A

  • Service instance determination method and device, storage medium and electronic equipment

    CN110837424A

  • Service node selection method, device, equipment and readable storage medium

    CN110933136A

  • Service calling method and device and service processing method and device under unitized architecture

    CN114172966A

  • Service publishing method and device, equipment and storage medium

    CN117707650A