Train stock seat management method and system and electronic equipment

By obtaining the number of physical seats on the train, determining the initial number of preferential seats, and dynamically updating the number of preferential seats available for sale using fuzzy sets and fuzzy rule bases, the instability problem of preferential ticket quantity control in the railway ticketing system is solved, realizing the flexibility and timeliness of seat management, and ensuring the high efficiency and stability of the system.

CN121563091APending Publication Date: 2026-02-24CHINA ACADEMY OF RAILWAY SCI CORP LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511713673.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-20
Publication Date
2026-02-24

AI Technical Summary

Technical Problem

The existing railway ticketing system suffers from excessive computational load or lack of flexibility when controlling the number of preferential tickets, resulting in frequent fluctuations in the upper limit of preferential tickets and affecting the stability and fairness of the system.

Method used

By obtaining the physical number of seats on the train, the initial number of priority seats is determined, and the number of available priority seats is dynamically updated based on the number sold and the time since they were sold. Intelligent adjustments are made using fuzzy sets and fuzzy rule bases to ensure the flexibility and timeliness of seat management.

Benefits of technology

This system matched preferential ticket allocation with actual train seats, reducing system load, improving the flexibility and timeliness of seat management, and ensuring the efficient and stable operation of the ticketing system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121563091A_ABST
    Figure CN121563091A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of railway traffic, and discloses a train stock seat management method and system and electronic equipment.The method comprises the steps that the number of physical seats of a train is obtained, and the initial number of preferential seats is determined based on the number of the physical seats; and updating the saleable number of the superior seats based on the initial number, the sold number and the sold time of the superior seats. The initial number of the preferential seats is determined by obtaining the number of the physical seats of the train, it is ensured that distribution of preferential ticket types is related to the actual seats of the train, frequent fluctuation of the upper limit value of the preferential ticket is avoided, and the system pressure is reduced; meanwhile, the seat management is more flexible and time-efficient through a dynamic updating mechanism, the sell quantity can be adjusted in time according to the real-time sales condition of the preferential seats, and the efficient and stable operation of the ticketing system is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of railway transportation, and more specifically, to a method, system, and electronic equipment for managing existing train seats. Background Technology

[0002] In the railway passenger transport sector, the train ticketing system is a core tool for organizing transportation, serving passengers, and managing revenue. Existing railway ticketing systems typically control the number of preferential tickets (such as senior citizen tickets and group tickets) by dynamically calculating the upper limit of preferential tickets based on the total number of tickets sold in real time. However, this method incurs a huge computational burden because the denominator constantly changes with the dynamic changes in the total number of tickets sold in real time, leading to frequent fluctuations in the upper limit of preferential tickets.

[0003] Another approach is to pre-set fixed quotas based on fixed train capacity. While this method is relatively stable, it lacks flexibility and cannot adapt to dynamic changes in real-time passenger flow.

[0004] Therefore, how to control the number of discounted tickets available for sale in order to improve calculation efficiency and flexibility is a technical problem that needs to be solved by those skilled in the art. Summary of the Invention

[0005] To address one or more deficiencies in the existing technology, the present invention provides a method, system, and electronic device for managing existing train seats.

[0006] A method for managing existing train seating includes: Obtain the physical number of seats on the train, and determine the initial number of preferential seats based on the physical number of seats; the preferential seats are the seats corresponding to preferential ticket types. The available number of the preferential seats is updated based on the initial number of seats, the number sold, and the time since they were sold.

[0007] Optionally, updating the available quantity of the preferential seats based on the initial quantity, the quantity sold, and the time elapsed since the sale includes: The sold time ratio and the remaining time ratio are determined based on the sold time; the sold time ratio is the ratio of the sold time to the total sold time of the seats, and the remaining time ratio is the ratio of the difference between the total sold time of the seats and the sold time to the total sold time of the seats. The ratio of the quantity sold to the initial quantity is determined as the sales quantity ratio, and the ratio of the sales quantity ratio to the time elapsed after sales is determined as the sales speed ratio; The remaining time ratio is converted into a first input value based on a first fuzzy set, and the sales speed ratio is converted into a second input value based on a second fuzzy set; The output values ​​corresponding to the first input value and the second input value are determined based on a fuzzy rule base. The number of available seats for sale is updated based on the output value.

[0008] Optionally, updating the available quantity of the preferential seats based on the output value includes: A first correspondence is determined based on the sales speed ratio; the first correspondence is used to describe the correspondence between the output value and the adjustment quantity; The adjustment quantity corresponding to the output value is determined based on the first correspondence; The sum of the adjusted quantity and the available quantity is determined as the updated value; Update the available quantity to the updated value.

[0009] Optionally, after determining the sum of the adjustment quantity and the salable quantity as the updated value, the method further includes: Determine the elasticity coefficient corresponding to the preferential seats, and determine the range of available sales quantity based on the available sales quantity and the elasticity coefficient; Determine whether the updated value is within the range of available quantities; If so, then perform the step of updating the available quantity to the updated value; If not, determine whether the updated value is less than the lower limit of the available quantity range; If it is less than, then the available quantity is updated to the lower limit of the available quantity range; If it is not less than, then the available quantity is updated to the upper limit of the available quantity range.

