Seat allocation method and system based on conflict resolution and electronic equipment
By constructing a conflict set and introducing a weighting mechanism in the railway passenger ticketing system, the problems of seat hunger and concurrent conflicts in high-concurrency seat selection were solved, realizing dynamic optimization of seat resources and improvement of user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-03
- Publication Date
- 2026-03-10
AI Technical Summary
The existing railway ticketing system suffers from seat hunger and concurrency conflicts in high-concurrency seat selection scenarios, resulting in low seat turnover and poor user experience.
By constructing a conflict set and introducing a weighting mechanism, the system identifies and assigns the seat selection request with the highest weight, prioritizing seat allocation, while also providing a fallback allocation process to meet suboptimal needs.
It improved seat allocation efficiency, prevented seat waste, enhanced system performance and resource utilization, and improved user experience.
Smart Images

Figure CN121638510A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of railway transportation, in particular to a seat allocation method and system based on conflict resolution and an electronic device. BACKGROUND
[0002] In the railway ticket system, especially in the high-concurrency seat selection scenario, such as during holidays or large events, the existing seat allocation mechanism has significant defects. The traditional system mostly adopts the "lock seat" or "pre-occupy" strategy. When users pre-occupy seats for a long time without payment, the "seat starvation" problem occurs, which reduces the seat turnover rate. At the same time, the simple "first come, first served" mechanism is prone to "concurrent conflicts" when multiple users select the same seat at the same time, resulting in the failure of most users to select seats and affecting user experience. That is, the existing seat allocation mechanism cannot effectively utilize seat resources, reducing the seat turnover rate and overall system efficiency.
[0003] Therefore, how to improve the seat turnover rate and overall system efficiency in the seat allocation process is a technical problem to be solved by those skilled in the art. SUMMARY
[0004] In order to solve one or more defects in the prior art, the present application provides a seat allocation method and system based on conflict resolution and an electronic device.
[0005] A seat allocation method based on conflict resolution, comprising: In response to an input first seat selection request, determining a selected seat; determining whether the selected seat has been pre-occupied or locked by other seat selection requests; If yes, a conflict set is constructed, and the weights of all seat selection requests in the conflict set are determined; the conflict set includes the first seat selection request and all seat selection requests that occupy or lock the selected seat; determining whether the first seat selection request is the seat selection request with the highest weight in the conflict set; If the first seat selection request is the seat selection request with the highest weight in the conflict set, the selected seat is released from other seat selection requests and allocated to the first seat selection request.
[0006] Optionally, the method further comprises: If the first seat selection request is not the seat selection request with the highest weight in the conflict set, the first seat selection request is subjected to a degraded allocation process; The process of the degraded allocation process comprises: determining at least two seat selection requirements based on seat selection requests; determining whether there is a first seat in the same carriage that completely meets the seat selection requirements; If yes, output a seat recommendation option containing the first seat; If no, determine whether there is a second seat in the same carriage that at least meets one of the seat selection requirements; If the second seat exists in the same carriage, output a seat recommendation option containing the second seat; If the second seat does not exist in the same carriage, determine whether there is a third seat in other carriages that at least meets one of the seat selection requirements; If the third seat exists in the other carriages, output a seat recommendation option containing the third seat; If the third seat does not exist in the other carriages, determine a fourth seat based on the number of seats corresponding to the seat selection request, and output a seat recommendation option containing the fourth seat; the fourth seat contains the same number of seats as the number of seats corresponding to the seat selection request.
[0007] Optionally, the method further comprises: In response to an input confirmation instruction, allocating the seats corresponding to the seat recommendation option to the seat selection request.
[0008] Optionally, after the selected seat is released from other seat selection requests and allocated to the first seat selection request, the method further comprises: Performing a degraded allocation process on other seat selection requests in the conflict set.
[0009] Optionally, the determination of the weight of all seat selection requests in the conflict set comprises: Obtaining basic information of all seat selection requests in the conflict set; the basic information includes ticket purchase channel, number of passengers, seat selection continuity, and historical success rate; Determining a channel weight, a request size weight, a seat selection continuity weight, and a historical success rate weight of each seat selection request in the conflict set based on the basic information; Determining the weight of the corresponding seat selection request based on the channel weight, the request size weight, the seat selection continuity weight, and the historical success rate weight.
[0010] Optionally, the request size weight satisfies formula (1): (1) Wherein, is the request size weight, is the number of passengers.
[0011] Optionally, the determination of the weight of the corresponding seat selection request based on the channel weight, the request size weight, the seat selection continuity weight, and the historical success rate weight comprises: The multiplication result of the channel weight, the request size weight, the seat selection continuity weight and the historical success rate weight is determined as the weight of the corresponding seat selection request.
[0012] A seat allocation system based on conflict resolution, comprising: A first determination module is configured to determine a selected seat in response to an input first seat selection request. A first judgment module is configured to judge whether the selected seat has been preoccupied or locked by other seat selection requests. A second determination module is configured to, if the selected seat has been preoccupied or locked by other seat selection requests, construct a conflict set and determine the weights of all seat selection requests in the conflict set; the conflict set comprises the first seat selection request and all seat selection requests that preoccupy or lock the selected seat. A second judgment module is configured to judge whether the first seat selection request is the seat selection request with the highest weight in the conflict set. A seat allocation module is configured to, if the first seat selection request is the seat selection request with the highest weight in the conflict set, release the selected seat from other seat selection requests and allocate the selected seat to the first seat selection request.
[0013] An electronic device, comprising: A processor and a memory, the memory being configured to store at least one instruction, the instruction being loaded and executed by the processor to implement the method of seat allocation based on conflict resolution as claimed in any one of the above.
[0014] A computer readable storage medium having stored thereon a computer program, the computer program being executed by a processor to implement the method of seat allocation based on conflict resolution as claimed in any one of the above.
[0015] The method of seat allocation based on conflict resolution provided by the embodiments of the present application determines a selected seat in response to a first seat selection request, constructs a conflict set when the selected seat has been preoccupied or locked by other seat selection requests, and judges whether the first seat selection request is the seat selection request with the highest weight in the conflict set. If so, the selected seat is released from other seat selection requests and allocated to the first seat selection request. The present application determines seat allocation by constructing a conflict set and introducing a weight mechanism. When the selected seat conflicts with preoccupied or locked seats, the system comprehensively considers the weights of all relevant seat selection requests and allocates seats according to the weights, thereby solving the problem of seat allocation in a high-concurrency scenario and improving the efficiency of seat allocation. At the same time, the system releases seats from low-weight requests and allocates them to high-weight first seat selection requests according to the weights, thereby achieving dynamic optimization of seat resources, preventing seats from being preoccupied by low-weight requests for a long time and wasted, ensuring the success rate of seat allocation, and improving the overall performance and resource utilization of the system. BRIEF DESCRIPTION OF DRAWINGS
[0016] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments will be briefly introduced as follows. Obviously, the drawings in the following description only represent some of the embodiments of the present application, and other drawings can be obtained by those skilled in the art without any creative effort based on these drawings.
[0017] Figure 1 A flow chart of a seat allocation method based on conflict resolution provided by an embodiment of the present application; Figure 2 A flow chart of a downgrade allocation processing provided by an embodiment of the present application; Figure 3 A flow chart of a seat allocation method based on conflict resolution provided by an embodiment of the present application; Figure 1 A flow chart of a seat allocation method based on conflict resolution provided by an embodiment of the present application; Figure 4 A structural schematic diagram of a seat allocation system based on conflict resolution provided by an embodiment of the present application. DETAILED DESCRIPTION
[0018] In order to better understand the technical solutions of the present application, the embodiments of the present application will be described in detail below with reference to the drawings.
[0019] It should be clear that the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without any creative effort fall within the scope of protection of the present application.
[0020] The terms used in the embodiments of the present application are only for the purpose of describing the specific embodiments, and are not intended to limit the present application. The singular forms "a", "an" and "the" used in the embodiments of the present application and the appended claims are also intended to include the plural forms, unless the context clearly indicates otherwise.
[0021] It should be understood that the term "and / or" used herein is only to describe the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B, which can represent the three cases of A alone, A and B together, and B alone. In addition, the character " / " in this paper generally represents that the front and rear associated objects are a "or" relationship.
[0022] In the railway ticket system, especially in the high-concurrency seat selection scenario, such as during holidays or large events, the existing seat allocation mechanism has significant defects. The traditional system mostly adopts the "lock seat" or "pre-occupy" strategy, and when users pre-occupy seats for a long time without payment, the "seat starvation" problem occurs, resulting in a decrease in seat turnover rate; at the same time, the simple "first come, first served" mechanism is easy to cause "concurrent conflict" when multiple users select the same seat at the same time, resulting in the failure of most users to select seats, affecting user experience. That is, the existing seat allocation mechanism cannot effectively utilize seat resources, reducing the seat turnover rate and the overall efficiency of the system. Therefore, the present application provides a seat allocation method based on conflict resolution to solve the above problems.
[0023] Please refer to Figure 1 The flowchart of the seat allocation method based on conflict resolution provided by the embodiment of the present application includes the following steps: Step S01, in response to the input first seat selection request, determining the selected seat.
[0024] In this embodiment, when a user submits a seat selection request through a ticket purchase platform (such as a website, an APP, a station window, an automatic ticket vending machine, etc.), the system defines the seat selection request as a first seat selection request and explicitly the specific seat information selected by the user in the first seat selection request, such as the car number, the seat number, etc., to accurately obtain the user's seat selection intention and ensure that the system clearly understands the specific seat that the user expects to obtain. This helps to subsequently judge the seat status in order to timely discover whether there is a conflict with other requests. By accurately determining the selected seat of the user, allocation errors caused by ambiguous seat information can be effectively avoided, ensuring the accuracy and rationality of seat allocation.
[0025] Step S02, judging whether the selected seat has been pre-occupied or locked by other seat selection requests.
[0026] If yes, step S03 is executed.
[0027] In this embodiment, after receiving the first seat selection request, the system detects the current status of the seat selected by the user, for example, it can query the database or relevant data structure to check whether the seat has been pre-occupied (i.e., a request has been submitted but not paid) or locked (such as being temporarily locked by other requests waiting for processing) by other users. This step is a key link for identifying seat conflicts, ensuring that the system can timely discover and handle potential seat allocation conflicts.
[0028] The purpose of the embodiment is to identify the conflict situation in seat allocation. In a high concurrency scenario, multiple users may select the same seat at almost the same time. By judging whether the seat has been preoccupied or locked, the system can avoid directly allocating the seat that has been occupied, reducing the probability of seat selection failure. In addition, timely discovery of conflicts helps to start the conflict resolution process subsequently, providing the user with the "best" seat allocation scheme, improving the overall user experience and system efficiency.
[0029] In some embodiments, when the selected seat is not preoccupied or locked by other seat selection requests, the selected seat can be directly allocated to the first seat selection request.
[0030] In some embodiments, the system can achieve this judgment by querying the seat state information in the database or memory. When receiving the first seat selection request, the system will query the current state identifier of the seat according to the seat information (such as car number, seat number, etc.) in the request. The state identifier can include "unoccupied", "preoccupied", "locked", etc. If the query result shows that the seat has been preoccupied or locked, it indicates that there is a conflict that needs to be further processed.
[0031] Step S03, constructing a conflict set and determining the weight of all seat selection requests in the conflict set.
[0032] The conflict set includes the first seat selection request and all seat selection requests that occupy or lock the selected seat.
[0033] In this embodiment, when the selected seat has been preoccupied or locked by other seat selection requests, the system will construct a set containing the current first seat selection request and all other seat selection requests that occupy or lock the selected seat, i.e. the conflict set, for unified management and weight calculation. At the same time, the priority of each request can be evaluated by applying a dynamic weight calculation model.
[0034] The purpose of constructing the conflict set and determining the weight is to intelligently select the "best" request for seat allocation when there is a seat conflict. Through weight calculation, the system can prioritize more important or more urgent requests to improve the fairness and rationality of seat allocation.
[0035] Step S04, determining whether the first seat selection request is the seat selection request with the highest weight in the conflict set.
[0036] If so, step S05 is executed.
[0037] In this embodiment, the system compares the weight values of the seat selection requests in the conflict set to determine whether the current first seat selection request has the highest priority. This judgment process is based on the previously calculated weight to make decisions, ensuring that the seat is allocated to the most important request, and the purpose is to resolve seat conflicts through arbitration mechanisms.
[0038] In a high concurrency scenario, multiple requests may simultaneously compete for the same seat, at which time the system needs a fair and reasonable basis for decision to select the optimal request. The highest-weighted seat selection request represents a more important user demand or a more optimal allocation mode in line with the system optimization goal. Therefore, by judging whether the first seat selection request is the highest-weighted, the system can meet the core demand while improving the overall seat allocation efficiency and system performance, and also improving the user experience.
[0039] Step S05, releasing the selected seat from other seat selection requests and allocating it to the first seat selection request.
[0040] In the embodiment, if it is judged that the first seat selection request is the highest-weighted seat selection request in the conflict set, the system will perform the operation of releasing the seat from other low-weighted requests and finally allocating it to the first seat selection request. For example, the system can lock the seat and notify other low-weighted requests to release the pre-occupation or locking state of the seat. Subsequently, the system will formally allocate the seat to the first seat selection request, update the seat state in the database to "allocated", and notify the user that the seat allocation is successful, while starting the downgrade allocation process for other low-weighted requests to provide alternative solutions.
[0041] Based on the above technical solution, the seat allocation method based on conflict resolution provided by the embodiment of the application determines the selected seat in response to the first seat selection request, constructs a conflict set when the selected seat has been pre-occupied or locked by other seat selection requests, judges whether the first seat selection request is the highest-weighted seat selection request in the conflict set, and releases the selected seat from other seat selection requests and allocates it to the first seat selection request if it is. The application determines seat allocation by constructing a conflict set and introducing a weight mechanism. When the selected seat conflicts with the pre-occupied or locked seat, the system will comprehensively consider the weights of each related seat selection request and allocate the seat according to the weight, solving the seat allocation problem in a high concurrency scenario and improving the seat allocation efficiency. At the same time, the system will release the seat from low-weighted requests and allocate it to the first seat selection request according to the weight, realizing dynamic optimization configuration of seat resources, preventing seat waste due to long-term pre-occupation by low-weighted requests, ensuring the seat allocation success rate, and improving the overall performance and resource utilization of the system.
[0042] On the basis of the above embodiment, in some embodiments, if the first seat selection request is not the highest-weighted seat selection request in the conflict set, the first seat selection request is subjected to downgrade allocation processing.
[0043] In this embodiment, when the system determines that the first seat selection request is not the highest priority in the conflict set, it does not directly reject the request, but provides one or more suboptimal seat options for the user, as far as possible to meet the user's partial or all needs. This mechanism ensures that users can obtain other suitable seat options even if they cannot obtain their preferred seat by gradually reducing the strictness of the matching conditions.
[0044] In high concurrency scenarios, seat resources are limited, and multiple requests may compete for the same seat. Directly rejecting non-highest weight requests can lead to a decrease in user satisfaction and increase the burden on users to reselect seats. Through the downgrade allocation process, the system can provide suboptimal seat options when the user's first choice cannot be met, thereby improving user experience and overall satisfaction of the system. At the same time, this mechanism also improves the utilization rate of seat resources, avoiding long-term vacancy or occupation by low-priority requests.
[0045] Please refer to Figure 2 , a flowchart of a downgrade allocation process provided by an embodiment of the present application. The process of the downgrade allocation process can include steps as shown in Figure 2 . Step S11, determining at least two seat selection requirements based on the seat selection request.
[0046] In this embodiment, the system extracts key seat selection requirements from the user's seat selection request, which can include but is not limited to seat continuity (such as adjacent seats), preference for window or aisle, and specific car location, etc. The purpose of this operation is to ensure that the system can provide alternative solutions that meet the user's needs as much as possible when the user's first choice cannot be met. By clearly specifying the user's multiple seat selection requirements, the system can gradually match these conditions in the downgrade allocation process, even if all requirements cannot be fully met, it can provide seat options that partially meet the requirements.
[0047] In some embodiments, the system can identify the user's explicit seat requirements by analyzing the user's submitted seat selection request, and can also refer to the user's past selection behavior or explicit preference settings to supplement or confirm the user's seat selection requirements. Then, according to the system's business rules, the system can refine the user's requirements into multiple actionable conditions, such as further splitting "adjacent seats" into "adjacent in the same row" or "adjacent in the same car", to ensure that the recommended seats meet the user's expectations as much as possible.
[0048] Step S12, determining whether there is a first seat in the same car that fully meets the seat selection requirements.
[0049] If yes, execute step S13, if no, execute step S14.
[0050] In this embodiment, the system first attempts to find seats in the same car that fully meet the user's seat selection requirements. This operation is the first step of the downgrade allocation, aiming to meet the user's original seat selection intention as much as possible. "Fully meet" here means that the seats are consistent with the user's requirements in all key attributes (such as seat continuity, window-side or aisle-side, etc.).
[0051] If the system can find seats that fully meet the requirements in the same car, not only can it significantly improve the user's satisfaction, but also can reduce the complexity of subsequent processing steps. In addition, preferentially finding seats in the same car can avoid the inconvenience of being allocated to different cars, further optimizing the user experience.
[0052] Step S13, output seat recommendation options containing the first seat.
[0053] In this embodiment, if the first seat that fully meets the requirements is found, the system will output the first seat as a recommended option to the user and prompt the user whether to accept these options.
[0054] Step S14, determine whether there is a second seat in the same car that at least meets one of the user's seat selection requirements.
[0055] If yes, perform step S15, if no, perform step S16.
[0056] In this embodiment, if the system cannot find a seat in the same car that fully meets all of the user's seat selection requirements, it determines whether there is a seat in the same car that at least meets part of the user's seat selection requirements, which is referred to as the "second seat". That is, in the case where all requirements cannot be met, try to match part of the user's key needs, such as finding adjacent seats in the same row although not providing window-side continuous seats.
[0057] From the perspective of user experience, this approach can improve satisfaction. When the user's first choice seat is occupied, providing a seat that partially meets the requirements can make the user feel that the system is still trying to meet their preferences, rather than directly declaring a seat selection failure. From the perspective of system resource optimization, this judgment process helps to make more full use of seat resources, avoid seat vacancy due to too strict conditions, and thus improve the overall resource utilization rate.
[0058] Step S15, output seat recommendation options containing the second seat.
[0059] In this embodiment, if the second seat that meets at least one requirement is found, the system will sort these seats into recommended options and present them to the user, and prompt the user whether to accept these alternatives.
[0060] Step S16: Determine whether there is a third seat in other carriages that meets at least one seat selection criterion.
[0061] If yes, proceed to step S17; otherwise, proceed to step S18.
[0062] In this embodiment, if the system cannot find a second seat in the same carriage that at least partially meets the user's seat selection requirements, the system expands the search scope from the current carriage to other carriages to find a seat that can partially meet the user's needs. The third seat is a seat that meets the user's requirements in at least one key attribute, such as seat continuity or window position.
[0063] When a user's initial seat selection request cannot be met within the same carriage, expanding the search to other carriages can increase the likelihood of finding a suitable seat. This ensures that the user can obtain a seat that best matches their preferences, while also making efficient use of the train's seating resources. It avoids leaving seats in other carriages empty due to a user's insistence on a particular carriage, thereby optimizing overall resource utilization.
[0064] Step S17: Output the recommended seat options that include the third seat.
[0065] In this embodiment, if a third seat that meets at least one requirement is found in another carriage, the system will organize this seat information and present it to the user as a recommended option, while prompting the user whether to accept these alternatives.
[0066] Step S18: Determine the fourth seat based on the number of seats corresponding to the seat selection request, and output the recommended seat options that include the fourth seat.
[0067] The fourth seat contains the same number of seats as the seat selection request.
[0068] In this embodiment, if the system cannot find a third seat in other carriages that satisfies at least one of the user's seat selection requirements, it will determine a fourth seat based on the number of seats requested by the user. That is, a set of seats with the same number of seats as the user's requested number, regardless of any other preferences. For example, if the user requests two adjacent window seats, but the system cannot find a combination of seats that meets these requirements, it will recommend any two adjacent seats, regardless of whether they are window seats or which carriage they are located in.
[0069] The purpose of the embodiment is to ensure that the user can obtain the same number of seats as the request, thereby avoiding user loss and resource waste due to seat selection failure. By providing a set of seats that meet the quantity requirement but do not meet the specific requirements, the system can maximize the success rate of seat allocation while giving the user a feasible solution. This not only helps to improve user satisfaction, but also more efficiently utilizes seat resources to ensure that train seats are used as much as possible.
[0070] After finding the fourth seat combination that meets the quantity requirement, the system presents it as a recommended option to the user and prompts the user whether to accept the seats.
[0071] In some embodiments, the method can further include: In response to the input confirmation instruction, the seat recommendation option is assigned to the seat selection request.
[0072] In the embodiment, after the system recommends seat options to the user, the user can choose to accept or reject. If the user accepts the recommended seat options and inputs a confirmation instruction, the system will formally allocate the seats to the user's seat selection request.
[0073] The purpose of the embodiment is to ensure that the user is satisfied with the recommended seat options and complete the seat allocation through the user's active confirmation. This not only improves user engagement and satisfaction, but also ensures that the system does not automatically allocate seats that the user is not satisfied with, avoiding seat selection failure or resource waste due to user dissatisfaction. In addition, the user's confirmation instruction can also be used as reference data for the system to optimize subsequent seat recommendation algorithms.
[0074] In some embodiments, the system can receive the user's confirmation instruction through the user interface, such as the user clicking the "Confirm" button or submitting a confirmation request. At this time, the system updates the database or related data structure, changes the status of the recommended seats from "idle" or "recommended" to "allocated", and sends a successful allocation notification to the user, informing the user that the seats have been successfully booked and providing relevant ticket purchase information.
[0075] In some embodiments, to improve the overall success rate of seat allocation and enhance user experience, after performing step S05, releasing the selected seats from other seat selection requests and allocating them to the first seat selection request, the system can also perform a downgraded allocation process for other seat selection requests in the conflict set.
[0076] In this embodiment, after assigning the selected seats to the first seat selection request with the highest weight, the system performs a downgraded allocation process for other seat selection requests that failed to acquire seats in the conflict set, in order to satisfy some or all of the needs of other users as much as possible. The downgraded allocation process provides these requests with suboptimal seat options by gradually reducing the strictness of the matching conditions, thereby improving user experience and system resource utilization.
[0077] Based on the above technical solution, this embodiment introduces a degraded allocation mechanism to ensure that users can obtain suitable seat selection, effectively avoiding user churn and resource waste caused by seat selection failure, and enhancing the smoothness of user experience and the flexibility of seat allocation.
[0078] Please refer to Figure 3 ,for Figure 1 A flowchart illustrating an actual manifestation of S03 in a conflict resolution-based seat allocation method.
[0079] In some embodiments, the step S03 mentioned above, determining the weight of all seat selection requests in the conflict set, may specifically include the following steps: Step S21: Obtain basic information on all seat selection requests in the conflict set.
[0080] The basic information includes ticket purchase channels, number of passengers, seat selection continuity, and historical success rate.
[0081] In this embodiment, when handling seat conflicts, the system collects basic information on all seat selection requests within the conflict set to achieve intelligent weight calculation. Differences in ticketing channels reflect the urgency levels of different users; for example, station windows and automatic ticket machines typically require priority processing to ensure the basic travel needs of passengers on-site. The number of passengers reflects the scale of the request; group ticket purchases should be given higher weight to improve overall satisfaction. Seat selection continuity assesses users' seat preferences; meeting consecutive seat requests can significantly improve user experience. Historical success rate helps the system identify requests that have repeatedly failed to select seats during a session, appropriately increasing the weight of these requests to prevent users from being unable to purchase tickets successfully for extended periods. By integrating this information, the system can allocate seat resources more fairly and reasonably.
[0082] Step S22: Based on the basic information, determine the channel weight, request size weight, seat selection continuity weight, and historical success rate weight for each seat selection request in the conflict set.
[0083] In this embodiment, each weight value reflects the priority or importance of the seat selection request in the corresponding dimension. The purpose of determining these weight values is to achieve a fairer and more reasonable allocation of resources during the seat allocation process.
[0084] In some embodiments, to improve the success rate of group ticket purchase and optimize user experience, the request size weight can be associated with the number of passengers, providing a significant advantage for group ticket purchase, i.e., the request size weight can satisfy formula (1): (1) wherein, is the request size weight, is the number of passengers.
[0085] In this embodiment, by quantifying the impact of the number of passengers on the weight, a higher priority is given to group ticket purchase requests. In actual scenarios, group travel often has more complex coordination needs and higher time sensitivity. By giving a larger weight, the system can prioritize these group requests, thereby improving overall satisfaction and reducing potential problems caused by failure to meet group needs. In addition, this linearly increasing formula is simple and intuitive, easy to implement and calculate, ensuring efficient operation of the system in high-concurrency scenarios.
[0086] In some embodiments, to ensure the basic travel needs of on-site passengers, the channel weight can satisfy formula (2): (2) wherein, is the channel weight, is the automatic ticket vending machine.
[0087] In some embodiments, to meet the adjacent preference of co-travelers and improve user experience, the seat selection continuity weight can satisfy formula (3): (3) wherein, is the seat selection continuity weight.
[0088] In some embodiments, if a user session has multiple consecutive seat selection failures, the weight needs to be appropriately increased to avoid the user never being able to select a seat, improving user experience, i.e., the historical success rate weight can satisfy formula (4): (4) wherein, is the historical success rate weight, is the number of consecutive failures in this seat selection request.
[0089] Step S23, based on the channel weight, request size weight, seat selection continuity weight, and historical success rate weight, determine the weight corresponding to the seat selection request.
[0090] In the embodiment, the channel weight, the request size weight, the seat selection continuity weight and the historical success rate weight are comprehensively calculated to obtain the comprehensive weight of each seat selection request, which reflects the overall priority of the request in the conflict set. By comprehensively considering the weights in multiple dimensions, the system can more fairly and reasonably evaluate the priority of each request, thereby improving the efficiency of seat allocation and user experience.
[0091] In some embodiments, in order to make the seat allocation decision more comprehensive and accurate, multiple key factors can be considered. The weight of the corresponding seat selection request is determined based on the channel weight, the request size weight, the seat selection continuity weight and the historical success rate weight, as mentioned in step S23. Specifically, the following steps can be included: The multiplication result of the channel weight, the request size weight, the seat selection continuity weight and the historical success rate weight is determined as the weight of the corresponding seat selection request.
[0092] In the embodiment, the purpose of multiplying these weights is to comprehensively consider multiple influencing factors to ensure the fairness and reasonableness of seat allocation, so that the system can intelligently select the optimal request among multiple conflict requests for seat allocation, thereby improving resource utilization efficiency and user satisfaction.
[0093] In some embodiments, the multiplication result of the channel weight, the request size weight, the seat selection continuity weight and the historical success rate weight can also be determined as the weight of the corresponding seat selection request.
[0094] Based on the above technical solution, the embodiment can achieve more accurate and personalized weight calculation by comprehensively considering the multi-dimensional basic information of all seat selection requests in the conflict set.
[0095] For reference Figure 4 A structure diagram of a seat allocation system based on conflict resolution provided by the embodiment of the application can include: A first determination module 100 is configured to determine the selected seat in response to an input first seat selection request. A first judgment module 200 is configured to judge whether the selected seat has been preoccupied or locked by other seat selection requests. A second determination module 300 is configured to construct a conflict set and determine the weight of all seat selection requests in the conflict set if the selected seat has been preoccupied or locked by other seat selection requests. The conflict set includes the first seat selection request and all seat selection requests that occupy or lock the selected seat. A second judgment module 400 is configured to judge whether the first seat selection request is the seat selection request with the highest weight in the conflict set. The seat allocation module 500 is configured to, if the first seat selection request is the seat selection request with the highest weight in the conflict set, release the selected seat from other seat selection requests and allocate the selected seat to the first seat selection request.
[0096] Based on the above embodiment, in one specific embodiment, the seat allocation module 500 is further configured to: If the first seat selection request is not the seat selection request with the highest weight in the conflict set, perform a degraded allocation process on the first seat selection request. The degraded allocation process includes: Determine at least two seat selection requirements based on the seat selection request; Determine whether there is a first seat in the same carriage that fully meets the seat selection requirements; If yes, output a seat recommendation option including the first seat; If no, determine whether there is a second seat in the same carriage that at least meets one of the seat selection requirements; If there is a second seat in the same carriage, output a seat recommendation option including the second seat; If there is no second seat in the same carriage, determine whether there is a third seat in other carriages that at least meets one of the seat selection requirements; If there is a third seat in other carriages, output a seat recommendation option including the third seat; If there is no third seat in other carriages, determine a fourth seat based on the number of seats corresponding to the seat selection request, and output a seat recommendation option including the fourth seat; the fourth seat includes the same number of seats as the number of seats corresponding to the seat selection request.
[0097] Based on the above embodiment, in one specific embodiment, the seat allocation module 500 is further configured to: In response to an input confirmation instruction, allocate the seat corresponding to the seat recommendation option to the seat selection request.
[0098] Based on the above embodiment, in one specific embodiment, the seat allocation module 500 is further configured to: Perform a degraded allocation process on other seat selection requests in the conflict set.
[0099] Based on the above embodiment, in one specific embodiment, the second determination module 300 is specifically configured to: Obtain basic information of all seat selection requests in the conflict set; the basic information includes a ticket purchase channel, a number of passengers, seat selection continuity, and a historical success rate; Determine a channel weight, a request size weight, a seat selection continuity weight, and a historical success rate weight of each seat selection request in the conflict set based on the basic information; Based on the channel weight, the request size weight, the seat selection continuity weight and the historical success rate weight, the weight corresponding to the seat selection request is determined.
[0100] On the basis of the above embodiment, in a specific embodiment, the request size weight satisfies formula (1): (1) Wherein, is the request size weight, is the number of passengers.
[0101] On the basis of the above embodiment, in a specific embodiment, the second determination module 300 is specifically used for: The multiplication result of the channel weight, the request size weight, the seat selection continuity weight and the historical success rate weight is determined as the weight corresponding to the seat selection request.
[0102] The embodiment provides an electronic device, including a processor and a memory, the memory is used for storing at least one instruction, the instruction is loaded and executed by the processor to realize the seat allocation method based on conflict resolution described above, its execution mode and beneficial effect are similar, here no longer repeat.
[0103] The embodiment of the application provides a computer readable storage medium, and the computer program is stored on the computer readable storage medium, and the computer program is executed by the processor to realize the seat allocation method based on conflict resolution described above, its execution mode and beneficial effect are similar, here no longer repeat.
[0104] It should be noted that although the above describes each step in a specific order, it does not mean that each step must be executed in the above specific order, in fact, some of the steps can be executed concurrently, or even change the order, as long as the required function can be realized.
[0105] The above only describes the preferred embodiment of the application, and does not limit the application, any modification, equivalent replacement, improvement, etc. within the spirit and principle of the application should be included in the protection scope of the application.
Claims
1. A method for seat allocation based on conflict resolution, characterized in that, The method comprises: in response to an input first seat selection request, determining a selected seat; determining whether the selected seat has been preoccupied or locked by other seat selection requests; if so, constructing a conflict set and determining the weight of all seat selection requests in the conflict set; the conflict set comprises the first seat selection request and all seat selection requests that occupy or lock the selected seat; determining whether the first seat selection request is the seat selection request with the highest weight in the conflict set; if the first seat selection request is the seat selection request with the highest weight in the conflict set, releasing the selected seat from other seat selection requests and assigning it to the first seat selection request.
2. The method of claim 1, wherein, The method further comprises: if the first seat selection request is not the seat selection request with the highest weight in the conflict set, performing a degraded allocation process on the first seat selection request; the process of the degraded allocation process comprises: determining at least two seat selection requirements based on the seat selection request; determining whether there is a first seat in the same carriage that fully meets the seat selection requirements; if so, outputting a seat recommendation option containing the first seat; if not, determining whether there is a second seat in the same carriage that at least meets one of the seat selection requirements; if there is the second seat in the same carriage, outputting a seat recommendation option containing the second seat; if there is no second seat in the same carriage, determining whether there is a third seat in other carriages that at least meets one of the seat selection requirements; if there is the third seat in other carriages, outputting a seat recommendation option containing the third seat; if there is no third seat in other carriages, determining a fourth seat based on the number of seats corresponding to the seat selection request and outputting a seat recommendation option containing the fourth seat; the fourth seat contains the same number of seats as the number of seats corresponding to the seat selection request.
3. The method of claim 2, wherein, The method further comprises: in response to an input confirmation instruction, assigning the seats corresponding to the seat recommendation option to the seat selection request.
4. The method of claim 2, wherein, After releasing the selected seat from other seat selection requests and assigning it to the first seat selection request, the method further comprises: performing a degraded allocation process on other seat selection requests in the conflict set.
5. The method of claim 1, wherein, The determination of the weight of all seat selection requests in the conflict set comprises: obtaining the basic information of all seat selection requests in the conflict set; the basic information includes ticket purchase channel, number of passengers, seat selection continuity and historical success rate; determining the channel weight, request size weight, seat selection continuity weight and historical success rate weight of each seat selection request in the conflict set based on the basic information; determining the weight of the corresponding seat selection request based on the channel weight, request size weight, seat selection continuity weight and historical success rate weight.
6. The method of claim 5, wherein, The request size weight satisfies formula (1): (1) wherein, is a request size weight, is a number of passengers.
7. The method of claim 5, wherein, The determination of the weight of the corresponding seat selection request based on the channel weight, request size weight, seat selection continuity weight and historical success rate weight comprises: determining the weight of the corresponding seat selection request based on the multiplication result of the channel weight, request size weight, seat selection continuity weight and historical success rate weight.
8. A seat allocation system based on conflict resolution, characterized in that, The method comprises: A first determining module is configured to determine a selected seat in response to an input first seat selection request; A first judging module is configured to judge whether the selected seat has been preoccupied or locked by other seat selection requests; A second determining module is configured to, if the selected seat has been preoccupied or locked by other seat selection requests, construct a conflict set and determine the weights of all seat selection requests in the conflict set; the conflict set comprises the first seat selection request and all seat selection requests that preoccupy or lock the selected seat; A second judging module is configured to judge whether the first seat selection request is the seat selection request with the highest weight in the conflict set; A seat allocation module is configured to, if the first seat selection request is the seat selection request with the highest weight in the conflict set, release the selected seat from other seat selection requests and allocate the selected seat to the first seat selection request.
9. An electronic device, comprising: The computer program is executed by a processor to implement the method for seat allocation based on conflict resolution according to any one of claims 1-7. The computer program is executed by a processor to implement the method for seat allocation based on conflict resolution according to any one of claims 1-7.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that,