CN118093992A - Seat recommendation method, electronic device and storage medium - Google Patents

Seat recommendation method, electronic device and storage medium Download PDF

Info

Publication number
CN118093992A
CN118093992A CN202410067166.9A CN202410067166A CN118093992A CN 118093992 A CN118093992 A CN 118093992A CN 202410067166 A CN202410067166 A CN 202410067166A CN 118093992 A CN118093992 A CN 118093992A
Authority
CN
China
Prior art keywords
seat
available
available seat
units
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410067166.9A
Other languages
Chinese (zh)
Inventor
王雪峰
阎志远
单杏花
王洪业
杨立鹏
李天翼
汪健雄
胡志鹏
李雯
李杨
俞海萍
刘典
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tielv Technology Co ltd
Institute of Computing Technologies of CARS
Beijing Jingwei Information Technology Co Ltd
Original Assignee
Tielv Technology Co ltd
Institute of Computing Technologies of CARS
Beijing Jingwei Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tielv Technology Co ltd, Institute of Computing Technologies of CARS, Beijing Jingwei Information Technology Co Ltd filed Critical Tielv Technology Co ltd
Priority to CN202410067166.9A priority Critical patent/CN118093992A/en
Publication of CN118093992A publication Critical patent/CN118093992A/en
Pending legal-status Critical Current

Links

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The seat recommending method, the electronic equipment and the storage medium provided by the embodiment of the application comprise the following steps: receiving a seat use request input by a current user; determining a target available seat unit in a plurality of available seat units according to a seat use request, wherein the target available seat unit is an available seat unit with the least recommended page number currently displayed in the plurality of available seat units, and each available seat unit comprises at least one available seat; and outputting a recommended page corresponding to the target available seat unit. By recommending the available seat units with the least number of the recommended pages currently displayed to the user, the seat selection conflict is avoided to the greatest extent under the condition that multiple users simultaneously request to use seats, the convenience of seat selection of the user is improved, and the user experience is improved.

Description

