Business processing methods, devices, systems, equipment, storage media and products

By judging the status log of the queue manager on the virtual server and switching the main virtual server, the cost problem in the existing technology is solved, and high availability and low-cost hot standby of message middleware are realized.

CN113961398BActive Publication Date: 2025-08-19CHINA CONSTRUCTION BANK
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111328371.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-10
Publication Date
2025-08-19
Estimated Expiration
2041-11-10

AI Technical Summary

Technical Problem

In the prior art, AIX physical machine and SAN memory are used to achieve message middleware hot standby is costly and does not adapt to the virtualization trend, making it difficult to achieve high availability on virtual servers.

Method used

By obtaining the status log of the queue manager, determine whether the virtual server is abnormal, and select a new primary virtual server from the backup virtual server when the exception is abnormal, release and forward the file lock, so that the message middleware on the new primary virtual server obtains the permissions of the queue manager to process business requests.

Benefits of technology

It realizes the hot backup of message middleware on the virtual server, reduces the cost of equipment investment, and ensures the security and reliability of business transactions between internal and external networks of the enterprise.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113961398B_ABST
    Figure CN113961398B_ABST
Patent Text Reader

Abstract

This article provides a business processing method, device, system, equipment, storage medium and product, which relates to the field of virtualization technology. The method includes: obtaining a pending business request; judging whether the current primary virtual server is abnormal based on the status log of the queue manager; if the current primary virtual server is abnormal, selecting one from the backup virtual servers as a new primary virtual server; obtaining the file lock of the queue manager from the current primary virtual server and sending it to the new primary virtual server, so that the message middleware on the new primary virtual server obtains the authority to the queue manager, thereby processing the business request based on the queue manager. This article judges whether the current primary virtual server is abnormal based on the working status of the queue manager, and can release the file lock held by the message middleware on the current primary virtual server and transfer it to the newly selected primary virtual server when the current primary virtual server is abnormal, thereby realizing hot standby of the message middleware on the virtual server.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of virtualization technology, and in particular to a business processing method, device, system, equipment, storage medium and product. Background Art

[0002] When exchanging data and conducting business transactions between an enterprise's internal network and an external network, message-based middleware is required to ensure the reliability of the information transmission process. To avoid single point risks, message-based middleware hot standby is configured to achieve high availability.

[0003] Existing technology uses AIX (Advanced Interactive Executive) minicomputers and high-speed Fibre Channel-based SAN (Storage Area Network) storage to share message queues for hot standby messaging middleware. AIX physical machines are a natural fit for messaging middleware. Using the AIX physical machine's built-in hot standby tools, simple configuration is required to automatically switch between the primary and backup machines in the event of a failure. SAN storage provides the same security and efficiency as using local disks.

[0004] However, AIX physical machines and SAN storage devices are expensive and difficult to manage. In an increasingly large system structure, in order to strengthen the control capability of services, and to more conveniently allocate, manage and recycle servers, and also to save investment costs, the use of virtual servers to replace physical machines is an inevitable development trend. In view of this, the present invention provides a business processing method, device, system, equipment, storage medium and product to achieve hot standby of message middleware on virtual machines, ensure the security of business transactions between the enterprise's internal and external networks, and reduce the hot standby cost of message middleware. Summary of the Invention

[0005] In response to the above-mentioned problems in the existing technology, the purpose of this article is to provide a business processing method, device, system, equipment, storage medium and product to solve the problems of high equipment cost and incompatibility with development trends caused by the use of physical machines and SAN disks to implement message middleware hot standby in the existing technology.

[0006] In order to solve the above technical problems, the specific technical solutions of this article are as follows:

[0007] In a first aspect, this document provides a business processing method, including:

[0008] Get pending business requests;

[0009] According to the queue manager status log, determine whether the current primary virtual server is abnormal;

[0010] If the current primary virtual server is abnormal, select one from the backup virtual servers as the new primary virtual server;

[0011] The file lock of the queue manager is obtained from the current primary virtual server and sent to the new primary virtual server, so that the message middleware on the new primary virtual server obtains the authority to the queue manager, thereby processing the service request based on the queue manager.

[0012] Specifically, the status log of the queue manager includes:

[0013] The device name of the primary virtual server, the working status label of the queue manager in question, and a timestamp.

[0014] Furthermore, judging whether the current primary virtual server is abnormal based on the status log of the queue manager includes:

[0015] Determine whether the time difference between the timestamp in the latest status log and the current time node is less than or equal to the preset time period;

[0016] If not, it is determined that the current primary virtual server is abnormal;

[0017] If so, determining whether the working status tag of the queue manager is in the stopped state;

