A seat matching method, device and medium
Patent Information
- Application Number
- CN202611076418.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-20
- Publication Date
- 2026-10-20
- Estimated Expiration
- 2046-07-20
AI Technical Summary
上述方法在接收到值机请求后,采取逐个分配的策略,即优先为单一用户锁定座位,再尝试匹配同行人员;缺乏对团体用户整体需求的考量,难以在全局范围内精准检索出最符合团体用户的整体需求的连续座位区域,极易导致座位资源碎片化,也无法有效满足团体用户的个性化出行需求,从而降低了整体的用户满意度
本申请提供了一种座位匹配方法、设备及介质,在所述方法中,对所有目标用户进行分组,并获取目标用户组列表A和每一目标用户组对应的座位偏好标签集;按照目标用户组在A中的排列顺序,依次确定每一目标用户组对应的目标座位组,其中,对于任意一个目标用户组B,将B的滑动窗口C设置在座位分布图对应的二维数组D的起始位置处,基于D中当前被C所覆盖的元素对应的座位,确定B对应的初始座位组E;若E中包含已分配座位,则控制C滑动,再次获取初始座位组,否则,将E作为B对应候选座位组,并基于该候选座位组当前对应的座位属性标签集和B对应的座位偏好标签集,获取该候选座位组对应的匹配分值;若D中当前被C所覆盖的元素中,不包括D中最后一行的末尾元素,则控制C滑动,继续获取初始座位组及候选座位组;否则,根据B对应的所有候选座位组以及候选座位组对应的匹配分值,确定B对应的目标座位组。可知,本申请先对目标用户进行分组,再通过滑动窗口进行全局扫描,获取目标用户组的候选座位组,进一步地,通过候选座位组的座位属性标签集和目标用户组的座位偏好标签集,获取候选座位组的匹配分值,基于候选座位组的匹配分值确定目标座位组;能够在全局范围内精准检索出最符合团体用户整体需求的连续座位区域,在有效避免座位资源碎片化的同时,充分满足了用户的个性化出行需求,从而显著提升了整体的用户满意度。
Smart Images