Seat recommendation method, electronic device and storage medium
Technical Field
The application relates to the technical field of information recommendation, in particular to a seat recommendation method, electronic equipment and a storage medium.
Background
In public transportation, railways are one of the most important main passages for passenger and cargo transportation, and the position and the function in comprehensive transportation are important. With the opening of the internet ticket purchasing channel and the online of the online seat selecting program, more and more users purchase tickets online. When the user opens the ticket purchasing program to purchase the ticket, the ticket purchasing program displays the seat condition of one carriage to the user through the recommended page.
In the related art, the cars are recommended to the users in the order of the car numbers, for example, the cars are recommended to the users in the order of the car numbers from small to large, and when a ticket is purchased by a plurality of users, the ticket purchasing program simultaneously recommends the number 1 car to the plurality of users.
However, when multiple users view seats in the same car at the same time, the situation that multiple users select the same seat, namely, the seat selecting conflict, easily occurs.
It should be noted that the information disclosed in the background section of the present application is only for enhancement of understanding of the general background of the present application and should not be taken as an admission or any form of suggestion that this information forms the prior art that is well known to a person skilled in the art.
Disclosure of Invention
In view of the above, the present application provides a seat recommendation method, an electronic device and a storage medium, so as to solve the problem of easy seat selection conflict in the prior art.
In a first aspect, an embodiment of the present application provides a seat recommendation method, including:
receiving a seat use request input by a current user;
Determining a target available seat unit in a plurality of available seat units according to the seat use request, wherein the target available seat unit is an available seat unit with the least recommended page number currently displayed in the plurality of available seat units, and each available seat unit comprises at least one available seat;
and outputting a recommended page corresponding to the target available seat unit.
In the embodiment of the application, the probability of seat selection conflict when a user subscribes a seat can be reduced by outputting the available seat units with the least number of the recommended pages currently displayed.
In one possible implementation manner, the outputting the recommended page corresponding to the target available seat unit includes:
if there are a plurality of the target available seat units, outputting the target available seat unit having the smallest available seat.
It will be appreciated that when the number of target available seat units is greater than or equal to 2, it is desirable to select one target available seat unit from among the target available seat units, and in the embodiment of the present application, the target available seat unit with the smallest available seat is selected, so that the available seat in each available seat unit is utilized as fully as possible.
In one possible implementation, the seat use request includes a demand seat number, where the demand seat number is a number of seats that the current user needs to reserve;
The determining a target available seat unit from a plurality of available seat units according to the seat use request comprises: and if the available seat number in the available seat units is greater than or equal to the required seat number, determining a target available seat unit in the available seat units according to the seat use request.
It can be understood that when the available seat number in the available seat number units is greater than or equal to the required seat number, the target available seat number unit is determined, so that unnecessary operation processes are avoided, the time of a user is saved, and the user experience is improved.
In one possible implementation, the method further includes:
if the available seats in the available seat units are smaller than the required seats, outputting prompt information, wherein the prompt information is used for prompting that the available seats are insufficient.
It can be understood that when the available seat in the available seat units can not meet the user demand, the user is prompted in time, and the user can select the available seat units in other time according to the prompt, so that the user time is saved, and the user experience is improved.
In one possible implementation, the determining a target available seat unit from a plurality of available seat units according to the seat use request includes:
determining target available seat units in a first available seat unit set according to the seat use request, wherein the available seat number of any one of the available seat units in the first available seat unit set is larger than or equal to the required seat number.
It can be understood that when one available seat unit can meet the demands of users, the users can directly select the seats needed by the users in the current recommended pages, the situation that the users switch pages due to insufficient available seats is avoided, the time of the users is saved, and the experience of the users is improved.
In one possible implementation, the method further includes:
if the number of available seat units in the first set of available seat units is 0, determining a target available seat unit in a second set of available seat units, wherein the available seat number of any one of the available seat units in the second set of available seat units is smaller than the demand seat number.
It will be appreciated that when a user needs more seats, one available seat unit cannot meet the user's needs, but the available seats in the plurality of available seat units can be added up to meet the user's needs, at this time, the target available seat unit is determined in the plurality of available seat units, so that on the one hand, the available seats in each available seat unit can be fully utilized, and on the other hand, the probability of a plurality of user seat selection conflicts is reduced.
In one possible implementation, before the determining the target available seat unit from the plurality of available seat units according to the seat use request, the method further includes:
Traversing a plurality of said available seat units;
if the available seat number of any one of the available seat units is greater than or equal to the required seat number, adding any one of the available seat units to a first set of available seat units;
If the available seat number of any one of the available seat units is less than the demand seat number, then adding any one of the available seat units to a second set of available seat units.
It can be understood that the plurality of available seat units are divided into two available seat unit sets, so that the data processing speed can be improved, the user time is saved, and the user experience is improved.
In one possible implementation, before the receiving the seat use request input by the current user, the method further includes:
available seat information in the plurality of available seat units is synchronized to the cache.
It will be appreciated that synchronizing the available seat information in each available seat unit to the cache, and querying the available seat information in each available seat unit from the cache, may increase the data processing speed.
In a second aspect, an embodiment of the present application provides an electronic device, including:
A processor;
A memory;
And a computer program, wherein the computer program is stored in the memory, the computer program comprising instructions that, when executed by the processor, cause the electronic device to perform the method of any of the first aspects.
In a third aspect, an embodiment of the present application provides a computer readable storage medium, where the computer readable storage medium includes a stored program, where when the program runs, the program controls a device in which the computer readable storage medium is located to execute the method of any one of the first aspects.
By adopting the scheme provided by the embodiment of the application, the available seat units with the least number of the recommended pages currently displayed are recommended to the user, so that the seat selection conflict is avoided to the greatest extent under the condition that multiple users simultaneously request to use the seats, the convenience of seat selection of the user is improved, and the user experience is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1A is a schematic illustration of a first page portion of an online ticketing interface provided by the related art;
FIG. 1B is a schematic view of a first lower page portion of an online ticketing interface provided by the related art;
FIG. 1C is a schematic illustration of a second page portion of an online ticketing interface provided by the related art;
FIG. 2 is a schematic flow chart of a seat recommendation method according to an embodiment of the present application;
FIG. 3 is a schematic flow chart of another seat recommendation method according to an embodiment of the present application;
Fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For a better understanding of the technical solution of the present application, the following detailed description of the embodiments of the present application refers to the accompanying drawings.
It should be understood that the described embodiments are merely some, but not all, embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The terminology used in the embodiments of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be understood that the term "and/or" as used herein is merely one way of describing an association of associated objects, meaning that there may be three relationships, e.g., a and/or b, which may represent: the first and second cases exist separately, and the first and second cases exist separately. In addition, the character "/" herein generally indicates that the front and rear associated objects are an "or" relationship.
In public transportation, railways are one of the most important main passages for passenger and cargo transportation, and the position and the function in comprehensive transportation are important. With the opening of the internet ticket purchasing channel and the online of the online seat selecting program, more and more users purchase tickets online. Particularly, the on-line seat selecting function is greatly convenient for users to select seats to purchase tickets, and the users are well received once the users push out the seats. But this functionality, while providing convenience to the user, also exposes some drawbacks.
The passenger seat rate of the train is always high, and particularly when tickets are sold on holidays or other trip hot tides, a large number of ticket purchasing requests can be generated in a short time, in the related technology, the same carriage can be recommended to a plurality of users, and at the moment, the probability that the same seat in the same carriage is selected by a plurality of people is high, namely, the situation of seat selecting conflict occurs.
Referring to fig. 1A, a schematic diagram of a first page upper portion of an online ticketing interface is provided for a related art. As shown in fig. 1A, after the user inputs a ticket purchasing request, the first page displayed is a recommendation page 1001, in which seat information of one car can be displayed, and in fig. 1A, seat information of the No. 1 car 101, it should be noted that the seat information displayed in the recommendation page 1001 is not necessarily the seat information of the No. 1 car 101. The seat information includes the number of rows of each seat (i.e., "1", "2", "3", "4", "5", "6" in fig. 1A), the number of columns of each seat (i.e., "a", "B", "C", "D", "F" in fig. 1A), and the current status of each seat (i.e., the seat corresponding to 2D in fig. 1A is empty and the seat corresponding to 1011,6F is sold seat 1012). It will be appreciated that seats that are not marked are empty seats, similar to empty seat 1011; similar to the sold seat 1012, the seats with the sold indicia thereon are all sold seats. After the user opens the interface, the user can select the corresponding seat according to the requirement, and by way of example, the user 1 needs a seat close to the window, and then the user 1 can select 1A or 2A or other seats in the A column and seats in the F column; user 2 needs two co-ordinates, then user 2 may select 1A and 1B or any two co-ordinates of other rows.
Referring to fig. 1B, a schematic diagram of a first lower page portion of an online ticket purchasing interface is provided for the related art. As shown in fig. 1B, after the user selects the seat, the user can click on the submitted order 102 shown in fig. 1B to pay and complete the purchase, and of course, the user can select the next page 103 without accepting the recommendation page 1001 of the purchase program, jump to the second page 1002 shown in fig. 1C, and view and select seats in other carriages. Fig. 1C is a schematic diagram of a second page upper portion of an online ticket purchasing interface according to the related art. Seat information for carriage number 2 104 is shown in fig. 1C, and similarly to empty seat 1011, seats on which no marks are made are empty seats; similar to the sold seat 1012, the seats with the sold indicia thereon are all sold seats. Of course, fig. 1A, 1B and 1C are only exemplary descriptions and should not be taken as limiting the scope of the application. In addition, it should be noted that fig. 1A and fig. 1B are the same page.
As shown in fig. 1A, when recommending seats to each user in the related art, the users are recommended to the seats according to the sequence of the serial numbers of the seats, for example, the user is recommended to the user according to the sequence from small to large of the serial numbers of the seats, at this time, the number 1 of the seats is recommended to the user first, and when the number of the users is large, a plurality of users view the number 1 of the seats 101 at the same time, so that the situation that the plurality of users select the same seat, namely, the seat selecting conflict, easily occurs. When the seat selecting conflict occurs, the user generally reselects the seat, and at the moment, new seat selecting conflict occurs, and the operation is repeated for a plurality of times, so that bad ticket purchasing experience is brought to the user, and meanwhile, the flow pressure is increased for the ticket purchasing program.
In order to solve the problems, the embodiment of the application provides a seat recommending method, which is used for recommending available seat units with the least number of recommended pages currently displayed to a user, so that seat selecting conflict is avoided to the greatest extent under the condition of multi-user ticket purchasing, convenience of ticket purchasing of the user is improved, and user experience is improved. The following detailed description refers to the accompanying drawings.
Referring to fig. 2, a flow chart of a seat recommendation method according to an embodiment of the present application is shown. As shown in fig. 2, it mainly includes the following steps.
Step S201: a seat use request is received that is currently entered by a user.
In one possible implementation, the method is applicable to a ticketing system in which the seat use request is a ticketing request. Specifically, after a user opens a ticket purchasing program, passenger information is added first, then a ticket purchasing request is input, and after the ticket purchasing program receives the ticket purchasing request input by the current user, the subsequent steps are executed.
In one possible implementation, the method may be applied to a physician registration system in which the seat use request is a registration request. Specifically, after a user opens a registration program, registration person information is added first, then a registration request is input, and after the registration program receives the registration request input by the current user, the subsequent steps are executed. It should be noted that the method is also applicable to other systems, such as cinema ticketing systems or hotel table booking systems. For convenience of explanation, the method will be described hereinafter by taking a ticket purchasing system as an example.
In the application, a queuing system is adopted, the seat use requests of multiple users are queued according to the time sequence input by each user, and the seat use requests of each user are sequentially processed according to the queuing sequence. In addition, in order to improve the data processing speed, the embodiment of the application synchronizes the available seat in each available seat unit and the available seat information into the distributed cache, and inquires the available seat information in each available seat unit from the distributed cache, thereby improving the data processing speed. The application adopts a multi-level seat information storage mode of the distributed cache and the distributed database, thereby ensuring the real-time performance of seat information and improving the seat inquiry performance of the whole algorithm through the cache. However, in practical application, when unexpected situations such as network disconnection occur in the data transmission process, the data in the database and the data in the distributed cache may be inconsistent, and in order to solve the problem, the application further comprises a data compensation program, wherein the consistency of the data is checked regularly through the data monitoring program, and when the data is inconsistent, the data compensation program is started, so that the latest data in the database is synchronized to the distributed cache, and the accuracy of seat information display is ensured.
In addition, since ticketing systems are multi-channel ticketing, for example: in order to avoid the situation that two ticketing channels sell the same ticket, namely repeated ticketing, if the available seats in available seat units displayed in a plurality of ticketing channels are the same, the application ensures that the seat can only sell through a single channel when a ticketing channel processes a ticketing request (seat use request), and the seat is sold in other ticketing channels, thereby avoiding repeated ticketing. Illustratively, user 1 selects the 1A seat of carriage 1 through handset APP, but has not yet submitted the order, at which point the status of carriage 1A seat of carriage 1 as seen by user 2 through TVM is sold. And multi-channel ticketing can lead to high concurrent ticketing scenes, so that seat dynamic calculation amount is large, and high-performance data read-write mechanisms and hardware equipment support are needed, for example, multi-channel seat dynamic calculation technology is needed.
Step S202: a target available seat unit is determined from a plurality of available seat units based on the seat use request.
Specifically, according to a seat use request input by a user, a plurality of available seat units are ordered from small to large according to the number of recommended pages currently displayed, and the available seat unit with the minimum number of recommended pages currently displayed is determined as a target available seat unit. The available seat units with the least recommended page quantity displayed at present are selected as target available seat units, so that the fact that the same available seat unit is recommended to multiple users is avoided, and the fact that multiple users select the same seat in the same available seat unit is avoided.
In ticketing systems, the available seats are referred to as empty seats. That is, the available seat units in the present application are empty-seated cars, and in one possible implementation, before determining the target available seat unit, it is determined whether the available seat in each available seat unit is greater than 0, and the target available seat unit is determined from among a plurality of available seat units having available seats greater than 0.
The recommended page is the first page recommended to the user for showing by the ticket buying program. It can be appreciated that the recommendation page is the recommendation page 1001 shown in fig. 1A and 1B. When multiple users purchase tickets simultaneously, one target available seat unit may be displayed to multiple users at the same time as a recommended page, for example, the number 1 carriage is displayed to 5 users, the number 2 carriage is displayed to 8 users, and the number 3 carriage is displayed to 10 users. In one possible implementation, the number of recommended pages currently displayed is represented by the number of recommended pages, where when an available seat unit is not recommended to the user, the number of recommended pages of the available seat unit is 0, and when the available seat unit is currently displayed to the user as a recommended page, the number of recommended pages of the available seat unit is increased by 1, for example, in the above example, after the number 1 car is recommended to the user a, the number of recommended pages of the number 1 car is increased by 1, and the number of recommended pages of the number 1 car is 6. When the user purchases the ticket successfully, looks at the next page or exits the recommended page, the recommended number of the available seat unit is reduced by 1, for example, in the above example, the number 3 carriage is displayed to 10 users, wherein when the user B purchases the ticket successfully leaves the page, the recommended number of the number 3 carriage is reduced by 1, the recommended number of the number 3 carriage becomes 9, similarly, if the user C does not select the seat of the number 2 carriage in the recommended page, the recommended number of the number 2 carriage is reduced by 1, the recommended number of the number 2 carriage becomes 7, and similarly, the user D does not select the seat of the number 2 carriage in the recommended page, exits the ticket purchasing system, the recommended number of the number 2 carriage is reduced by 1, and the recommended number of the number 2 carriage becomes 6. Of course, those skilled in the art may set the calculation manner of the recommended number of times to other manners according to actual needs, which is not limited by the embodiment of the present application. By the scheme in the embodiment of the application, the recommendation of the same available seat unit for a plurality of users can be avoided, and meanwhile, the special large calculation amount is not needed, namely, the seat selection conflict is avoided while the cost is saved.
In addition, in one possible implementation manner, when the ticket purchasing program displays the recommended pages for the user, the recommended pages of the ticket purchasing program are arranged in the order from small to large according to the recommended times of each carriage, that is, the recommended pages of the ticket purchasing program display the carriage with the least recommended times for the user; when the user clicks the next page, jumping to a second page, wherein the second page is a carriage with the second recommended number row for the user; and so on, the user clicks the next page again and jumps to the third page, and the third page shows the third carriage of the recommended number row for the user. The number of the empty seats in the three carriages can meet the requirements of users (namely, the number of the empty seats in each carriage is equal to or greater than the number of seats needed by the users), the number of the empty seats in each carriage is arranged in sequence from small to large, the first carriage is number 1, the second carriage is number 4, and the third carriage is number 2, at this time, the ticket purchasing program is a page corresponding to the number 1 carriage for the user to display, if the user does not accept the recommended number 1 carriage and clicks the next page, the second page is jumped to, and the second page is a page corresponding to the number 4 carriage for the user to display. It can be understood that if the user continues to click on the next page, the user jumps to the third page, and the third page is the page corresponding to the carriage No. 2 displayed by the user. Through sequencing the carriages according to the recommended times and displaying the carriages to the users in sequence, the situation that a plurality of users view the same carriage at the same time can be avoided to a large extent, and then the plurality of users can be prevented from selecting the same seat at the same time, namely, seat selection conflicts are avoided.
In practical application, the seat use request input by each user also comprises the preset number of seats (namely the required seats) required by the current user, if the available seats in the available seat units cannot meet the requirements of the user, the recommendation of the available seat units is not meaningful for the user, and instead, the time of the user is wasted; if the available seats in the available seat units are smaller than the required seats, outputting prompt information to prompt that the available seats are insufficient, wherein in a possible implementation mode, the prompt information can be' insufficient seats, and whether to change other vehicle numbers is determined according to the requirement.
In order to improve the working efficiency of the ticket purchasing program, in the embodiment of the application, according to the seat use request, a target available seat unit is determined in a first available seat unit set, and the available seat number of any one of the first available seat unit set is greater than or equal to the required seat number. In one possible implementation, prior to determining the target available seat units, traversing a plurality of available seat units, adding any of the available seat units to the first set of available seat units if the available seat number of any of the available seat units is equal to or greater than the demand seat number. It can be understood that when one available seat unit can meet the demands of users, the users can directly select the seats needed by the users in the current recommended pages, the situation that the users switch pages due to insufficient available seats is avoided, the time of the users is saved, and the experience of the users is improved. In one possible implementation, when the number of available seat units in the first set of available seat units is 0, a target available seat unit is determined in a second set of available seat units, any one of the available seat units in the second set of available seat units having an available seat number less than the demand seat number. In one possible implementation, prior to determining the target available seat units, traversing a plurality of available seat units, and adding any of the available seat units to the second set of available seat units if the available seat number of any of the available seat units is less than the demand seat number. It will be appreciated that when a user needs more seats, one available seat unit cannot meet the user's needs, but the available seats in the plurality of available seat units can be added up to meet the user's needs, at this time, the target available seat unit is determined in the plurality of available seat units, so that on the one hand, the available seats in each available seat unit can be fully utilized, and on the other hand, the probability of a plurality of user seat selection conflicts is reduced. The other parts "first set of available seat units" are also referred to herein as "recommendation list 1" and "second set of available seat units" are also referred to herein as "recommendation list 2".
Step S203: and outputting a recommended page corresponding to the target available seat unit.
Specifically, the recommended page corresponding to the target available seat unit determined in step S202 is output. For example, when the carriage No.1 is a target available seat unit, outputting a recommendation page corresponding to the carriage No. 1; similarly, when the carriage No.2 is the target available seat unit, a recommended page corresponding to the carriage No.2 is output.
In one possible implementation, there are multiple target available seat units, at which time the multiple target available seat units are ordered by available seat number and the target available seat unit with the least available seat number is output. The available seats of the carriage 1 and the carriage 2 are target available seat units, but the available seats of the carriage 1 are 10, the available seats of the carriage 2 are 8, and obviously, the available seats of the carriage 2 are smaller than the available seats of the carriage 1, namely, the carriage 2 is arranged in front of the carriage 1, and a recommended page corresponding to the carriage 2 is output at the moment. Similarly, if the available seat numbers of the plurality of target available seat units are the same, the target available seat units are ordered according to the sequence numbers, and the target available seat unit with the smallest sequence number is output. The number 1 carriage and the number 2 carriage are target available seat units, the available seats of the number 1 carriage and the number 2 carriage are 8, the serial numbers of the number 1 carriage and the number 2 carriage are 1, the number 1 carriage is taken as the target available seat unit, and the recommended page corresponding to the number 1 carriage is output.
According to the scheme, the seat display recommendation algorithm based on the dynamic matching strategy is used for calculating seat dynamic change data of each ticketing channel in real time by outputting the available seat units with the minimum number of the currently displayed recommended pages, so that carriages with minimum user requirements and recommended times are recommended for different users, the probability of seat selection conflict when the users subscribe seats is reduced to the greatest extent, convenience of ticket purchasing of the users is improved, and user experience is improved.
For easy understanding, the seat recommendation method provided by the embodiment of the application is described in detail below in connection with a specific implementation manner.
Referring to fig. 3, a flow chart of another seat recommendation method according to an embodiment of the present application is shown. As shown in fig. 3, it mainly includes the following steps.
Step S301: starting;
Step S302: synchronizing available seats and seat information for a plurality of cars to a cache;
in the embodiment of the application, the seat unit can be a carriage.
Step S303: setting recommended times for each carriage, defaulting to 0 (representing not recommended);
In the embodiment of the application, the default recommended number of times of each carriage is set to 0, which indicates that the carriage is not recommended for display.
Step S304: receiving a seat use request (comprising a demand seat) input by a current user;
step S305: the background queries the total available seat number from the cache in real time;
Step S306: judging whether the total available seat number is not less than the required seat number? If yes, go to step S308, otherwise go to step S307;
Step S307: prompting that the seat is insufficient, and determining whether to change other train numbers according to the requirement;
step S308: inquiring available seats, recommended times, seat information and the like of the carriage No. 1 from the cache;
step S309: judging that the available seat number of the carriage is greater than or equal to the required seat number? If yes, executing step S310, otherwise executing step S311;
step S310: adding carriage No.1 to the recommendation list 1;
Step S311: judging that the available seat number of the carriage is greater than 0? If yes, go to step S312, otherwise go to step S313;
step S312: adding carriage No.1 to the recommendation list 2;
Step S313: determine if the current car is the last car? If yes, go to step S315, otherwise go to step S314;
step S314: inquiring available seats, recommended times and seat information of the next carriage from the cache;
Step S315: determine if recommendation list 1 is empty? If yes, go to step S317, otherwise go to step S316;
step S316: sequencing the recommendation list 1 from small to large according to the recommendation times, and sequencing from small to large according to the available seats;
In the embodiment of the application, a recommendation list 1 is used for representing a first available seat unit set, the carriages in the recommendation list 1 are firstly ordered from small to large according to the recommendation times, if the recommendation times of a plurality of carriages are minimum, the carriages are ordered from small to large according to the available seats, and the carriage with the minimum recommendation times and the minimum available seats is determined as the target carriage.
Step S317: determine if recommendation list 2 is empty? If yes, go to step S323, otherwise go to step S318;
step S318: sequencing the recommendation list 2 from small to large according to the recommendation times, and sequencing from large to small according to the available seat books;
In the embodiment of the application, the second available seat unit set is represented by a recommendation list 2, the carriages in the recommendation list 2 are firstly ordered from small to large according to the recommendation times, if the recommendation times of a plurality of carriages are minimum, the plurality of carriages are ordered from large to small according to the available seats, and the carriage with the minimum recommendation times and the maximum available seats is determined as the target carriage.
Step S319: in the cache, adding 1 to the recommended times of the target carriage;
Step S320: seat information of the target carriage (meeting the user requirement and having the least recommended times) is displayed;
step S321: receiving a selection operation of a user;
Specifically, step S322 is performed corresponding to the user accepting the proposal or not accepting the recommended proposal (autonomously selecting seat or directly exiting).
Step S322: in the cache, subtracting 1 from the recommended number of times of the target carriage;
Step S323: and (5) ending.
The details of the embodiments of the present application may be referred to the description of the embodiment shown in fig. 2, and for brevity, the description is omitted.
Corresponding to the embodiment, the application also provides electronic equipment.
Referring to fig. 4, a schematic structural diagram of an electronic device according to an embodiment of the present application is provided. As shown in fig. 4, the electronic device 400 may include: a processor 401, a memory 402 and a communication unit 403. The components may communicate via one or more buses, and it will be appreciated by those skilled in the art that the configuration of the electronic device shown in the drawings is not limiting of the embodiments of the application, as it may be a bus-like structure, a star-like structure, or include more or fewer components than shown, or may be a combination of certain components or a different arrangement of components.
Wherein, the communication unit 403 is configured to establish a communication channel, so that the electronic device may communicate with other devices. Receiving user data sent by other devices or sending user data to other devices.
The processor 401 serves as a control center for the electronic device, connects various parts of the entire electronic device using various interfaces and lines, and executes various functions and/or processes data stored in the memory 402 by running or executing software programs, instructions and/or modules, and invoking data stored in the memory. The processor may be comprised of integrated circuits (INTEGRATED CIRCUIT, ICs), such as a single packaged IC, or may be comprised of packaged ICs that connect multiple identical or different functions. For example, the processor 401 may include only a central processing unit (central processing unit, CPU). In the embodiment of the application, the CPU can be a single operation core or can comprise multiple operation cores.
The memory 402, for storing instructions for execution by the processor 401, the memory 402 may be implemented by any type of volatile or nonvolatile memory device or combination thereof, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.
The execution of the instructions in memory 402, when executed by processor 401, enables electronic device 400 to perform some or all of the steps of the embodiment shown in fig. 1.
In a specific implementation, an embodiment of the present application further provides a computer storage medium, where the computer storage medium may store a program, where the program may include some or all of the steps in each embodiment of the method for generating a simulation scene provided by the embodiment of the present application when executed. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), a random-access memory (random access memory, RAM), or the like.
In the embodiments of the present application, "at least one" means one or more, and "a plurality" means two or more. "and/or", describes an association relation of association objects, and indicates that there may be three kinds of relations, for example, a and/or B, and may indicate that a alone exists, a and B together, and B alone exists. Wherein A, B may be singular or plural. The character "/" generally indicates that the context-dependent object is an "or" relationship. "at least one of the following" and the like means any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c may represent: a, b, c, a-b, a-c, b-c, or a-b-c, wherein a, b, c may be single or plural.
Those of ordinary skill in the art will appreciate that the various elements and algorithm steps described in the embodiments disclosed herein can be implemented as a combination of electronic hardware, computer software, and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, and are not repeated herein.
In several embodiments provided by the present application, any of the functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a read-only memory (ROM), a random access memory (random access memory RAM), a magnetic disk, or an optical disk, etc., which can store program codes.
The same or similar parts between the various embodiments in this specification are referred to each other. In particular, for the device embodiment and the terminal embodiment, since they are substantially similar to the method embodiment, the description is relatively simple, and reference should be made to the description in the method embodiment for relevant points.