[0018] If the working status tag of the queue manager is in a stopped state, it is determined that the current primary virtual server is abnormal.

[0019] Furthermore, judging whether the current primary virtual server is abnormal based on the status log of the queue manager further includes:

[0020] If the working status tag of the queue manager is running, it is determined that the current primary virtual server is normal.

[0021] Furthermore, if the working status tag of the queue manager is in the running state, after determining that the current primary virtual server is normal, the method further includes:

[0022] Keep the current primary virtual server unchanged.

[0023] Specifically, selecting one of the standby virtual servers as a new primary virtual server includes:

[0024] When there is more than one backup virtual server, a new primary virtual server is selected based on the priority order of the backup virtual servers; or

[0025] One of the backup virtual servers is selected as the new primary virtual server in a round-robin manner.

[0026] Specifically, after selecting one of the standby virtual servers as a new primary virtual server, the method further includes:

[0027] Drift the virtual IP address of the current primary virtual server to the new primary virtual server.

[0028] Specifically, after selecting one of the standby virtual servers as a new primary virtual server, the method further includes:

[0029] Determine whether the current primary virtual server has any unfinished business requests;

[0030] If the current primary virtual server has unfinished business requests, the unfinished business requests will be transferred to the new primary virtual server for processing.

[0031] Preferably, after selecting one of the standby virtual servers as a new primary virtual server, the method further includes:

[0032] Send a fault alarm of the faulty virtual server.

[0033] In a second aspect, this document provides a service processing device, including:

[0034] A first acquisition module is used to obtain a pending business request;

[0035] A judgment module is used to judge whether the current primary virtual server is abnormal based on the status log of the queue manager;

[0036] A selection module is used to select a new primary virtual server from the backup virtual servers if the current primary virtual server is abnormal;

[0037] The second acquisition module is used to obtain the file lock of the queue manager from the current primary virtual server and send it to the new primary virtual server, so that the message middleware on the new primary virtual server obtains the authority to the queue manager and processes the service request based on the queue manager.

[0038] Thirdly, this document also provides a business processing method, including:

[0039] The service processing device obtains a service request to be processed; analyzes whether the current primary virtual server is abnormal based on the queue manager's status log; if the current primary virtual server is abnormal, selects a new primary virtual server from the backup virtual servers; obtains the queue manager's file lock from the current primary virtual server and sends it to the new primary virtual server;

[0040] The message middleware on the new primary virtual server obtains the authority of the queue manager according to the file lock, and processes the service request based on the queue manager.

[0041] In a fourth aspect, this document further provides a business processing system, comprising a business processing device and at least two virtual servers;

[0042] The service processing device is used to obtain a service request to be processed and determine whether the primary virtual server is abnormal based on the status log of the queue manager; if the primary virtual server is abnormal, select one of the backup virtual servers as a new primary virtual server, obtain the file lock of the queue manager from the current primary virtual server, and send it to the new primary virtual server;

[0043] The virtual server includes a primary virtual server and a backup virtual server; the primary virtual server is used to obtain permission to the queue manager based on the file lock, thereby processing the business request based on the queue manager; the backup virtual server is used to obtain the file lock released from the primary virtual server when the primary virtual server is abnormal to replace the primary virtual server to process the business request.

[0044] In a fifth aspect, this document also provides a computer device, comprising 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, a method as provided in the above technical solution is implemented.

[0045] In a sixth aspect, this document provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements a method provided by the above technical solution.

[0046] In a seventh aspect, this document also provides a computer program product, comprising at least one instruction or at least one program segment, wherein the at least one instruction or the at least one program segment is loaded and executed by a processor to implement the method provided by the above technical solution.

[0047] By adopting the above-mentioned technical solution, a business processing method, device, system, equipment, storage medium and product are described in this article. This article determines whether the current main virtual server is abnormal through the status log of the queue manager. When it is abnormal, the file lock of the queue manager held by the message middleware on the current main virtual server can be released and transferred to the newly selected main virtual server, thereby realizing hot standby of the message middleware on the virtual server and greatly reducing the equipment investment cost of the message middleware hot standby.

[0048] In order to make the above and other purposes, features and advantages of this article more obvious and easy to understand, the following specifically cites preferred embodiments and provides detailed descriptions in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the technical solutions in the embodiments of this article or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of this article. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0050] Figure 1 A schematic diagram of an application scenario of a business processing method provided in an embodiment of this document is shown;

[0051] Figure 2 A first flow chart of a business processing method provided by an embodiment of this document is shown;

[0052] Figure 3 A second flow chart of a business processing method provided in an embodiment of this invention is shown;

