Service operation method and device, electronic equipment and storage medium

By registering and managing service nodes on the registry center server, gracefully controlling the replacement process of service nodes, the problem of requests to run out of service nodes is solved, and the continuity of business operations and user experience is improved.

CN119226008APending Publication Date: 2024-12-31CHINA PING AN PROPERTY INSURANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411365035.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-27
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

During the replacement of service nodes, user requests may reach service nodes that have been offline, resulting in breakpoints between requested empty runs and business operations, affecting the continuity of user operations, especially when the back-end application service is in an over-release state. obvious.

Method used

By registering the first service node on the registration center server and detecting its registration status, if successful, sending a notification of the second service node offline, waiting for a preset time, calling the first service, ensuring that all newly released service deployments are Only after being in an available state are imported, the second service node is actively recycled, and gracefully controls the registration and offline process of the service node.

Benefits of technology

It reduces the failed requests caused by active service release, improves the continuity of business operations during service node replacement, reduces the perceived load in user operation processes, and ensures the integrity of the core service link.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119226008A_ABST
    Figure CN119226008A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a service operation method and device, electronic equipment and a storage medium, and belongs to the technical field of cloud computing and financial science and technology. The method is applied to scheduling an application server, and specifically comprises the following steps: indicating an application service client to register a first service node at a registration center server, the first service node being an instance node deployed by a first service; the service registration state of the first service node is detected, if the service registration state shows that the first service node is successfully registered, a second service node offline notification is sent to the application service client, and the second service node offline notification is used for instructing the application service client to offline a second service node; the second service node is an instance node deployed by a second service; and after a first preset waiting duration, calling the first service. According to the embodiment of the invention, the continuity of service operation in a service node replacement process of different service deployments can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical fields of cloud computing and financial technology, and in particular to a service operation method and device, an electronic device and a storage medium. Background Art

[0002] Since the maximum number of available service nodes is limited, when the backend application service is in an over-release state, the user's request may reach a service node where a new service being released has been offline, resulting in the request being empty, affecting the user's progress in the next step of the process and causing a breakpoint.

[0003] For example, when a user is inquiring about insurance policies, claims, case processing submission status, purchasing and paying for items in the mall, or purchasing and paying for car / non-car products, if the backend application service is in a service over-release state, the service node reached by the operation request may have been offline due to the replacement of the old and new service nodes when the user is performing the operation, resulting in a scenario where the user operation fails, affecting the continuity of the business scenario operation. Summary of the invention

[0004] The main purpose of the embodiments of the present application is to propose a service operation method and device, an electronic device and a storage medium, aiming to improve the continuity of business operations during the replacement of service nodes for different service deployments.

[0005] To achieve the above-mentioned purpose, a first aspect of an embodiment of the present application proposes a service operation method, which is applied to a scheduling application server, and the method includes: Instructing the application service client to register a first service node at the registration center server, where the first service node is an instance node deployed by the first service; Detecting the service registration status of the first service node, and if the service registration status indicates that the first service node is successfully registered, sending a second service node offline notification to the application service client, where the second service node offline notification is used to instruct the application service client to offline the second service node; the second service node is an instance node deployed by the second service; After a first preset waiting time, the first service is called.

[0006] In some embodiments, instructing the application service client to register the first service node at the registration center server includes: Instructing the application service client to pull up the first service node; After a second preset waiting time, a first service node registration notification is sent to the application service client, where the first service node registration notification is used to instruct the application service client to register the first service node with the registration center server.

[0007] In some embodiments, the detecting the service registration status of the first service node, and if the service registration status indicates that the first service node is successfully registered, sending a second service node offline notification to the application service client includes: Obtain the number of the first service nodes to obtain the number of first nodes; Calculate the difference between a preset threshold and the number of service nodes in which the application service client is in an online state to obtain a second number of nodes, wherein the preset threshold is used to represent the maximum number of service nodes in which the application service client can be in an online state at the same time; If the number of the first nodes is greater than the number of the second nodes, a second service node offline notification is sent to the application service client.