[0010] Optionally, the method further includes: In response to the input modification command, the elasticity coefficient corresponding to the preferential seat is modified.

[0011] Optionally, after updating the available quantity of the preferential seats based on the initial quantity, the quantity sold, and the time elapsed since the sale, the method further includes: In response to the user's ticket purchase request, determine the type and quantity of tickets to purchase; If the ticket type is a preferential ticket, then determine whether the number of tickets purchased is less than the number of preferential seats; If so, the ticket purchase request is executed, and the preferential seats corresponding to the number of tickets purchased are locked in the ticketing system; If not, the ticket purchase request will be rejected.

[0012] Optionally, determining the initial number of preferential seats based on the number of physical seats includes: Obtain the proportion of the preferential seats in the train; The product of the number of physical seats and the ratio is determined as the initial quantity.

[0013] A train existing seat management system, comprising: The determination module is used to obtain the number of physical seats on the train and determine the initial number of preferential seats based on the number of physical seats; the preferential seats are the seats corresponding to preferential ticket types. The update module is used to update the available quantity of the preferential seats based on the initial quantity, the quantity sold, and the time since the sale.

[0014] An electronic device, comprising: A processor and a memory, the memory being used to store at least one instruction, which, when loaded and executed by the processor, implements the train stock management method as described in any of the preceding embodiments.

[0015] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for managing train stock seats as described in any of the preceding claims.

[0016] The method for managing train seat availability provided in this invention obtains the physical number of seats on the train and determines the initial number of preferential seats based on this number. The available number of preferential seats is then updated based on the initial number, the number sold, and the time elapsed since the sale. This invention ensures that the allocation of preferential tickets is related to the actual number of seats on the train by obtaining the physical number of seats, avoiding frequent fluctuations in the upper limit of preferential tickets and reducing system pressure. Simultaneously, the dynamic update mechanism makes seat management more flexible and timely, allowing for timely adjustments to the available number of seats based on real-time sales of preferential seats, thus ensuring the efficient and stable operation of the ticketing system. Attached Figure Description

[0017] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 A flowchart illustrating a method for managing existing train seats provided in an embodiment of the present invention; Figure 2 for Figure 1 A flowchart illustrating an actual manifestation of S02 in a method for managing existing train seats; Figure 3for Figure 2 A flowchart of one actual manifestation of step S25; Figure 4 A flowchart illustrating another method for managing existing train seats provided in an embodiment of the present invention; Figure 5 This is a schematic diagram of a train seat management system provided in an embodiment of the present invention. Detailed Implementation

[0019] To better understand the technical solution of the present invention, the embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0020] It should be understood that the described embodiments are merely some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

[0021] The terminology used in the embodiments of this invention is for the purpose of describing particular embodiments only and is not intended to limit the invention. The singular forms “a,” “the,” and “the” as used in the embodiments of this invention and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.

[0022] It should be understood that the term "and / or" used in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.

[0023] In the railway passenger transport sector, the train ticketing system is a core tool for organizing transportation, serving passengers, and managing revenue. Existing railway ticketing systems primarily use the following methods to control the number of preferential ticket types (such as senior citizen tickets and group tickets): Real-time calculation is a method that dynamically calculates the upper limit of discounted tickets based on the total number of tickets sold in real time. However, this method has an extremely high computational load because the denominator constantly changes with the dynamic changes in the total number of tickets sold in real time, causing frequent fluctuations in the upper limit of discounted tickets. This instability is easily exploited; for example, a passenger might first buy a regular ticket to inflate the upper limit of discounted tickets, then buy discounted tickets, and finally cancel the regular tickets. This behavior seriously disrupts the ticketing order, causes chaos in ticket management, and affects the fairness and revenue protection of the ticketing system.

[0024] The static quota method pre-sets a fixed quota based on a fixed number of train passengers. While this method is relatively stable, it lacks flexibility and cannot adapt to dynamic changes in real-time passenger flow. During off-peak seasons, fixed quotas are prone to waste and cannot be adjusted according to actual demand; while during peak seasons, fixed quotas may fail to meet market demand, resulting in some passengers being unable to purchase the discounted tickets they need, affecting their travel experience and the social service functions of the railway department.

[0025] Therefore, the present invention provides a method for managing existing train seats to solve the above-mentioned problems.

[0026] Please refer to Figure 1 The flowchart below shows a method for managing existing train seats provided by an embodiment of the present invention, which includes the following steps: Step S01: Obtain the number of physical seats on the train and determine the initial number of priority seats based on the number of physical seats.