[0053] Figure 4 A third flow chart of a business processing method provided in an embodiment of this document is shown;

[0054] Figure 5 A schematic diagram of the structure of a service processing device provided in an embodiment of this invention is shown;

[0055] Figure 6 A schematic diagram showing a process flow of another business processing method provided in an embodiment of this document is shown;

[0056] Figure 7 A schematic diagram of the structure of a business processing system provided in an embodiment of this invention is shown;

[0057] Figure 8 A schematic structural diagram of a computer device provided in an embodiment of this invention is shown.

[0058] Description of the accompanying symbols:

[0059] 51. First acquisition module;

[0060] 52. Judgment module;

[0061] 53. Select module;

[0062] 54. Second acquisition module;

[0063] 71. Business processing device;

[0064] 72. Primary virtual server;

[0065] 73. Backup virtual server;

[0066] 802. Computer equipment;

[0067] 804, processor;

[0068] 806, memory;

[0069] 808, driving mechanism;

[0070] 810, input / output module;

[0071] 812. Input devices;

[0072] 814. Output device;

[0073] 816. Presentation equipment;

[0074] 818. Graphical User Interface;

[0075] 820, network interface;

[0076] 822, communication link;

[0077] 824. Communication bus. DETAILED DESCRIPTION

[0078] The following will be combined with the accompanying drawings to clearly and completely describe the technical solutions in the embodiments of this document. Obviously, the embodiments described are only part of the embodiments of this document, not all of the embodiments. Based on the embodiments of this document, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this document.

[0079] It should be noted that the terms "first," "second," and the like in the specification and claims herein and in the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a particular order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, apparatus, product, or device comprising a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to these processes, methods, products, or devices.

[0080] In the network area between the enterprise intranet and the extranet, a demilitarized zone (DMZ) is usually set up. The demilitarized zone is equipped with message middleware for processing business transactions. Such a setting can more effectively ensure the security and reliability of business transactions between the enterprise intranet and the extranet.

[0081] In the increasingly large system structure, in order to strengthen the control over services, more conveniently allocate, manage and recycle servers, and save investment costs, it is necessary to improve the original hot standby method of using AIX minicomputers and SAN storage shared message queues to implement message middleware.

[0082] To solve the above problems, the embodiments of this article provide a business processing method, apparatus, system, device, storage medium and product, which can realize hot standby of message middleware on virtual servers, ensure high availability of message middleware while reducing investment costs. Figure 1 This is a schematic diagram of an application scenario of the business processing method provided in the embodiments of this specification. Figure 2 It is a schematic diagram of the steps of the business processing method. This specification provides the method operation steps as described in the embodiment or flowchart, but it may include more or fewer operation steps based on conventional or non-creative work. The order of steps listed in the embodiment is only one way of executing the order of many steps and does not represent the only execution order. When the actual system or device product is executed, it can be executed in the order of the method shown in the embodiment or the accompanying drawings or in parallel. Specifically, Figure 2 As shown, the method may include:

[0083] S210: Obtain a pending business request.

[0084] like Figure 1 As shown, the service requests received by the virtual server in the isolation zone include service requests from the intranet and service requests from the outside.

[0085] S220: Determine whether the current primary virtual server is abnormal based on the status log of the queue manager.

[0086] In the embodiments of this specification, a status log of the queue manager is generated in a preset time period. The status log can be stored in a shared storage unit. For example, a crontab scheduled task can be set to regularly generate a status log of the queue manager. Exemplarily, the preset time period can be 5s, 10s, 15s, etc. The time interval can be set according to the specific actual usage. The shorter the time period, the more detailed the monitoring of the queue manager's working status, but the more status logs are generated, which will also have a certain impact on storage space.

[0087] The queue manager is set on a shared storage unit. In the embodiment of this specification, the shared storage unit can be a NAS (Network Attached Storage) disk. A NAS disk is a device connected to a network and has an information storage function. It can realize centralized data management, free up bandwidth, improve performance, and reduce costs compared to SAN storage shared message queues.

[0088] After establishing the queue manager on the NAS disk, shared queues can be created and managed, for example, by executing the steps described above to generate status logs. Shared queues are typically established based on the source and target process addresses in the message carried by the service request, as well as locally stored routing information. After obtaining the shared queues, the message middleware processes the service request accordingly.

[0089] In the embodiments of this specification, the working status of each virtual server is characterized by the status log of the queue manager, that is, the status of the queue manager being executed by each virtual server, which solves the problem in the prior art that it is difficult to obtain the working status of the virtual server and difficult to determine whether the virtual server is abnormal.

[0090] S230: If the current primary virtual server is abnormal, select one from the backup virtual servers as a new primary virtual server.

