A concurrent access control method, apparatus, product, device and medium
By obtaining the source address, destination address, message type, and target identifier from the request message, the business identifier and concurrency threshold are determined, solving the system stability problem of high-concurrency access control between airlines and achieving stable and efficient support for business interactions between different airlines.
Patent Information
- Application Number
- CN202411366300.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2044-09-27
AI Technical Summary
Given the frequent information exchange between airlines, existing technologies cannot effectively meet the concurrency control needs of different business identifiers and airline sizes in order to effectively manage high-concurrency access, ensure smooth information flow, and guarantee the business stability of the system.
By obtaining the source address, destination address, message type, and target identifier from the request message, the service identifier, concurrency threshold, and concurrency timeout are determined. These factors are combined to perform precise concurrent access control, distinguishing between messages with and without contextual relationships and using different control methods to ensure resource utilization efficiency and system stability.
It has achieved stable and efficient support for business interactions between different airlines, optimized resource utilization efficiency, and ensured the system's business stability and data consistency.
Smart Images

Figure CN119210858B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of aviation information technology, and in particular to a concurrent access control method, device, product, equipment and medium. BACKGROUND
[0002] With the vigorous development of the civil aviation industry, the rapid growth of passenger flow directly promotes the continuous expansion of airport infrastructure to meet the growing travel demand. At the same time, the processing volume of core business processes such as booking system, flight query, departure service, etc. has risen sharply, and the complexity of business logic has also increased significantly, putting higher requirements on the response speed, data processing capacity and business processing capacity of the system.
[0003] This profound industry change poses an unprecedented severe challenge to the underlying communication system that supports these key business processes. Especially in the context of frequent information exchange between multiple airlines, how to effectively manage high concurrency access, ensure smooth information flow, and at the same time guarantee the business stability of the system, has become a technical problem to be solved. SUMMARY
[0004] To solve the above technical problems, the technical solutions provided by the embodiments of the present application are as follows:
[0005] The present application provides a concurrent access control method, comprising:
[0006] receiving a request message;
[0007] obtaining a source address, a destination address, a message type, a first target identifier and a second target identifier from the request message; the source address corresponds to a first airline initiating access; the destination address corresponds to a second airline responding to access; the first target identifier is used to indicate whether the request message has a context relationship with other messages; the second target identifier is used to identify a terminal sending the request message;
[0008] determining a business identifier corresponding to the source address, the destination address and the message type;
[0009] determining a concurrency threshold corresponding to the business identifier; the concurrency threshold represents the limit of the current concurrent access volume of the business of the business identifier;
[0010] if the first target identifier indicates that the request message does not have a context relationship with other messages, determining whether to allow the request message to be processed by the second airline based on the second target identifier and the concurrency threshold;
[0011] if the first target identifier indicates that the request message has a context relationship with other messages, determining whether the second target identifier corresponds to a concurrent timeout time;
[0012] based on the concurrent threshold, the concurrent timeout time, and the second target identifier, determining whether the request message is allowed to be processed by the second airline company.
[0013] In a possible implementation, based on the second target identifier and the concurrent threshold, determining whether the request message is allowed to be processed by the second airline company comprises:
[0014] if the second target identifier of a previous request message that has not obtained a response from the second airline company is the same as the second target identifier, rejecting the request message to be processed by the second airline company;
[0015] if the second target identifier of the previous request message that has not obtained the response from the second airline company is different from the second target identifier, and the concurrent threshold is greater than 0, allowing the request message to be processed by the second airline company, and performing decrement processing on the concurrent threshold to obtain a new concurrent threshold;
[0016] if the second target identifier of the previous request message that has not obtained the response from the second airline company is different from the second target identifier, and the concurrent threshold is not greater than 0, rejecting the request message to be processed by the second airline company.
[0017] In a possible implementation, based on the concurrent threshold, the concurrent timeout time, and the second target identifier, determining whether the request message is allowed to be processed by the second airline company comprises:
[0018] if the first target identifier further indicates that the request message is the first message in the context relationship, establishing an occupation relationship between the second target identifier and the request message, and setting the concurrent timeout time for the occupation relationship;
[0019] if a time maintained by the occupation relationship does not reach the concurrent timeout time, determining whether the request message is allowed to be processed by the second airline company based on the concurrent threshold;
[0020] if the time maintained by the occupation relationship reaches the concurrent timeout time, releasing the occupation relationship.
[0021] In a possible implementation, based on the concurrent threshold, the concurrent timeout time, and the second target identifier, determining whether the request message is allowed to be processed by the second airline company comprises:
[0022] If the first target identifier further indicates that the request message is an intermediate message in a context relationship, it is determined whether an occupation relationship corresponding to the second target identifier exists;
[0023] If the occupation relationship exists and a time period during which the occupation relationship is maintained has not reached the concurrency timeout time, the request message is allowed to be processed by the second airline company and the concurrency timeout time is updated for the occupation relationship;
[0024] If the time period during which the occupation relationship is maintained reaches the concurrency timeout time, the occupation relationship is released.
[0025] In a possible implementation, the determining whether the request message is allowed to be processed by the second airline company based on the concurrency threshold, the concurrency timeout time and the second target identifier comprises:
[0026] If the first target identifier further indicates that the request message is a final message in a context relationship, it is determined whether an occupation relationship corresponding to the second target identifier exists;
[0027] If the occupation relationship exists and a time period during which the occupation relationship is maintained has not reached the concurrency timeout time, the request message is allowed to be processed by the second airline company, and the occupation relationship and the concurrency timeout time are deleted, and the concurrency threshold is incremented to obtain a new concurrency threshold;
[0028] If the time period during which the occupation relationship is maintained reaches the concurrency timeout time, the occupation relationship is released.
[0029] Another aspect of the present application provides a concurrency access control device, comprising:
[0030] A message admission module is configured to receive a request message.
[0031] A message analysis module is configured to acquire a source address, a destination address, a message type, a first target identifier and a second target identifier from the request message; the source address corresponds to a first airline company initiating an access; the destination address corresponds to a second airline company responding to the access; the first target identifier is used to indicate whether the request message has a context relationship with other messages; and the second target identifier is used to identify a terminal sending the request message.
[0032] A concurrency access control module is configured to determine a service identifier corresponding to the source address, the destination address and the message type.
[0033] A concurrency threshold limiting module is configured to determine a concurrency threshold corresponding to the service identifier; the concurrency threshold represents a limit of a current concurrency access amount of a service of the service identifier.
[0034] The concurrent access control module is further configured to determine, based on the second target identifier and the concurrency threshold, whether to allow the second airline to process the request message if the first target identifier indicates that the request message has no context relationship with other messages;
[0035] The concurrent timeout processing module is used to determine the concurrent timeout time corresponding to the second target identifier if the first target identifier indicates that the request message has a context relationship with other messages;
[0036] The concurrent access control module is further configured to determine, based on the concurrent threshold, the concurrent timeout time, and the second target identifier, whether to allow the second airline to process the request message.
[0037] In one possible implementation, the concurrent access control module is specifically used for:
[0038] If the second target identifier of the previous request message that did not receive a response from the second airline is the same as the second target identifier, then the second airline is refused to process the request message.
[0039] If the second target identifier of the previous request message that did not receive a response from the second airline is different from the second target identifier, and the concurrency threshold is greater than 0, the second airline is allowed to process the request message, and the concurrency threshold is decremented to obtain a new concurrency threshold.
[0040] If the second target identifier of the previous request message that did not receive a response from the second airline is different from the second target identifier, and the concurrency threshold is not greater than 0, the second airline is refused to process the request message.
[0041] A third aspect of this application provides a computer program product including computer-readable instructions that, when executed on an electronic device, cause the electronic device to implement the concurrent access control method as described in any of the preceding claims.
[0042] A fourth aspect of this application provides an electronic device, comprising at least one processor and a memory connected to the processor, wherein:
[0043] The memory is used to store computer programs;
[0044] The processor is used to execute the computer program to enable the electronic device to implement the concurrent access control method as described in any of the above.
[0045] The fifth aspect of this application provides a computer storage medium carrying one or more computer programs, which, when executed by an electronic device, enable the electronic device to implement the concurrent access control method as described in any of the preceding claims.
[0046] Compared with the prior art, the beneficial effects of this application are as follows:
[0047] In this application, by obtaining a request message, the source address, destination address, message type, and first target identifier are retrieved from the request message. A service identifier corresponding to the source address, destination address, and message type is determined. This service identifier can represent a specific service accessed by the airline corresponding to the source address (i.e., a first airline) to the airline corresponding to the destination address (i.e., a second airline). A concurrency threshold corresponding to the service identifier is then determined. Since the concurrency threshold represents the current limit of concurrent access to the service represented by the service identifier, i.e., the setting of the concurrency threshold considers the comprehensive factors of the source address, destination address, and message type, determining whether the second airline is allowed to process the request message based on the concurrency threshold allows for precise control of concurrent access to specific services by the second airline when a specific first airline accesses the service. The above-mentioned concurrency access control method is applicable to different first airlines, ensuring that the stability of the second airline's services is protected regardless of which first airline initiates the request, optimizing resource utilization efficiency, and providing stable and efficient support for inter-airline business interactions.
[0048] Furthermore, by using the first target identifier, it distinguishes whether the request message has a contextual relationship with other messages, thereby employing different concurrency access control methods. That is, for messages without contextual relationships, the main focus is on the concurrency threshold and the second target identifier; while for messages with contextual relationships, factors such as the concurrency threshold, concurrency timeout, and the second target identifier are comprehensively considered. This diversified judgment method makes concurrency access control more accurate and efficient. Attached Figure Description
[0049] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.
[0050] Figure 1 This is a flowchart illustrating a concurrent access control method provided in Embodiment 1 of this application;
[0051] Figure 2 This is a flowchart illustrating a concurrent access control method provided in Embodiment 2 of this application;
[0052] Figure 3 This is a flowchart illustrating a concurrent access control method provided in Embodiment 3 of this application;
[0053] Figure 4 This is a flowchart illustrating a concurrent access control method provided in Embodiment 4 of this application;
[0054] Figure 5 This is a flowchart illustrating a concurrent access control method provided in Embodiment 5 of this application;
[0055] Figure 6 This is a schematic diagram of the structure of a concurrent access control device provided in this application. Detailed Implementation
[0056] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0057] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.
[0058] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.
[0059] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0060] Currently, information exchange between airlines primarily relies on MATIP connections (an end-to-end TCP-based network transmission encapsulation standard for aviation-specific protocol data packets, establishing a routing-independent mapping between the transport and application layers), and follows the HTH protocol (an IATA guideline for end-to-end connections. HTH is a protocol based on the TCP / IP seven-layer network architecture. Layers 4, 5, and 6 of HTH correspond to layers 4, 5, and 6 of the OSI model.) in the HTH protocol (a field specified in the HTH protocol containing a unique reference to the resource endpoint (e.g., agent or program) that made the request to the remote host. The returned field remains unchanged and can then be used to reallocate resources.) mechanism protects internal systems from overload by setting concurrent access thresholds. However, this mechanism is too simplistic when dealing with complex and ever-changing business scenarios and cannot effectively meet the concurrency control needs of different business identifiers and airlines of varying sizes.
[0061] Furthermore, the HTH protocol distinguishes between messages with contextual relationships (represented by VYU, where V is the first message, T is the middle message, and U is the last message) and messages without contextual relationships (represented by W). This difference in message types is particularly critical in concurrent access control because messages with contextual relationships require additional resource allocation and release mechanisms to ensure data consistency and system stability. Therefore, this application provides a concurrent access control method that expands the dimensions and judgment methods of concurrent access control to meet the needs of different business scenarios and to implement different controls for messages with and without contextual relationships.
[0062] The concurrent access control method disclosed in the embodiments of this application will be described below, referring to... Figure 1 This is a flowchart illustrating a concurrent access control method provided in Embodiment 1 of this application. Figure 1 As shown, the method may include, but is not limited to, the following steps:
[0063] Step S101: Obtain the request message.
[0064] In this embodiment, based on the established communication connection between the first airline and the second airline, one of the first airline and the second airline can act as the initiator of the access, and the other as the responder. The initiator can send a request message to the responder to request resources or information, etc. For example, the first airline initiating the access can send a query request message to request flight information from the second airline.
[0065] The request message may include the source address, destination address, message type, and first destination identifier.
[0066] The source address can correspond to the first airline that initiated the access.
[0067] The destination address can correspond to the second airline that responded to the access request.
[0068] The first target identifier can be used to indicate whether the request message has a contextual relationship with other messages.
[0069] The request message may also include a second target identifier. The second target identifier can be used to identify the terminal that sent the request message.
[0070] Step S102: Obtain the source address, destination address, message type, first target identifier, and second target identifier from the request message.
[0071] In this embodiment, the source address, destination address, message type, first target identifier, and second target identifier are obtained by parsing the request message.
[0072] Step S103: Determine the service identifier corresponding to the source address, the destination address, and the message type.
[0073] In this embodiment, various service identifiers can be pre-configured based on different source addresses, destination addresses, and message types to establish a correspondence between service identifiers and source addresses, destination addresses, and message types. A service identifier can represent a specific service provided by an airline corresponding to a source address to an airline corresponding to a destination address. For example, if the source address corresponds to airline A, the destination address corresponds to airline B, and the service type is 'a' (the service type can be determined based on the message type), the service identifier for this combination is LABa, representing airline A accessing airline B's service 'a'; or, if the source address corresponds to airline C, the destination address corresponds to airline B, and the service type is 'a', the service identifier for this combination is LCBa, representing airline C accessing airline B's service.
[0074] Concurrency thresholds can be configured for various service identifiers, and these thresholds represent the limits on concurrent access to the service represented by each service identifier. For example, the concurrency threshold corresponding to service identifier LABA can represent the limits on concurrent access to service a of airline A to airline B. Alternatively, the concurrency threshold corresponding to service identifier LCBa can represent the limits on concurrent access to service a of airline C to airline B.
[0075] After obtaining the source address, destination address, and message type from the request message, the service identifier corresponding to the source address, destination address, and message type can be found from the correspondence.
[0076] Step S104: Determine the concurrency threshold corresponding to the service identifier.
[0077] In this embodiment, the concurrency threshold corresponding to the service identifier decreases as the number of service accesses under that service identifier increases. The concurrency threshold represents the current limit of concurrent accesses for the service represented by the service identifier.
[0078] Step S105: If the first target identifier indicates that the request message has no contextual relationship with other messages, determine whether the second airline is allowed to process the request message based on the second target identifier and the concurrency threshold.
[0079] Context relationships can be a logical structure used to describe the association and order between a series of request messages. In this structure, request messages can be categorized into three different roles: the first message, the middle message, and the last message. These three types of messages together constitute a complete message sequence used to transmit information and perform operations during communication or data processing.
[0080] In a context relationship, the first message is the first element in the sequence, marking the start of message passing or data processing. By definition, there is only one first message in each context relationship.
[0081] Intermediate messages are located between the first and last messages, and they constitute the main body of the message sequence. Unlike the first and last messages, there can be one or more intermediate messages, the exact number depending on the complexity of the context and the amount of information to be transmitted.
[0082] The last message is the final element in a context relationship, marking the end of message passing or data processing. Similarly, there is only one last message in each context relationship.
[0083] Based on the second target identifier, it can be determined whether the terminal sending the request message has permission to access the second airline. Based on the concurrency threshold, it can be determined whether the second airline has the ability to respond to and process the request message, and thus it can be determined whether the second airline is allowed to process the request message.
[0084] Step S106: If the first target identifier indicates that the request message has a contextual relationship with other messages, determine the concurrent timeout time corresponding to the second target identifier.
[0085] The concurrent timeout period can characterize the time limit for the request message to occupy the second target identifier.
[0086] The concurrent timeout period can be set as needed, and is not limited in this application.
[0087] Step S107: Based on the current concurrency threshold, the concurrency timeout time, and the second target identifier, determine whether to allow the second airline to process the request message.
[0088] Based on the second target identifier, it can be determined whether the terminal sending the request message has permission to access the second airline. Based on the concurrency threshold, it can be determined whether the second airline has the ability to respond to and process the request message. Based on the concurrency timeout, it can be determined whether to release the occupation of the second target identifier, and thus determine whether to allow the second airline to process the request message.
[0089] In this embodiment, by obtaining a request message, the source address, destination address, message type, and first target identifier are retrieved from the request message. A service identifier corresponding to the source address, destination address, and message type is determined. This service identifier can represent a specific service accessed by the airline corresponding to the source address (i.e., a first airline) to the airline corresponding to the destination address (i.e., a second airline). A concurrency threshold corresponding to the service identifier is then determined. Since the concurrency threshold represents the current limit of concurrent access to the service represented by the service identifier, i.e., the setting of the concurrency threshold considers the comprehensive factors of the source address, destination address, and message type, determining whether the second airline is allowed to process the request message based on the concurrency threshold allows for precise control of concurrent access to specific services by the second airline when a specific first airline accesses the service. This concurrency access control method is applicable to different first airlines, ensuring that regardless of which first airline initiates the request, the stability of the second airline's services is protected, resource utilization efficiency is optimized, and stable and efficient support is provided for inter-airline business interactions.
[0090] Furthermore, by using the first target identifier, it distinguishes whether the request message has a contextual relationship with other messages, thereby employing different concurrency access control methods. That is, for messages without contextual relationships, the main focus is on the concurrency threshold and the second target identifier; while for messages with contextual relationships, factors such as the concurrency threshold, concurrency timeout, and the second target identifier are comprehensively considered. This diversified judgment method makes concurrency access control more accurate and efficient.
[0091] As another optional embodiment of this application, refer to Figure 2 This is a flowchart illustrating a concurrent access control method provided in Embodiment 2 of this application. This embodiment mainly refines step S104 in Embodiment 1 above, such as... Figure 2 As shown, step S105 may include, but is not limited to, the following steps:
[0092] Step S1051: If the first target identifier indicates that the request message has no context relationship with other messages, determine whether the second target identifier of the previous request message that did not receive a response from the second airline is the same as the second target identifier obtained in step S102.
[0093] In this embodiment, when the request message does not receive a response, the second target identifier in the request message can be temporarily stored in a designated area. After the request message receives a response, the second target identifier can be deleted from the designated area.
[0094] In this embodiment, if the first target identifier indicates that the request message has no contextual relationship with other messages, the second target identifier in the specified area can be compared with the second target identifier to see if they are the same.
[0095] If they are the same, proceed to step S1052; if they are not the same, proceed to step S1053.
[0096] Step S1052: Reject the request message to be processed by the second airline.
[0097] Step S1053: Determine whether the concurrency threshold is greater than 0.
[0098] If yes, proceed to step S1054; otherwise, proceed to step S1055.
[0099] Step S1054: Allow the second airline to process the request message and decrement the concurrency threshold to obtain a new concurrency threshold.
[0100] In this embodiment, when decreasing the concurrency threshold, the threshold can be reduced by one unit, i.e., the reduction amount is 1 each time. This processing method can ensure that the concurrency threshold can be gradually reduced in a controllable and precise manner.
[0101] Step S1055: Reject the request message to be processed by the second airline.
[0102] In this embodiment, by determining whether the second target identifier of the previous request message that did not receive a response from the second airline is the same as the second target identifier, the second airline can avoid duplicate processing or potential conflicts. This aims to ensure the processing efficiency and data consistency of the second airline and prevent resource waste or data errors caused by duplicate processing of the same request.
[0103] As another optional embodiment of this application, refer to Figure 3This is a flowchart illustrating a concurrent access control method provided in Embodiment 3 of this application. This embodiment mainly refines step S107 in Embodiment 1 above, such as... Figure 3 As shown, step S107 may include, but is not limited to, the following steps:
[0104] Step S1071: If the first target identifier also indicates that the request message is the first message in the context relationship, establish an occupancy relationship between the second target identifier and the request message, and set the concurrent timeout for the occupancy relationship.
[0105] Step S1072: If the duration of the occupancy relationship does not reach the concurrency timeout period, determine whether the second airline is allowed to process the request message based on the concurrency threshold.
[0106] In this embodiment, it is determined whether the concurrency threshold is greater than 0; if it is greater than 0, the second airline is allowed to process the request message, and the concurrency threshold is decremented to obtain a new concurrency threshold; if the concurrency threshold is not greater than 0, the second airline is refused to process the request message.
[0107] Step S1073: If the duration of the occupancy relationship reaches the concurrent timeout period, release the occupancy relationship.
[0108] After the occupancy relationship is released, the second target identifier, which was previously occupied by the first message, will no longer be exclusively occupied by that message, providing an opportunity for other request messages in the context to use the second target identifier. In particular, since these subsequent request messages can continue to use the same resources as the first message (through sharing or reusing the second target identifier, etc.), this mechanism helps reduce the overhead of resource allocation and configuration, thereby saving the second airline's resource costs and improving overall processing efficiency.
[0109] As another optional embodiment of this application, refer to Figure 4 This is a flowchart illustrating a concurrent access control method provided in Embodiment 4 of this application. This embodiment mainly refines step S107 in Embodiment 1 above, such as... Figure 4 As shown, step S107 may include, but is not limited to, the following steps:
[0110] Step S1074: If the first target identifier also indicates that the request message is an intermediate message in the context relationship, check whether there is an occupancy relationship corresponding to the second target identifier.
[0111] If the first target identifier also indicates that the request message is an intermediate message in the context relationship, it means that a first message or other intermediate message has appeared before the request message. Therefore, it is necessary to confirm whether a request message has already established an occupancy relationship with the second target identifier, and whether the relationship is still active.
[0112] If it exists, proceed to step S1075.
[0113] If there is no holding relationship, or if the holding relationship has expired, the intermediate message can be rejected.
[0114] Step S1075: Determine whether the duration of the occupancy relationship has not reached the concurrent timeout period.
[0115] If yes, proceed to step S1076; otherwise, proceed to step S1077.
[0116] Step S1076: Allow the second airline to process the request message and update the concurrency timeout for the occupancy relationship.
[0117] Updating the concurrent timeout for the occupancy relationship may include resetting the concurrent timeout of the occupancy relationship to its initial value. For example, if the current concurrent timeout of the occupancy relationship is 150 seconds and the initial value is 300 seconds, then the concurrent timeout of the occupancy relationship will be reset to 300 seconds.
[0118] Step S1077: Release the occupancy relationship.
[0119] In this embodiment, if the occupancy relationship already exists and is valid, then the current request message, as an intermediate message, is part of the context relationship and should be supported. The second airline can continue to process the current request message.
[0120] Meanwhile, in order to maintain effective management of the second airline's resources and avoid potential concurrency issues, the concurrency timeout can be updated for existing occupancy relationships to adapt to changing contextual requirements.
[0121] As another optional embodiment of this application, refer to Figure 5 This is a flowchart illustrating a concurrent access control method provided in Embodiment 5 of this application. This embodiment mainly refines step S107 in Embodiment 1 above, such as... Figure 5 As shown, step S107 may include, but is not limited to, the following steps:
[0122] Step S1078: If the first target identifier also indicates that the request message is the last message in the context relationship, check whether there is an occupancy relationship corresponding to the second target identifier.
[0123] If the first target identifier also indicates that the request message is the last message in the context relationship, it means that the first message and intermediate messages have appeared before the request message. Therefore, it is necessary to confirm whether a request message has already established an occupancy relationship with the second target identifier, and whether the relationship is still active.
[0124] If so, proceed to step S1079.
[0125] Step S1079: Determine whether the duration of the occupancy relationship has not reached the concurrent timeout period.
[0126] If yes, proceed to step S10710; otherwise, proceed to step S10711.
[0127] Step S10710: Allow the second airline to process the request message, delete the occupancy relationship and the concurrency timeout, and increment the concurrency threshold to obtain a new concurrency threshold.
[0128] If the occupancy relationship already exists and is valid, then the current request message, as the last message, is part of the context relationship and should be supported. The second airline can continue to process the current request message.
[0129] With the successful processing of the last message, the occupancy relationship associated with the second destination identifier can be deleted, as this signifies the end of the processing sequence represented by that occupancy relationship. Simultaneously, the system will also delete the concurrent timeout associated with that occupancy relationship.
[0130] Furthermore, with the successful processing of the last message, it indicates that the concurrent resources previously allocated by the second airline for this message can now be released, and the concurrency threshold can be adaptively incremented to reflect in real time the current concurrent access limit of the service represented by the service identifier.
[0131] Step S10711: Release the occupancy relationship.
[0132] The following section introduces a concurrent access control device provided in this application. The concurrent access control device described below can be referred to in correspondence with the concurrent access control method described above.
[0133] Reference Figure 6 The concurrent access control device includes: a message admission module 100, a message parsing module 200, a concurrent access control module 300, a concurrent threshold limiting module 400, and a concurrent timeout processing module 500.
[0134] Message admission module 100 is used to receive request messages;
[0135] The message parsing module 200 is used to obtain the source address, destination address, message type, first target identifier, and second target identifier from the request message; the source address corresponds to the first airline that initiated the access; the destination address corresponds to the second airline that responded to the access; the first target identifier is used to indicate whether the request message has a contextual relationship with other messages; the second target identifier is used to identify the terminal that sent the request message;
[0136] Concurrent access control module 300 is used to determine the service identifier corresponding to the source address, the destination address, and the message type;
[0137] The concurrency threshold limiting module 400 is used to determine the concurrency threshold corresponding to the service identifier; the concurrency threshold represents the current limit of concurrent access to the service represented by the service identifier;
[0138] The concurrent access control module 300 is further configured to determine, based on the second target identifier and the concurrency threshold, whether to allow the second airline to process the request message if the first target identifier indicates that the request message has no context relationship with other messages;
[0139] The concurrent timeout processing module 500 is used to determine the concurrent timeout time corresponding to the second target identifier if the first target identifier indicates that the request message has a context relationship with other messages;
[0140] The concurrent access control module 300 is further configured to determine whether the second airline is allowed to process the request message based on the concurrent threshold, the concurrent timeout time, and the second target identifier.
[0141] The concurrent access control module 300 determines, based on the second target identifier and the concurrent threshold, whether to allow the second airline to process the request message. Specifically, this process may include:
[0142] If the second target identifier of the previous request message that did not receive a response from the second airline is the same as the second target identifier, then the second airline is refused to process the request message.
[0143] If the second target identifier of the previous request message that did not receive a response from the second airline is different from the second target identifier, and the concurrency threshold is greater than 0, the second airline is allowed to process the request message, and the concurrency threshold is decremented to obtain a new concurrency threshold.
[0144] If the second target identifier of the previous request message that did not receive a response from the second airline is different from the second target identifier, and the concurrency threshold is not greater than 0, the second airline is refused to process the request message.
[0145] The concurrent access control module 300 determines whether to allow the second airline to process the request message based on the concurrent threshold, the concurrent timeout time, and the second target identifier. Specifically, this process may include:
[0146] If the first target identifier also indicates that the request message is the first message in the context relationship, establish an occupancy relationship between the second target identifier and the request message, and set the concurrent timeout for the occupancy relationship;
[0147] If the occupancy relationship is maintained for a period of time less than the concurrency timeout period, based on the concurrency threshold, it is determined whether the second airline is allowed to process the request message.
[0148] If the occupancy period lasts until the concurrent timeout period, the occupancy relationship is released.
[0149] The concurrent access control module 300 determines whether to allow the second airline to process the request message based on the concurrent threshold, the concurrent timeout time, and the second target identifier. Specifically, this process may include:
[0150] If the first target identifier also indicates that the request message is an intermediate message in the context relationship, check whether there is an occupancy relationship corresponding to the second target identifier;
[0151] If it exists, and the occupancy relationship has not been maintained for the duration of the concurrent timeout, the second airline is permitted to process the request message and update the concurrent timeout for the occupancy relationship;
[0152] If the occupancy period lasts until the concurrent timeout period, the occupancy relationship is released.
[0153] The concurrent access control module 300 determines whether to allow the second airline to process the request message based on the concurrent threshold, the concurrent timeout time, and the second target identifier. Specifically, this process may include:
[0154] If the first target identifier also indicates that the request message is the last message in the context relationship, check whether there is an occupancy relationship corresponding to the second target identifier;
[0155] If it exists, and the occupancy relationship is maintained for a period of time that does not reach the concurrency timeout, the second airline is allowed to process the request message, delete the occupancy relationship and the concurrency timeout, and increment the concurrency threshold to obtain a new concurrency threshold.
[0156] If the occupancy period lasts until the concurrent timeout period, the occupancy relationship is released.
[0157] The interaction between the message admission module 100, the message parsing module 200, the concurrent access control module 300, the concurrent threshold limiting module 400, and the concurrent timeout handling module 500 will be introduced with an example.
[0158] For example, a request message has no context relationship with other messages:
[0159] Step 1: Initial Parameter Configuration
[0160] In the ticket service, the service identifier (L5) corresponding to the source address 1E, destination address ZA, and message type PAOREQ is set to "11EZASLQ". The concurrency threshold (11EZASLQlimit) corresponding to this L5 "11EZASLQ" is set to "100". Since the ticket service is non-contextual, there is no concurrency timeout (TPRtimeout).
[0161] Step 2: Message Processing
[0162] Assuming the first MATIP request message is received:
[0163] V.
[0164] VHLG.WA / E11EZASLQ / I11EZASLR / P60DA7A
[0165] VGYA
[0166] UNB+IATA:1+9E1E1E1E+ZA+191012:0701+396711'UNH+1+PAOREQ:96:2:IA+P1406647AA'MSG+1:46'ORG+1 E:BJS+:HGH193+HGH+++CN'ODI+KOS+SHE'TVL+181019+KOS+NNG+ZA+459+3+1+P'UNT+6+1'UNZ+1+396711'
[0167] The first line represents the fourth layer of the HTH message, the second the fifth layer, the third the sixth layer, and the fourth the application message. VHLG.WA / E11EZASLQ / I11EZASLR / P60DA7A
[0168] In the middle, W represents the first target identifier, E11EZASLQ / I11EZASLR represents L5, and P60DA7A represents TPR (the second target identifier).
[0169] Parsing the message yields a message type of PAOREQ, a destination address of ZA, a source address of 1E, and a first destination identifier of W, with TPR=P60DA7A. The corresponding L5=11EZASLQ is found. Since the first destination identifier is W, the concurrency threshold limiting module 400 is directly invoked.
[0170] Step 3: Concurrency threshold processing.
[0171] The concurrency threshold (L5tprlimit) corresponding to L5 "11EZASLQ" determined by the concurrency threshold limiting module 400 is found to be "100";
[0172] Concurrent access control module 300 determines that 11EZASLQtprlimit is greater than 0, and allows the second airline to process the request message;
[0173] The concurrency threshold limit module 400 is set to 11EZASLQtprlimit=99.
[0174] Before receiving a response to the first message, 98 more messages from different users but with the same source, destination address, and message type were received, i.e., the same L5 request messages. The second airline was allowed to process each request message. At this time, the concurrency threshold limiting module 400 set 11EZASLQtprlimit=0.
[0175] Before receiving responses to the previous 99 messages, another message from a different user but with the same source, destination address, and message type (i.e., the same L5 message) was received. At this point, 11EZASLQtprlimit < 0, and the request message was rejected by the second airline.
[0176] For example, a request message may have a contextual relationship with other messages:
[0177] Step 1: Initial Parameter Configuration
[0178] In the reservation service, the service identifier (L5) with source address GP, destination address 1E, and message type ITAREQ, HWPREQ, and CLTREQ is set to "1GP1EDSQ". The concurrency threshold (L5tprlimit) corresponding to this L5 "1GP1EDSQ" is set to "100", and the concurrency timeout (TPRtimeout) corresponding to this L5 "1GP1EDSQ" is set to "300" seconds.
[0179] Step 2: Context message processing + Step 3: Concurrency threshold processing.
[0180] 1) Assume that the first user sends a request packet from GP to ITAREQ on 1E. The first destination identifier is V, and TPR (second destination identifier) = TPR001. At this time, the packet parsing module 200 parses the source address as GP, the destination address as 1E, and the packet type as ITAREQ. The concurrency access control module 300 obtains L5 as 1GP1EDSQ. Since the first destination identifier is not W, the concurrency access control module 300 calls the concurrency timeout handling module 500. At this time, TPRtimeout is set to 300s. Since the first destination identifier is V, the concurrency threshold limiting module 400 is called. The module finds that 1GP1EDSQtprlimit is 100. Since the value of 1GP1EDSQtprlimit is not 0, 1GP1EDSQtprlimit is decremented by one. At this time, 1GP1EDSQtprlimit is 99. The concurrency threshold limiting module 400 notifies the concurrency access control module 300 that there are available concurrent resources and that the request packet can be processed.
[0181] 2) Suppose that within the 300s timeout period, 98 different users receive ITRAREQ request messages from the same L5, 1GP1EDSQ, with the first target identifier being V, {TPR}=TPR002, TPR=TPR003, TPR099. Since the first target identifier is not W, the concurrent access control module 300 calls the concurrent timeout processing module 500. The concurrent timeout processing module 500 determines that {TPR} does not exist, so it sets {TPR}timeout to 300. The concurrent access control module 300 calls the concurrent threshold limiting module 400, finds that 1GP1EDSQtprlimit corresponding to 1GP1EDSQ is 1. Since the value of 1GP1EDSQtprlimit is not 0, it decrements 1GP1EDSQtprlimit by one. At this time, 1GP1EDSQtprlimit is 0. The concurrent threshold limiting module 400 notifies the concurrent access control module 300 that there is available concurrent resource and allows processing of request messages.
[0182] 3) Suppose that within the timeout period of 300 seconds, a new user receives an ITRAREQ request message from the same L5, 1GP1EDSQ. At this time, the 1GP1EDSQtprlimit corresponding to 1GP1EDSQ is 0. The concurrent threshold limit module 400 notifies the concurrent access control module 300 that there is no available concurrency and rejects the service.
[0183] 4) Suppose that within the timeout period of 300s, a CLTREQ request message with L5 of 1GP1EDSQ from the first user is received. The first target identifier is U, and TPR=TPR001. Since the first target identifier is not W, the concurrent access control module 300 calls the concurrent timeout processing module 500 to delete TPR, calls the concurrent threshold limit module 400 to increment 1GP1EDSQtprlimit by one, and sets 1GP1EDSQtprlimit to 1 to notify the concurrent access control module 300 that there are available concurrent resources at this time.
[0184] 5) Suppose that within the timeout period of 300 seconds, a new user receives an ITRAREQ request message from the same L5, 1GP1EDSQ. The concurrent access control module 300 calls the concurrent threshold limiting module 400, finds that the 1GP1EDSQtprlimit corresponding to 1GP1EDSQ is 1. Since the 1GP1EDSQtprlimit value is not 0, it decrements 1GP1EDSQtprlimit by one. At this time, 1GP1EDSQtprlimit is 0. The concurrent threshold limiting module 400 notifies the concurrent access control module 300 that there are available concurrent resources and that the request message can be processed.
[0185] Step 4: Perform TPR timeout checks periodically.
[0186] The concurrency timeout management module will periodically check, for example, every 5 seconds, the currently occupied TPR. If it finds that the TPR has been occupied for more than 300 seconds, it will notify the concurrency access control module 300 that the TPR has timed out. The concurrency access control module 300 will call the concurrency threshold limit module 400 to delete the TPR and increment L5tprlimit by one.
[0187] For example: messages with different first target identifiers that have a contextual relationship.
[0188] Step 1: Initial Parameter Configuration
[0189] In the ticket service configuration, the source address is set to 1S, the destination address to ZA, the message type to ITAREQ, and the service identifier (L5) corresponding to CLTREQ to "11SZADSQ". The concurrency threshold (11SZADSQlimit) corresponding to this L5 "11SZADSQ" is set to "100". Since the ticket service is context-based, the concurrency timeout (TPRtimeout) is set to "300s".
[0190] Step 2: Context message processing
[0191] Three messages were received in sequence.
[0192] Article 1:
[0193] V.
[0194] VHLG.VA. / E11SZADSQ / I11SZADSR / P0000A0107
[0195] VGYA
[0196] UNB+IATA:1+1S+ZA+240724:1531+FB581981970001'UNH+712+ITAREQ:96:2:IA+590733C13303'ORG +1S+14646015:G9MJ+SFO++T+US:USD+AWT'ODI+GUM+PNH'TVL+060125:0555:060125:0755:0+GUM+M NL+PR+0111:Y+1+5+N'TVL+060125:0945:060125:1220:0+MNL+BKK+PR+0730:Y+1+6+N'TVL+060125 :1410:060125:1520:0+BKK+PNH+ZA+0675:Y+1+7+P'RPI+1+NN'UNT+8+712'UNZ+1+FB581981970001'
[0197] Article 2:
[0198] V.
[0199] VHLG.TB. / E11SZADSQ / I11SZADSR / P0000A0107
[0200] VGYA
[0201] UNB+IATA:1+1S+ZA+240724:1536+FB581981970002'UNH+1481+ITAREQ:96:2:IA+590733C13303 / 09E81009003B9B'ORG+1S+14646015:G9 MJ+SFO++T+US:USD+AWT'ODI'TVL+060125:1410:060125:1520:0+BKK+PNH+ZA+0675:Y'RPI+1+XX'UNT+6+1481'UNZ+1+FB581981970002'
[0202] Article 3:
[0203] V.
[0204] VHLG.UC. / E11SZADSQ / I11SZADSR / P0000A0107
[0205] VGYA
[0206] UNB+IATA:1+1S+ZA+240724:1536+FB581981970003'UNH+2738+CLTREQ:96:2:IA +590733C13303 / 09E81009003B9B'CLT+A'UNT+3+2738'UNZ+1+FB581981970003'
[0207] Parsing the first message yields a message type of ITAREQ, a destination address of ZA, a source address of 1S, and a first destination identifier of V, with TPR=P0000A0107. The corresponding L5 is found to be 11SZADSQ.
[0208] Parsing the second message yields a message type of ITAREQ, a destination address of ZA, a source address of 1S, and a first destination identifier of T, with TPR=P0000A0107. The corresponding L5 is found to be 11SZADSQ.
[0209] Parsing the third message yields a message type of ITAREQ, a destination address of ZA, a source address of 1S, and a first destination identifier of U, with TPR=P0000A0107. The corresponding L5=11SZADSQ is then found.
[0210] Since the first target identifier is not W, the concurrent access control module 300 calls the concurrent timeout handling module 500, at which point TPRtimeout is set to 300.
[0211] Step 3: Concurrency threshold processing.
[0212] In the first message, since the first target identifier is V, resource occupation TPR=P0000A0107 is performed, TPRtimeout is set to 300, the concurrency threshold limiting module 400 is called, and the 11SZADSQtprlimit corresponding to 11SZADSQ is found to be 100. Since the 11SZADSQtprlimit value is not 0, it is decremented by one. At this time, 1GP1EDSQtprlimit is 99. The concurrency threshold limiting module 400 notifies the concurrency access control module 300 that there is available concurrent resource and the request message can be processed.
[0213] In the second message, since the first target identifier is T and TPR=P0000A0107 already exists, the TPRtimeout is updated to 300. The concurrency threshold limiting module 400 is called, and the 11SZADSQtprlimit corresponding to 11SZADSQ is found to be 99. Since the 11SZADSQtprlimit value is not 0, the concurrency threshold limiting module 400 notifies the concurrency access control module 300 that there are available concurrent resources at this time, allowing the processing of the request message.
[0214] In the third message, since the first target identifier is U and TPR=P0000A0107 already exists, TPR is deleted. The concurrency threshold limiting module 400 is called, and the 11SZADSQtprlimit corresponding to 11SZADSQ is found to be 99. 11SZADSQtprlimit is incremented by one. At this time, 11SZADSQtprlimit is 100. The concurrency threshold limiting module 400 notifies the concurrency access control module 300 that there is available concurrent resource and the request message can be processed.
[0215] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.
[0216] While several specific implementation details are included in the foregoing discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.
[0217] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.
Claims
1. A concurrent access control method, characterized in that, include: Receive request message; Obtain the source address, destination address, message type, first destination identifier, and second destination identifier from the request message; The source address corresponds to the first airline that initiated the access; the destination address corresponds to the second airline that responded to the access; the first target identifier is used to indicate whether the request message has a contextual relationship with other messages; the second target identifier is used to identify the terminal that sent the request message; Determine the service identifier corresponding to the source address, the destination address, and the message type; Determine the concurrency threshold corresponding to the service identifier; The concurrency threshold represents the current limit on the concurrent access volume of the service represented by the service identifier; If the first target identifier indicates that the request message has no contextual relationship with other messages, based on the second target identifier and the concurrency threshold, it is determined whether the second airline is allowed to process the request message; If the first target identifier indicates that the request message has a contextual relationship with other messages, determine the concurrent timeout time corresponding to the second target identifier; Based on the concurrency threshold, the concurrency timeout time, and the second target identifier, it is determined whether the second airline is allowed to process the request message.
2. The concurrent access control method according to claim 1, characterized in that, Based on the second target identifier and the concurrency threshold, determining whether to allow the second airline to process the request message includes: If the second target identifier of the previous request message that did not receive a response from the second airline is the same as the second target identifier, then the second airline is refused to process the request message. If the second target identifier of the previous request message that did not receive a response from the second airline is different from the second target identifier, and the concurrency threshold is greater than 0, the second airline is allowed to process the request message, and the concurrency threshold is decremented to obtain a new concurrency threshold. If the second target identifier of the previous request message that did not receive a response from the second airline is different from the second target identifier, and the concurrency threshold is not greater than 0, the second airline is refused to process the request message.
3. The method according to claim 1, characterized in that, Based on the concurrency threshold, the concurrency timeout time, and the second target identifier, determining whether to allow the second airline to process the request message includes: If the first target identifier also indicates that the request message is the first message in the context relationship, establish an occupancy relationship between the second target identifier and the request message, and set the concurrent timeout for the occupancy relationship; If the occupancy relationship is maintained for a period of time less than the concurrency timeout period, based on the concurrency threshold, it is determined whether the second airline is allowed to process the request message. If the occupancy relationship is maintained for a period of time equal to the concurrent timeout period, the occupancy relationship is released.
4. The method according to claim 1, characterized in that, Based on the concurrency threshold, the concurrency timeout time, and the second target identifier, determining whether to allow the second airline to process the request message includes: If the first target identifier also indicates that the request message is an intermediate message in the context relationship, check whether there is an occupancy relationship corresponding to the second target identifier; If it exists, and the occupancy relationship has not been maintained for the duration of the concurrent timeout, the second airline is permitted to process the request message and update the concurrent timeout for the occupancy relationship; If the occupancy relationship is maintained for a period of time equal to the concurrent timeout period, the occupancy relationship is released.
5. The method according to claim 1, characterized in that, Based on the concurrency threshold, the concurrency timeout time, and the second target identifier, determining whether to allow the second airline to process the request message includes: If the first target identifier also indicates that the request message is the last message in the context relationship, check whether there is an occupancy relationship corresponding to the second target identifier; If it exists, and the occupancy relationship is maintained for a period of time that does not reach the concurrency timeout, the second airline is allowed to process the request message, delete the occupancy relationship and the concurrency timeout, and increment the concurrency threshold to obtain a new concurrency threshold. If the occupancy relationship is maintained for a period of time equal to the concurrent timeout period, the occupancy relationship is released.
6. A concurrent access control device, characterized in that, include: The message admission module is used to receive request messages; The message parsing module is used to obtain the source address, destination address, message type, first target identifier, and second target identifier from the request message; the source address corresponds to the first airline initiating the access; the destination address corresponds to the second airline responding to the access; the first target identifier is used to indicate whether the request message has a contextual relationship with other messages; the second target identifier is used to identify the terminal that sent the request message; The concurrent access control module is used to determine the service identifier corresponding to the source address, the destination address, and the message type; The concurrency threshold limiting module is used to determine the concurrency threshold corresponding to the service identifier; The concurrency threshold represents the current limit on the concurrent access volume of the service identified by the service; The concurrent access control module is further configured to determine, based on the second target identifier and the concurrency threshold, whether to allow the second airline to process the request message if the first target identifier indicates that the request message has no context relationship with other messages; The concurrent timeout processing module is used to determine the concurrent timeout time corresponding to the second target identifier if the first target identifier indicates that the request message has a context relationship with other messages; The concurrent access control module is further configured to determine, based on the concurrent threshold, the concurrent timeout time, and the second target identifier, whether to allow the second airline to process the request message.
7. The apparatus according to claim 6, characterized in that, The concurrent access control module is specifically used for: If the second target identifier of the previous request message that did not receive a response from the second airline is the same as the second target identifier, then the second airline is refused to process the request message. If the second target identifier of the previous request message that did not receive a response from the second airline is different from the second target identifier, and the concurrency threshold is greater than 0, the second airline is allowed to process the request message, and the concurrency threshold is decremented to obtain a new concurrency threshold. If the second target identifier of the previous request message that did not receive a response from the second airline is different from the second target identifier, and the concurrency threshold is not greater than 0, the second airline is refused to process the request message.
8. A computer program product, characterized in that, It includes computer-readable instructions that, when executed on an electronic device, cause the electronic device to implement the concurrent access control method as described in any one of claims 1 to 5.
9. An electronic device, characterized in that, It includes at least one processor and a memory connected to the processor, wherein: The memory is used to store computer programs; The processor is used to execute the computer program to enable the electronic device to implement the concurrent access control method as described in any one of claims 1 to 5.
10. A computer storage medium, characterized in that, The storage medium carries one or more computer programs that, when executed by an electronic device, enable the electronic device to implement the concurrent access control method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Concurrency control method and device
CN110191160A
Access traffic control method and device
CN118233389A