[0027] Among them, the preferential seats are the seats corresponding to the preferential ticket types; In this embodiment, the physical number of seats refers to the total number of seats actually available for passengers on the train, covering all seat types (such as first class, second class, business class, etc.). The initial number of preferential seats is the number of seats pre-allocated specifically for certain preferential ticket types (such as senior citizen tickets, veteran tickets, etc.).

[0028] To address the significant shortcomings of existing systems in controlling the number of preferential tickets, such as the vulnerability of real-time calculation methods to malicious exploitation and the lack of flexibility in static quota methods, this embodiment determines the initial number of preferential seats based on the physical number of seats. This ensures that the allocation of preferential tickets matches the actual seating capacity of the train, avoiding over-allocation or waste of ticket resources. At the same time, a stable initial number can provide a benchmark for subsequent dynamic adjustments, which helps to achieve refined and intelligent seat management.

[0029] In some embodiments, the initial number of preferential seats mentioned in step S01, based on the number of physical seats, may specifically include the following steps: Step S11: Obtain the proportion of priority seats in the train.

[0030] Step S12: Determine the initial quantity by multiplying the number of physical seats by the proportion.

[0031] In this embodiment, the proportion of preferential seats in the total number of seats on the train is first obtained. This proportion reflects the relative number of seats reserved by the railway department for preferential tickets based on factors such as policy, market demand, or social responsibility. Then, the initial number of preferential seats is calculated by multiplying the actual total number of physical seats on the train by this proportion.

[0032] By setting a proportion for priority seats and calculating the initial quantity accordingly, it is possible to ensure that the supply of priority tickets meets the basic needs of specific passenger groups without excessive reservations affecting the sales of regular tickets and the overall revenue of the train. Furthermore, this proportion-based calculation method is highly flexible and adaptable, allowing for rapid adjustments based on the total number of seats on different trains, passenger flow characteristics on different routes, and policy requirements at different times. For example, during peak tourist seasons or holidays, the proportion of priority seats can be appropriately increased to better serve elderly passengers, veterans, and other groups, thereby enhancing the social welfare and market competitiveness of railway services.

[0033] Step S02: Update the available number of preferential seats based on the initial number of seats, the number of seats sold, and the time elapsed since the sale.

[0034] In this embodiment, based on a predetermined initial number of priority seats as a baseline, and by combining various dynamic factors such as the number of priority seats already sold and the time dimension of ticket sales (e.g., time elapsed since sales began), the remaining number of priority seats available for sale is recalculated and adjusted using a specific calculation model or algorithm. The aim is to make the management of priority seats more precise and flexible, adapting to real-time market changes and fluctuations in passenger demand.

[0035] In train ticketing scenarios, passenger purchasing behavior and needs are dynamic. Setting a fixed number of available seats based solely on an initial quantity will lead to various problems. For example, in the early stages of ticket sales, certain preferential tickets may sell slowly. If the available number is not adjusted in time, some seats may remain idle for an extended period, affecting the overall seat utilization rate of the train and the railway department's revenue. Conversely, during peak sales periods, certain preferential tickets may sell out quickly. If passengers have urgent travel needs but are unable to purchase suitable preferential tickets due to the limited availability, this will undermine the public welfare nature of railway services. This dynamic updating mechanism allows for real-time optimization of seat allocation based on sales speed and time phases, ensuring that the travel rights of preferential groups are protected at different stages while maximizing seat utilization efficiency, thus balancing economic benefits and social responsibility.

[0036] In some embodiments, a database containing the initial number of preferential seats, real-time sales records for each type of preferential ticket, and ticket sales time information can be pre-established. The system then initiates an update process periodically (e.g., every 30 minutes) or when triggered by a specific event (e.g., a certain number of preferential tickets are sold). During the update process, data such as the initial number, current sold number, and ticket sales time are first read from the database. Next, based on a pre-defined intelligent adjustment model such as a neural network algorithm, the current sold number and ticket sales time are used as input variables to calculate and infer a quota adjustment factor. Finally, this adjustment factor is applied to the initial number to calculate the new available number of seats, which is then updated in the database. Simultaneously, the new available number information is fed back to the ticketing terminal to guide subsequent ticket sales decisions.

[0037] Based on the above technical solution, the train seat management method provided in this embodiment of the invention obtains the physical number of seats on the train and determines the initial number of preferential seats based on the physical number of seats; it then updates the available number of preferential seats based on the initial number of preferential seats, the number sold, and the time since they were sold. This invention determines the initial number of preferential seats by obtaining the physical number of seats on the train, ensuring that the allocation of preferential tickets is related to the actual number of seats on the train, avoiding frequent fluctuations in the upper limit of preferential tickets, and reducing system pressure. At the same time, the dynamic update mechanism makes seat management more flexible and timely, allowing for timely adjustment of the available number of seats based on the real-time sales situation of preferential seats, ensuring the efficient and stable operation of the ticketing system.