[0091] There is only one primary virtual server at the same time, and the remaining virtual servers serve as backups. When the primary virtual server goes down or fails, the work of the primary virtual server can be switched to the backup virtual server to achieve high availability of the system.

[0092] In such Figure 1 In the illustrated application scenario, there are three virtual servers. When one of them becomes the primary virtual server, the remaining two serve as backup virtual servers. Of course, a higher number of virtual servers can be configured, meaning there can be a higher number of backup virtual servers. However, having too many backup virtual servers can result in excessive equipment investment costs. Therefore, in actual application scenarios, the number of backup virtual servers can be set based on actual needs.

[0093] S240: Obtain the file lock of the queue manager from the current primary virtual server and send it to the new primary virtual server, so that the message middleware on the new primary virtual server obtains the authority to the queue manager, thereby processing the service request based on the queue manager.

[0094] Only the virtual server that has acquired the file lock can start the queue manager. Once the queue manager is started, it can process service requests, transmit, and interact with them. The file lock can be a token composed of a preset string. Therefore, the file lock must be released from the current primary virtual server and transferred to the new primary virtual server.

[0095] A business processing method provided in an embodiment of this specification determines whether the current primary virtual server is abnormal through the status log of the queue manager. When it is abnormal, the file lock of the queue manager held by the message middleware on the current primary virtual server can be released and transferred to the newly selected primary virtual server, so that only the message middleware on the primary virtual server can respond to business requests, realizing hot standby of the message middleware on the virtual server, and greatly reducing the equipment investment cost of hot standby of the message middleware by sharing storage between the virtual server and NAS.

[0096] It should be noted that in the embodiments of this specification, the message middleware may specifically be IBM message middleware. IBM message middleware has unique security mechanisms, a simple and fast programming style, good stability, scalability, cross-platform support, and powerful transaction processing and message communication capabilities, making it one of the most widely used message middleware.

[0097] In the embodiments of this specification, keepalived can be configured on each virtual server to assist in switching between primary and backup virtual servers. When the primary virtual server becomes a backup virtual server, the queue manager's stop script is called to actively release file locks. When the backup virtual server becomes the primary virtual server, the queue manager's start script is called to acquire file locks. However, keepalived can only implement primary and backup virtual server switching and cannot control the release and transfer of file locks obtained by the message middleware on the virtual server.

[0098] Therefore, when the primary virtual server is abnormal and cannot release the file lock, the new primary virtual server will not be able to obtain the file lock. At this time, even if the master-slave switch of the virtual server is realized, the new primary virtual server cannot have permission to the queue manager because it cannot obtain the file lock, that is, it cannot process business requests.

[0099] In addition, when keepalived fails, it is impossible to switch between the primary and backup virtual servers, and it is even more impossible to switch the message middleware deployed on the primary and backup virtual servers. In serious cases, it will have a bad impact on the processing and response of business requests.

[0100] Therefore, in embodiments of this specification, when a new primary virtual server is selected to replace a faulty current primary virtual server, file locks on the current primary virtual server can be forcibly released to avoid issues with the new primary virtual server lacking queue manager permissions and the ability to process service requests. In some feasible embodiments, file locks on the message middleware on the faulty virtual server can be forcibly released through compression, backup, decompression, and restoration.

[0101] In the embodiment of this specification, the status log of the queue manager includes: the device name of the primary virtual server, the working status label of the queue manager and a timestamp, wherein the timestamp refers to the time when the status log is generated.

[0102] Furthermore, the status log includes: the device name of the current primary virtual server, the working status label and timestamp of the queue manager under the control of the current primary virtual server;

[0103] It may also include: the device name of the standby virtual server, the relative working status label and time stamp of the queue manager and the standby virtual server.

[0104] Preferably, a queue manager status log for each virtual server is generated simultaneously.

[0105] For example, let A be the current primary virtual server, and virtual servers B and C be backup virtual servers. The queue manager status logs are as follows:

[0106] The first type: When the queue manager's working status tag is running and the virtual server that controls its operation is the primary virtual server A, a status log can be generated: A+run (indicating that the queue manager's working status tag is running) + timestamp (the timestamp here is the time node when the working status is generated, not the time when the queue manager is started by virtual server A).

[0107] At this time, for virtual server B and virtual server C, the queue manager is not started by them, and logs can also be generated: B+stop+timestamp; C+stop+timestamp.

[0108] The second scenario: When the queue manager's working status is in the stopped state and the primary virtual server is controlling its operation, this indicates that primary virtual server A has not successfully started the queue manager. This indicates that primary virtual server A may have failed. In this case, a status log is generated: A+stop+warning (i.e., a failure alarm is sent)+timestamp. If virtual servers B and C are both in the stopped state, status logs are also generated: B+stop+timestamp; C+stop+timestamp.

[0109] The third scenario: When the queue manager's work status is "Running" and the virtual server controlling its operation is a backup virtual server (for example, virtual server B), a switchover has occurred from primary virtual server A to backup virtual server B. Logs such as A+stop+timestamp and B+run+timestamp are generated. Alternatively, logs such as C+stop+timestamp are generated. In this case, virtual server A should be demoted to a backup virtual server or removed from the system, with virtual server B becoming the new primary virtual server.

[0110] In some preferred embodiments, the status logs may be foldered with the device name of the virtual server, that is, the status logs of the queue manager may be classified based on the same virtual server, thereby facilitating analysis of the operating status of each virtual server.

[0111] In the embodiments of the present specification, by generating a status log of the queue manager to indirectly represent the status log of the primary virtual server, it is possible to determine whether the primary virtual server is in normal working condition; in addition, a status log corresponding to each backup virtual server is also obtained, which can serve as a preliminary check of the working status of the backup virtual server to avoid the problem of switching failure or low switching response efficiency when it is necessary to switch from the primary virtual server to the backup virtual server due to the backup virtual server being in a fault state caused by downtime or other situations.

[0112] Based on the above status logs, we can get the corresponding table of the working status of the queue manager and each virtual server, as shown in Table 1 below:

[0113] Table 1

[0114]

[0115] In Table 1, “√” indicates that the system is in working state, and “×” indicates that the system is not in working state.

[0116] The state corresponding to sequence number 1 is the normal state (as opposed to the first state log mentioned above), the primary virtual server A obtains the file lock of the queue manager and starts the queue manager; the state corresponding to sequence number 2 is the state of switching from the primary virtual server A to the backup virtual server B (as opposed to the third state log mentioned above), virtual server B obtains the file lock of the queue manager, and virtual server C is not working; the state corresponding to sequence number 3 is the state where the primary virtual server A fails and fails to switch to the backup virtual server successfully (as opposed to the second state log mentioned above), and the primary virtual server A still retains the file lock of the queue manager.

[0117] In summary, in the embodiment of this specification, it is possible to characterize whether each virtual server has an abnormality based on the status log of the queue manager, that is, its execution status by each virtual server. Specifically, if Figure 3 As shown, in the embodiment of this specification, step S220: judging whether the current primary virtual server is abnormal according to the status log of the queue manager includes:

[0118] S310: Determine whether the time difference between the timestamp in the latest status log and the current time node is less than or equal to a preset time period;

[0119] That is, determine whether to generate and record the queue manager status log regularly.

[0120] S320: If not (i.e., the status log of the queue manager is not generated regularly), it is determined that the current primary virtual server is abnormal;

[0121] When the status log of the queue manager is not recorded on time, the essence is that the startup status of the queue manager by the primary virtual server is not obtained, nor is the startup status of the queue manager by other backup virtual servers. It is then determined that the current primary virtual server (that is, the virtual server where the message middleware with the file lock is located) has failed and has not been successfully switched to the backup virtual server.

[0122] S330: If yes (i.e., a status log of the queue manager is generated regularly), determine whether the working status tag of the queue manager is in the stopped state;

[0123] That is, when the status log is recorded normally, whether the current primary virtual server is abnormal is determined based on whether the queue manager is in the running state or the stopped state.

[0124] S331: If the working status tag of the queue manager is in the stopped state, it is determined that the current primary virtual server is abnormal.

[0125] That is, when the situation corresponding to sequence number 3 in Table 1 occurs, it is determined that the current primary virtual server is abnormal.

[0126] Furthermore, the method further comprises:

[0127] S332: If the working status tag of the queue manager is running, it is determined that the current primary virtual server is normal.

[0128] That is, corresponding to the situation of sequence number 1 in Table 1, it is judged that the current primary virtual server is normal; corresponding to the situation of sequence number 2 in Table 1, the current execution queue manager is running a backup virtual server, but in fact it is the newly selected primary virtual server, that is, the "current primary virtual server". At this time, it is judged that the newly selected primary virtual server is normal.

[0129] Furthermore, in step S332: if the working status tag of the queue manager is in the running state, after determining that the current primary virtual server is normal, the method further includes:

[0130] Keep the current primary virtual server unchanged.

[0131] That is, corresponding to the situation of sequence number 1, the message middleware on the main virtual server A still processes the business request; corresponding to the situation of sequence number 2, the message middleware on the virtual server B (which is actually also the current main virtual server) is still used to process the business request.

