Business access methods, devices, electronic equipment and storage media
Patent Information
- Application Number
- CN202310422259.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-19
- Publication Date
- 2026-09-01
- Estimated Expiration
- 2043-04-19
AI Technical Summary
[0005]本申请提供一种业务访问方法、装置、电子设备及存储介质,用于解决现有技术中当业务服务单元处于不健康状态时,若终端设备向业务的处理请求携带的用户账号关联的业务服务单元,发送对业务的处理请求时,对业务的处理容易失败的问题
[0020]本申请提供一种业务访问方法、装置、电子设备及存储介质,当终端设备确定业务服务单元未处于健康运行状态时,终端设备可以从预设的关系表中查找出与业务域名地址关联的备用服务单元的备用域名地址。这样一来,终端设备触发与备用域名地址关联的第二监管服务器,以使得第二监管服务器向备用服务单元发送访问指令,以使备用服务单元根据访问指令,执行目标业务。可见,执行目标业务的设备不是未处于健康运行状态的业务服务单元,而是备用服务单元。如此,对目标业务的处理不容易失败,可靠性高。
Smart Images

Figure CN116760833B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of business processing technology, and in particular to a business access method, apparatus, electronic device, and storage medium. Background Technology
[0002] Terminal devices can respond to user actions by generating requests for service processing. These requests are then sent to the service server to enable the server to process the service.
[0003] Currently, business servers face a large number of processing requests every moment. To reduce the pressure on business servers, the business server cluster can be divided into multiple business service units, each of which includes multiple business servers. When a terminal device responds to a user's operation and generates a processing request, the terminal device sends the processing request to one of the business servers in the business service unit associated with the user account, based on the user account carried in the processing request. This allows the receiving business server to process the request.
[0004] However, when the service unit is in an unhealthy state, if the terminal device sends a service processing request to the service unit associated with the user account carried in the service processing request, the service processing is likely to fail. Summary of the Invention
[0005] This application provides a service access method, apparatus, electronic device, and storage medium to solve the problem in the prior art that when a service unit is in an unhealthy state, the processing of the service is prone to failure when the terminal device sends a service request to the service unit associated with the user account carried in the service processing request.
[0006] In a first aspect, embodiments of this application also provide another service access method, applied to, the method comprising: responding to a user-inputted access instruction for a target service, determining the business domain name address of the service unit to be accessed in the access instruction; triggering a first monitoring server associated with the business domain name address, so that the first monitoring server detects whether the service unit is in a healthy operating state; receiving the detection result of the health operating state of the service unit from the first monitoring server; when the detection result indicates that the service unit is not in a healthy operating state, searching out the backup domain name address of the backup service unit associated with the business domain name address from a preset relation table; triggering a second monitoring server associated with the backup domain name address, so that the second monitoring server sends an access instruction to the backup service unit, so that the backup service unit executes the target service according to the access instruction.
[0007] In one optional implementation, the business service unit includes multiple business servers; triggering a first monitoring server associated with a business domain name address to detect whether the business service unit is in a healthy operating state includes: triggering the first monitoring server associated with a business domain name address to detect the number of business servers in the business service unit that are in a healthy operating state, and determining that the business service unit is not in a healthy operating state when the number of business servers in a healthy operating state is lower than a preset threshold.
[0008] In one optional implementation, triggering a first monitoring server associated with a business domain name address to detect the number of business servers in a healthy operating state within a business service unit includes: triggering the first monitoring server associated with a business domain name address to send detection data packets to each business server in the business service unit, and determining the number of business servers that send back response data packets within a preset time period as the number of business servers in a healthy operating state.
[0009] In one optional implementation, the backup service unit includes multiple backup servers. A second monitoring server associated with a backup domain name address is triggered, causing the second monitoring server to send an access instruction to the backup service unit, enabling the backup service unit to execute a target service according to the access instruction. This includes: triggering the second monitoring server associated with the backup domain name address; detecting the number of backup servers in the backup service unit that are in a healthy operating state; determining that the backup service unit is not in a healthy operating state when the number of backup servers in a healthy operating state is lower than a preset threshold; receiving the detection result of the backup service unit not being in a healthy operating state from the second monitoring server; obtaining the number of service servers in a healthy operating state from the first monitoring server and the number of backup servers in a healthy operating state from the second monitoring server; and triggering the second monitoring server associated with the backup domain name address to send an access instruction to the backup service unit when the number of backup servers in a healthy operating state is higher than the number of service servers in a healthy operating state, so that the backup service unit executes the target service according to the access instruction. When the number of standby servers in a healthy operating state is lower than the number of business servers in a healthy operating state, the first monitoring server associated with the business domain name address is triggered to send an access instruction to the business service unit, so that the business service unit can execute the target business according to the access instruction.
[0010] Secondly, this application also provides a service access method, applied to [the following]. The method provided by this application includes: receiving a check notification from a terminal device regarding a service unit, wherein the service unit to be accessed is associated with a service domain name address determined by the terminal device in response to a user-inputted access instruction for a target service, and the service domain name address is associated with a backup domain name address. In response to the check notification, the method checks whether the service unit is in a healthy operating state. The method sends a detection result of the healthy operating state of the service unit to the terminal device, so that when the detection result indicates that the service unit is not in a healthy operating state, the terminal device triggers a second monitoring server associated with the backup domain name address to control the backup service unit associated with the backup domain name address to execute the target service.
[0011] In one optional implementation, the service unit includes multiple service servers. In response to a check notification, the system detects whether the service unit is in a healthy operating state, including: detecting the number of service servers in the service unit that are in a healthy operating state; and determining that the service unit is not in a healthy operating state when the number of service servers in a healthy operating state is lower than a preset threshold.
[0012] In one optional implementation, detecting the number of service servers in a healthy operating state within a service unit includes: sending detection data packets to each service server in the service unit; and determining the number of service servers that send response data packets within a preset time period as the number of service servers in a healthy operating state.
[0013] Thirdly, this application also provides a service access device, comprising: an address determination unit, configured to determine the business domain name address of the service unit to be accessed in the access instruction in response to a user-inputted access instruction for a target service; an operation status detection unit, configured to trigger a first monitoring server associated with the business domain name address, so that the first monitoring server detects whether the service unit is in a healthy operation state; an information receiving unit, configured to receive the detection result of the health operation state of the service unit from the first monitoring server; an address lookup unit, configured to, when the detection result indicates that the service unit is not in a healthy operation state, the terminal device looks up the backup domain name address of the backup service unit associated with the business domain name address from a preset relationship table; and a service execution unit, configured to trigger a second monitoring server associated with the backup domain name address, so that the second monitoring server sends an access instruction to the backup service unit, so that the backup service unit executes the target service according to the access instruction.
[0014] Fourthly, this application also provides a service access device, including:
[0015] The data receiving unit is used to receive the user's access instruction for the target service from the terminal device and then send a check notification to the service unit.
[0016] The health monitoring unit is used to detect whether the business service unit is in a healthy operating state in response to inspection notifications;
[0017] The data sending unit is used to send the detection result of the health operation status of the detection service unit to the terminal device, so that when the detection result indicates that the service unit is not in a healthy operation state, the terminal device triggers the second monitoring server associated with the backup domain name address to control the backup service unit associated with the backup domain name address to execute the target service.
[0018] Fifthly, this application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the electronic device performs the method provided in the first aspect of this application.
[0019] Sixthly, this application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, causes the computer to perform the method provided in the first aspect of this application.
[0020] This application provides a service access method, apparatus, electronic device, and storage medium. When a terminal device determines that a service unit is not in a healthy operating state, the terminal device can look up the backup domain name address of the backup service unit associated with the service domain name address from a preset relationship table. In this way, the terminal device triggers a second monitoring server associated with the backup domain name address, causing the second monitoring server to send an access command to the backup service unit, enabling the backup service unit to execute the target service according to the access command. Therefore, the device executing the target service is not the service unit that is not in a healthy operating state, but rather a backup service unit. This makes the processing of the target service less prone to failure and highly reliable. Attached Figure Description
[0021] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1 This is a schematic diagram illustrating the interaction between the terminal device, the first monitoring server, the second monitoring server, the business service unit, and the backup service unit provided in the embodiments of this application.
[0023] Figure 2 One of the flowcharts for the business access method provided in the embodiments of this application;
[0024] Figure 3 The second flowchart of the service access method provided in the embodiments of this application;
[0025] Figure 4 for Figure 2 The detailed flowchart of S205 in the document;
[0026] Figure 5 The third flowchart of the service access method provided in the embodiments of this application;
[0027] Figure 6 This is one of the functional module block diagrams of the service access device provided in the embodiments of this application;
[0028] Figure 7 The second functional module block diagram of the service access device provided in the embodiments of this application. Detailed Implementation
[0029] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments made by those skilled in the art under the guidance of these embodiments are within the scope of protection of this application.
[0030] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0031] Terminal devices can respond to user actions by generating service processing requests. These requests are then sent to the service server for processing. However, when a service unit is in an unhealthy state, processing may fail if the terminal device sends a service processing request to the service unit associated with the user account carried in the service processing request.
[0032] Based on the aforementioned technical problems, the inventive concept of this application is as follows: when the terminal device determines that the service unit is not in a healthy operating state, it switches to allow the backup service unit to execute the target service. In this way, the processing of the target service is less prone to failure and has high reliability.
[0033] The technical solutions of this application and how they solve the aforementioned technical problems will be described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0034] This application provides a service access method applied to terminal device 101. Figure 1 This is a schematic diagram illustrating the interaction between the terminal device 101, the first monitoring server 102, the second monitoring server 104, the business service unit 103, and the backup service unit 105 provided in the embodiments of this application. Figure 1 As shown, terminal device 101 is communicatively connected to first monitoring server 102 and second monitoring server 104. First monitoring server 102 is communicatively connected to business service unit 103, and second monitoring server 104 is communicatively connected to backup service unit 105. First monitoring server 102 and business service unit 103 are located in a first network, and the domain name address of the first network is the business domain name address. Second monitoring server 104 and backup service unit 105 are located in a second network, and the domain name address of the second network is the backup domain name address. Terminal device 101 can be, but is not limited to, a mobile phone or a computer. Business service unit 103 includes multiple business servers, each of which is communicatively connected to first monitoring server 102.
[0035] Figure 2 A flowchart illustrating the service access method provided in this application embodiment. Specifically, as shown... Figure 2 As shown, the method provided in this application embodiment includes:
[0036] S201: In response to the user's input instruction to access the target service, the terminal device 101 determines the service domain name address of the service unit 103 to be accessed in the access instruction.
[0037] For example, when the target service is logging into a target application, the terminal device 101 can respond to the user's input of a login instruction for the target service after the user enters their username and password and clicks login on the login interface of the target application (such as an instant messaging application, shopping application, or video application). The access instruction carries the business domain name address (i.e., the business domain name address of the business service unit 103) of the first network where the first monitoring server 102 and the business service unit 103 are located.
[0038] It should be noted that a business domain name can be associated with multiple user accounts. The user account entered on the login page is one of the multiple user accounts associated with the business domain name. In other words, different sets of user accounts are associated with different business domain names, meaning different sets of user accounts are used to access different business service units 103.
[0039] S202: Terminal device 101 triggers the first monitoring server 102 associated with the business domain name address, so that the first monitoring server 102 detects whether the business service unit 103 is in a healthy operating state.
[0040] Specifically, terminal device 101 accesses the first monitoring server 102 under the business domain name address to notify the first monitoring server 102 to detect whether the business service unit 103 is in a healthy operating state.
[0041] exist Figure 2 Based on the corresponding embodiments, the business service unit 103 includes multiple business servers. Figure 3 Another flowchart of the business access method provided in the embodiments of this application. Specifically, as shown... Figure 3 As shown, S202 includes:
[0042] Terminal device 101 triggers the first monitoring server 102 associated with the business domain name address, so that the first monitoring server 102 detects the number of business servers in the business service unit 103 that are in a healthy operating state, and determines that the business service unit 103 is not in a healthy operating state when the number of business servers in a healthy operating state is lower than a preset threshold.
[0043] The specific method for detecting the number of business servers in the business service unit 103 that are in a healthy operating state can be as follows: the terminal device 101 triggers the first monitoring server 102 associated with the business domain name address, so that the first monitoring server 102 sends detection data packets to each business server in the business service unit 103, and determines the number of business servers that provide response data packets within a preset time period as the number of business servers in a healthy operating state.
[0044] For example, when the number of service servers in the service unit 103 that are in a healthy operating state includes 2 and the preset threshold is 3, it can be concluded that the number of service servers in a healthy operating state is lower than the preset threshold, and in this case, it is determined that the service unit 103 is not in a healthy operating state. When the number of service servers in the service unit 103 that are in a healthy operating state includes 4 and the preset threshold is 3, it can be concluded that the number of service servers in a healthy operating state is higher than the preset threshold, and in this case, it is determined that the service unit 103 is in a healthy operating state.
[0045] Understandably, when the number of service servers in a healthy operating state is lower than a preset threshold, if the number of terminal devices 101 accessing service unit 103 is large enough, it is easy for one or more service servers in service unit 103 to crash. Therefore, it is determined that service unit 103 is not in a healthy operating state. Conversely, when the number of service servers in a healthy operating state is higher than the preset threshold, even if the number of terminal devices 101 accessing service unit 103 is large enough, it is not easy for one or more service servers in service unit 103 to crash. Therefore, it is determined that service unit 103 is in a healthy operating state.
[0046] S203: Terminal device 101 receives the detection result of the health operation status of business service unit 103 from the first monitoring server 102.
[0047] The test result can be either "in a healthy operating state" or "not in a healthy operating state", without any limitation.
[0048] S204: When the detection result indicates that the service unit 103 is not in a healthy operating state, the terminal device 101 searches for the backup domain name address of the backup service unit 105 associated with the service domain name address from the preset relationship table.
[0049] The preset relationship table includes a one-to-one correspondence between each business domain name address and its backup domain name address.
[0050] S205: Terminal device 101 triggers the second monitoring server 104 associated with the backup domain name address, so that the second monitoring server 104 sends an access instruction to the backup service unit 105, so that the backup service unit 105 executes the target service according to the access instruction.
[0051] Understandably, the second monitoring server 104 may send an access command to one of the backup servers in the backup service unit 105 at random, or it may send an access command to the backup server in the backup service unit 105 with the least number of accesses.
[0052] For example, when the access instruction is a login instruction, the backup service unit 105 performs the login service (i.e., the target service) according to the login instruction; when the access instruction is a verification instruction, the backup service unit 105 performs the verification service (i.e., the target service) according to the verification instruction.
[0053] In summary, the service access method provided in this application embodiment allows terminal device 101 to retrieve the backup domain name address of backup service unit 105 associated with the service domain name address from a preset relationship table when terminal device 101 determines that service unit 103 is not in a healthy operating state. In this way, terminal device 101 triggers a second monitoring server 104 associated with the backup domain name address, causing the second monitoring server 104 to send an access command to backup service unit 105, enabling backup service unit 105 to execute the target service according to the access command. Therefore, the device executing the target service is not the service unit 103, which is not in a healthy operating state, but the backup service unit 105. This reduces the likelihood of failure in processing the target service and ensures high reliability.
[0054] Optionally, in Figure 1 Based on the corresponding embodiments, the backup service unit 105 includes multiple backup servers. Figure 4 for Figure 2 The detailed flowchart of S205 in the document is as follows: Figure 4 As shown, the above-mentioned S205 can be specifically implemented as follows:
[0055] S401: Terminal device 101 triggers the second monitoring server 104 associated with the backup domain name address to detect the number of backup servers in the backup service unit 105 that are in a healthy operating state, so that when the number of backup servers in a healthy operating state is lower than a preset threshold, the second monitoring server 104 determines that the backup service unit 105 is not in a healthy operating state.
[0056] Understandably, when the number of backup servers in a healthy operating state is lower than a preset threshold, if the number of terminal devices 101 accessing the backup service unit 105 is large enough, it is easy to cause one or more backup servers in the backup service unit 105 to crash. Therefore, it is determined that the backup service unit 105 is not in a healthy operating state.
[0057] S402: Terminal device 101 receives a detection result from the backup service unit 105 of the second monitoring server 104 indicating that it is not in a healthy operating state.
[0058] Similarly, the test result can be "in a healthy operating state" or "not in a healthy operating state", without limitation.
[0059] S403: Terminal device 101 obtains the number of business servers in a healthy operating state from the first monitoring server 102, and the number of standby servers in a healthy operating state from the second monitoring server 104.
[0060] S404: When the number of backup servers in a healthy operating state is higher than the number of business servers in a healthy operating state, the terminal device 101 triggers the second monitoring server 104 associated with the backup domain name address to send an access instruction to the backup service unit 105 so that the backup service unit 105 can execute the target business according to the access instruction.
[0061] S405: When the number of standby servers in a healthy operating state is lower than the number of business servers in a healthy operating state, the terminal device 101 triggers the first monitoring server 102 associated with the business domain name address to send an access instruction to the business service unit 103, so that the business service unit 103 can execute the target business according to the access instruction.
[0062] Based on the above S403-S405, when both the business service unit 103 and the backup service unit 105 are not in a healthy operating state, an access command can be sent to the backup service unit 105 with a higher number of backup servers in a healthy operating state. This allows the backup service unit 105 to execute the target business according to the access command, and the success rate of executing the target business is higher. Conversely, when both the business service unit 103 and the backup service unit 105 are not in a healthy operating state, an access command can be sent to the business service unit 103 with a higher number of business servers in a healthy operating state. This allows the business service unit 103 to execute the target business according to the access command, and the success rate of executing the target business is higher.
[0063] Figure 5 A flowchart illustrating another service access method provided in an embodiment of this application. Please refer to [link / reference]. Figure 5 This application also provides a business access method applied to a first monitoring server 102. It should be noted that the basic principle and technical effects of the business access method provided in this application are the same as those described above. Figure 2 The corresponding embodiments are the same. For the sake of brevity, any parts not mentioned in the embodiments of this application can be referred to the corresponding content in the above embodiments. The method provided by the embodiments of this application includes:
[0064] S501: The first monitoring server 102 receives an inspection notification for the business service unit 103 from the terminal device 101.
[0065] In this process, after responding to the user's input instruction to access the target service, the first monitoring server 102 and the terminal device 101 determine the business domain name address of the service unit 103 to be accessed, and the business domain name address is associated with a backup domain name address.
[0066] S502: The first monitoring server 102 responds to the inspection notification and checks whether the business service unit 103 is in a healthy operating state.
[0067] Specifically, the first monitoring server 102 can detect the number of business servers in the business service unit 103 that are in a healthy operating state, and determine that the business service unit 103 is not in a healthy operating state when the number of business servers in a healthy operating state is lower than a preset threshold.
[0068] The first monitoring server 102 sends detection data packets to each business server in the business service unit 103; the first monitoring server 102 determines the number of business servers that are in a healthy operating state by the number of business servers that send back response data packets within a preset time period.
[0069] S503: The first monitoring server 102 sends the detection result of the detection service unit 103 on the health operation status of the service unit 103 to the terminal device 101, so that when the detection result indicates that the first monitoring server 102 is not in a healthy operation state, the terminal device 101 triggers the second monitoring server 104 associated with the backup domain name address to control the backup service unit 105 associated with the backup domain name address to execute the target service.
[0070] Figure 6 This is a functional block diagram of the service access device 600 provided in an embodiment of this application. Please refer to... Figure 6 This application also provides a service access device 600. It should be noted that the service access method provided in this application has the same basic principles and technical effects as described above. Figure 2 The corresponding embodiments are the same. For the sake of brevity, any parts not mentioned in the embodiments of this application can be referred to the corresponding content in the above embodiments. The service access device 600 includes an address determination unit 601, a motion state detection unit 602, an information receiving unit 603, an address lookup unit 604, and a service execution unit 605.
[0071] Address determination unit 601 is used to determine the business domain name address of the business service unit 103 to be accessed in the access instruction in response to the user's input access instruction for the target service.
[0072] The motion state detection unit 602 is used to trigger the first monitoring server 102 associated with the business domain name address, so that the first monitoring server 102 can detect whether the business service unit 103 is in a healthy operating state.
[0073] The information receiving unit 603 is used to receive the detection results of the health operation status of the business service unit 103 from the first monitoring server 102.
[0074] Address lookup unit 604 is used to find the backup domain name address of backup service unit 105 associated with the business domain name address from a preset relationship table when the detection result indicates that the business service unit 103 is not in a healthy operating state.
[0075] The business execution unit 605 is used to trigger the second monitoring server 104 associated with the backup domain name address, so that the second monitoring server 104 sends an access instruction to the backup service unit 105, so that the backup service unit 105 executes the target business according to the access instruction.
[0076] Specifically, the business service unit 103 includes multiple business servers. The business execution unit 605 is specifically used to trigger the first monitoring server 102 associated with the business domain name address, so that the first monitoring server 102 detects the number of business servers in the business service unit 103 that are in a healthy operating state, and determines that the business service unit 103 is not in a healthy operating state when the number of business servers in a healthy operating state is lower than a preset threshold.
[0077] Furthermore, the business service unit 103 is specifically used to trigger the first monitoring server 102 associated with the business domain name address, so that the first monitoring server 102 sends detection data packets to each business server in the business service unit 103, and determines the number of business servers that provide response data packets within a preset time period as the number of business servers in a healthy operating state.
[0078] In one optional implementation, the backup service unit 105 includes multiple backup servers. Specifically, the business service unit 103 is configured to trigger a second monitoring server 104 associated with a backup domain name address to detect the number of backup servers in the backup service unit 105 that are in a healthy operating state, so that when the number of backup servers in a healthy operating state is lower than a preset threshold, the second monitoring server 104 determines that the backup service unit 105 is not in a healthy operating state; receive the detection result of the backup service unit 105 not being in a healthy operating state from the second monitoring server 104; obtain the number of business servers in a healthy operating state from the first monitoring server 102, and obtain the number of backup servers in a healthy operating state from the second monitoring server 104; when the number of backup servers in a healthy operating state is higher than the number of business servers in a healthy operating state, trigger the second monitoring server 104 associated with the backup domain name address to send an access instruction to the backup service unit 105, so that the backup service unit 105 executes the target business according to the access instruction.
[0079] In an optional implementation, the business service unit 103 is specifically configured to trigger the first monitoring server 102 associated with the business domain name address to send an access instruction to the business service unit 103 when the number of standby servers in a healthy operating state is lower than the number of business servers in a healthy operating state, so that the business service unit 103 executes the target business according to the access instruction.
[0080] Figure 7 A functional block diagram of another service access device 700 provided in an embodiment of this application. Please refer to... Figure 7 This application also provides a service access device 700. It should be noted that the basic principle and technical effects of the service access device 700 provided in this application are the same as those described above. Figure 2 The corresponding embodiments are the same. For the sake of brevity, any parts not mentioned in the embodiments of this application can be referred to the corresponding content in the above embodiments. The service access device 700 provided in the embodiments of this application includes a data receiving unit 701, a health detection unit 702, and a data sending unit 703, wherein,
[0081] The data receiving unit 701 is used to receive a user's access instruction for the target service from the terminal device 101 and then send a check notification to the service service unit 103.
[0082] The health detection unit 702 is used to detect whether the business service unit 103 is in a healthy operating state in response to an inspection notification.
[0083] The data sending unit 703 is used to send the detection result of the health operation status of the detection service unit 103 to the terminal device 101, so that when the detection result indicates that the service unit 103 is not in a healthy operation state, the terminal device 101 triggers the second monitoring server 104 associated with the backup domain name address to control the backup service unit 105 associated with the backup domain name address to execute the target service.
[0084] In one optional implementation, the service unit 103 includes multiple service servers. A health detection unit 702 is used to detect the number of service servers in the service unit 103 that are in a healthy operating state. A first monitoring server 102 determines that the service unit 103 is not in a healthy operating state when the number of service servers in a healthy operating state is lower than a preset threshold.
[0085] In one alternative implementation, the health detection unit 702 is specifically used to send detection data packets to each business server in the business service unit 103; the first monitoring server 102 determines the number of business servers that provide response data packets within a preset time period as the number of business servers in a healthy operating state.
[0086] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0087] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A business access method, characterized in that, Applied to a terminal device, the method includes: In response to a user's input instruction to access a target service, the business domain name address of the service unit to be accessed in the access instruction is determined; the service unit includes multiple service servers. Trigger the first monitoring server associated with the business domain name address, so that the first monitoring server detects the number of business servers in the business service unit that are in a healthy operating state, and determines that the business service unit is not in a healthy operating state when the number of business servers in a healthy operating state is lower than a preset threshold. Receive the detection result of the health operation status of the business service unit from the first monitoring server; When the detection result indicates that the business service unit is not in a healthy operating state, the backup domain name address of the backup service unit associated with the business domain name address is retrieved from a preset relationship table; the preset relationship table includes a one-to-one correspondence between each business domain name address and the backup domain name address; The second monitoring server associated with the backup domain name address is triggered to detect the number of backup servers in the backup service unit that are in a healthy operating state, so that when the number of backup servers in a healthy operating state is lower than a preset threshold, the second monitoring server determines that the backup service unit is not in a healthy operating state. Receive the detection result from the second monitoring server that the backup service unit is not in a healthy operating state; The number of business servers in a healthy operating state is obtained from the first monitoring server, and the number of standby servers in a healthy operating state is obtained from the second monitoring server; When the number of standby servers in a healthy operating state is higher than the number of business servers in a healthy operating state, the second monitoring server associated with the standby domain name address is triggered to send the access instruction to the standby service unit, so that the standby service unit can execute the target service according to the access instruction; When the number of standby servers in a healthy operating state is lower than the number of business servers in a healthy operating state, the first monitoring server associated with the business domain name address is triggered to send the access instruction to the business service unit, so that the business service unit can execute the target business according to the access instruction; Wherein, the first monitoring server and the business service unit are located in a first network, and the domain name address of the first network is the business domain name address; the second monitoring server and the backup service unit are located in a second network, and the domain name address of the second network is the backup domain name address.
2. The method according to claim 1, characterized in that, Triggering a first monitoring server associated with the business domain name address, so that the first monitoring server detects the number of business servers in the business service unit that are in a healthy operating state, including: The first monitoring server associated with the business domain name address is triggered, so that the first monitoring server sends detection data packets to each business server in the business service unit, and determines the number of business servers that provide response data packets within a preset time period as the number of business servers in a healthy operating state.
3. A business access method, characterized in that, Applied to a first monitoring server, the method includes: Receive a notification from a terminal device to inspect a service unit, wherein the service unit to be accessed is associated with the service domain name address determined by the terminal device in response to the user's input instruction to access the target service, and the service domain name address is associated with a backup domain name address. In response to the inspection notification, the number of business servers in the business service unit that are in a healthy operating state is detected, and if the number of business servers in a healthy operating state is lower than a preset threshold, it is determined that the business service unit is not in a healthy operating state; the business service unit includes multiple business servers; The system sends a detection result of the health status of the business service unit to the terminal device. When the detection result indicates that the business service unit is not in a healthy operating state, the terminal device searches for the backup domain name address of the backup service unit associated with the business domain name address from a preset relationship table. This triggers a second monitoring server associated with the backup domain name address to detect the number of backup servers in the backup service unit that are in a healthy operating state. If the number of backup servers in a healthy operating state is lower than a preset threshold, the second monitoring server determines that the backup service unit is not in a healthy operating state. The preset relationship table includes a one-to-one correspondence between each business domain name address and a backup domain name address. The first monitoring server and the business service unit are located in a first network, and the domain name address of the first network is the business domain name address. The second monitoring server and the backup service unit are located in a second network, and the domain name address of the second network is the backup domain name address. Upon receiving an access notification from the terminal device, and in response to the access, sending the access instruction to the service unit so that the service unit executes the target service according to the access instruction; the access notification is sent by the terminal device when it determines that the number of backup servers in a healthy operating state is lower than the number of service servers in a healthy operating state.
4. The method according to claim 3, characterized in that, Detecting the number of service servers in the service unit that are in a healthy operating state includes: Send detection data packets to each business server in the business service unit; The number of business servers that send response data packets within a preset time period is determined as the number of business servers in a healthy operating state.
5. A service access device, applied to a terminal device, characterized in that, The device includes: The address determination unit is used to determine the business domain name address of the business service unit to be accessed in the access instruction in response to the user's input of an access instruction for the target service; the business service unit includes multiple business servers; The operation status detection unit is used to trigger the first monitoring server associated with the business domain name address, so that the first monitoring server detects the number of business servers in the business service unit that are in a healthy operation state, and determines that the business service unit is not in a healthy operation state when the number of business servers in a healthy operation state is lower than a preset threshold. An information receiving unit is used to receive the detection results of the health operation status of the business service unit from the first monitoring server; The address lookup unit is used to, when the detection result indicates that the service unit is not in a healthy operating state, the terminal device looks up the backup domain name address of the backup service unit associated with the service domain name address from a preset relationship table; the preset relationship table includes a one-to-one correspondence between each service domain name address and the backup domain name address; The business execution unit is configured to trigger a second monitoring server associated with the backup domain name address to detect the number of backup servers in the backup service unit that are in a healthy operating state, so that when the number of backup servers in a healthy operating state is lower than a preset threshold, the second monitoring server determines that the backup service unit is not in a healthy operating state; receive the detection result of the backup service unit not being in a healthy operating state from the second monitoring server; obtain the number of business servers in a healthy operating state from the first monitoring server and the number of backup servers in a healthy operating state from the second monitoring server; when the number of backup servers in a healthy operating state is higher than the number of business servers in a healthy operating state, trigger the second monitoring server associated with the backup domain name address to send the access instruction to the backup service unit, so that the backup service unit executes the target business according to the access instruction; when the number of backup servers in a healthy operating state is lower than the number of business servers in a healthy operating state, trigger the first monitoring server associated with the business domain name address to send the access instruction to the business service unit, so that the business service unit executes the target business according to the access instruction. Wherein, the first monitoring server and the business service unit are located in a first network, and the domain name address of the first network is the business domain name address; the second monitoring server and the backup service unit are located in a second network, and the domain name address of the second network is the backup domain name address.
6. A business access device, applied to a first monitoring server, characterized in that, The device includes: The data receiving unit is used to receive the user's access instruction for the target service from the terminal device and then send a check notification to the service unit. A health detection unit is used to detect the number of business servers in the business service unit that are in a healthy operating state in response to the inspection notification, and to determine that the business service unit is not in a healthy operating state when the number of business servers in a healthy operating state is lower than a preset threshold; the business service unit includes multiple business servers; A data sending unit is configured to send a detection result indicating the health status of the service unit to the terminal device. When the detection result indicates that the service unit is not in a healthy operating state, the terminal device retrieves the backup domain name address of the backup service unit associated with the service domain name address from a preset relationship table. This triggers a second monitoring server associated with the backup domain name address to detect the number of backup servers in the backup service unit that are in a healthy operating state. The second monitoring server determines that the backup service unit is not in a healthy operating state when the number of backup servers in a healthy operating state is lower than a preset threshold. The preset relationship table includes a one-to-one correspondence between each service domain name address and a backup domain name address. The first monitoring server and the service unit are located in a first network, and the domain name address of the first network is the service domain name address. The second monitoring server and the backup service unit are located in a second network, and the domain name address of the second network is the backup domain name address. The data receiving unit is also used to receive access notifications from the terminal device; The data sending unit is further configured to send the access instruction to the service unit in response to the access notification, so that the service unit executes the target service according to the access instruction; the access notification is sent by the terminal device when it determines that the number of backup servers in a healthy operating state is lower than the number of service servers in a healthy operating state.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it causes the electronic device to perform the method as described in any one of claims 1 to 4.
8. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it causes the computer to perform the method as described in any one of claims 1 to 4.
Citation Information
Patent Citations
DMZ server switching method and device
CN103825777A
Method, device and system for switching master and standby servers
CN107465556A
Business service disaster tolerance method, device and system, management server and electronic equipment
CN110417595A
Integration of service scaling and external health checking systems
US10135916B1