Claims (10)

1.A seat recommendation method, comprising:
receiving a seat use request input by a current user;
Determining a target available seat unit in a plurality of available seat units according to the seat use request, wherein the target available seat unit is an available seat unit with the least recommended page number currently displayed in the plurality of available seat units, and each available seat unit comprises at least one available seat;
and outputting a recommended page corresponding to the target available seat unit.
2. The method of claim 1, wherein the outputting the recommended page corresponding to the target available seat unit comprises:
and if a plurality of target available seat units exist, outputting a recommended page corresponding to the target available seat unit with the minimum available seat.
3. The method of claim 1, wherein the step of determining the position of the substrate comprises,
The seat use request comprises a demand seat, wherein the demand seat is the number of seats which are required to be reserved by the current user;
The determining a target available seat unit from a plurality of available seat units according to the seat use request comprises: and if the available seat number in the available seat units is greater than or equal to the required seat number, determining a target available seat unit in the available seat units according to the seat use request.
4. A method according to claim 3, characterized in that the method further comprises:
if the available seats in the available seat units are smaller than the required seats, outputting prompt information, wherein the prompt information is used for prompting that the available seats are insufficient.
5. A method according to claim 3, wherein said determining a target available seat unit from a plurality of available seat units based on said seat use request comprises:
determining target available seat units in a first available seat unit set according to the seat use request, wherein the available seat number of any one of the available seat units in the first available seat unit set is larger than or equal to the required seat number.
6. The method as recited in claim 5, further comprising:
if the number of available seat units in the first set of available seat units is 0, determining a target available seat unit in a second set of available seat units, wherein the available seat number of any one of the available seat units in the second set of available seat units is smaller than the demand seat number.
7. The method of claim 5, further comprising, prior to said determining a target available seat unit from a plurality of available seat units in accordance with said seat use request:
Traversing a plurality of said available seat units;
if the available seat number of any one of the available seat units is greater than or equal to the required seat number, adding any one of the available seat units to a first set of available seat units;
If the available seat number of any one of the available seat units is less than the demand seat number, then adding any one of the available seat units to a second set of available seat units.
8. The method of claim 1, further comprising, prior to said receiving the current user-entered seat use request:
available seat information in the plurality of available seat units is synchronized to the cache.
9. An electronic device, comprising:
A processor;
A memory;
and a computer program, wherein the computer program is stored in the memory, the computer program comprising instructions that, when executed by the processor, cause the electronic device to perform the method of any one of claims 1 to 8.
10. A computer readable storage medium, characterized in that the computer readable storage medium comprises a stored program, wherein the program when run controls a device in which the computer readable storage medium is located to perform the method according to any one of claims 1 to 8.
CN202410067166.9A 2024-01-17 2024-01-17 Seat recommendation method, electronic device and storage medium Pending CN118093992A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410067166.9A CN118093992A (en) 2024-01-17 2024-01-17 Seat recommendation method, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410067166.9A CN118093992A (en) 2024-01-17 2024-01-17 Seat recommendation method, electronic device and storage medium