[0132] In some embodiments, step S230 of selecting one of the backup virtual servers as a new primary virtual server specifically includes:

[0133] Determine whether the number of standby virtual servers is greater than one;

[0134] If the number of standby virtual servers is greater than one (for example, in the embodiment of this specification, there are two standby virtual servers, virtual server B and virtual server C), a new primary virtual server may be selected based on the priority order of the standby virtual servers; or

[0135] One of the backup virtual servers is selected as the new primary virtual server in a round-robin manner.

[0136] like Figure 4 As shown, in the embodiment of this specification, after selecting one virtual server from the backup virtual servers as a new primary virtual server in step S230, the following steps are also included:

[0137] S410: Drift the virtual IP address of the current primary virtual server to the new primary virtual server.

[0138] Specifically, keepalived can be used to achieve the drift of the virtual IP address from the failed current primary virtual server to the newly selected primary virtual server, thereby achieving seamless switching of the primary and backup virtual servers (for the initiator of the service request).

[0139] In addition, it also includes:

[0140] S420: Determine whether the current primary virtual server has any unfinished business requests; if the current primary virtual server has any unfinished business requests, transfer the unfinished business requests to a new primary virtual server for processing.

[0141] S430: Send a fault alarm of the current primary virtual server to remind the operation and maintenance personnel to repair the faulty virtual server.

[0142] When the fault of the current primary virtual server is repaired, it can be added to the virtual server group as a backup virtual server.

[0143] Preferably, before step S240: obtaining the file lock of the queue manager from the current primary virtual server and sending it to the new primary virtual server so that the message middleware on the new primary virtual server obtains the authority to the queue manager and processes the service request based on the queue manager, the process further includes:

[0144] Determine whether the new primary virtual server is normal.

[0145] That is, when the current primary virtual server needs to be switched due to an abnormality, the functions of the newly selected primary virtual server should be normal to avoid multiple switches affecting the normal processing of business requests.

[0146] Through the above method, the queue manager can be kept in operation (during which the message middleware of the virtual server that starts it may need to be switched), so as to ensure that the message middleware on the virtual server can respond to and process business requests accordingly.

[0147] In actual applications, when a queue manager is initially established, it is stopped and no primary virtual server exists. The primary virtual server is then determined based on a preset priority order or a round-robin approach among the three virtual servers. The queue manager's file lock is then assigned to the primary virtual server, enabling the messaging middleware on it to respond to and process service requests.

[0148] In summary, the embodiments of this specification provide a business processing method that uses the status log of the queue manager to determine whether an exception occurs in the current primary virtual server. If an exception occurs, it is forced to release the file lock and transfer it to the newly selected primary virtual server, and cooperates with keepalived to realize the switching of the virtual server and the business thereon, so that the message middleware on the new primary virtual server has the authority of the queue manager to process the business request, thereby realizing the high availability of the message middleware on the virtual server, reducing the hot standby cost and improving the business processing efficiency of the message middleware.

[0149] like Figure 5 As shown, the embodiment of this specification also provides a service processing device, including:

[0150] A first acquisition module 51 is used to acquire a pending service request;

[0151] A judgment module 52 is used to judge whether the current primary virtual server is abnormal according to the status log of the queue manager;

[0152] A selection module 53 is configured to select one of the backup virtual servers as a new primary virtual server if the current primary virtual server is abnormal;

[0153] The second acquisition module 54 is used to obtain the file lock of the queue manager from the current primary virtual server and send it to the new primary virtual server, so that the message middleware on the new primary virtual server obtains the authority to the queue manager and processes the service request based on the queue manager.

[0154] The beneficial effects achieved by the device provided in the embodiments of this specification are consistent with the beneficial effects achieved by the above-mentioned method and will not be repeated here.

[0155] like Figure 6 As shown, the embodiment of this specification also provides a service processing method, including:

[0156] S601: The service processing device obtains a pending service request; analyzes the current primary virtual server based on the queue manager's status log to determine whether it is abnormal; if so, selects a new primary virtual server from the backup virtual servers, obtains the queue manager's file lock from the current primary virtual server, and sends the lock to the new primary virtual server;

[0157] S602: The message middleware on the new primary virtual server obtains the permission of the queue manager according to the file lock, and processes the service request based on the queue manager.

[0158] like Figure 7 As shown, the embodiment of this specification also provides a business processing system, including a business processing device 71 and at least two virtual servers;

[0159] The service processing device 71 is used to obtain a service request to be processed and determine whether the primary virtual server 72 is abnormal based on the status log of the queue manager. If the primary virtual server 72 is abnormal, it selects a new primary virtual server from the backup virtual servers 73, obtains the queue manager's file lock from the current primary virtual server, and sends it to the new primary virtual server.