[0008] To achieve the above-mentioned purpose, a second aspect of an embodiment of the present application proposes a service operation method, which is applied to an application service client and includes: Registering a first service node with a registration center server under the instruction of a scheduling application server, wherein the first service node is an instance node of a first service deployment; Receiving a service registration status of a first service node sent by the registration center server; Receiving a second service node offline notification sent by the scheduling application server; In response to the offline notification of the second service node, offline processing is performed on the service process on the second service node; Send a second service node deregistration notification to the registration center server, where the second service node deregistration notification is used to instruct the registration center server to delete the registration information of the second service node.

[0009] In some embodiments, registering the first service node with the registration center server under the instruction of the scheduling application server includes: Pull up the first service node under the instruction of the scheduling application server; Receiving a first service node registration notification sent by the scheduling application server; In response to the first service node registration notification, the registration information of the first service node is sent to a registration center server.

[0010] In some embodiments, the offline processing of the service process on the second service node includes: Reading a first thread corresponding to the remote procedure call service on the second service node, and if the first thread is being executed, stopping the execution of the first thread; The second thread corresponding to the transmission control protocol service on the second service node is read, and if the second thread is being executed, the execution of the second thread is stopped.

[0011] To achieve the above-mentioned purpose, a third aspect of an embodiment of the present application proposes a service operation device, which is applied to a scheduling application server, and includes: An instruction module, used to instruct the application service client to register a first service node at the registration center server, where the first service node is an instance node deployed by the first service; a processing module, configured to detect a service registration status of the first service node, and if the service registration status indicates that the first service node is successfully registered, send a second service node offline notification to the application service client, wherein the second service node offline notification is used to instruct the application service client to offline the second service node; the second service node is an instance node deployed by the second service; The calling module is used to call the first service after a first preset waiting time.

[0012] To achieve the above-mentioned purpose, a fourth aspect of an embodiment of the present application proposes a service operation device, which is applied to an application service client, and includes: A registration module, used to register a first service node with a registration center server under the instruction of a scheduling application server, wherein the first service node is an instance node of a first service deployment; A first receiving module, configured to receive a service registration status of a first service node sent by the registration center server; A second receiving module, configured to receive a second service node offline notification sent by the scheduling application server; An offline processing module, configured to perform offline processing on the service process on the second service node in response to the offline notification of the second service node; The sending module is used to send a second service node deregistration notification to the registration center server, where the second service node deregistration notification is used to instruct the registration center server to delete the registration information of the second service node.

[0013] To achieve the above objectives, the fifth aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, the memory stores a computer program, and the processor implements the method described in the first or second aspect when executing the computer program.

[0014] To achieve the above objectives, the sixth aspect of an embodiment of the present application proposes a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in the first aspect or the second aspect is implemented.

[0015] The service operation method and device, electronic device and storage medium proposed in the present application, after completing the registration of the first service node deployed by the first service, actively recycle the second service node deployed by the published second service. After completing the recycling of the second service node, the first service is called again, which can control the registration and offline process of service nodes of different services, and elegantly control the replacement of services. By ensuring that all service nodes deployed by newly published services are in an available state before importing traffic, this method can reduce failed requests caused by active service release, improve the continuity of business operations during the replacement of service nodes of different services, and reduce the perception of service release on the user's operation process. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 is a flow chart of the service operation method provided by an embodiment of the present application; Figure 2 yes Figure 1 Flow chart of step S101; Figure 3 yes Figure 1 Flow chart of step S102; Figure 4 This is the second flowchart of the service operation method provided in the embodiment of the present application; Figure 5 yes Figure 4 Flow chart of step S401 in FIG. Figure 6 yes Figure 4 Flow chart of step S404; Figure 7 is another flow chart of the service operation method provided in the embodiment of the present application; Figure 8 It is a structural diagram of a service operation device provided in the first embodiment of the present application; Fig. 9 is a structural diagram of a service operation device provided in the second embodiment of the present application; Fig.10 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION

[0017] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0018] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0019] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0020] First, some nouns involved in this application are analyzed: The scheduling application server is used to manage containerized applications on multiple hosts in the cloud platform. Its goal is to make the deployment of containerized applications simple and powerful. In some embodiments, the scheduling application server is an open source container orchestration engine that supports automated deployment, large-scale scalability, and application containerization management. When deploying an application in a production environment, it is usually necessary to deploy multiple instances of the application in order to load balance application requests. In actual applications, multiple containers can be created, each of which runs an application instance, and then the built-in load balancing strategy is used to manage, discover, and access this group of application instances, and these details do not require the operation and maintenance personnel to perform complex manual configuration and processing.

[0021] A container is an instance of an independently running application or service that can contain the application's code, runtime environment, dependencies, and configurations. A container is a lightweight, portable, self-contained software packaging technology that packages an application and all its dependencies together to ensure that the application runs in the same way in any environment.

[0022] A deployment unit (Pod) is the smallest scheduling unit, which contains one or more containers that share storage, network, and container runtime configuration.

[0023] Node is a working node in the scheduling application server cluster, also known as a host or machine. Node is a physical or virtual machine responsible for running the container in the Pod. Each Node has its own computing resources and storage resources. The scheduling application server executes the workload by placing the container into the Pod running on the Node. Application Programming Interface (API) is a set of predefined functions that aims to provide application and developers with the ability to access a set of routines based on certain software or hardware without having to access the source code or understand the details of the internal working mechanism. By pre-customizing the API with corresponding functions, the corresponding operation can be achieved by calling the API.

[0024] Based on this, the embodiments of the present application provide a service operation method and device, an electronic device and a storage medium, aiming to improve the continuity of business operations during the replacement of service nodes for different service deployments. The service operation method and device, electronic device and storage medium provided in the embodiments of the present application are specifically described through the following embodiments. First, the service operation method in the embodiments of the present application is described.

[0025] Figure 1 is an optional flow chart of the service operation method provided in the embodiment of the present application. In the specific implementation, Figure 1 The service operation method provided in the illustrated embodiment can be applied to a scheduling application server. Figure 1 The method may include but is not limited to steps S101 to S103.

[0026] Step S101, instructing the application service client to register a first service node at a registration center server, where the first service node is an instance node deployed by a first service.

[0027] Step S102, detecting the service registration status of the first service node. If the service registration status indicates that the first service node is successfully registered, sending a second service node offline notification to the application service client. The second service node offline notification is used to instruct the application service client to offline the second service node; the second service node is an instance node deployed by the second service.

[0028] Step S103: After a first preset waiting time, calling the first service.

[0029] In step S101 of some embodiments, the scheduling application server instructs the application service client to register the first service node at the registration center server. In some embodiments, the scheduling application server can instruct the application service client to register the first service node at the registration center server by calling a pre-configured interface.

[0030] In step S102 of some embodiments, the scheduling application server pre-customizes the target heartbeat interface, which is introduced by the service and added to the list of interfaces that can be scheduled. Furthermore, the target heartbeat interface can have functions such as authentication, detection of service operation status, and detection of service registration status. In step S102 of some embodiments, the scheduling application server detects the operation status of the first service by calling the pre-customized target heartbeat interface, including the service registration status of the first service node. If the service registration status indicates that the first service node is successfully registered, a notification of the second service node going offline is sent to the application service client.

[0031] The application service client receives the offline notification of the second service node sent by the scheduling application server; in response to the offline notification of the second service node, the service process on the second service node is offline processed. The application service client sends a deregistration notification of the second service node to the registration center server, and the deregistration notification of the second service node is used to instruct the registration center server to remove the registration information of the second service node.

[0032] In step S103 of some embodiments, after the first preset waiting time, the scheduling application server assumes that the application server client has completed the offline of the second service node, and thus calls the first service. Of course, in step S103 of some embodiments, the scheduling application server may also detect the offline status of the second service node, and if the offline status of the second service node indicates that the second service node is offline successfully, the first service is called.