[0038] Please refer to Figure 2 ,for Figure 1 A flowchart illustrating one practical manifestation of step S02 in a method for managing existing train seats is provided. Based on the above embodiments, in some embodiments, step S02, which involves updating the available number of preferential seats based on the initial number, the number sold, and the time elapsed since the sale, may specifically include the following steps: Step S21: Determine the sold time ratio and the remaining time ratio based on the sold time.

[0039] Among them, the sold time ratio is the ratio of sold time to the total selling time of seats, and the remaining time ratio is the ratio of the difference between the total selling time of seats and the sold time to the total selling time of seats.

[0040] In this embodiment, the sold-out time refers to the length of time elapsed from the moment tickets went on sale to the current statistical moment. The sold-out time ratio is the ratio obtained by comparing the sold-out time with the total sales time of all seats, reflecting the proportion of the current ticketing stage in the overall ticketing cycle. The calculation of the remaining time ratio involves the difference between the total sales time and the sold-out time, i.e., the remaining time available for tickets to be sold, and then comparing this difference with the total sales time to obtain the remaining time ratio.

[0041] For example, assuming the total sales duration is 60 hours, if 24 hours have been sold, then the sold time ratio is 40%, and the remaining time ratio is 60%.

[0042] Step S22: The ratio of the quantity sold to the initial quantity is determined as the sales quantity ratio, and the ratio of the sales quantity ratio to the time elapsed after sales is determined as the sales speed ratio.

[0043] In this embodiment, the sales quantity ratio directly reflects the proportion of the currently sold preferential seats in the initial allocation quantity. The sales speed ratio combines the sales quantity ratio with the time factor to measure the sales progress of preferential seats within a unit of time, thereby providing a quantitative basis for the subsequent dynamic adjustment of the available quantity of preferential seats, enabling the system to accurately grasp the sales pace.

[0044] At different stages of ticket sales, the same number of tickets sold can have completely different meanings. For example, a low number of tickets sold in the early stages of sales may be normal, but if the number of tickets sold remains low as the travel date approaches, it may indicate insufficient demand for that type of preferential ticket; conversely, a high sales rate indicates strong market demand. By introducing the sales rate ratio as an indicator, we can more accurately determine whether the sales of preferential seats in the current sales stage are meeting expectations, thereby adjusting the number of available seats in a timely manner to avoid idle or oversold seats and achieve a balance between railway department revenue and public welfare.

[0045] Step S23: Convert the remaining time ratio into a first input value based on the first fuzzy set, and convert the sales speed ratio into a second input value based on the second fuzzy set.

[0046] In this embodiment, fuzzy sets are a mathematical tool capable of handling uncertainty and fuzzy concepts. The remaining time ratio and sales speed ratio, as two important indicators reflecting the ticketing process, can be transformed from their original precise values ​​into input values ​​that the fuzzy logic system can understand and process through fuzzy set conversion. This process essentially discretizes and semanticizes complex, continuous real-world factors, enabling the system to reason and make decisions based on fuzzy rules. This provides the necessary input conditions for subsequently adjusting the number of available preferential seats through fuzzy reasoning.

[0047] The remaining time ratio and sales speed ratio are crucial for adjusting the number of available seats for priority bookings, but the information they reflect is inherently fuzzy and uncertain. For example, when the remaining time ratio is between 0.3 and 0.5, it's difficult to use a simple numerical value to define whether the ticket sales stage is in the middle or early stages. Similarly, the sales speed ratio is difficult to directly correlate with the speed of sales using a precise numerical value. By using fuzzy set transformation, these continuous numerical values ​​can be mapped to semantically meaningful fuzzy sets.

[0048] For example, reasonable fuzzy sets can be designed based on historical data and expert experience. For the remaining time ratio, the fuzzy set can be defined as {early, middle, late}, with corresponding ranges determined for each of these three fuzzy concepts. For instance, early corresponds to a remaining time ratio between 0.6 and 1.0, middle to 0.3 and 0.6, and late to 0.0 and 0.3. Similarly, a fuzzy set {slow, normal, fast} can be designed for the sales speed ratio. For example, slow corresponds to a sales speed ratio between 0 and 0.5, normal to 0.5 and 1.0, and fast to 1.0 and 2.0. Then, using fuzzy membership functions or lookup tables, the actual remaining time ratio and sales speed ratio values ​​are converted into membership values ​​of the corresponding fuzzy sets, i.e., the first input value and the second input value.

[0049] Step S24: Determine the output values ​​corresponding to the first input value and the second input value based on the fuzzy rule base.

[0050] In this embodiment, the fuzzy rule base is essentially a collection of fuzzy logic rules, each of which specifies the output strategy to be adopted under specific input conditions. The output value is a quantity representing the direction and magnitude of the adjustment of the number of preferential seats available for sale. By calling the rule matching mechanism in the fuzzy rule base, the fuzzified input value is compared with the conditions in the rule base to find the best matching rule, and the corresponding output value is determined based on that rule. This output value will directly guide the subsequent update operation of the number of preferential seats available for sale.