Figure CN122596300B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing, and in particular to a seat matching method, device and medium. Background Technology
[0002] With the rapid development of the air transport industry, flight seat resources are becoming increasingly scarce. Chinese patent (publication number: CN119761741A) discloses a method, device, computer program product and electronic device for flight seat allocation. The method automatically matches the target seat based on the user's check-in request and preset rules. If the user has a companion user, it further verifies whether the adjacent seat allocation rules are met. If the conditions are met, the companion user is automatically assigned an adjacent seat. Otherwise, the companion user can choose the target seat himself or the target seat is randomly assigned.
[0003] However, the above method has the following technical problems: The above method, upon receiving a check-in request, adopts a strategy of allocating seats one by one, that is, prioritizing the locking of seats for individual users and then attempting to match them with fellow travelers. It lacks consideration for the overall needs of group users, making it difficult to accurately retrieve the continuous seating area that best meets the overall needs of the group users across the entire scope. This easily leads to the fragmentation of seat resources and fails to effectively meet the personalized travel needs of group users, thereby reducing overall user satisfaction. Summary of the Invention
[0004] To address the aforementioned technical problem, the technical solution adopted in this application is as follows: According to a first aspect of this application, a seat matching method is provided, the method comprising the following steps: S1. Group all target users and obtain a list A of target user groups and a set of seat preference labels for each target user group; A includes several target user groups.
[0005] S2. According to the order of the target user groups in A, determine the target seat group corresponding to each target user group in sequence; wherein, for any target user group B, determining the target seat group corresponding to B includes: S21. Set the sliding window C of B at the starting position of the two-dimensional array D corresponding to the seating distribution map; the initial value of the window length of C is consistent with the number of target users in B, and the sliding step of C is 1; the elements in D correspond one-to-one with the seats in the seating distribution map.
[0006] S22. Based on the seats corresponding to the elements currently covered by C in D, determine the initial seat group E corresponding to B; the number of seats in E is consistent with the number of target users in B.
[0007] S23. If E contains assigned seats, control C to slide and proceed to step S22; otherwise, use E as the candidate seat group corresponding to B, and obtain the matching score corresponding to the candidate seat group based on the current seat attribute label set corresponding to the candidate seat group and the seat preference label set corresponding to B.
[0008] S24. If the elements currently covered by C in D do not include the last element of the last row in D, then control C to slide and proceed to step S22; otherwise, determine the target seat group corresponding to B based on all candidate seat groups corresponding to B and the matching scores corresponding to the candidate seat groups.
[0009] According to a second aspect of this application, a non-transitory computer-readable storage medium is provided, wherein at least one instruction or at least one program is stored in the non-transitory computer-readable storage medium, and the at least one instruction or at least one program is loaded and executed by a processor to implement the above-described seat matching method.
[0010] According to a third aspect of this application, an electronic device is provided, including a processor and the aforementioned non-transitory computer-readable storage medium.
[0011] This application has at least the following beneficial effects: This application provides a seat matching method, device, and medium. In the method, all target users are grouped, and a target user group list A and a seat preference tag set corresponding to each target user group are obtained. According to the order of the target user groups in A, the target seat groups corresponding to each target user group are determined sequentially. Specifically, for any target user group B, a sliding window C of B is set at the starting position of the two-dimensional array D corresponding to the seat distribution map. Based on the seats corresponding to the elements currently covered by C in D, an initial seat group E corresponding to B is determined. If E contains already assigned seats, C is controlled to slide, and the initial seat group is obtained again. Otherwise, E is used as a candidate seat group corresponding to B, and a matching score corresponding to the candidate seat group is obtained based on the current seat attribute tag set corresponding to the candidate seat group and the seat preference tag set corresponding to B. If the elements currently covered by C in D do not include the last element of the last row in D, C is controlled to slide, and the initial seat group and candidate seat groups are obtained again. Otherwise, the target seat group corresponding to B is determined based on all candidate seat groups corresponding to B and the matching scores corresponding to the candidate seat groups. As can be seen, this application first groups the target users, then performs a global scan through a sliding window to obtain candidate seat groups for the target user groups. Furthermore, it obtains the matching score of the candidate seat groups by using the seat attribute tag set of the candidate seat groups and the seat preference tag set of the target user groups, and determines the target seat group based on the matching score of the candidate seat groups. This approach can accurately retrieve the continuous seat areas that best meet the overall needs of group users globally, effectively avoiding the fragmentation of seat resources while fully satisfying the personalized travel needs of users, thereby significantly improving overall user satisfaction. Attached Figure Description
[0012] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0013] Figure 1 A flowchart of a seat matching method provided in an embodiment of this application. Detailed Implementation
[0014] The technical solutions in the embodiments of this application will be clearly and completely described below. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0015] It is worth noting that in the following description, specific details such as particular system structures and techniques are set forth for illustrative purposes rather than for limiting purposes, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application can also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods are omitted so as not to obscure the description of this application with unnecessary details.
[0016] It should be understood that in this application specification, the use of the terms "comprising," "including," "including but not limited to," "including but not limited to," "mainly composed of," or "mainly made up of" indicates the presence of the described feature, whole, step, operation, element, and / or component, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or collections thereof.
[0017] It should be understood that in this application specification, the use of the terms "consisting of" or "component of" indicates the presence of the described feature, whole, step, operation, element and / or component, but excludes the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or collections thereof.
[0018] It should be understood that, in this application specification, the term "and" indicates a combination in which multiple of the associated listed items exist simultaneously. For example, "A, B, C, and D" means a combination in which "A and B and C and D exist simultaneously".
[0019] It should be understood that, in this application specification, the use of the term "or" indicates a combination in which one of the associated listed items exists alone. For example, "A, B, C or D" refers to the four combinations of "A alone", "B alone", "C alone", and "D alone".
[0020] It should be understood that, in this application specification, the term "and / or" refers to any combination of one or more of the associated listed items, as well as all possible combinations, and includes such combinations. For example, "A and / or B" refers to the three combinations of "A alone," "B alone," or "A and B simultaneously." For example, "A, B, and / or C" refers to the seven combinations of "A alone," "B alone," "C alone," "A and B simultaneously," "A and C simultaneously," "B and C simultaneously," and "A, B, and C simultaneously."
[0021] It should be understood that, in this application specification, the term "if" is used, and the indication may be interpreted, depending on the context, as "in the case of," "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if [the described condition or event] is detected" may be interpreted, depending on the context, as "once determined," "in response to determination," "once [the described condition or event] is detected," or "in response to detection of [the described condition or event]."
[0022] It should be understood that in this application specification, the terms "greater than", "less than", "exceeding", etc. are understood to exclude the number itself; and the terms "above", "below", "within", etc. are understood to include the number itself.
[0023] It should be understood that in this application specification, the terms "described", "the above", "the", "said", "described", "mentioned", etc., can be understood in context as referring to the content mentioned above.
[0024] It should be understood that in this application specification, the terms "first," "second," "third," etc., are used only for distinguishing descriptions and should not be construed as indicating or implying relative importance, nor are they used to describe a specific order or sequence.
[0025] It should be understood that in this application specification, the designations such as "S100," "S200," and "S300" are used only for distinguishing descriptions and should not be construed as indicating or implying a specific order or sequence of execution of steps or processes. For example, "S100, obtain data A; S200, obtain data B; S300, obtain C based on A and B;" is merely an example of a feasible execution order, not a necessary one. Those skilled in the art can determine the actual and feasible execution order based on the function and internal logic of each step. For example, "step S100 is executed before step S200, then step S300 is executed," "step S200 is executed before step S100, then step S300 is executed," or "steps S100 and S200 are executed in parallel, then step S300 is executed."
[0026] It should be understood that in this application specification, if the numbering or quantity is in the form of “f(i); i=1, 2, ..., n;”, the specific value corresponding to the term “f(i)” should be understood as a value that changes with the value of i, and not as a fixed value. For example, in different practical scenarios, “f(1)” and “f(2)”, “f(1)” can be equal to “f(2)” or not equal to “f(2)”, and unless otherwise specified, there is no necessary size relationship between “f(1)” and “f(2)”.
[0027] It should be understood that in this application specification, if numbers or symbols are used in the form of superscript, and the context or other corresponding locations provide a specific explanation for them, they should be understood according to their corresponding explanatory description, and cannot be directly and simply understood as concepts such as "exponent" in mathematics or "atomic number" in chemistry. Similarly, if numbers or symbols are used in the form of subscript, they should also be understood in the same way, without further explanation.
[0028] It should be understood that in the description of this application, if terms such as "A=(...)" are used, unless otherwise specifically explained, they should be understood as "A includes...", and not as "A is composed of...". Furthermore, unless otherwise specifically explained, the parentheses "(" and ")" are only used in conjunction with "=" to indicate what items or data A includes, and do not refer to any specific data structure, nor do they limit the type of its elements, whether the number of elements is fixed, whether the elements are ordered, whether the elements can be repeated, what query method is required to query its elements, or what access order is required to access its elements.
[0029] It should be understood that in the description of this application, if common processing functions such as "max(...)", "min(...)", and "avg(...)" are used, and the context or other corresponding locations provide a specific explanation, that specific explanation should prevail. If no specific explanation exists, those skilled in the art should use relevant technical terms from computer science and technology for connection. For example, "max(...)" refers to a function for determining the maximum value, "min(...)" refers to a function for determining the minimum value, and "avg(...)" refers to a function for determining the average value.
[0030] Embodiments of this application provide a seat matching method, the method comprising the following steps, such as... Figure 1 As shown: S1. Group all target users and obtain a list A of target user groups and a set of seat preference labels for each target user group; A includes several target user groups.
[0031] Specifically, step S1 includes the following steps S11-S15: S11. For each initial user, obtain the user information of the initial user and their corresponding companions; the user information includes: user ID, crowd attribute tags and seat preference tags; among which, crowd attribute tags include: children, elderly, people with mobility impairments and NULL.
[0032] Specifically, initial users can be understood as users who have seat matching needs and are responsible for entering their own information and that of their corresponding companions on the interactive interface.
[0033] Specifically, seat preference tags are labels used to characterize a user's seat selection preferences, such as: window seat, no window seat, aisle seat, no aisle seat, front row, middle row, back row, etc.
[0034] Specifically, the seat preference label can be NULL.
[0035] S12. Take the initial user and the person traveling with the initial user as the target user, and divide all target users into several target user groups based on the user ID of the target user; wherein, each target user group includes at least one target user; and all target users in the same target user group are each other's travel companions.
[0036] Specifically, in step S12, for each initial user, the combination of the initial user's user ID and the user IDs of the person traveling with that initial user is taken as a user ID combination; all user ID combinations are traversed, and if any two user ID combinations contain the same user ID, these two user ID combinations are deduplicated and merged to obtain a new user ID combination; the traversal and merging operation is repeated until no two user ID combinations contain the same user ID; at this point, all target users corresponding to user IDs within the same user ID combination are grouped into target users in the same target user group; this can be understood as: user ID combinations correspond one-to-one with target user groups, and user IDs in a user ID combination correspond one-to-one with target users in the target user group corresponding to that user ID combination.
[0037] The above steps involve deduplicating and merging user ID combinations with the same user ID to generate new user ID combinations until no two user ID combinations contain the same user ID. Then, all target users corresponding to user IDs within the same user ID combination are grouped into the same target user group. This process can accurately identify and automatically aggregate complex peer relationships with cross-correlation, effectively solving the data fragmentation problem caused by multiple users repeatedly or separately entering information. This ensures that target users who are peers are accurately grouped into the same target user group.
[0038] S13. For each target user group, deduplicate the seat preference labels of all target users within the target user group to obtain the seat preference label set corresponding to that target user group.
[0039] S14. When the set of demographic attribute tags corresponding to the target user group is not NULL, the target user group is marked as a first-level user group; when the set of demographic attribute tags corresponding to the target user group is NULL, and there are target users with reserved seats in the target user group, the target user group is marked as a second-level user group; otherwise, the target user group is marked as a third-level user group. The set of demographic attribute tags corresponding to the target user group is obtained by deduplicating the demographic attribute tags of all target users in the target user group.
[0040] Specifically, the application programming interface (API) is called to obtain the reserved seat information, and the seat number is parsed from it to determine the reserved seat.
[0041] S15. Sort all target user groups according to the multi-level sorting rules to obtain A. The multi-level sorting rules are as follows: prioritize the first-level user group, second-level user group, and third-level user group. For several target user groups that are all first-level user groups, all second-level user groups, or all third-level user groups, sort them according to the input time of the user information corresponding to the target user group from earliest to latest.
[0042] Specifically, if there are multiple input times for user information corresponding to a target user group, the earliest input time among the multiple input times is selected as the sorting criterion for the target user group.
[0043] Through the above steps, target users who are traveling together are grouped into the same target user group based on their user IDs, and the corresponding seat preference tag set for the target user group is obtained. When there are children, the elderly, or people with mobility impairments among the target users in the target user group, the target user group is marked as a Level 1 user group. If there are no children, the elderly, or people with mobility impairments among the target users in the target user group, but there are target users with reserved seats, the target user group is marked as a Level 2 user group. Otherwise, the target user group is marked as a Level 3 user group. Furthermore, all target user groups are sorted according to a multi-level sorting rule to obtain a target user group list A. This ensures that when determining the target seat group corresponding to each target user group according to the order of the target user groups in A, the travel rights of special passengers can be prioritized, achieving a balance between fairness and humanization in seat matching.
[0044] S2. According to the order of the target user groups in A, determine the target seat group corresponding to each target user group in turn.
[0045] Specifically, after the airline opens the seat selection service, step S2 is executed.
[0046] Specifically, the procedure after step S1 and before step S2 includes: S11. Traverse all target user groups marked as secondary user groups in A, and remove users from each target user group marked as secondary user groups in A according to their order in A.
[0047] Specifically, user removal processing includes: S10. For a target user in target user group F that is marked as the second user group and has a reserved seat, determine the current allocation status of the reserved seat corresponding to the target user.
[0048] S20. If the current allocation status is unallocated, remove the target user from F and mark the target user as the associated user corresponding to F. At the same time, determine the reserved seat of the target user as the target seat corresponding to the target user and update the current allocation status of the target seat to allocated.
[0049] Through the above steps, for target users with reserved seats within the target user group marked as the second user group, the reserved seats corresponding to these target users are preferentially allocated as target seats, and the current allocation status of these target seats is updated to "allocated" in a timely manner. At this point, the target user's seat requirement has been met, so it is necessary to remove them from the target user group and establish their association with the target user group. This fundamentally ensures the absolute realization of the reserved rights, effectively avoids resource conflicts in subsequent seat matching, and improves the overall efficiency of seat matching.
[0050] Specifically, step S112 also includes: if the current allocation status is already allocated, then the target user is not removed from F.
[0051] Specifically, for any target user group B, determine the target seating group corresponding to B, including: S21. Set the sliding window C of B at the starting position of the two-dimensional array D corresponding to the seating distribution map; the initial value of the window length of C is consistent with the number of target users in B, and the sliding step of C is 1; the elements in D correspond one-to-one with the seats in the seating distribution map.
[0052] Specifically, the seat distribution diagram is a cabin seating layout diagram of the flight taken by the target user.
[0053] Specifically, before step S1, the following steps are also included: The seating distribution map is digitally modeled to obtain D; in the modeling process, non-seat areas such as aisles in the cabin are mapped as virtual seats to construct a complete two-dimensional array structure with rows and columns.
[0054] The above steps involve digitally modeling the seat distribution map to obtain a two-dimensional array corresponding to the seat distribution map; mapping non-seat areas such as cabin aisles to virtual seats, thus constructing a complete two-dimensional array structure that strictly corresponds to the physical space; it can flexibly adapt to various complex cabin layouts and the distribution of non-seat areas such as aisles, ensuring the universality and adaptability of the method in different flight scenarios.
[0055] Specifically, the starting position of D is the position corresponding to the element in the first row and first column of D.
[0056] Specifically, each element in D is associated with a corresponding seat attribute label, which includes, but is not limited to: seat number, current allocation status, window seat type label, aisle seat type label, virtual seat type label, and location distribution label.
[0057] Specifically, the window-side type label is either window-side or not window-side.
[0058] Specifically, the aisle type label is either "alleyway" or "not aisle".
[0059] Specifically, the virtual seat type label is either virtual seat or non-virtual seat.
[0060] Specifically, the location distribution labels are front row, middle row, or back row.
[0061] Furthermore, the current allocation status of the seat attribute label associated with each element in D is initially set to unallocated; when the seat corresponding to an element in D is determined to be a seat in the target seat group, the current allocation status of the seat attribute label associated with that element is updated to allocated.
[0062] Specifically, when it is detected that the seat corresponding to an element in D has been selected by an external channel, the current allocation status of that seat is synchronously updated to "allocated"; the external channels include, but are not limited to, manual seat selection operations and third-party system interfaces; to avoid conflicts during seat matching.
[0063] S22. Based on the seats corresponding to the elements currently covered by C in D, determine the initial seat group E corresponding to B; the number of seats in E is consistent with the number of target users in B.
[0064] Specifically, step S22 includes the following steps: S221. Based on the seat attribute label associated with the element currently covered by C in D, determine whether there is a virtual seat among the seats corresponding to the element currently covered by C in D.
[0065] Specifically, if every virtual seat label in every seat attribute label associated with every element currently covered by C in D is a non-virtual seat, then it is determined that there is no virtual seat in the seats corresponding to the element currently covered by C in D; otherwise, it is determined that there is a virtual seat in the seats corresponding to the element currently covered by C in D.
[0066] S222. If no virtual seats exist, then the group of seats corresponding to the elements currently covered by C in D is taken as E; if virtual seats exist, then let CL = CL + X to update C; CL is the window length of C; X is the number of virtual seats in the group of seats corresponding to the elements currently covered by C in D.
[0067] Specifically, X is obtained by counting the number of virtual seat labels that are virtual seats among all the seat attribute labels associated with all elements currently covered by C in D.
[0068] S223. Take the seats corresponding to the elements currently covered by C in D as the extended seat group.
[0069] S224. Delete the virtual seats in the extended seating group to obtain E, and set CL=BL to update C; BL is the number of target users in B.
[0070] Specifically, in step S224, while obtaining E, a deletion identifier corresponding to E is generated, which indicates that the virtual seat has been deleted.
[0071] Through the above steps, a window adaptive adjustment mechanism is introduced. When there are virtual seats in the seats corresponding to the elements covered by the sliding window, it indicates that there are physical barriers in the current continuous seating area, such as aisles, which cannot directly meet the continuous seating needs of the target user group. Therefore, the window length needs to be expanded according to the number of virtual seats, and the virtual seats in the seats corresponding to the elements covered by the expanded window are deleted to obtain an initial seating group that meets the continuous seating needs of the target user group. After obtaining the initial seating group, the window length is immediately restored to the initial length to avoid logical deviations in subsequent scanning and ensure a strict match between the number of actually available seats in the initial seating group and the number of target users in the target user group.
[0072] S23. If E contains assigned seats, control C to slide and proceed to step S22; otherwise, use E as the candidate seat group corresponding to B, and obtain the matching score corresponding to the candidate seat group based on the current seat attribute label set corresponding to the candidate seat group and the seat preference label set corresponding to B.
[0073] Specifically, the set of seat attribute labels corresponding to the current candidate seat group is obtained by deduplicating all the current seat attribute labels of all seats in the candidate seat group.
[0074] Specifically, the higher the matching score, the better the match between the candidate seating group and the target users in the target user group.
[0075] Specifically, "assigned seats" refers to seats whose current assignment status is "assigned".
[0076] Optionally, based on the current seat attribute label set corresponding to the candidate seat group and the seat preference label set corresponding to B, the matching score corresponding to the candidate seat group is obtained, including the following steps: S231. For each seat preference label in the seat preference label set corresponding to B, if there is a seat attribute label with the same name as the seat preference label in the current seat attribute label set corresponding to the candidate seat group, then the seat preference label is marked as a successful match.
[0077] In one specific embodiment, a precise character matching strategy is used to determine whether the seat preference label and the seat attribute label are the same: the seat preference label and the seat attribute label are compared character by character, and when the character sequences of the two are completely consistent, it is determined that the seat preference label and the seat attribute label are the same.
[0078] In another specific embodiment, a semantic similarity matching strategy is used to determine whether the seat preference label and the seat attribute label are the same: the feature vectors corresponding to the seat preference label and the seat attribute label are obtained respectively, and the vector similarity between the two is calculated; when the similarity is greater than a preset similarity threshold, it is determined that the seat preference label and the seat attribute label are the same; wherein, those skilled in the art know that any method of obtaining the feature vector of the label in the prior art is within the protection scope of the present invention, for example: obtaining the feature vector of the label through one-hot encoding, which will not be described in detail here.
[0079] Specifically, the value of vector similarity ranges from 0 to 1. The closer it is to 1, the more similar the feature vectors are.
[0080] Specifically, the preset similarity threshold ranges from 0.85 to 0.95, and preferably, the preset similarity threshold is 0.9.
[0081] S232. Obtain the number of seat preference tags marked as successfully matched in the seat preference tag set corresponding to B, and multiply the number by the preset single-item matching score as the matching score corresponding to the candidate seat group; the preset single-item matching score is a score set in advance by those skilled in the art according to actual needs, such as 1, 10, which will not be elaborated here.
[0082] Through the above steps, the seat preference tags in the seat preference tag set are compared with the attribute tags in the seat attribute tag set to determine the number of seat preference tags marked as successfully matched. The product of this number and the preset single-item matching score is used as the matching score corresponding to the candidate seat group. The degree of demand satisfaction is quantified into a matching score. The higher the matching score, the higher the degree of matching between the candidate seat group and the target user in the target user group, which provides a basis for subsequent screening of the target seat group from the candidate seat group.
[0083] Specifically, the following steps are included after step S232: S233. If the number of seats in the candidate seat group is greater than 1, and there is a deletion flag corresponding to the candidate seat group, then the matching score corresponding to the candidate seat group is reduced by a first preset influence score, so as to update the matching score corresponding to the candidate seat group; wherein, the first preset influence score is a score that is preset by those skilled in the art according to actual needs and is less than the preset single-item matching score. For example, when the preset single-item matching score is 1, the first preset influence score is 0.5; when the preset single-item matching score is 10, the first preset influence score is 5; it will not be elaborated here.
[0084] In the above steps, if the number of seats in a candidate seat group is greater than 1 and there is a deletion flag corresponding to that candidate seat group, it means that the continuous seat area corresponding to that candidate seat group crosses aisle or other non-seat areas and is not a physically strictly continuous area. Therefore, it is necessary to deduct points from the matching score to ensure that such areas can be avoided first when selecting target seat groups, thus achieving a refined allocation of "selecting the best from the best". At the same time, the availability of such areas is preserved when resources are scarce, effectively balancing user experience and seat resource allocation success rate.
[0085] S234. When B has a corresponding associated user, if the element in D corresponding to the seat in the candidate seat group is in the same row as the element in D corresponding to the target seat of the associated user, then the matching score corresponding to the candidate seat group is increased by a second preset influence score to update the matching score corresponding to the candidate seat group. The second preset influence score is a score that is preset by those skilled in the art according to actual needs and is less than the preset single-item matching score. For example, when the preset single-item matching score is 1, the second preset influence score is 0.5; when the preset single-item matching score is 10, the second preset influence score is 5. This will not be elaborated further here.
[0086] In the above steps, when B has a corresponding associated user, and the element in D corresponding to the seat in the candidate seat group is in the same row as the element in D corresponding to the target seat of the associated user, it means that the target seat of the associated user of B is in the same row as the seat in the candidate seat group, and the target user of B and the associated user are traveling together. The candidate seat group better meets the needs of B. Therefore, the matching score corresponding to the candidate seat group is increased to ensure that such seats are selected first when filtering target seat groups, which is beneficial to improving the user experience.
[0087] In one specific embodiment, the following steps are included after step S234: If the matching score of the candidate seat group is the same as the maximum score of B, then the candidate seat group is taken as the target seat group of B; otherwise, proceed to step S24.
[0088] Specifically, when B does not have a corresponding associated user, the maximum score for B is equal to the number of seat preference tags in B's seat preference tags multiplied by the preset single-item matching score; when B has a corresponding associated user, the maximum score for B is equal to the number of seat preference tags in B's seat preference tags multiplied by the preset single-item matching score, plus the second preset influence score.
[0089] In the above steps, when the matching score of the candidate seat group is the same as the maximum score of B, it means that this is the optimal choice. The candidate seat group is directly used as the target seat group of B, and the search for seat combinations that meet the needs of B is stopped. This saves computing resources and improves the overall seat matching efficiency.
[0090] S24. If the elements currently covered by C in D do not include the last element of the last row in D, then control C to slide and proceed to step S22; otherwise, determine the target seat group corresponding to B based on all candidate seat groups corresponding to B and the matching scores corresponding to the candidate seat groups.
[0091] Through the above steps, target users are first grouped, and then a global scan is performed using a sliding window to obtain candidate seat groups for the target user groups. Furthermore, by using the seat attribute tag set of the candidate seat groups and the seat preference tag set of the target user groups, the matching score of the candidate seat groups is obtained, and the target seat group is determined based on the matching score of the candidate seat groups. This approach can accurately retrieve the continuous seat areas that best meet the overall needs of group users globally, effectively avoiding the fragmentation of seat resources while fully satisfying users' personalized travel needs, thereby significantly improving overall user satisfaction.
[0092] Specifically, when controlling the sliding of C, if C does not cover the last element of the current row, C is controlled to slide to the right according to its sliding step size; if C covers the last element of the current row, C is controlled to slide to the starting position of the next row.
[0093] The above steps establish the traversal rule of "moving right within a row and starting a new line at the end" for the sliding window. This ensures that all seats are scanned without omission, while strictly avoiding the situation where sliding the window across rows causes seats with discontinuous physical locations to be combined into the same initial seat group, thus guaranteeing the continuity and rationality of seat allocation.
[0094] Specifically, in step S24, the target seat group corresponding to B is determined based on all candidate seat groups corresponding to B and the matching scores corresponding to the candidate seat groups, including the following steps: S241. When the number of candidate seat groups corresponding to B is not 0, the candidate seat group with the largest matching score among all candidate seat groups corresponding to B shall be taken as the target seat group corresponding to B.
[0095] Specifically, when the number of candidate seat groups with the highest matching scores is greater than 1, the first candidate seat group obtained is taken as the target seat group.
[0096] S242. When the number of candidate seat groups corresponding to B is 0, B is divided into BL new target user groups, and the seat preference label set corresponding to B is used as the seat preference label set corresponding to each new target user group in the BL new target user groups.
[0097] S243. Replace B with the new target user groups BL to update A.
[0098] Through the above steps, when the number of candidate seat groups corresponding to B is not zero, it indicates that there exists an area that satisfies B's need for consecutive seats. The candidate seat group with the highest matching score among all candidate seat groups corresponding to B is taken as the target seat group corresponding to B, ensuring the global optimality of seat allocation and maximizing the satisfaction of user preferences. Otherwise, it means that there is currently no area that satisfies B's need for consecutive seats. The target user group is split into a new target user group that includes individual target users, and inherits the original seat preference tag set. The split new target user group is inserted into the original position of B in A, so that seat matching can continue for the new target user group. This achieves a smooth transition from "group consecutive seating" to "individual preference", improving the overall utilization rate of seat resources and the final allocation success rate.
[0099] Specifically, the procedure before step S21 also includes: S20. If BL≤DL, proceed to step S21; otherwise, based on the preset partitioning rule mapping table and BL, divide B into several new target user groups, and replace B with the several new target user groups so that A can be updated; DL is the number of non-virtual seats in the seats corresponding to the single row element of D.
[0100] Specifically, the preset partitioning rule mapping table includes several preset user group lengths and preset partitioning rules corresponding to each preset user group length. The preset user group lengths and the preset partitioning rules corresponding to the preset user group lengths are lengths and partitioning rules preset by those skilled in the art according to actual needs. For example, if the preset user group length is 7, the corresponding preset partitioning rules are to partition according to 3 target users and 4 target users respectively; if the preset user group length is 8, the corresponding preset partitioning rules are to partition according to 2 target users, 3 target users and 3 target users respectively; these will not be elaborated further here.
[0101] Specifically, in step S20, when the number of target users contained in the several new target user groups is inconsistent, the new target user groups are arranged in descending order of the number of target users.
[0102] Through the above steps, when the number of target users in the target user group is greater than the number of non-virtual seats in the seats corresponding to the single row element of D, it indicates that there are too many people traveling together and there is no area that can meet the continuous seat requirements of B. This directly triggers a customized splitting strategy based on a preset mapping table, effectively avoiding invalid calculations and significantly improving computational efficiency. The new target user groups obtained from the splitting are arranged in descending order of the number of people, establishing a "large first, small later" resource allocation priority. This prioritizes ensuring the success rate of consecutive seats for large groups while maximizing the utilization rate of seat resources and the overall allocation success rate.
[0103] Specifically, when B has corresponding associated users, the associated users corresponding to B are used as the associated users of the new target user group obtained based on B.
[0104] Specifically, after updating A, the target seat group corresponding to each target user group is determined sequentially according to the order in which the target user groups are arranged in A.
[0105] Specifically, after determining the target seat groups corresponding to all target user groups, check-in operations are performed based on the seats in the target seat groups and the target seats.
[0106] In this application embodiment, a non-transitory computer-readable storage medium is also provided. This non-transitory computer-readable storage medium can be disposed in an electronic device to store at least one instruction or at least one program related to implementing the method provided in any embodiment of this application. The at least one instruction or the at least one program is loaded and executed by a processor to implement the method provided in any embodiment of this application, and can achieve the same technical effect. To avoid repetition, further details are omitted here.
[0107] Examples of non-transitory computer-readable storage media include: computer read-only memory (ROM), random access memory (RAM), erasable programmable read-only memory (EPROM), compact disc read-only memory (CD-ROM), flash memory, magnetic disk, optical disk, portable computer disk, hard disk and / or solid-state drive, etc.
[0108] In this application embodiment, an electronic device is also provided, the electronic device including a processor and the non-transitory computer-readable storage medium. The processor loads and executes at least one instruction or at least one program stored in the non-transitory computer-readable storage medium related to implementing the method provided in any embodiment of this application, so as to implement the method provided in the embodiment of this application.
[0109] For example, the electronic device may be a mobile electronic device or a non-mobile electronic device that also includes other functions such as a personal digital assistant and / or music player. Further, the mobile electronic device may be any one of a mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA); the non-mobile electronic device includes any one of a server, network attached storage (NAS), personal computer (PC), television (TV), ATM, or self-service machine. No specific limitations are made in the embodiments of this application.
[0110] For example, the processor can be a processor in any electronic device.
[0111] Exemplary embodiments of this application also provide a feasible structure for an electronic device. For example, the electronic device may include a processor, an external memory interface, internal memory, a universal serial bus (USB) interface (hereinafter referred to as a USB interface), a charging management module, a power management module, a battery, a first antenna, a second antenna, a mobile communication module, a wireless communication module, an audio module, a speaker, a receiver, a microphone, a headphone jack, a sensor module, buttons, a motor, an indicator, a camera, a display screen, and a subscriber identification module (SIM) card interface (hereinafter referred to as a SIM card interface), etc. The sensor module may include pressure sensors, gyroscope sensors, barometric pressure sensors, magnetic sensors, accelerometers, distance sensors, proximity sensors, fingerprint sensors, temperature sensors, touch sensors, ambient light sensors, and / or bone conduction sensors, etc.
[0112] It should be understood that the exemplary structures of the embodiments of this application do not constitute a specific limitation on the electronic device. In other embodiments of this application, the electronic device may include more or fewer components than the structure described herein, or combine some components, or split some components, or have different component arrangements. The components may be implemented in hardware, software, or a combination of software and hardware.
[0113] For example, the processor may include one or more processing units, wherein the processing units include: an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors. The controller may generate operation control signals based on instruction opcodes and timing signals to control instruction fetching and execution.
[0114] For example, the processor may further include a memory for storing instructions and data. In some embodiments of this application, the memory in the processor is a cache memory. The memory can store instructions or data that the processor has just used or that are used repeatedly. If the processor needs to use the instructions or data again, it can directly retrieve them from the memory.
[0115] For example, the processor may also include one or more interfaces. These interfaces include: an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a SIM card interface, and / or a USB interface, etc.
[0116] The integrated circuit interface is a bidirectional synchronous serial bus, which includes a serial data line (SDA) and a serial clock line (SCL).
[0117] Integrated circuits with built-in audio interfaces can be used for audio communication. In some embodiments of this application, the processor may include multiple sets of integrated circuit-based audio interfaces. The processor can couple with an audio module through the integrated circuit-based audio interface to achieve communication between the processor and the audio module.
[0118] The pulse code modulation interface can also be used for audio communication, specifically for sampling, quantizing, and encoding analog signals. In some embodiments of this application, the audio module and the wireless communication module can be coupled through the pulse code modulation interface.
[0119] A Universal Asynchronous Receiver / Transmitter (UART) is a universal serial data bus interface used for asynchronous communication. This bus can be a bidirectional communication bus interface. It converts the data to be transmitted between serial and parallel communication. In some embodiments of this application, the processor and the wireless communication module can be connected via the UART.
[0120] Mobile industry processor interfaces can be used to connect processors to peripheral devices such as displays and cameras.
[0121] General purpose input / output interfaces can be configured via software.
[0122] Furthermore, the general-purpose input / output interface can be configured as a control signal or a data signal. In some embodiments of this application, the general-purpose input / output interface can be used to connect the processor to a camera, display screen, wireless communication module, audio module, sensor module, etc.
[0123] A USB interface is an interface that conforms to the USB standard specification, specifically including Mini USB, Micro USB, and USB Type-C interfaces. USB interfaces can be used to connect chargers to charge electronic devices, and also for transferring data between electronic devices and peripheral devices.
[0124] It should be understood that the interface connection relationships between the modules illustrated in the embodiments of this application are merely illustrative and do not constitute a limitation on the structure of the electronic device. In other embodiments of this application, the electronic device may also employ different interface connection methods or a combination of multiple interface connection methods as described in the embodiments.
[0125] The charging management module receives charging input from a charger, which can be either a wireless or wired charger. In some wired charging embodiments, the charging management module receives charging input from the wired charger via a USB interface. In some wireless charging embodiments, the charging management module receives wireless charging input via the wireless charging coil of the electronic device. While charging the battery, the charging management module can also supply power to various parts of the electronic device via the power management module.
[0126] The power management module is used to connect the battery, the charging management module, and the processor.
[0127] Wireless communication functionality in electronic devices can be achieved through a first antenna, a second antenna, a mobile communication module, a wireless communication module, a modem processor, and a baseband processor.
[0128] Mobile communication modules can enable wireless communication solutions, including 2G / 3G / 4G / 5G, for use in electronic devices.
[0129] A modem processor may include a modulator and a demodulator. The modulator modulates a low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates a received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to a baseband processor for processing. After processing by the baseband processor, the low-frequency baseband signal is transmitted to an application processor. The application processor outputs sound signals through audio devices (not limited to speakers, receivers, etc.) or displays images or videos on a display screen. In some embodiments of this application, the modem processor may be a separate device. In other embodiments, the modem processor may be independent of the processor and housed within the same device as the mobile communication module or other functional modules.
[0130] Wireless communication modules can enable solutions for wireless communication applications in electronic devices, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies.
[0131] In some embodiments of this application, the first antenna of the electronic device is coupled to the mobile communication module, and the second antenna is coupled to the wireless communication module, enabling the electronic device to communicate with networks and other devices via wireless communication technology.
[0132] Electronic devices utilize GPUs, displays, and application processors to achieve their display functions. A GPU is a microprocessor for image processing, connecting the display and the application processor. GPUs perform mathematical and geometric calculations and are used for graphics rendering. A processor may include one or more GPUs, which execute program instructions to generate or modify display information.
[0133] The display screen is used to display images, videos, etc. The display screen includes a display panel. The display panel can be a liquid crystal display (LCD), or a display panel made of materials selected from organic light-emitting diodes (OLEDs), active-matrix organic light-emitting diodes (AMOLEDs), flexible light-emitting diodes (FLEDs), minimized, microLEDs, micro-OLEDs, or quantum dot light-emitting diodes (QLEDs). In some embodiments of this application, the electronic device may include one or more display screens. In some embodiments of this application, the display screen may also integrate touch functionality and may also be referred to as a touch screen.
[0134] Electronic devices can achieve shooting functions through ISPs, cameras, video codecs, GPUs, displays, and application processors.
[0135] External storage interfaces can be used to connect external memory cards, such as Micro SD cards, to expand the storage capacity of electronic devices.
[0136] Internal memory can be used to store executable program code for a computer, which includes instructions. The processor executes the instructions stored in internal memory to perform various functional applications and data processing of electronic devices.
[0137] Electronic devices can implement audio functions through audio modules, speakers, receivers, microphones, headphone jacks, and application processors. Examples include music playback and recording.
[0138] The audio module converts digital audio information into analog audio signals for output, and also converts analog audio input into digital audio signals. The speaker, also called a "horn," converts audio electrical signals into sound signals. The receiver, also called a "handset," converts audio electrical signals into sound signals. The microphone, also called a "microphone" or "voice transducer," converts sound signals into electrical signals. The headphone jack is used to connect wired headphones.
[0139] Pressure sensors are used to sense pressure signals and convert them into electrical signals. In some embodiments of this application, the pressure sensor can be located on the display screen. A gyroscope sensor can be used to determine the motion posture of the electronic device. A barometric pressure sensor is used to measure air pressure. In some embodiments of this application, the electronic device calculates altitude using the air pressure value measured by the barometric pressure sensor, assisting in positioning and navigation. An accelerometer can detect the magnitude of acceleration of the electronic device in various directions (generally three axes). A distance sensor is used to measure distance. A fingerprint sensor is used to collect fingerprints. A touch sensor, also known as a "touch panel," can be located on the display screen, forming a touchscreen, also known as a "touch screen." A bone conduction sensor can acquire vibration signals. In some embodiments of this application, a bone conduction sensor can acquire vibration signals from vibrating bone fragments in the human vocal cords. A bone conduction sensor can also contact the human pulse to receive blood pressure signals.
[0140] The buttons include a power button and volume buttons. A motor can generate vibration alerts. Indicators can be indicator lights, used to show charging status, battery level changes, messages, missed calls, notifications, etc. A SIM card slot is used to connect a SIM card.
[0141] Embodiments of this application also provide a computer program product including program code that, when the program product is run on an electronic device, causes the electronic device to perform the steps of the methods described in this specification according to various exemplary embodiments of this application.
[0142] This application also provides a chip, which includes a processor and a communication interface. The communication interface is used to receive signals and transmit the signals to the processor. The processor processes the signals so that the methods described in the various exemplary embodiments of this application are executed.
[0143] While specific embodiments of this application have been described in detail by way of examples, those skilled in the art should understand that the examples are for illustrative purposes only and not intended to limit the scope of this application. Those skilled in the art should also understand that various modifications can be made to the embodiments without departing from the scope and spirit of this application. The scope of this application is defined by the appended claims.
Claims
1. A seat matching method, characterized in that, The method includes the following steps: S1. Group all target users and obtain a list A of target user groups and a set of seat preference labels for each target user group; A includes several target user groups; S2. According to the order of the target user groups in A, determine the target seat group corresponding to each target user group in sequence; wherein, for any target user group B, determining the target seat group corresponding to B includes: S21. Set the sliding window C of B at the starting position of the two-dimensional array D corresponding to the seating distribution map; the initial value of the window length of C is consistent with the number of target users in B, and the sliding step of C is 1; the elements in D correspond one-to-one with the seats in the seating distribution map; each element in D is associated with a corresponding seat attribute label, which includes, but is not limited to: seat number, current allocation status, window seat type label, aisle seat type label, virtual seat type label, and location distribution label; S22. Based on the seats corresponding to the elements currently covered by C in D, determine the initial seat group E corresponding to B; the number of seats in E is consistent with the number of target users in B; including: S221. Based on the seat attribute labels associated with the elements currently covered by C in D, determine whether there are virtual seats among the seats corresponding to the elements currently covered by C in D. S222. If no virtual seats exist, then the group of seats corresponding to the elements currently covered by C in D is taken as E; if virtual seats exist, then let CL = CL + X to update C; CL is the window length of C; X is the number of virtual seats in the group of seats corresponding to the elements currently covered by C in D. S223. Take the seats corresponding to the elements currently covered by C in D as the extended seat group; S224. Delete the virtual seats in the extended seating group to obtain E, and let CL=BL to update C; BL is the number of target users in B; S23. If E contains assigned seats, control C to slide and proceed to step S22; otherwise, use E as the candidate seat group corresponding to B, and obtain the matching score corresponding to the candidate seat group based on the current seat attribute label set corresponding to the candidate seat group and the seat preference label set corresponding to B. S24. If the elements currently covered by C in D do not include the last element of the last row in D, then control C to slide and proceed to step S22; otherwise, determine the target seat group corresponding to B based on all candidate seat groups corresponding to B and the matching scores corresponding to the candidate seat groups.
2. The seat matching method according to claim 1, characterized in that, Step S1 includes the following steps: S11. For each initial user, obtain the user information of the initial user and their corresponding companions; the user information includes: user ID, crowd attribute tags, and seat preference tags; among which, crowd attribute tags include: children, elderly, people with mobility impairments, and NULL; S12. The initial user and their corresponding colleagues are designated as target users, and all target users are divided into several target user groups based on their user IDs; each target user group must contain at least one target user; all target users in the same target user group are colleagues of each other; S13. For each target user group, deduplicate the seat preference labels of all target users in the target user group to obtain the seat preference label set corresponding to the target user group. S14. When the set of audience attribute tags corresponding to the target user group is not NULL, the target user group is marked as a first-level user group; when the set of audience attribute tags corresponding to the target user group is NULL, and there are target users with reserved seats within the target user group, the target user group is marked as a second-level user group; otherwise, the target user group is marked as a third-level user group. The set of audience attribute tags corresponding to the target user group is obtained by deduplicating the audience attribute tags of all target users within the target user group. S15. Sort all target user groups according to the multi-level sorting rules to obtain A. The multi-level sorting rules are as follows: prioritize the first-level user group, second-level user group, and third-level user group. For several target user groups that are all first-level user groups, all second-level user groups, or all third-level user groups, sort them according to the input time of the user information corresponding to the target user group from earliest to latest.
3. The seat matching method according to claim 1, characterized in that, In step S24, the target seat group corresponding to B is determined based on all candidate seat groups corresponding to B and the matching scores corresponding to the candidate seat groups, including the following steps: S241. When the number of candidate seat groups corresponding to B is not 0, the candidate seat group with the largest matching score among all candidate seat groups corresponding to B shall be the target seat group corresponding to B. S242. When the number of candidate seat groups corresponding to B is 0, B is divided into BL new target user groups, and the seat preference label set corresponding to B is used as the seat preference label set corresponding to each new target user group in the BL new target user groups. S243. Replace B with the new target user groups BL to update A.
4. The seat matching method according to claim 1, characterized in that, The current allocation status of the seat attribute label associated with each element in D is initially set to unallocated; when the seat corresponding to an element in D is determined to be a seat in the target seat group, the current allocation status of the seat attribute label associated with that element is updated to allocated.
5. The seat matching method according to claim 1, characterized in that, When controlling the sliding of C, if C does not cover the last element of the current row, then C is controlled to slide to the right according to the sliding step size; if C covers the last element of the current row, then C is controlled to slide to the starting position of the next row.
6. The seat matching method according to claim 1, characterized in that, The steps preceding step S21 also include: S20. If BL≤DL, proceed to step S21; otherwise, based on the preset partitioning rule mapping table and BL, divide B into several new target user groups, and replace B with the several new target user groups so that A can be updated; DL is the number of non-virtual seats in the seats corresponding to the single row element of D.
7. A non-transitory computer-readable storage medium, characterized in that, The non-transitory computer-readable storage medium stores at least one instruction or at least one program segment, which is loaded and executed by a processor to implement the seat matching method as described in any one of claims 1-6.
8. An electronic device, characterized in that, Includes a processor and the non-transitory computer-readable storage medium as described in claim 7.
Citation Information
Patent Citations
Flight seat distribution method and device, computer program product and electronic equipment
CN119761741A
Flight recommendation system based on customer portrait
CN113779384A
Seat selection method and device, equipment and storage medium
CN114386635A