[0033] In the embodiment of the present application, the first service is a service to be released, and the second service is a released service. In step S101, after successfully registering the first service node, the front-end traffic is temporarily not imported. After the second service node is recycled in step S102, the first service is called again. By alternating the first service node and the second service node in the above manner, it can be ensured that all first service nodes are online when the first service imports the front-end traffic, and that the nodes to which the user's request arrives are all online nodes, thereby ensuring that the validity of the user's operation is not affected by the service release.

[0034] Steps S101 to S103 shown in the embodiment of the present application can control the registration and offline process of service nodes of different services and elegantly control service replacement by actively reclaiming the second service node of the published second service deployment after completing the registration of the first service node deployed by the first service, and then calling the first service after completing the recycling of the second service node. This method ensures that traffic is imported only after all service nodes of the newly published service deployment are in an available state, which can reduce failed requests caused by active service release, improve the continuity of business operations during the replacement of service nodes of different services, and reduce the perception of service release on the user operation process.

[0035] See also Figure 2 In step S101 of some embodiments, step S101 may include but is not limited to steps S201 to S202: Step S201, instructing the application service client to pull up the first service node; Step S202: after a second preset waiting time, sending a first service node registration notification to the application service client, where the first service node registration notification is used to instruct the application service client to register the first service node with the registration center server.

[0036] In step S201 of some embodiments, the scheduling application server instructs the application service client to pull up the first service node and configure a new container corresponding to the first service.

[0037] Since the application service client needs a certain response time, in step S202 of some embodiments, the scheduling application server sends a first service node registration notification to the application service client after the second preset waiting time. In step S201 of some embodiments, the scheduling application server counts time by timing heartbeat detection, and when the timing heartbeat detection reaches a preset number of times, it indicates that the second preset waiting time has been reached, and at this time, the first service node registration notification is sent to the application service client.

[0038] See also Figure 3 In step S102 of some embodiments, step S102 may include but is not limited to steps S301 to S303: Step S301, obtaining the number of first service nodes to obtain the number of first nodes; Step S302, calculating the difference between a preset threshold and the number of service nodes in which the application service client is in an online state, to obtain a second number of nodes, wherein the preset threshold is used to represent the maximum number of service nodes in which the application service client can be in an online state at the same time; Step S303: If the number of first nodes is greater than the number of second nodes, a second service node offline notification is sent to the application service client.

[0039] In step S302 of some embodiments, the preset threshold is pre-configured and can be set and adjusted according to actual needs. When the number of first nodes is greater than the number of second nodes, it can be considered that the service is currently over-published, and the first service nodes may not all be online, resulting in a scenario where the user operation fails. This method can ensure that the first service can still be reliably published in the service publishing process.

[0040] In step S102 of some embodiments, step S102 includes determining whether the first service belongs to a preset core service, and if the first service belongs to a preset core service, detecting the service registration status of the first service node, and if the service registration status indicates that the first service node is successfully registered, sending a second service node offline notification to the application service client. Through the above method, the link integrity of the preset core service (such as payment, claims and other core scenarios) can be guaranteed.

[0041] See also Figure 4 , Figure 4 is a flow chart of the service operation method provided in the embodiment of the present application. In the specific implementation, Figure 4 The service running method provided by the illustrated embodiment can be applied to an application service client. Figure 4 The method may include but is not limited to steps S401 to S405: Step S401, registering a first service node with a registration center server under the instruction of a scheduling application server, where the first service node is an instance node of a first service deployment; Step S402, receiving the service registration status of the first service node sent by the registration center server; Step S403, receiving a notification of the second service node going offline sent by the scheduling application server; Step S404, in response to the offline notification of the second service node, offline processing is performed on the service process on the second service node; Step S405: Send a second service node deregistration notification to the registration center server. The second service node deregistration notification is used to instruct the registration center server to delete the registration information of the second service node.