[0160] The virtual server includes a main virtual server 72 and a backup virtual server 73; the main virtual server 72 is used to obtain the authority to the queue manager based on the file lock, thereby processing the business request based on the queue manager; the backup virtual server 73 is used to obtain the file lock released from the main virtual server 72 when the main virtual server 72 is abnormal, so as to replace the main virtual server to process the business request.

[0161] like Figure 8As shown, a computer device provided in an embodiment of the present invention is shown. The computer device 802 may include one or more processors 804, such as one or more central processing units (CPUs), each of which may implement one or more hardware threads. The computer device 802 may also include any memory 806 for storing any type of information, such as code, settings, data, etc. For example, without limitation, the memory 806 may include any one or more combinations of the following: any type of RAM, any type of ROM, a flash memory device, a hard disk, an optical disk, etc. More generally, any memory may use any technology to store information. Furthermore, any memory may provide volatile or non-volatile retention of information. Furthermore, any memory may represent a fixed or removable component of the computer device 802. In one embodiment, when the processor 804 executes associated instructions stored in any memory or combination of memories, the computer device 802 may perform any operation of the associated instructions. The computer device 802 also includes one or more drive mechanisms 808 for interacting with any memory, such as a hard disk drive mechanism, an optical disk drive mechanism, etc.

[0162] The computer device 802 may also include an input / output module 810 (I / O) for receiving various inputs (via input devices 812) and for providing various outputs (via output devices 814). A specific output mechanism may include a presentation device 816 and an associated graphical user interface 818 (GUI). In other embodiments, the input / output module 810 (I / O), input devices 812, and output devices 814 may not be included, and the computer device 802 may simply be a computer device in a network. The computer device 802 may also include one or more network interfaces 820 for exchanging data with other devices via one or more communication links 822. One or more communication buses 824 couple the components described above together.

[0163] The communication link 822 may be implemented in any manner, for example, via a local area network, a wide area network (e.g., the Internet), a point-to-point connection, etc., or any combination thereof. The communication link 822 may include any combination of hardwired links, wireless links, routers, gateway functions, name servers, etc., governed by any protocol or combination of protocols.

[0164] Corresponding to Figures 2 to 4 and Figure 6 The embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which executes the steps of the above method when executed by a processor.

[0165] The embodiment of the present invention also provides a computer readable instruction, wherein when the processor executes the instruction, the program causes the processor to execute the following Figures 2 to 4 and Figure 6 The method in .

[0166] The embodiment of the present invention also provides a computer program product, which includes at least one instruction or at least one program segment, and the at least one instruction or the at least one program segment is loaded and executed by a processor to implement the following Figures 2 to 4 and Figure 6 The method in .

[0167] It should be understood that in the various embodiments of this document, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this document.

[0168] It should also be understood that in the embodiments herein, the term "and / or" merely describes an association between associated objects, indicating that three possible relationships exist. For example, "A and / or B" could represent: A alone, A and B simultaneously, or B alone. Furthermore, the character " / " in this document generally indicates an "or" relationship between the associated objects.

[0169] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the composition and steps of each example according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this document.

[0170] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0171] In the several embodiments provided herein, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices, or units, or can be an electrical, mechanical, or other form of connection.

[0172] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments herein.

[0173] In addition, the functional units in the various embodiments herein may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0174] 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 this article is essentially or the part that contributes to the existing technology, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of this article. The aforementioned storage medium includes: various media that can store program code, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0175] This article uses specific embodiments to illustrate the principles and implementation methods of this article. The description of the above embodiments is only used to help understand the methods and core ideas of this article. At the same time, for those skilled in the art, based on the ideas of this article, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation to this article.

Claims

1. A business processing method, characterized in that: include: Get pending business requests; Judging whether the current primary virtual server is abnormal according to the status log of the queue manager, wherein the status log of the queue manager includes: the device name of the primary virtual server, the working status tag of the queue manager and the timestamp; comprising: judging whether the time difference between the timestamp in the latest status log and the current time node is less than or equal to a preset time period; if not, determining that the current primary virtual server is abnormal; if so, judging whether the working status tag of the queue manager is in a stopped state; if the working status tag of the queue manager is in a stopped state, determining that the current primary virtual server is abnormal; If the current primary virtual server is abnormal, select one from the backup virtual servers as the new primary virtual server; The file lock of the queue manager is obtained from the current primary virtual server and sent to the new primary virtual server, so that the message middleware on the new primary virtual server obtains the authority of the queue manager, thereby processing the service request based on the queue manager.