[0051] The advantage of fuzzy rule bases lies in their ability to simulate the decision-making process of human experts, incorporating rich experience and subjective judgment into the rules. For example, when the remaining time is "late" and the sales speed is "slow," even if the specific values ​​are not exactly the same, fuzzy rules can determine that a significant adjustment to the number of seats available is needed. This fuzzy rule-based decision-making process can better cope with the uncertainty and diversity in real-world ticketing scenarios, enabling the system to make reasonable and flexible seat adjustment decisions under different sales conditions, thus improving the intelligence level of seat management.

[0052] In some embodiments, assuming the first fuzzy set of the sales speed ratio V is {slow, normal, fast}, and the second fuzzy set of the remaining time ratio T is {early, mid, late}, the corresponding output value Δ can include {significantly reduced, slightly reduced, maintained, slightly increased, significantly increased}, then the fuzzy rule base can be: 1) IF (V is slow) AND (T is late) THEN (Δ is significantly reduced).

[0053] 2) IF (V is fast) AND (T is early) THEN (Δ is significantly increased).

[0054] 3) IF (V is normal) AND (T is intermediate) THEN (Δ is maintained).

[0055] Step S25: Update the number of available seats for sale based on the output value.

[0056] In this embodiment, the output value derived from fuzzy rule base inference is defuzzified, transforming it into a specific numerical adjustment amount to guide the increase or decrease of the number of available preferential seats. This adjustment amount reflects the system's optimized decision on the number of available preferential seats in the current ticketing phase, considering both the remaining time ratio and the sales speed ratio. By applying this adjustment amount to the current available quantity, the number of available preferential seats is updated, making seat allocation more aligned with actual market demand and the characteristics of the time phase.

[0057] In some embodiments, the output value is a fuzzy set, which is defuzzified and converted into a specific numerical adjustment, such as "add 10 seats" or "reduce 5% of seats". The system then calculates this adjustment with the current number of available preferential seats to obtain a new number of available seats.

[0058] Based on the above technical solution, this embodiment combines the quantity sold with the time factor to form an indicator that can intuitively reflect the sales situation, providing a strong basis for judging the current sales pace. At the same time, the operation based on fuzzy control theory greatly enhances the system's flexibility and intelligence in dealing with complex and uncertain sales environments.

[0059] Please refer to Figure 3 ,for Figure 2 A flowchart of one actual manifestation of step S25.

[0060] In some embodiments, to achieve precise adjustment of preferential seats, quickly respond to market changes, and adjust seat allocation strategies in a timely manner, the correspondence between the output value and the adjustment quantity can be clearly defined. Based on the current sales situation, the number of seats requiring adjustment can be precisely determined, avoiding the uncertainty caused by ambiguous adjustments and improving the accuracy of seat management. Specifically, as mentioned in step S25, updating the available quantity of preferential seats based on the output value can include, for example: Figure 3 The steps shown are as follows: Step S31: Determine the first correspondence based on the sales speed ratio.

[0061] In train ticketing systems, the output value derived from the fuzzy rule base is a fuzzy result reflecting the direction and relative magnitude of the adjustment, but it cannot directly guide the system to make specific numerical adjustments. To enable the system to perform precise seat quantity updates, a clear correspondence must be established between the output value and the actual adjustment quantity.

[0062] In this embodiment, the first correspondence describes the relationship between the output value and the adjustment quantity, and is essentially a function or lookup table. By introducing the key indicator of sales speed ratio, the size of the adjustment quantity can be dynamically determined according to different sales situations. For example, when the sales speed ratio shows fast sales, a larger adjustment quantity needs to be determined through the first correspondence to increase the number of available seats to meet market demand; conversely, when the sales speed is slow, a smaller adjustment quantity is determined or even the number of available seats is reduced to protect revenue. That is, an appropriate first correspondence can be selected based on the sales speed ratio. This correspondence based on the sales speed ratio ensures that the system can make reasonable and accurate seat adjustment decisions under different market environments.

[0063] Step S32: Determine the adjustment quantity corresponding to the output value based on the first correspondence.

[0064] In this embodiment, the output value of the fuzzy logic system is transformed into a specific and executable adjustment quantity, such as "add 10 seats" or "decrease 5 seats", according to a pre-set rule. This provides a direct basis for the subsequent accurate updating of the available number of preferential seats.

[0065] While the output values ​​of the fuzzy rule base can indicate the direction and relative magnitude of the adjustment, they are not themselves concrete numerical values ​​that can be directly used to modify the number of seats. In order for the system to execute actual seat adjustment operations, these abstract output values ​​must be mapped to specific adjustment quantities through a first correspondence. This first correspondence comprehensively considers various factors such as historical sales data, train type, line characteristics, and different sales stages, thereby ensuring that the adjustment quantities both conform to the current sales situation and meet the needs of actual operation.