[0042] This embodiment is used as Figure 1 The implementation method of the application service client side corresponding to the embodiment shown in the figure can be found in Figure 1 To avoid repetition, the corresponding contents of the related introduction in the illustrated embodiments will not be repeated here.

[0043] In the steps S401 to S405 shown in the embodiment of the present application, after registering the first service node with the registration center server under the instruction of the scheduling application server, in response to the offline notification of the second service node, the service process on the second service node is offline, and a second service node deregistration notification is sent to the registration center server. This method ensures that the second service nodes are offline before the first service is called, and there are sufficient available service nodes, thereby reducing failed requests caused by active service release, improving the continuity of business operations during the replacement of service nodes of different services, and reducing the perception of service release on the user operation process.

[0044] See also Figure 5 In step S401 of some embodiments, step S401 may include but is not limited to steps S501 to S503: Step S501, pulling up the first service node under the instruction of the scheduling application server; Step S502, receiving a first service node registration notification sent by a scheduling application server; Step S503: In response to the first service node registration notification, the registration information of the first service node is sent to the registration center server.

[0045] In step S501 of some embodiments, the application service client pulls up a first service node under the instruction of the scheduling application server to deploy a first service. While pulling up the first service node, the application service client obtains registration information of the first service node.

[0046] In step S503 of some embodiments, the application service client sends the registration information of the first service node to the registration center server in response to the first service node registration notification. The registration center server completes the registration of the first service node based on the registration information of the first service node, replies to the application service client with full application information and refreshes cached data, and replies to the application service client with service registration status.

[0047] This embodiment is used as Figure 2 The implementation method of the application service client side corresponding to the example shown in the figure can be found in Figure 2 To avoid repetition, the corresponding contents of the related introduction in the illustrated embodiments will not be repeated here.

[0048] See also Figure 6 In step S404 of some embodiments, step S404 may include but is not limited to steps S601 to S602: Step S601, reading a first thread corresponding to a remote procedure call service on a second service node, and if the first thread is being executed, stopping the execution of the first thread; Step S602: read the second thread corresponding to the transmission control protocol service on the second service node, and if the second thread is being executed, stop executing the second thread.

[0049] In step S601 of some embodiments, the application service client processes the logic call of the first software tool development kit to stop the execution of the first thread corresponding to the remote procedure call service on the second service node. Specifically, in some embodiments, before the service is started, a customized first software tool development kit (Software Development Kit, SDK) is introduced to read the thread pool / service bean related to the remote procedure call (Remote Procedure Call, RPC) service. When the service node offline interface call is received, the operation logic of the related bean is stopped and the bean is destroyed to ensure that within the graceful offline waiting time (recorded as T0) issued by the unified configuration center, no new thread continues to execute and no old thread is not terminated.

[0050] In step S602 of some embodiments, the application service client processes the logic call of the second software tool development kit to stop the execution of the second thread corresponding to the transmission control protocol service on the second service node. Specifically, in some embodiments, before the service is started, a customized second SDK is introduced to read the thread pool / service bean related to the transmission control protocol (TCP) request, and when a service node offline interface call is received, the operation logic of the related bean is stopped and the bean is destroyed to ensure that no new thread continues to execute and no old thread is not terminated within the graceful offline waiting time T0 issued by the unified configuration center.

[0051] In some embodiments, the first preset waiting time is greater than or equal to the graceful offline waiting time T0. In some embodiments, the first preset waiting time is equal to T0, based on T0 issued by the unified configuration center, the service process is offline using the kill-15 instruction after T0 ends. In the above manner, it can be ensured that the maximum processing time of the service logic triggered by the rpc / tcp request is covered, avoiding abnormal exit when the service logic is not completed.

[0052] In step S405 of some embodiments, after the rpc and / or tcp related calls are stopped, the application service client sends a second service node deregistration notification to the registration center server. After receiving the second service node deregistration notification, the registration center server removes the registration information of the second service node, synchronizes it to all downstream client nodes, and refreshes the relevant cache.