2. The method according to claim 1, characterized in that The step of determining whether the current primary virtual server is abnormal based on the status log of the queue manager further includes: If the working status tag of the queue manager is running, it is determined that the current primary virtual server is normal.

3. The method according to claim 1, characterized in that If the working status tag of the queue manager is in the running state, after determining that the current primary virtual server is normal, the method further includes: Keep the current primary virtual server unchanged.

4. The method according to claim 1, wherein The step of selecting one of the backup virtual servers as a new primary virtual server includes: When there is more than one backup virtual server, a new primary virtual server is selected based on the priority order of the backup virtual servers; or One of the backup virtual servers is selected as the new primary virtual server in a round-robin manner.

5. The method according to claim 1, wherein After selecting one of the standby virtual servers as a new primary virtual server, the method further includes: Drift the virtual IP address of the current primary virtual server to the new primary virtual server.

6. The method according to claim 1, characterized in that After selecting one of the standby virtual servers as a new primary virtual server, the method further includes: Determine whether the current primary virtual server has any unfinished business requests; If the current primary virtual server has unfinished business requests, the unfinished business requests will be transferred to the new primary virtual server for processing.

7. The method according to claim 1, characterized in that After selecting one of the standby virtual servers as a new primary virtual server, the method further includes: Send a fault alarm for the current primary virtual server.

8. A business processing device, characterized in that: include: A first acquisition module is used to obtain a pending business request; The judgment module is configured to judge whether the current primary virtual server is abnormal based on the status log of the queue manager, wherein the status log of the queue manager includes: the device name of the primary virtual server, the working status tag of the queue manager, and the timestamp; the judgment module includes: judging whether the time difference between the timestamp in the latest status log and the current time node is less than or equal to a preset time period; if not, determining that the current primary virtual server is abnormal; if so, judging whether the working status tag of the queue manager is in a stopped state; if the working status tag of the queue manager is in a stopped state, determining that the current primary virtual server is abnormal; A selection module is used to select a new primary virtual server from the backup virtual servers if the current primary virtual server is abnormal; The second acquisition module is used to obtain the file lock of the queue manager from the current primary virtual server and send it to the new primary virtual server, so that the message middleware on the new primary virtual server obtains the authority to the queue manager and processes the service request based on the queue manager.

9. A business processing method, characterized in that: include: The service processing device obtains the service request to be processed; Analyze whether the current primary virtual server is abnormal according to the status log of the queue manager, wherein the status log of the queue manager includes: the device name of the primary virtual server, the working status tag of the queue manager and the timestamp; including: judging whether the time difference between the timestamp in the latest status log and the current time node is less than or equal to a preset time period; if not, determining that the current primary virtual server is abnormal; if so, judging whether the working status tag of the queue manager is in a stopped state; if the working status tag of the queue manager is in a stopped state, determining that the current primary virtual server is abnormal; if the current primary virtual server is abnormal, selecting one from the standby virtual servers as a new primary virtual server, obtaining the file lock of the queue manager from the current primary virtual server and sending it to the new primary virtual server; The message middleware on the new primary virtual server obtains the permission of the queue manager according to the file lock, and processes the service request based on the queue manager.

10. A business processing system, characterized in that: including a business processing device and at least two virtual servers; The business processing device is used to obtain a pending business request and determine whether the primary virtual server is abnormal based on the status log of the queue manager, wherein the status log of the queue manager includes: the device name of the primary virtual server, the working status tag of the queue manager and the timestamp; including: determining whether the time difference between the timestamp in the latest status log and the current time node is less than or equal to a preset time period; if not, determining that the current primary virtual server is abnormal; if so, determining whether the working status tag of the queue manager is in a stopped state; if the working status tag of the queue manager is in a stopped state, determining that the current primary virtual server is abnormal; if the primary virtual server is abnormal, selecting one from the standby virtual servers as a new primary virtual server, obtaining the file lock of the queue manager from the current primary virtual server and sending it to the new primary virtual server; The virtual server includes a primary virtual server and a backup virtual server; the primary virtual server is used to obtain permission to the queue manager based on the file lock, thereby processing the business request based on the queue manager; the backup virtual server is used to obtain the file lock released from the primary virtual server when the primary virtual server is abnormal to replace the primary virtual server to process the business request.

11. A computer device comprising 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 method according to any one of claims 1 to 7 is implemented.

12. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

13. A computer program product, characterized in that The method comprises at least one instruction or at least one program, wherein the at least one instruction or the at least one program is loaded and executed by a processor to implement the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Message subscription method, device and system, electronic equipment and storage medium

    CN111212135A