[0066] In some embodiments, a first correspondence can be pre-established based on extensive historical sales data and expert experience. This can be achieved by constructing a two-dimensional table, where rows represent different output value ranges and columns represent corresponding adjustment quantities. For example, when the output value is between 0 and 0.2, the corresponding adjustment quantity might be a reduction of 5 seats; when the output value is between 0.2 and 0.5, no adjustment is made; when the output value is between 0.5 and 1.0, 5 seats are added; and so on. Alternatively, a mathematical function fitting method can be used to establish a continuous mapping relationship between output values ​​and adjustment quantities, such as a linear or non-linear function.

[0067] Step S33: Determine the sum of the adjusted quantity and the available quantity as the updated value.

[0068] In this embodiment, the adjustment quantity is used to indicate whether to increase or decrease the number of preferential seats. The available quantity is the actual number of preferential seats currently available for sale in the system. Adding these two values ​​together yields the updated value, which is the new number of available seats adjusted according to the current sales situation and is used to guide subsequent ticketing operations.

[0069] Step S34: Update the available quantity to the updated value.

[0070] In this embodiment, the number of available priority seats is dynamically updated by replacing the original number of available seats with the updated value. This operation is the final step in the entire dynamic seat management process, directly determining the number of priority seats that passengers can see and purchase at the ticketing terminal, and is the ultimate manifestation of the system's response to changes in market demand.

[0071] Based on the above embodiments, in some embodiments, to further enhance system stability and reliability and improve the rationality of decision-making, an elasticity coefficient can be introduced to determine the range of available sales quantity, and the updated value can be judged within this range to avoid unreasonable extreme values ​​in the available sales quantity due to market fluctuations or algorithm errors, ensuring that the system operates within a stable range. That is, after executing step S34 to update the available sales quantity to the updated value, the following steps can also be executed: Step S41: Determine the elasticity coefficient corresponding to the preferential seats, and determine the range of available sales quantity based on the available sales quantity and the elasticity coefficient.

[0072] In this embodiment, the elasticity coefficient is a pre-set parameter used to specify the maximum percentage by which the available quantity can deviate from the initial quantity, thus forming a range for the available quantity. This range defines the reasonable fluctuation range of the available quantity of preferential seats in the current sales phase, providing a quantitative boundary for subsequently judging whether the updated value is reasonable, ensuring that the adjusted available quantity can adapt to changes in market demand without deviating excessively from the initial plan. By setting the elasticity coefficient and the available quantity range, the system can balance flexibility and stability, ensuring that while adapting to market fluctuations, it maintains the controllability and rationality of seat management.

[0073] For example, it may be necessary to set a reasonable flexibility coefficient for each type of preferential seat based on historical sales data, train type, characteristics of preferential tickets, and the railway department's operational strategy. This coefficient is usually a positive number less than 1, such as 0.2, indicating that the number of available seats can fluctuate within ±20% of the initial number. Then, based on the current number of available seats and the flexibility coefficient, the upper and lower limits of the available seat range are calculated. The calculation formula is: Lower limit = Available seat quantity × (1 - Flexibility coefficient), Upper limit = Available seat quantity × (1 + Flexibility coefficient). For example, if the current available seat quantity is 100 and the flexibility coefficient is 0.2, then the available seat range is 80 to 120.

[0074] In some embodiments, to further increase flexibility to adapt to diverse needs and achieve precise control of preferential seating, the following steps may also be performed: In response to the input modification command, the elasticity coefficient corresponding to the preferential seats is modified.

[0075] In this embodiment, railway operators are allowed to intervene in the flexibility coefficient based on real-time operational needs, market changes, or special circumstances, adjusting the pre-set flexibility coefficient by inputting a modification command. Modifying the flexibility coefficient means redefining the range of available sales quantities, thereby affecting the subsequent update logic and range of available sales quantities.

[0076] Step S42: Determine whether the updated value is within the range of available quantities.

[0077] If yes, proceed to step S35 to update the available quantity to the updated value; otherwise, proceed to step S43.

[0078] In this embodiment, the updated value is verified by setting a range of available sales quantity to determine whether it conforms to a preset reasonable range. If the updated value is within this range, it indicates that the value is reasonable under the current market and operating conditions and can be directly used as the new available sales quantity. At this time, step S35 is executed to update the available sales quantity to the updated value. This process is equivalent to setting a "reasonableness filter" for the dynamic adjustment mechanism, ensuring that the available sales quantity after each adjustment reflects both market changes and conforms to the railway department's operating strategy.

[0079] Step S43: Determine whether the updated value is less than the lower limit of the available quantity range.

[0080] If yes, proceed to step S44; otherwise, proceed to step S45.

[0081] Step S44: Update the available quantity to the lower limit of the available quantity range.

[0082] Step S45: Update the available quantity to the upper limit of the available quantity range.

[0083] In this embodiment, when the updated value is outside the available quantity range, the system needs to further determine whether the updated value is too small or too large. If the updated value is less than the lower limit, it indicates that the seat demand calculated based on the current sales situation is too low. In this case, the available quantity is adjusted to the lower limit to ensure the minimum supply of preferential tickets. Conversely, if the updated value is not less than the lower limit, it proves that the updated value is greater than the upper limit of the available quantity range. In this case, the available quantity is adjusted to the upper limit to prevent excessive allocation of seats. This process ensures that the available quantity is always within a reasonable and controllable range.

[0084] Please refer to Figure 4 The flowchart below shows another method for managing existing train seats provided by an embodiment of the present invention, which includes the following steps: Step S51: Obtain the number of physical seats on the train and determine the initial number of priority seats based on the number of physical seats.

[0085] This step is the same as step S01, and will not be repeated here.

[0086] Step S52: Update the available number of preferential seats based on the initial number of seats, the number of seats sold, and the time elapsed since the sale.

[0087] This step is the same as step S02, and will not be repeated here.

[0088] Step S53: In response to the user's input ticket purchase request, determine the type and quantity of tickets to purchase.

[0089] In this embodiment, when a user submits a ticket purchase request through a ticket window, website, or mobile application, the system first needs to identify and parse the request to determine the type of ticket the user wishes to purchase (such as adult tickets, senior tickets, group tickets, etc.) and the specific quantity. This is the foundation of the entire ticket purchase process, ensuring that the system can perform subsequent seat allocation and ticketing processing based on the user's actual needs.

[0090] Step S54: If the ticket type is a preferential ticket, determine whether the number of tickets purchased is less than the number of preferential seats.

[0091] If yes, proceed to step S55; otherwise, proceed to step S56.

[0092] Step S55: Execute the ticket purchase request and lock the priority seats corresponding to the number of tickets purchased in the ticketing system.

[0093] Step S56: Reject the ticket purchase request.

[0094] In this embodiment, the system only allows successful ticket purchases and locks the corresponding seats in the system if the number of preferential tickets requested by the user does not exceed the number of currently available preferential seats; otherwise, the request is rejected to prevent overselling and ensure the accuracy and fairness of ticket management.

[0095] In train ticketing management, the number of priority seats is limited, and their allocation must strictly adhere to established rules to protect the rights of specific passenger groups. When a user's ticket purchase request involves priority tickets, it must be ensured that the number of tickets sold does not exceed the currently available number of priority seats. This avoids service disputes such as passengers being unable to board due to overselling, and also ensures the rational use of priority ticket resources and prevents waste. By locking sold priority seats in the system, seat status can be updated in real time, providing accurate seat information for subsequent ticketing operations and improving the overall efficiency and management level of the ticketing system.

[0096] Based on the above technical solution, this embodiment ensures the stability of the system under high-concurrency ticket purchase conditions through reasonable logical judgment and seat locking mechanism, and prevents system errors or crashes caused by inaccurate seat information.

[0097] Please refer to Figure 5 The diagram below illustrates the structure of a train existing seat management system provided in an embodiment of the present invention. The train existing seat management system may include: The determination module 100 is used to obtain the number of physical seats on the train and determine the initial number of preferential seats based on the number of physical seats; the preferential seats are the seats corresponding to the preferential ticket type. Update module 200 is used to update the number of available preferential seats based on the initial number of preferential seats, the number sold, and the time since they were sold.

[0098] Based on the above embodiments, in one specific embodiment, the update module 200 is specifically used for: The sold time ratio and the remaining time ratio are determined based on the sold time. The sold time ratio is the ratio of the sold time to the total sold time of the seats, and the remaining time ratio is the ratio of the difference between the total sold time of the seats and the sold time to the total sold time of the seats. The ratio of the quantity sold to the initial quantity is defined as the sales quantity ratio, and the ratio of the sales quantity ratio to the time elapsed after the sale is defined as the sales speed ratio. The remaining time ratio is converted into a first input value based on the first fuzzy set, and the sales speed ratio is converted into a second input value based on the second fuzzy set; The output values ​​corresponding to the first and second input values ​​are determined based on a fuzzy rule base. Update the number of available seats for sale based on the output value.

[0099] Based on the above embodiments, in one specific embodiment, the update module 200 is specifically used for: The first correspondence is determined based on the sales speed ratio; the first correspondence describes the relationship between the output value and the adjustment quantity. The adjustment quantity corresponding to the output value is determined based on the first correspondence; The sum of the adjusted quantity and the available quantity is determined as the updated value; Update the available quantity to the updated value.

[0100] Based on the above embodiments, in one specific embodiment, the updating module 200 is further configured to: Determine the elasticity coefficient corresponding to the preferential seats, and determine the range of available sales quantity based on the available sales quantity and the elasticity coefficient; Determine if the updated value is within the available quantity range; If so, proceed with the step of updating the available quantity to the updated value; If not, then determine whether the updated value is less than the lower limit of the available quantity range; If it is less than, then update the available quantity to the lower limit of the available quantity range; If it is not less than, then update the available quantity to the upper limit of the available quantity range.