[0053] See also Figure 7 , the following will take a specific embodiment as an example to illustrate the specific process of the service operation method provided in the embodiment of the present application.

[0054] First, before the service is run, each end device can pre-configure various parameters and interfaces.

[0055] Exemplarily, the scheduling application server may configure the first preset waiting time, the second preset waiting time, and the preset threshold; The application service client can configure the application instance cache time (including the first-level cache expiration time and the second-level cache expiration time), and can adjust the second-level cache expiration time and the third-level cache expiration time of the node list to configure it within the call time. The application service client can also pre-customize the corresponding interfaces such as the node offline interface and the target heartbeat interface, and introduce them into the list of schedulable interfaces through the service.

[0056] The registration center server can configure the server node synchronization time, server node synchronization timeout, cluster synchronization information duration, client cache refresh duration, and weighted random calls. Among them, weighted random calls refer to setting weights for different groups. The sum of all group weights is 100%. When under load, random calls are made to the corresponding groups according to different weights. In specific implementation, by deploying cluster services, the heartbeat synchronization between services is kept within an acceptable delay time period.

[0057] When the first service is online, the scheduling application server instructs the application service client to pull up the first service node. After the background service is started, the scheduling application server initiates a heartbeat interface call. After the number of calls and the number of successful responses are met according to the configuration, it is considered that the second preset waiting time has been reached, and the scheduling application server sends a first service node registration notification to the application service client.

[0058] After the application service client pulls up the first service node under the instruction of the scheduling application server, it responds to the registration notification of the first service node and sends the registration information of the first service node to the registration center server. The registration center server confirms that the registration is successful and the service is running stably and normally, adds it to the load scheduling list, synchronizes it to each server standby node, returns the full application information, refreshes the client application instance information cache, and feedbacks the service registration status of the first service node to the application service client.

[0059] When the scheduling application server configures the container to be pulled up, the service registration status of the first service node can be detected through the pre-customized target heartbeat interface. If the service registration status indicates that the first service node is successfully registered, the scheduling application server reads the timing configuration duration, and after waiting for the timing configuration duration, sends a second service node offline notification to the application service client.

[0060] The application service client responds to the offline notification of the second service node and offlines the service process on the second service node to ensure that the maximum processing time of the service logic triggered by the RPC / TCP request is covered to avoid abnormal exit when the service logic is not completed. Then send a deregistration notification of the second service node to the registration center server. After receiving the deregistration notification of the second service node, the registration center server removes the registration information of the second service node, synchronizes it to all downstream client nodes, and refreshes the relevant cache.

[0061] After the first preset waiting time, the scheduling application server calls the first service, thus completing the replacement of the first service node and the second service node. It should be understood that during the scheduling process of the scheduling application server, the hook interface call in the service registration process is added, and the original container service is kept running within the specified heartbeat cycle.

[0062] In actual application scenarios, the method provided in this embodiment can well control the registration and online / offline process of service nodes during the release of core financial business services, elegantly control service replacement, reduce the perception of service release on the user's operation process, reduce failed requests caused by active release of core services, and better ensure the link integrity of core scenarios such as payment and claims.

[0063] See also Figure 8 The embodiment of the present application also provides a service operation device, which is applied to a scheduling application server, and includes: An instruction module, used to instruct the application service client to register a first service node at the registration center server, where the first service node is an instance node deployed by the first service; A processing module, configured to detect a service registration status of a first service node, and if the service registration status indicates that the first service node is successfully registered, send a second service node offline notification to an application service client, wherein the second service node offline notification is used to instruct the application service client to offline the second service node; the second service node is an instance node deployed by the second service; The calling module is used to call the first service after a first preset waiting time.

[0064] In some optional embodiments, the indication module includes: An instruction unit, used to instruct the application service client to pull up the first service node; The first sending unit is used to send a first service node registration notification to the application service client after a second preset waiting time, where the first service node registration notification is used to instruct the application service client to register the first service node with the registration center server.

[0065] In some optional embodiments, the processing module includes: An acquiring unit, configured to acquire the number of first service nodes to obtain the number of first nodes; a calculation unit, configured to calculate a difference between a preset threshold and the number of service nodes in which the application service client is in an online state, to obtain a second number of nodes, wherein the preset threshold is used to represent a maximum number of service nodes in which the application service client can be in an online state at the same time; The second sending unit is configured to send a second service node offline notification to the application service client if the number of the first nodes is greater than the number of the second nodes.

[0066] The specific implementation method of the service operation device is the same as the above Figure 1 The specific implementation methods of the service operation method are basically the same and will not be repeated here.

[0067] See also Fig. 9 The embodiment of the present application also provides a service operation device, which is applied to the application service client and can implement the above Figure 4 The service operation method shown, the device includes: A registration module, used to register a first service node with a registration center server under the instruction of a scheduling application server, where the first service node is an instance node deployed by a first service; A first receiving module, configured to receive a service registration status of a first service node sent by a registration center server; A second receiving module is used to receive a second service node offline notification sent by the scheduling application server; An offline processing module, configured to respond to an offline notification of the second service node and perform offline processing on the service process on the second service node; The sending module is used to send a second service node deregistration notification to the registration center server, where the second service node deregistration notification is used to instruct the registration center server to delete the registration information of the second service node.

[0068] In some optional embodiments, the registration module includes: A pulling unit, used to pull up the first service node under the instruction of the scheduling application server; A receiving unit, configured to receive a first service node registration notification sent by a scheduling application server; The third sending unit is configured to send registration information of the first service node to the registration center server in response to the first service node registration notification.

[0069] In some optional embodiments, the offline processing module includes: A first processing unit is configured to read a first thread corresponding to the remote procedure call service on the second service node, and if the first thread is being executed, stop executing the first thread; The second processing unit is used to read the second thread corresponding to the transmission control protocol service on the second service node, and stop executing the second thread if the second thread is being executed.

[0070] The specific implementation method of the service operation device is the same as the above Figure 4 The specific implementation examples of the service operation methods shown are basically the same and will not be repeated here.

[0071] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above service operation method when executing the computer program. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.

[0072] See also Fig.10 , Fig.10 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes: The processor 1101 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application; The memory 1102 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1102 can store an operating system and other application programs. When the technical solution provided in the embodiments of this specification is implemented by software or firmware, the relevant program code is stored in the memory 1102, and the processor 1101 calls and executes the service operation method of the embodiments of this application; Input / output interface 1103, used to implement information input and output; The communication interface 1104 is used to realize the communication interaction between the device and other devices. The communication can be realized through a wired manner (such as USB, network cable, etc.) or a wireless manner (such as mobile network, WIFI, Bluetooth, etc.); A bus 1105 that transmits information between various components of the device (e.g., the processor 1101, the memory 1102, the input / output interface 1103, and the communication interface 1104); The processor 1101 , the memory 1102 , the input / output interface 1103 and the communication interface 1104 are connected to each other in communication within the device via the bus 1105 .

[0073] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the above-mentioned service operation method is implemented.

[0074] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0075] The service operation method, service operation device, electronic device and storage medium provided in the embodiments of the present application actively recycle the second service node of the published second service deployment after completing the registration of the first service node deployed by the first service. After completing the recycling of the second service node, the first service is called again, which can control the registration and online / offline process of service nodes of different services and elegantly control the replacement of services. This method ensures that traffic is imported only after all service nodes of newly published service deployments are in an available state, which can reduce failed requests caused by active service release, improve the continuity of business operations during the replacement of service nodes of different services, and reduce the perception of service release during the user operation process.

[0076] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0077] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.

[0078] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0079] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.

[0080] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0081] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0082] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0083] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0084] In addition, each functional unit in each embodiment of the present application may be integrated into one 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.

[0085] 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 computer-readable storage medium. Based on this understanding, the technical solution of the present application, 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 multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.