Publications (1)

Publication Number Publication Date
CN118093992A true CN118093992A (en) 2024-05-28

Family

ID=91146826

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410067166.9A Pending CN118093992A (en) 2024-01-17 2024-01-17 Seat recommendation method, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN118093992A (en)

Similar Documents

Publication Publication Date Title
CN111311295B (en) Service mode determining method, device, electronic equipment and storage medium
MX2007013214A (en) Universal redemption vehicle.
WO2011143662A1 (en) Searching for airline travel based upon seat characteristics
CN111105251A (en) Information pushing method and device
CN106649638A (en) Big data acquisition method
CN111859172A (en) Information pushing method and device, electronic equipment and computer readable storage medium
CN112017001A (en) Network appointment vehicle type recommendation method and device, electronic equipment and storage medium
WO2021157346A1 (en) Used secondary battery reuse system
CN118093992A (en) Seat recommendation method, electronic device and storage medium
CN110147983B (en) Secondary card certificate creating method and device, and verification and cancellation method and device
CN111861623A (en) Information recommendation method, device and equipment
JP5159592B2 (en) Katsuma voting ticket selection device and its selection program
CN110998617A (en) Seat distribution system
CN109598363A (en) A kind of vehicle reservation method and apparatus
CN107798034A (en) A kind of generation method of service page and the generating means of service page
CN112686724A (en) Information recommendation method and device, electronic equipment and storage medium
CN111859105A (en) Service request processing method and device, electronic equipment and storage medium
CN112801324A (en) Travel recommendation method and device, electronic equipment and computer-readable storage medium
CN112036774A (en) Service policy evaluation method, device, equipment and storage medium
CN111524002A (en) Method and device for determining credit line of joint name card
CN110333927A (en) Interface jump method, device, server and storage medium
CN112417265B (en) Service providing server, service providing system, and service providing method
CN108776893A (en) Information-pushing method, device, electronic equipment and computer readable storage medium
CN111539744A (en) Data processing method and device, electronic equipment and storage medium
CN109345283A (en) Gift distribution method and system, terminal and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination