Business service method and device
By assigning business status tags in the business service node and uploading them to the gateway, determining the target node for business services, the problem of low stateless service performance is solved, and efficient business services and high availability are achieved.
Patent Information
- Application Number
- CN202411995889.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-18
AI Technical Summary
Stateless services lead to inefficiency in Internet service development, and the inability to efficiently use local cache and data warm-up.
By assigning business status tags in the business service node, data warm-up is realized and uploading these tags to the gateway to determine the target business service node for business services.
Converting stateless business service nodes into stateful nodes improves the performance and efficiency of business services while maintaining high availability.
Smart Images

Figure CN119854149A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a business service method and device. Background Art
[0002] In the development of Internet services, in order to ensure the high availability of services, a cluster deployment mode is generally adopted. Each service node in the cluster is stateless. This ensures that if any node fails, other nodes can continue to provide services without distinction.
[0003] The disadvantages of stateless services are also obvious. For example, they cannot use local cache efficiently and cannot preheat data for deterministic scenarios, which leads to low overall performance and efficiency. Summary of the invention
[0004] In view of the above problems, the embodiments of the present application provide a business service method and device that overcome the above problems or at least partially solve the above problems.
[0005] In a first aspect, an embodiment of the present application provides a business service method, which is applied to a business control center, and the method includes:
[0006] Obtain node information of each business service node in the business service cluster;
[0007] Based on the node information of each business service node, a corresponding business status label is allocated to each business service node, so that each business service node performs data preheating according to the corresponding business status label;
[0008] The business status tag of each business service node is uploaded to the gateway, so that when the gateway receives a business request, it determines the target business service node in the business service cluster according to the business request and the business status tag of each business service node, so as to provide business services through the target business service node.
[0009] Optionally, allocating a corresponding service status label to each service node based on the node information of each service node includes:
[0010] Obtain multiple business status tags based on business rules;
[0011] Based on multiple business status labels and node information of each business service node, a business status label corresponding to each business service node is allocated;
[0012] Feedback the business status tag corresponding to each business service node to the corresponding business service node.
[0013] Optionally, each service status label corresponds to a plurality of service service nodes, and the plurality of service service nodes include: a primary service service node and at least two backup service service nodes corresponding to the service status label.
[0014] In a second aspect, an embodiment of the present application further provides a business service method, which is applied to a gateway, and the method includes:
[0015] Receive the business status label of each business service node in the business service cluster sent by the business control center;
[0016] When a service request is received, a target service node in the service service cluster is determined according to the service request and the service status tags of each service node, so as to provide service through the target service node.
[0017] Optionally, when receiving the service request, determining the target business service node in the business service cluster according to the business request and the business status label of each business service node includes:
[0018] When receiving a service request, judging whether each service node in the service cluster meets a preset condition according to the service parameters in the service request and the service status label of each service node;
[0019] If the first business service node in the business service cluster meets the preset condition, determining the first business service node as the target business service node;
[0020] If all the business service nodes in the business service cluster do not meet the preset condition, any one of the business service nodes in the business service cluster is determined as the target business service node.
[0021] Optionally, the preset conditions include:
[0022] The service status label of the service service node is a service status label corresponding to the service parameter;
[0023] The operation status of the business service node is in the running state.
[0024] In a third aspect, an embodiment of the present application further provides a business service device, which is applied to a business control center, and the device includes:
[0025] An acquisition module is used to obtain node information of each business service node in the business service cluster;
[0026] An allocation module, used to allocate a corresponding business status tag to each business service node based on the node information of each business service node, so that each business service node performs data preheating according to the corresponding business status tag;
[0027] The upload module is used to upload the business status label of each business service node to the gateway, so that when the gateway receives a business request, it determines the target business service node in the business service cluster according to the business request and the business status label of each business service node, so as to provide business services through the target business service node.
[0028] In a fourth aspect, an embodiment of the present application further provides a business service device, which is applied to a gateway, and the device includes:
[0029] A receiving module, used to receive the business status label of each business service node in the business service cluster sent by the business control center;
[0030] The determination module is used to determine the target business service node in the business service cluster according to the business request and the business status tags of each business service node when receiving the business request, so as to provide business services through the target business service node.
[0031] In a fifth aspect, an embodiment of the present application further provides an electronic device, including a memory, a transceiver, and a processor:
[0032] A memory for storing a computer program; a transceiver for sending and receiving data under the control of a processor; and a processor for reading the computer program in the memory and executing the method described in the first or second aspect above.
[0033] In a sixth aspect, an embodiment of the present application further provides a processor-readable storage medium, wherein the processor-readable storage medium stores a computer program, and the computer program is used to enable the processor to execute the method described in the first aspect or the second aspect above.
[0034] In the above-mentioned embodiment of the present application, the business control center obtains the node information of each business service node in the business service cluster, and assigns a corresponding business status label to each business service node based on the node information of each business service node, so that each business service node performs data preheating according to the corresponding business status label, and uploads the business status label of each business service node to the gateway, so that when the gateway receives a business request, it determines the target business service node in the business service cluster according to the business request and the business status label of each business service node, so as to provide business services through the target business service node. By preheating data through the business status label, the stateless business service node itself can be converted into a stateful business service node. In this case, each business service node can not only provide business services efficiently in a stateful manner, but also provide stateless services, which will not only not reduce the high availability effect, but also improve the overall service performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0036] Figure 1 A flowchart of a business service method applied to a business control center provided in an embodiment of the present application;
[0037] Figure 2 A schematic diagram of information transmission between a service control center and a gateway provided in an embodiment of the present application;
[0038] Figure 3 A flowchart of a business service method applied to a gateway provided in an embodiment of the present application;
[0039] Figure 4 A structural block diagram of a business service device applied to a business control center provided in an embodiment of the present application;
[0040] Figure 5 A structural block diagram of a business service device applied to a gateway provided in an embodiment of the present application;
[0041] Figure 6 A structural block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0042] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0043] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0044] The business service method provided by the embodiment of the present application is described in detail below through specific embodiments and their application scenarios in conjunction with the accompanying drawings.
[0045] Specifically, the present application embodiment provides a business service method, such as Figure 1 As shown, it is applied to the business control center and may specifically include the following steps:
[0046] Step 101: Obtain node information of each business service node in the business service cluster.
[0047] The business control center is specifically the service business status control center. Figure 2 As shown, the business service cluster includes multiple business service nodes, and each business service node reports node information to the business control center. The node information includes but is not limited to: Internet Protocol (IP) port, business information supported by the business service node, etc.
[0048] Step 102: Based on the node information of each business service node, a corresponding business status label is allocated to each business service node, so that each business service node performs data preheating according to the corresponding business status label.
[0049] like Figure 2As shown, the business control center assigns the corresponding business status label to each business service node based on the node information of each business service node received, thereby forming a binding relationship between the node information of each business service node and the corresponding business status label. Since the node information and the business service node are in a one-to-one correspondence, a binding relationship is formed between each business service node and the corresponding business status label. Therefore, each business service node can preheat data according to the business status label assigned by the business control center, that is, each business service node only preheats data related to its own business status label, thereby each business service node is a stateful node for the business related to the business status label, and a stateless node for the business not related to the business status label. For example: the business status label of business service node 1 is the business status label of dispatching orders to place A, that is, business service node 1 only loads data about dispatching orders to place A.
[0050] It should be noted that the business control center only assigns business labels to healthy business service nodes. For unhealthy business service nodes, even if the node information is received, the business status label is not assigned. The business status label is only assigned to healthy business service nodes to ensure that the business service nodes corresponding to each business status label are healthy business service nodes, so as to improve the efficiency of business services.
[0051] If the service control center does not receive the node information of the service node within the preset time, the service node is an unhealthy service node. If the service control center receives the node information of the service node within the preset time, the service node is a healthy service node.
[0052] It should be noted that data preheating refers to the process of pre-loading indexes and related data structures into memory before data query requests arrive. This process is designed to optimize query response time and search performance and reduce cold start delays caused by data not being cached in memory. In stateful nodes, data is stored locally or within the node. Each node saves some or all of the application state information, which means that the node needs to save certain data so that it can process requests when needed. Stateless nodes do not save any persistent data related to client sessions. Each request is processed independently of other requests and does not depend on the state of the application when it was last run. All necessary data is stored in external systems, such as databases or cache services, and nodes only need to read this data to process requests.
[0053] Step 103, upload the business status tag of each business service node to the gateway, so that when the gateway receives a business request, it determines the target business service node in the business service cluster according to the business request and the business status tag of each business service node, so as to provide business services through the target business service node.
[0054] like Figure 2 As shown, the business control center uploads the business status tag corresponding to each business service node to the gateway. If the business caller initiates a business request to the gateway, the gateway can determine the target business service node in the business service cluster for providing business services for the business request based on the business request and the business status tag of each business service node when receiving the business request.
[0055] In the above-mentioned embodiment of the present application, the business control center obtains the node information of each business service node in the business service cluster, and assigns a corresponding business status label to each business service node based on the node information of each business service node, so that each business service node performs data preheating according to the corresponding business status label, and uploads the business status label of each business service node to the gateway, so that when the gateway receives a business request, it determines the target business service node in the business service cluster according to the business request and the business status label of each business service node, so as to provide business services through the target business service node. By preheating data through the business status label, the stateless business service node itself can be converted into a stateful business service node. In this case, each business service node can not only provide business services efficiently in a stateful manner, but also provide stateless services, which will not only not reduce the high availability effect, but also improve the overall service performance.
[0056] As an optional specific embodiment, the step 102 allocates a corresponding service status label to each service node based on the node information of each service node, including:
[0057] Obtain multiple business status tags based on business rules;
[0058] Based on multiple business status labels and node information of each business service node, a business status label corresponding to each business service node is allocated;
[0059] Feedback the business status tag corresponding to each business service node to the corresponding business service node.
[0060] like Figure 2As shown, the business control center obtains business rules, and based on the business rules, obtains multiple business status tags related to the business rules. For example, if the business rule is: dispatch orders to three places A, B, and C, the business status tags related to the business rule are: business status tags for dispatching orders to place A, business status tags for dispatching orders to place B, and business status tags for dispatching orders to place C.
[0061] The business control center assigns the corresponding business status label to each business service node based on the node information and multiple business status labels received from each business service node, and feeds back the assigned business status labels to the corresponding business service nodes respectively, so that each business service node can preheat the data according to the business status labels assigned by the business control center.
[0062] It should be noted that the number of business service nodes is less than or equal to the number of places where orders are dispatched.
[0063] Take the example that the number of business service nodes is equal to the number of places where orders are dispatched:
[0064] The business service cluster includes three business service nodes, namely business service node 1, business service node 2, and business service node 3. The node information of business service node 1 indicates that business service node 1 supports dispatching orders at location A, the node information of business service node 2 indicates that business service node 2 supports dispatching orders at location B, and the node information of business service node 3 indicates that business service node 3 supports dispatching orders at location C. The business control center assigns a business status tag for dispatching orders at location A to business service node 1 based on the node information of business service node 1, the business control center assigns a business status tag for dispatching orders at location B to business service node 2 based on the node information of business service node 2, and the business control center assigns a business status tag for dispatching orders at location C to business service node 3 based on the node information of business service node 3.
[0065] Take the example where the number of business service nodes is less than the number of dispatch locations:
[0066] The business service cluster includes two business service nodes, namely business service node 1 and business service node 2. The node information of business service node 1 indicates that business service node 1 supports dispatching orders at location A, and the node information of business service node 2 indicates that business service node 2 supports dispatching orders at locations B and C. The business control center assigns a business status tag for dispatching orders at location A to business service node 1 based on the node information of business service node 1, and the business control center assigns a business status tag for dispatching orders at locations B and C to business service node 2 based on the node information of business service node 2.
[0067] As an optional specific embodiment, in step 102, each service status label corresponds to a plurality of service service nodes, and the plurality of service service nodes include: a primary service service node and at least two backup service service nodes corresponding to the service status label.
[0068] In order to ensure the high availability of business services, each business status label is set to correspond to a main business service node and at least two backup business service nodes. The main business service node corresponding to the business status label is used preferentially for business services, that is, each business service node can efficiently provide business services in a stateful manner; when the main business service node goes down, the backup business service node is selected to provide business services, that is, each business service node can also provide stateless services, which will not only not reduce the high availability of the service, but also improve the overall service performance.
[0069] The following example takes each service status label as corresponding to one main service node and two backup service nodes as an example:
[0070] The business rules indicate that orders are dispatched to four locations, ABCD. The business service cluster includes business service nodes 1, 2, 3, 3, and 4. The business control center assigns business status tags for dispatching orders to location A to business service nodes 1, 2, and 3, and uses business service node 1 as the main business service node for dispatching orders to location A, and business service nodes 2 and 3 as backup business service nodes for dispatching orders to location A. The business control center assigns business status tags for dispatching orders to location B to business service nodes 2, 3, and 4, and uses business service node 2 as the main business service node for dispatching orders to location B, and business service nodes 3 and 4 as backup business service nodes for dispatching orders to location B. The business control center assigns business status tags for dispatching orders to location C to business service nodes 3, 4, and 1, and uses business service node 3 as the main business service node for dispatching orders to location C, and business service nodes 4 and 1 as backup business service nodes for dispatching orders to location C. The business control center assigns business status tags for D dispatch to business service nodes 4, 1, and 2, and uses business service node 4 as the main business service node for D dispatch, and business service nodes 1 and 2 as backup business service nodes for D dispatch.
[0071] To sum up, in the above embodiments of the present application, the business control center obtains the node information of each business service node in the business service cluster, and assigns a corresponding business status label to each business service node based on the node information of each business service node. Each business service node preheats data according to the corresponding business status label, and can convert the stateless business service node into a stateful business service node. In this case, each business service node can not only provide business services efficiently in a stateful manner, but also provide stateless services, which will not only not reduce the high availability effect, but also improve the overall service performance.
[0072] The present application also provides a business service method, such as Figure 3 As shown, when applied to a gateway, the following steps may be specifically included:
[0073] Step 301: Receive a service status label of each service node in a service cluster sent by a service control center.
[0074] The business control center is specifically the service business status control center. Figure 2 As shown, the business service cluster includes multiple business service nodes, and each business service node reports node information to the business control center. The node information includes but is not limited to: IP port, business information supported by the business service node, etc.
[0075] The business control center assigns the corresponding business status tag to each business service node based on the node information of each business service node received, so that each business service node preheats the data according to the business status tag assigned by the business control center, that is, each business service node only preheats the data related to its own business status tag, so that each business service node is a stateful node for the business related to the business status tag, and a stateless node for the business not related to the business status tag. For example: the business status tag of business service node 1 is the business status tag of dispatching orders at place A, that is, business service node 1 only loads data about dispatching orders at place A.
[0076] The service control center uploads the service status label corresponding to each service node to the gateway, and the gateway receives the service status label of each service node sent by the service control center.
[0077] Step 302: upon receiving a service request, determining a target service node in the service cluster according to the service request and service status tags of each service node, so as to provide service through the target service node.
[0078] like Figure 2 As shown, if the business call direction initiates a business request to the gateway, when the gateway receives the business request, it can determine the target business service node in the business service cluster for providing business service for the business request based on the business request and the business status label of each business service node, and route it to the corresponding target business service node for business service.
[0079] In the above embodiment of the present application, the gateway receives the business status label of each business service node sent by the business control center. When the gateway receives a business request, it determines the target business service node in the business service cluster for providing business services for the business request based on the business request and the business status label of each business service node, and routes to the corresponding target business service node for business services. By routing to the corresponding target business service node for business services through the business status label, the stateless business service node itself can be converted into a stateful business service node. In this case, each business service node can not only provide business services efficiently in a stateful manner, but also provide stateless services, which will not only not reduce the effect of high availability, but also improve the overall service performance.
[0080] As an optional specific embodiment, when receiving a service request, step 302 determines the target business service node in the business service cluster according to the business request and the business status label of each business service node, specifically including:
[0081] When receiving a service request, judging whether each service node in the service cluster meets a preset condition according to the service parameters in the service request and the service status label of each service node;
[0082] If the first business service node in the business service cluster meets the preset condition, determining the first business service node as the target business service node;
[0083] If all the business service nodes in the business service cluster do not meet the preset condition, any one of the business service nodes in the business service cluster is determined as the target business service node.
[0084] In order to ensure the high availability of business services, each business status label is set to correspond to a main business service node and at least two backup business service nodes. The main business service node corresponding to the business status label is used preferentially for business services, that is, each business service node can efficiently provide business services in a stateful manner; when the main business service node goes down, the backup business service node is selected to provide business services, that is, each business service node can also provide stateless services, which will not only not reduce the high availability of the service, but also improve the overall service performance.
[0085] If the business call direction initiates a business request to the gateway, the gateway can determine whether each business service node in the business business cluster meets the preset conditions based on the request parameters in the business request and the business status label of each business service node when receiving the business request. If all business service nodes in the business service cluster do not meet the preset conditions, it means that there is no business status label corresponding to the business parameters in the business service cluster, that is, for the business request parameters, all business service nodes in the business service cluster are stateless nodes, then any business service node will be used as the target business service node for business services.
[0086] If one or more business service nodes (i.e., the first business service node) in the business service cluster meets the preset conditions, it means that there is a business status label corresponding to the business parameters in the business service cluster, that is, for the business request parameters, the first business service node in the business service cluster is a stateful node, then the stateful node will be used as the target business service node for business services.
[0087] It should be noted that if there are multiple stateful nodes, the primary business service node is preferentially selected as the target business service node. If the primary business service node is down, any backup business service node is selected as the target business service node.
[0088] The service parameters include but are not limited to: time, distance, etc.
[0089] Furthermore, the preset conditions include but are not limited to:
[0090] The service status label of the service service node is a service status label corresponding to the service parameter;
[0091] The operation status of the business service node is in the running state.
[0092] If the business call direction initiates a business request to the gateway, the gateway can determine whether the business cluster includes business status tags corresponding to the business parameters based on the request parameters in the business request and the business status tags of each business service node when receiving the business request. If the business service cluster does not include the business status tags corresponding to the business parameters, it means that all business service nodes do not meet the preset conditions.
[0093] If the business service cluster includes a business status tag corresponding to the business parameters, the business status tag corresponding to the business parameters is used as the target business status tag, and the operating status of multiple business service nodes corresponding to the target business status tag is further determined. If the operating status of multiple business service nodes corresponding to the target business status tag are all down, it means that all business service nodes do not meet the preset conditions; if the operating status of the main business service node corresponding to the target business status tag is in the running state, it means that the main business service node meets the preset conditions, and the main business service node is used as the target business service node; if the operating status of the main business service node corresponding to the target business status tag is down and the alternative business service node is in the running state, it means that the alternative business service node meets the preset conditions, and any alternative business service node in the running state is used as the target business service node.
[0094] To summarize, in the above embodiment of the present application, the gateway receives the business status label of each business service node sent by the business control center. When the gateway receives a business request, it determines the target business service node in the business service cluster for providing business services for the business request based on the business request and the business status label of each business service node, and routes to the corresponding target business service node for business services. By routing to the corresponding target business service node for business services through the business status label, the stateless business service node itself can be converted into a stateful business service node. In this case, each business service node can not only provide business services efficiently in a stateful manner, but also provide stateless services, which will not only not reduce the effect of high availability, but also improve the overall service performance.
[0095] It should be noted that the specific implementation steps of the business service method applied to the business control center and the business service method applied to the gateway are interrelated. The specific implementation content of the method on one side can be implemented based on the specific implementation content of the method on the other side to ensure the relevance and consistency between the steps.
[0096] The business service method provided by the embodiment of the present application is introduced above. The business service device provided by the embodiment of the present application will be introduced below in conjunction with the accompanying drawings.
[0097] like Figure 4 As shown, the embodiment of the present application further provides a business service device 400, which is applied to a business control center, and the device includes:
[0098] The acquisition module 401 is used to acquire the node information of each business service node in the business service cluster;
[0099] The allocation module 402 is used to allocate a corresponding business status tag to each business service node based on the node information of each business service node, so that each business service node performs data preheating according to the corresponding business status tag;
[0100] The upload module 403 is used to upload the business status label of each business service node to the gateway, so that when the gateway receives a business request, it determines the target business service node in the business service cluster according to the business request and the business status label of each business service node, so as to provide business services through the target business service node.
[0101] Optionally, when allocating a corresponding service status label to each service node based on the node information of each service node, the allocation module 402 is specifically configured to:
[0102] Obtain multiple business status tags based on business rules;
[0103] Based on multiple business status labels and node information of each business service node, a business status label corresponding to each business service node is allocated;
[0104] Feedback the business status tag corresponding to each business service node to the corresponding business service node.
[0105] Optionally, each service status label corresponds to a plurality of service service nodes, and the plurality of service service nodes include: a primary service service node and at least two backup service service nodes corresponding to the service status label.
[0106] It should be noted here that the above-mentioned business service device provided in the embodiment of the present application can implement all the method steps implemented in the above-mentioned business service method embodiment, and can achieve the same technical effect. The parts and beneficial effects that are the same as those in the method embodiment will not be described in detail here.
[0107] like Figure 5 As shown, the embodiment of the present application further provides a business service device 500, which is applied to a gateway, and the device includes:
[0108] The receiving module 501 is used to receive the service status label of each service node in the service cluster sent by the service control center;
[0109] The determination module 502 is used to determine the target business service node in the business service cluster according to the business request and the business status tags of each business service node when receiving the business request, so as to provide business services through the target business service node.
[0110] Optionally, when receiving a service request, the determination module 502 determines the target business service node in the business service cluster according to the service request and the business status label of each business service node, specifically for:
[0111] When receiving a service request, judging whether each service node in the service cluster meets a preset condition according to the service parameters in the service request and the service status label of each service node;
[0112] If the first business service node in the business service cluster meets the preset condition, determining the first business service node as the target business service node;
[0113] If all the business service nodes in the business service cluster do not meet the preset condition, any one of the business service nodes in the business service cluster is determined as the target business service node.
[0114] Optionally, the preset conditions include:
[0115] The service status label of the service service node is a service status label corresponding to the service parameter;
[0116] The operation status of the business service node is in the running state.
[0117] It should be noted that the division of units in the embodiments of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation. In addition, each functional unit in each embodiment of the present application may be integrated into a processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0118] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a processor-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program codes.
[0119] like Figure 6 As shown, an embodiment of the present application further provides an electronic device, including a memory 620, a transceiver 610, and a processor 600:
[0120] Memory 620, used for storing computer programs;
[0121] A transceiver 610, configured to transmit and receive data under the control of the processor;
[0122] The processor 600 is configured to read the computer program in the memory and execute the steps of the business service method described in any of the above embodiments.
[0123] Among them, Figure 6 In the embodiment, the bus architecture may include any number of interconnected buses and bridges, specifically linking together various circuits of one or more processors represented by processor 600 and memory represented by memory 620. The bus architecture may also link together various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface. The transceiver 610 may be a plurality of components, namely, a transmitter and a receiver, providing a unit for communicating with various other devices on a transmission medium, which transmission medium may include a wireless channel, a wired channel, an optical cable, and the like. The processor 600 is responsible for managing the bus architecture and general processing, and the memory 620 may store data used by the processor 600 when performing operations.
[0124] The processor 600 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or a complex programmable logic device (CPLD). The processor may also adopt a multi-core architecture.
[0125] The processor calls the computer program stored in the memory to execute the business service method provided by the embodiment of the present application according to the obtained executable instructions. The processor and the memory can also be arranged physically separately.
[0126] It should be noted here that the above-mentioned electronic device provided in the embodiment of the present application can implement all the method steps implemented in the above-mentioned business service method embodiment, and can achieve the same technical effect. The parts and beneficial effects that are the same as the method embodiment in this embodiment will not be described in detail here.
[0127] An embodiment of the present application further provides a processor-readable storage medium, wherein the processor-readable storage medium stores a computer program, and the computer program is used to enable the processor to execute the above-mentioned business service method.
[0128] The processor-readable storage medium can be any available medium or data storage device that can be accessed by the processor, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical storage (such as CD, DVD, BD, HVD, etc.), and semiconductor storage (such as ROM, EPROM, EEPROM, non-volatile memory (NANDFLASH), solid-state drive (SSD)), etc.
[0129] 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 present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) that contain computer-usable program code.
[0130] 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 executable instructions. These computer executable 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.
[0131] These processor executable instructions may also be stored in a processor readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the processor readable memory produce an article of manufacture including 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.
[0132] These processor-executable instructions may also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable device to implement 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.
[0133] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A business service method, characterized in that: Applied to a service control center, the method comprises: Obtain node information of each business service node in the business service cluster; Based on the node information of each business service node, a corresponding business status label is allocated to each business service node, so that each business service node performs data preheating according to the corresponding business status label; The business status tag of each business service node is uploaded to the gateway, so that when the gateway receives a business request, it determines the target business service node in the business service cluster according to the business request and the business status tag of each business service node, so as to provide business services through the target business service node.
2. The method according to claim 1, characterized in that The assigning of a corresponding service status label to each service node based on the node information of each service node includes: Obtain multiple business status tags based on business rules; Based on multiple business status labels and node information of each business service node, a business status label corresponding to each business service node is allocated; Feedback the business status tag corresponding to each business service node to the corresponding business service node.
3. The method according to claim 1, characterized in that Each service state label corresponds to a plurality of service service nodes, and the plurality of service service nodes include: a main service service node and at least two backup service service nodes corresponding to the service state label.
4. A business service method, characterized in that: Applied to a gateway, the method comprises: Receive the business status label of each business service node in the business service cluster sent by the business control center; When a service request is received, a target service node in the service service cluster is determined according to the service request and the service status tags of each service node, so as to provide service through the target service node.
5. The method according to claim 4, characterized in that When receiving a service request, determining a target service node in the service service cluster according to the service request and service status tags of each service node includes: When receiving a service request, judging whether each service node in the service cluster meets a preset condition according to the service parameters in the service request and the service status label of each service node; If the first business service node in the business service cluster meets the preset condition, determining the first business service node as the target business service node; If all the business service nodes in the business service cluster do not meet the preset condition, any one of the business service nodes in the business service cluster is determined as the target business service node.
6. The method according to claim 5, characterized in that The preset conditions include: The service status label of the service service node is a service status label corresponding to the service parameter; The operation status of the business service node is in the running state.
7. A business service device, characterized in that: Applied to a business control center, the device comprises: An acquisition module is used to obtain node information of each business service node in the business service cluster; An allocation module, used to allocate a corresponding business status tag to each business service node based on the node information of each business service node, so that each business service node performs data preheating according to the corresponding business status tag; The upload module is used to upload the business status label of each business service node to the gateway, so that when the gateway receives a business request, it determines the target business service node in the business service cluster according to the business request and the business status label of each business service node, so as to provide business services through the target business service node.
8. A business service device, characterized in that: Applied to a gateway, the device comprises: A receiving module, used to receive the business status label of each business service node in the business service cluster sent by the business control center; The determination module is used to determine the target business service node in the business service cluster according to the business request and the business status tags of each business service node when receiving the business request, so as to provide business services through the target business service node.
9. An electronic device, characterized in that: Including memory, transceiver, processor: Memory for storing computer programs; a transceiver, for transmitting and receiving data under the control of the processor; A processor, configured to read the computer program in the memory and execute the business service method according to any one of claims 1 to 3, or execute the business service method according to any one of claims 4 to 6.
10. A processor-readable storage medium, characterized in that: The processor-readable storage medium stores a computer program, and the computer program is used to enable the processor to execute the business service method according to any one of claims 1 to 3, or to execute the business service method according to any one of claims 4 to 6.