[0086] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.

Claims

1. A service operation method, characterized in that: The method is applied to a scheduling application server, and the method comprises: Instructing the application service client to register a first service node at the registration center server, where the first service node is an instance node deployed by the first service; Detecting the service registration status of the first service node, and if the service registration status indicates that the first service node is successfully registered, sending a second service node offline notification to the application service client, where the second service node offline notification is used to instruct the application service client to offline the second service node; the second service node is an instance node deployed by the second service; After a first preset waiting time, the first service is called.

2. The method according to claim 1, characterized in that The instructing the application service client to register the first service node at the registration center server includes: Instructing the application service client to pull up the first service node; After a second preset waiting time, a first service node registration notification is sent to the application service client, where the first service node registration notification is used to instruct the application service client to register the first service node with the registration center server.

3. The method according to any one of claims 1 or 2, characterized in that The detecting the service registration status of the first service node, and if the service registration status indicates that the first service node is successfully registered, sending a second service node offline notification to the application service client, includes: Obtain the number of the first service nodes to obtain the number of first nodes; Calculate the difference between a preset threshold and the number of service nodes in which the application service client is in an online state to obtain a second number of nodes, wherein the preset threshold is used to represent the maximum number of service nodes in which the application service client can be in an online state at the same time; If the number of the first nodes is greater than the number of the second nodes, a second service node offline notification is sent to the application service client.

4. A service operation method, characterized in that: The method is applied to an application service client, and the method comprises: Registering a first service node with a registration center server under the instruction of a scheduling application server, wherein the first service node is an instance node of a first service deployment; Receiving a service registration status of a first service node sent by the registration center server; Receiving a second service node offline notification sent by the scheduling application server; In response to the offline notification of the second service node, offline processing is performed on the service process on the second service node; Send a second service node deregistration notification to the registration center server, where the second service node deregistration notification is used to instruct the registration center server to delete the registration information of the second service node.

5. The method according to claim 4, characterized in that The registering the first service node with the registration center server under the instruction of the scheduling application server includes: Pull up the first service node under the instruction of the scheduling application server; Receiving a first service node registration notification sent by the scheduling application server; In response to the first service node registration notification, the registration information of the first service node is sent to a registration center server.

6. The method according to any one of claims 4 or 5, characterized in that The offline processing of the service process on the second service node includes: Reading a first thread corresponding to the remote procedure call service on the second service node, and if the first thread is being executed, stopping the execution of the first thread; The second thread corresponding to the transmission control protocol service on the second service node is read, and if the second thread is being executed, the execution of the second thread is stopped.

7. A service operation device, characterized in that: The device is applied to a scheduling application server, and the device includes: An instruction module, used to instruct the application service client to register a first service node at the registration center server, where the first service node is an instance node deployed by the first service; a processing module, configured to detect a service registration status of the first service node, and if the service registration status indicates that the first service node is successfully registered, send a second service node offline notification to the application service client, wherein the second service node offline notification is used to instruct the application service client to offline the second service node; the second service node is an instance node deployed by the second service; The calling module is used to call the first service after a first preset waiting time.

8. A service operation device, characterized in that: The device is applied to an application service client, and the device includes: A registration module, used to register a first service node with a registration center server under the instruction of a scheduling application server, wherein the first service node is an instance node of a first service deployment; A first receiving module, configured to receive a service registration status of a first service node sent by the registration center server; A second receiving module, configured to receive a second service node offline notification sent by the scheduling application server; An offline processing module, configured to, in response to the offline notification of the second service node, perform offline processing on the service process on the second service node; The sending module is used to send a second service node deregistration notification to the registration center server, where the second service node deregistration notification is used to instruct the registration center server to delete the registration information of the second service node.

9. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the service operation method described in any one of claims 1 to 3, or implements the service operation method described in any one of claims 4 to 6 when executing the computer program.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the computer program implements the service operation method according to any one of claims 1 to 3, or implements the service operation method according to any one of claims 4 to 6.