[0101] Based on the above embodiments, in one specific embodiment, the updating module 200 is further configured to: In response to the input modification command, the elasticity coefficient corresponding to the preferential seats is modified.

[0102] Based on the above embodiments, in one specific embodiment, the updating module 200 is further configured to: In response to the user's ticket purchase request, determine the type and quantity of tickets to purchase; If the ticket type is a concession ticket, then determine whether the number of tickets purchased is less than the number of concession seats; If so, the ticket purchase request will be executed, and the corresponding priority seats will be locked in the ticketing system. If not, the ticket purchase request will be rejected.

[0103] Based on the above embodiments, in one specific embodiment, the determining module 100 is specifically used for: The percentage of passengers on the train who received preferential seating; The initial quantity is determined by multiplying the number of physical seats by the proportion.

[0104] This embodiment provides an electronic device, including a processor and a memory. The memory is used to store at least one instruction. When the instruction is loaded and executed by the processor, it implements the above-mentioned method for managing train stock seats. Its execution method and beneficial effects are similar and will not be described again here.

[0105] This invention provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the above-described method for managing train stock seats. The execution method and beneficial effects are similar and will not be described again here.

[0106] It should be noted that although the steps are described in a specific order above, it does not mean that the steps must be executed in the above specific order. In fact, some of these steps can be executed concurrently or even in a different order, as long as the required function can be achieved.

[0107] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for managing existing train seating, characterized in that, include: Obtain the number of physical seats on the train, and determine the initial number of priority seats based on the number of physical seats; The preferential seats are the seats corresponding to the preferential ticket types; The available number of the preferential seats is updated based on the initial number of seats, the number sold, and the time since they were sold.

2. The method according to claim 1, characterized in that, The process of updating the available quantity of the preferential seats based on the initial quantity, the quantity sold, and the time elapsed since the sale includes: The sold time ratio and the remaining time ratio are determined based on the sold time; the sold time ratio is the ratio of the sold time to the total sold time of the seats, and the remaining time ratio is the ratio of the difference between the total sold time of the seats and the sold time to the total sold time of the seats. The ratio of the quantity sold to the initial quantity is determined as the sales quantity ratio, and the ratio of the sales quantity ratio to the time elapsed after sales is determined as the sales speed ratio; The remaining time ratio is converted into a first input value based on a first fuzzy set, and the sales speed ratio is converted into a second input value based on a second fuzzy set; The output values ​​corresponding to the first input value and the second input value are determined based on a fuzzy rule base. The number of available seats for sale is updated based on the output value.

3. The method according to claim 2, characterized in that, The step of updating the available quantity of the preferential seats based on the output value includes: A first correspondence is determined based on the sales speed ratio; the first correspondence is used to describe the correspondence between the output value and the adjustment quantity; The adjustment quantity corresponding to the output value is determined based on the first correspondence; The sum of the adjusted quantity and the available quantity is determined as the updated value; Update the available quantity to the updated value.

4. The method according to claim 3, characterized in that, After determining the sum of the adjusted quantity and the available quantity as the updated value, the method further includes: Determine the elasticity coefficient corresponding to the preferential seats, and determine the range of available sales quantity based on the available sales quantity and the elasticity coefficient; Determine whether the updated value is within the range of available quantities; If so, then perform the step of updating the available quantity to the updated value; If not, determine whether the updated value is less than the lower limit of the available quantity range; If it is less than, then the available quantity is updated to the lower limit of the available quantity range; If it is not less than, then the available quantity is updated to the upper limit of the available quantity range.

5. The method according to claim 4, characterized in that, The method further includes: In response to the input modification command, the elasticity coefficient corresponding to the preferential seat is modified.

6. The method according to claim 1, characterized in that, After updating the available quantity of the preferential seats based on the initial quantity, the quantity sold, and the time elapsed since the sale, the method further includes: In response to the user's ticket purchase request, determine the type and quantity of tickets to purchase; If the ticket type is a preferential ticket, then determine whether the number of tickets purchased is less than the number of preferential seats; If so, the ticket purchase request is executed, and the preferential seats corresponding to the number of tickets purchased are locked in the ticketing system; If not, the ticket purchase request will be rejected.

7. The method according to claim 1, characterized in that, The determination of the initial number of preferential seats based on the number of physical seats includes: Obtain the proportion of the preferential seats in the train; The product of the number of physical seats and the ratio is determined as the initial quantity.

8. A train existing seat management system, characterized in that, include: The determination module is used to obtain the number of physical seats on the train and determine the initial number of priority seats based on the number of physical seats. The preferential seats are the seats corresponding to the preferential ticket types; The update module is used to update the available quantity of the preferential seats based on the initial quantity, the quantity sold, and the time since the sale.

9. An electronic device, characterized in that, include: A processor and a memory, the memory being used to store at least one instruction, which, when loaded and executed by the processor, implements the method for managing train stock seats as described in any one of claims 1-7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the method for managing train stock seats as described in any one of claims 1-7.