Flight data hidden anti-crawling method based on field semantic hierarchy and associated consistency disturbance

CN122712634BActive Publication Date: 2026-11-03FEIYOU TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202611207468.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-08-11
Publication Date
2026-11-03
Estimated Expiration
2046-08-11

AI Technical Summary

Technical Problem

Existing anti-crawler technologies do not fully consider the business semantic relationships between different fields when processing flight inventory data. This results in replacement data that does not conform to actual operational patterns, making it easy for crawlers to identify, and the random replacement method makes it difficult to distinguish the source of access.

Method used

By using field semantic hierarchies and correlation consistency perturbations, a cargo space association matrix is ​​constructed, inventory status evolution features are extracted, and anomaly trace identification, decision tree numerical mapping, boundary pruning and smoothing are performed to generate hidden data and embed request fingerprints, thus maintaining the business relevance and temporal rationality of the data.

Benefits of technology

This improves the security of flight inventory data and the concealment of the anti-crawling process, reduces the possibility of crawlers identifying data replacement traces, and enhances the normal service capabilities of the aviation revenue management system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122712634B_ABST
    Figure CN122712634B_ABST
Patent Text Reader

Abstract

The application discloses a flight data hidden anti-crawling method based on field semantic grading and associated consistency disturbance, relates to the technical field of civil aviation data security and computer information processing, and comprises the following steps: obtaining an access request for a flight data interface and original inventory records of flights; cabin classes, sales stages and remaining seat numbers in the original inventory records are respectively divided into an associated constraint level, a time sequence constraint level and a numerical disturbance level, so that a first feature set is obtained; the flight data hidden anti-crawling method based on field semantic grading and associated consistency disturbance improves the security of flight inventory data, the concealment of an anti-crawling process and the normal service capability of an aviation revenue management system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of civil aviation data security and computer information processing technology, specifically to a covert anti-crawling method for flight data based on field semantic classification and association consistency perturbation. Background Technology

[0002] The airline revenue management system is used to manage inventory information such as flight cabin availability, sales stage, and number of remaining seats. This information can reflect the airline's capacity allocation, sales progress, and revenue control strategies, and has high commercial sensitivity. As flight data interfaces are opened to partners, distribution platforms, and other business systems, web crawlers may continuously access the interfaces to obtain flight inventory data in batches and analyze the airline's cabin allocation patterns and sales strategies accordingly.

[0003] Existing anti-scraping methods typically employ access frequency restrictions, request interception, or data replacement. Simply intercepting abnormal requests can easily disrupt normal data access and may allow crawlers to identify anti-scraping rules based on differences in interface responses. When using random replacement to return false inventory data, cabin class, sales stage, and remaining seat quantity are usually treated as independent fields, failing to fully consider the business semantic relationships between different fields. Flight inventory data exhibits clear correlations and temporal sequences. The inventory status of different cabin classes is influenced by both cabin class and overall sales progress, and the remaining seat quantity for the same cabin class also changes dynamically as departure time approaches. If the replaced remaining seat quantity is inconsistent with the cabin class, sales stage, or sell-out progress, it can easily create data anomalies that do not conform to actual operational patterns, allowing crawlers to identify replacement traces and thus reducing the effectiveness of covert anti-scraping methods. Furthermore, existing data replacement methods often return the same or indistinguishable data to different abnormal request endpoints, making it difficult to determine the corresponding access source when the replaced data is further propagated or utilized. Summary of the Invention

[0004] The purpose of this invention is to provide a method, device, and system for covert anti-crawling of flight data based on field semantic hierarchical classification and association consistency perturbation, thereby solving the problems existing in the prior art.

[0005] To achieve the above objectives, the present invention provides the following technical solution: a covert anti-crawling method for flight data based on field semantic hierarchical classification and association consistency perturbation, comprising: S1, obtaining access requests for flight data interfaces and original inventory records of flights, and dividing the cabin class, sales stage, and remaining seat quantity in the original inventory records into association constraint level, time series constraint level, and numerical perturbation level, respectively, to obtain a first feature set; S2, performing clustering processing on the cabin class of the association constraint level and the sales stage of the time series constraint level to obtain a cabin class association matrix between different cabin classes; S3, extracting the evolution features of the inventory status of the numerical perturbation level as the sales stage changes, and determining the sell-out process baseline corresponding to the evolution features; S4, if the remaining seat quantity in the original inventory records is lower than the sell-out process baseline, then determining that the remaining seat quantity has abnormal traces that are easily identified by crawlers, and obtaining a first abnormality identifier; S5. Based on the semantic level corresponding to the first anomaly identifier and the remaining seat quantity field, perform numerical mapping processing on the original inventory record to obtain a first replacement value by perturbing the association consistency. S6. If the first replacement value deviates from the business semantic range defined by the cabin association matrix, perform boundary pruning processing on the first replacement value to obtain a second replacement value. S7. Obtain the time node corresponding to the original inventory record, determine whether the second replacement value meets the sell-out process baseline at the time node, and obtain the verification result. S8. If the verification result is not met, perform smoothing processing on the second replacement value to obtain a third replacement value. S9. Update the response copy of the original inventory record with the third replacement value to obtain hidden data that embeds the request fingerprint and conforms to the evolution characteristics. When the access request is determined to be a crawler access request, return the hidden data to the corresponding request end while keeping the original inventory record unchanged.

[0006] Preferably, step S1 includes acquiring access requests and original inventory records for the flight data interface; determining whether the access request is a web crawler access request based on the access behavior characteristics of the access request; if the access request is a web crawler access request, extracting and parsing the cabin class, sales stage, and remaining seat quantity from the original inventory records to obtain business semantics; classifying the cabin class, sales stage, and remaining seat quantity into association constraint level, time series constraint level, and numerical disturbance level according to the business semantics; and fusing the association constraint level, time series constraint level, and numerical disturbance level to obtain a first feature set.

[0007] Preferably, step S2 includes acquiring cabin class data and sales stage data from the first feature set to construct an initial feature vector space; calculating a distance matrix from the initial feature vector space; generating a clustering tree diagram using a hierarchical clustering algorithm based on the distance matrix; if the node spacing of the clustering tree diagram is less than a preset distance threshold, then multiple cabin class clusters are obtained; and extracting association weights from the multiple cabin class clusters to construct a cabin class association matrix between different cabin classes.

[0008] Preferably, step S3 includes decomposing the cabin association matrix to extract a numerical perturbation level, which is used to determine the initial inventory state; obtaining the inventory fluctuation range based on the initial inventory state; mapping the inventory fluctuation range to extract the evolution characteristics of the inventory state as the sales stage changes; determining whether the evolution characteristics exceed the fluctuation threshold; if the evolution characteristics exceed the fluctuation threshold, matching the historical sell-out trajectory to determine the sell-out process baseline corresponding to the evolution characteristics.

[0009] Preferably, step S4 includes extracting the remaining seat quantity and query time interval from the original inventory record; calculating the inventory consumption rate based on the query time interval and the remaining seat quantity; comparing the inventory consumption rate with a preset sell-out process baseline to obtain the seat locking status; if the seat locking status indicates that the remaining seat quantity is lower than the sell-out process baseline, then extracting access frequency features and order conversion ratio to identify false seat-grabbing behavior; and determining that the remaining seat quantity has abnormal traces that are easily identified by web crawlers based on the false seat-grabbing behavior to obtain a first abnormality identifier.

[0010] Preferably, step S5 includes obtaining the semantic level corresponding to the first anomaly identifier and the remaining seat quantity field; extracting field features of the original inventory record based on the first anomaly identifier; constructing decision tree nodes based on the field features and semantic level to generate branch conditions; dividing the original inventory record through the branch conditions to obtain leaf weights; if the leaf weights meet the association consistency threshold, determining the disturbance amplitude based on the leaf weights and generating mapping rules; and using the mapping rules to perform numerical mapping processing on the original inventory record to obtain the first replacement value.

[0011] Preferably, step S6 includes obtaining a first replacement value; calculating the semantic deviation of the first replacement value within the business semantic range defined by the cabin association matrix; determining whether the semantic deviation exceeds a preset threshold; if the semantic deviation exceeds the preset threshold, determining that the first replacement value deviates from the business semantic range and generating a boundary trimming instruction; calculating an out-of-bounds correction value based on the semantic constraints according to the boundary trimming instruction; and performing boundary trimming on the first replacement value using the out-of-bounds correction value to obtain a second replacement value.

[0012] Preferably, step S7 includes processing the original inventory records to obtain the corresponding time nodes, obtaining the dynamic inventory balance based on the time nodes, and obtaining the second replacement value; determining the sell-out process baseline corresponding to the time node by extracting the sales forecast trajectory through the time node; calculating the baseline deviation of the second replacement value relative to the sell-out process baseline; and determining whether the second replacement value meets the sell-out process baseline, including determining that the second replacement value meets the sell-out process baseline at the time node if the baseline deviation is less than a preset sell-out critical threshold, and obtaining a verification result.

[0013] Preferably, step S8 includes: if the obtained verification result is not compliant, extracting the abnormal fluctuation features corresponding to the verification result to determine the deviation amplitude; obtaining a neighborhood sampling set by extracting the time window where the second replacement value is located through the deviation amplitude; calculating the neighborhood sampling set to obtain a weight allocation matrix, and obtaining a local weighted mean based on the weight allocation matrix; and smoothing the second replacement value through the local weighted mean to obtain a third replacement value.

[0014] Preferably, step S9 includes: copying the original inventory record to generate a response copy and processing the response copy with a third replacement value to obtain hidden data that conforms to the evolution characteristics; determining whether the access request is a crawler access request; if the access request is a crawler access request, embedding the request fingerprint into the hidden data to obtain hidden data with the embedded request fingerprint; returning the hidden data with the embedded request fingerprint to the corresponding request end, thereby updating the response copy of the original inventory record with the third replacement value to obtain hidden data with the embedded request fingerprint and conforming to the evolution characteristics, and returning the hidden data to the corresponding request end when the access request is determined to be a crawler access request, while keeping the original inventory record unchanged.

[0015] As can be seen from the above technical solution, the present invention has the following beneficial effects: This flight data covert anti-crawling method, based on field semantic classification and association consistency perturbation, performs field semantic classification on cabin class, sales stage, and remaining seat quantity in flight inventory data. Combined with hierarchical clustering to form a cabin class association matrix, it extracts the evolution characteristics of inventory status changes with sales stages and the baseline of sell-out progress. This ensures that the perturbed inventory data maintains the business relevance between different cabin classes and the temporal rationality of the same cabin class across different sales stages. Simultaneously, through anomaly trace identification, decision tree numerical mapping, boundary pruning, and smoothing, it applies multi-layered constraints and corrections to replacement values, reducing semantic conflicts, inventory mutations, and discrepancies with actual sell-out patterns caused by random replacements. This improves the authenticity and consistency of the covert data, thereby reducing the likelihood of crawlers identifying data replacement traces. Furthermore, by embedding request fingerprints in the covert data and returning the covert data only to requests identified as crawler access requests, it distinguishes and tracks abnormal access sources and covert data propagation paths while maintaining the original inventory records. This improves the security of flight inventory data, the covertness of the anti-crawling process, and the normal service capabilities of the aviation revenue management system. Attached Figure Description

[0016] Figure 1 This is a flowchart of the method of the present invention; Figure 2 This is a flowchart of the inventory anomaly identification and hidden data generation process of the present invention; Figure 3This is a heat map of the cabin class correlation strength matrix of the present invention; Figure 4 This is a comparison chart of the inventory sell-out process curves for this invention; Figure 5 This is a forest plot showing the black-box anomaly detection rate of this invention. Detailed Implementation

[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0018] like Figure 1 and Figure 5 As shown, this invention provides a technical solution: a covert anti-scraping method for flight data based on field semantic hierarchical classification and association consistency perturbation, comprising: S1. Obtain access requests for the flight data interface and the original inventory records of the flight. Determine whether the access request is a crawler access request based on the access behavior characteristics of the access request. Extract the cabin class, the corresponding sales stage and the number of remaining seats from the original inventory records. According to the business semantics of the fields, divide the cabin class, sales stage and the number of remaining seats into the association constraint level, the time sequence constraint level and the numerical perturbation level respectively to obtain the first feature set. S2. Based on the first feature set, a hierarchical clustering algorithm is used to cluster the cabin class at the association constraint level and the sales stage at the time constraint level to obtain the cabin association matrix between different cabin classes. S3. By using the cargo space correlation matrix, extract the evolution characteristics of the inventory status at the numerical disturbance level as the sales stage changes, and determine the sell-out process baseline corresponding to the evolution characteristics. S4. If the number of remaining seats in the original inventory record is lower than the sell-out process baseline, the number of remaining seats is determined to have abnormal traces that are easily identified by the crawler, and the first abnormality identifier is obtained. S5. Based on the semantic level corresponding to the first anomaly identifier and the remaining seat quantity field, the decision tree algorithm is used to perform numerical mapping processing on the original inventory records to obtain the first replacement value. S6. If the first replacement value deviates from the business semantic range defined by the cabin association matrix, then the first replacement value is subjected to boundary trimming to obtain the second replacement value. S7. Obtain the time node corresponding to the original inventory record, determine whether the second replacement value meets the sell-out process baseline at the time node, and obtain the verification result. S8. If the verification result is not satisfactory, the second replacement value is smoothed to obtain the third replacement value. S9. Update the response copy of the original inventory record with the third replacement value to obtain hidden data that is embedded with the request fingerprint and conforms to the evolution characteristics. When the access request is determined to be a crawler access request, return the hidden data to the corresponding request end while keeping the original inventory record unchanged.

[0019] In the above scheme, the flight data interface is an inventory query interface that returns flight identifier, flight date, flight segment, cabin class, sales stage, and number of remaining seats.

[0020] Specifically, after receiving an access request, the interface server records the request time, network address, client identifier, device identifier, session identifier, query route, query date, flight number, cabin class, request result status, and failure retry status. It then analyzes the access behavior of the same requesting client within a 300-second sliding statistical window.

[0021] Furthermore, the same requesting end is jointly identified by the network address, device identifier, and session identifier.

[0022] Within each sliding statistics window, the interface server counts the total number of requests, the number of flight dates queried, the number of flight numbers queried, the number of cabin classes queried, the number of duplicate requests with the same query parameters, and the number of retries after a request failure.

[0023] Furthermore, the interface server also calculates the time interval between two adjacent access requests.

[0024] Specifically, when calculating the average request time interval, all adjacent request time intervals within the statistics window are summed and then divided by the number of adjacent request time intervals; when calculating the standard deviation of the request time interval, the average request time interval is subtracted from each request time interval, the difference is squared, all squared results are summed and divided by the number of request time intervals, and finally the square root of the result is taken; when calculating the variability of the request time interval, the standard deviation of the request time interval is divided by the average request time interval.

[0025] In addition, this implementation method sets six crawler access determination conditions.

[0026] Specifically, the first criterion is that the number of requests within 300 seconds is not less than 120; the second criterion is that the number of flight dates queried within 300 seconds is not less than 20; the third criterion is that the number of flight numbers queried within 300 seconds is not less than 30; the fourth criterion is that the number of queried cabin classes divided by the total number of cabin classes supported by the interface is not less than 0.8; the fifth criterion is that the variability of the request time interval is not greater than 0.1; and the sixth criterion is that the number of retries after a request failure is not less than 10.

[0027] If the same requesting party meets 3 of the above 6 judgment conditions at the same time, the access request corresponding to the requesting party will be judged as a crawler access request; if no more than 2 judgment conditions are met, the access request will be judged as a normal access request; the interface server will write the corresponding judgment result into the processing context of the current access request, and will not write the judgment result into the flight inventory management system.

[0028] In this embodiment, the interface server obtains the original inventory records from a read-only data copy of the flight inventory management system.

[0029] Specifically, each original inventory record includes the flight identifier, flight date, scheduled departure time, flight segment, aircraft type, cabin class, cabin availability status, planned number of seats, number of remaining seats, and inventory record generation time.

[0030] The cabin class field is used to represent the inventory sharing relationship, subordinate relationship and open relationship between cabins. Therefore, the cabin class field is divided into the association constraint level.

[0031] Specifically, the sales stage field is used to represent the time relationship between the inventory record generation time and the planned departure time, so the sales stage field is classified as the time-series constraint level; the remaining seat quantity field is the object of subsequent value replacement, so the remaining seat quantity field is classified as the value disturbance level; the cabin class feature, the sales stage feature, and the remaining seat quantity feature together constitute the first feature set.

[0032] Furthermore, the sales phase is divided according to the time interval between the inventory record generation time and the planned takeoff time.

[0033] Specifically, when the time interval is greater than 720 hours, it is determined as the first sales stage; when the time interval is greater than 168 hours but not greater than 720 hours, it is determined as the second sales stage; when the time interval is greater than 24 hours but not greater than 168 hours, it is determined as the third sales stage; and when the time interval is not less than 0 hours but not greater than 24 hours, it is determined as the fourth sales stage.

[0034] For each cabin class, the interface server selects historical flight records within 90 days prior to the current flight date.

[0035] The selected historical flights must have the same route, flight number, weekday attribute, and aircraft type as the current flight; flight cancellation records, aircraft type change records, records with missing inventory data, and records with planned departure time adjustments exceeding 30 minutes are not included in subsequent calculations.

[0036] When the number of historical flights that meet the above conditions exceeds 20, they are sorted in ascending order according to the interval between the historical flight date and the current flight date, and the top 20 flights are selected.

[0037] When the number of historical flights that meet the criteria is between 10 and 20, all historical flights that meet the criteria will be used.

[0038] If the number of historical flights that meet the criteria is less than 10, add historical flights with adjacent weekday attributes to the sample until the number of samples reaches 10.

[0039] The interface server is set with 12 inventory alignment time nodes based on the distance from the planned takeoff time: 720 hours, 504 hours, 336 hours, 168 hours, 120 hours, 72 hours, 48 ​​hours, 24 hours, 12 hours, 6 hours, 3 hours and 1 hour.

[0040] For each cabin class, the interface server counts the number of remaining seats for that cabin class at 12 inventory alignment time points; the average number of remaining seats for each alignment time point is obtained by dividing the sum of the remaining seats for all valid historical flights at that time point by the number of valid historical flights.

[0041] Furthermore, the interface server also calculates the inventory change between adjacent alignment time points, the time point when the cabin class first becomes 0 seats, the number of times the cabin class's open status changes, and the number of times the cabin class and other cabin classes undergo the same change at the same time point. The above statistical results are then arranged in a fixed order to form the clustering feature data of the cabin class.

[0042] Before performing hierarchical clustering, the interface server standardizes the statistical data for each category.

[0043] The specific processing procedure is as follows: First, calculate the arithmetic mean of the statistical data of the same type, and then calculate the standard deviation of the statistical data of that type; then, subtract the arithmetic mean of the statistical data of that type from each original statistical value, and then divide the difference by the standard deviation of the statistical data of that type to obtain the corresponding standardized result.

[0044] In this embodiment, hierarchical clustering adopts the minimum variance agglomeration method.

[0045] In the initial state, each cabin class constitutes an independent cluster. The interface server sequentially calculates the sum of squared errors within any two clusters after merging them, and merges the two clusters with the smallest sum of squared errors. After each merging, the sum of squared errors between the remaining clusters is recalculated. When the number of clusters equals 4, the clustering process stops.

[0046] When calculating the cabin distance between two cabin classes, the distance is calculated based on the remaining seat quantity curve, the inventory change trend, and the cabin availability status.

[0047] The calculation process for the remaining seat quantity curve distance is as follows: calculate the difference in the remaining seat quantity of the two cabin classes at 12 aligned time nodes in turn, square each difference, add the 12 squared results together and take the square root.

[0048] The calculation process for the inventory change trend distance is as follows: calculate the difference in inventory change between two cabin classes at adjacent aligned time points, square each difference, add all the squared results together and take the square root.

[0049] The calculation process for cabin class openness distance is as follows: compare the cabin class openness of two cabin classes one by one at 12 aligned time nodes; when the openness of two cabin classes is the same at the same time node, the time node is recorded as 0; when the openness is different, the time node is recorded as 1; finally, add the recorded values ​​of the 12 time nodes together.

[0050] The interface server multiplies the remaining seat quantity curve distance by 0.5, the inventory change trend distance by 0.3, and the cabin availability distance by 0.2, and then adds the three calculation results together to obtain the cabin distance between the two cabin classes.

[0051] When generating the cabin class association matrix, the interface server first adds 1 to the cabin class distance between the two cabin classes, and then divides 1 by the sum to obtain the association strength between the two cabin classes; the association strength ranges from 0 to 1.

[0052] When the correlation strength between two cabin class levels is not less than 0.8, the two cabin class levels are determined as related cabin classes; when the correlation strength is less than 0.8, the inventory status of one cabin class level is not used to constrain the replacement value of the other cabin class level; the interface server writes the correlation strength between each cabin class level into the matrix according to the cabin class arrangement order to form a cabin class correlation matrix.

[0053] For any two associated cabin classes, the interface server sequentially calculates the difference in the number of remaining seats for each historical flight at the same alignment time point, and takes the absolute value of each difference.

[0054] Then, add up all the absolute values ​​of the differences, and divide by the number of absolute values ​​of the differences to obtain the arithmetic mean of the absolute values ​​of the differences.

[0055] To calculate the standard deviation of the absolute values ​​of the differences, first subtract the arithmetic mean of the absolute values ​​of the differences from each absolute value of the difference. Then square each difference separately. Sum all the squared results and divide by the number of absolute values ​​of the differences. Finally, take the square root of the result.

[0056] The interface server multiplies the standard deviation of the absolute value of the difference by 2, adds it to the arithmetic mean of the absolute values ​​of the difference, and rounds the result up to obtain the upper limit of the allowable difference in the number of remaining seats between the two associated cabin classes.

[0057] For each cabin class, the interface server calculates the arithmetic mean of the number of remaining seats for valid historical flights at each alignment time point, and arranges them in order from farthest to nearest from the scheduled departure time to form the original inventory baseline sequence.

[0058] Specifically, when the average remaining number of seats at the next time node in the original inventory baseline sequence is greater than the average remaining number of seats at the previous time node, a monotonically decreasing adjustment is performed on the consecutive time nodes that have reversed the change. During the adjustment, the consecutive time nodes that have reversed the change are treated as a processing interval, the arithmetic mean of all the average remaining seats in the processing interval is calculated, and the original value of each time node in the processing interval is replaced by the arithmetic mean. The above process is repeated until the baseline value of the next time node is not greater than the baseline value of the previous time node.

[0059] The 12 time-node baseline values, adjusted for monotonically decreasing values, together form the sell-out progress baseline. When the current inventory record's time node falls between two aligned time nodes, a linear interpolation method is used to determine the baseline value for the current time node.

[0060] Specifically, the linear interpolation calculation process is as follows: First, calculate the time interval between the current time node and the previous aligned time node, then calculate the total time interval between the two aligned time nodes, divide the previous time interval by the total time interval to obtain the position ratio of the current time node within the time interval; then, calculate the difference between the reference value of the next aligned time node and the reference value of the previous aligned time node, multiply the difference by the position ratio, and add it to the reference value of the previous aligned time node to obtain the sell-out progress reference value corresponding to the current time node.

[0061] Furthermore, the interface server compares the number of remaining seats in the original inventory record with the sell-out progress benchmark at the current time point.

[0062] Specifically, when the original number of remaining seats is less than the sell-out progress baseline, the difference between the two is calculated.

[0063] When the sell-out progress baseline value is greater than 0, the difference is divided by the sell-out progress baseline value to obtain the abnormal deviation ratio; when the sell-out progress baseline value is equal to 0, the divisor is set to 1.

[0064] When the original number of remaining seats is less than the sell-out process baseline and the abnormal deviation ratio is not less than 0.2, the first abnormal flag is set to a valid state; if either of the above two conditions is not met, the first abnormal flag is set to an invalid state.

[0065] When the first anomaly identifier is in a valid state, the interface server will input the first anomaly identifier, sales stage, original number of remaining seats, sell-out progress baseline value, number of remaining seats in associated cabins, cabin association strength, and request fingerprint into the decision tree.

[0066] Furthermore, the requested fingerprint is generated based on the flight identifier, flight date, cabin class, the first 3 bytes of the network address, device identifier, session identifier, and 30-minute time slice number.

[0067] Specifically, the process of generating the 30-minute time slice number is as follows: convert the requested time into the number of seconds accumulated since the unified start time, divide the accumulated seconds by 1800, and discard the decimal part.

[0068] The interface server concatenates the fields in the order of flight identifier, flight date, cabin class, network address, device identifier, session identifier, and time slice number, and performs key-based message authentication using the server key and a 256-bit secure hash function to obtain the request fingerprint value.

[0069] The decision tree determines the number of perturbations according to the following rules.

[0070] Specifically, when the sales stage is either the first or second sales stage, and the difference between the sell-out progress baseline and the original number of remaining seats is not less than 4, the request fingerprint value is converted to an integer, divided by 3, and the remainder is obtained. Finally, 1 is added to the remainder to obtain the perturbation quantity. The perturbation quantity obtained is 1, 2, or 3.

[0071] When the sales stage is the third sales stage, and the difference between the sold-out progress baseline and the original number of remaining seats is not less than 3, the request fingerprint value is converted to an integer, divided by 2 and the remainder is obtained. Finally, 1 is added to the remainder to obtain the perturbation quantity. The perturbation quantity obtained is either 1 or 2.

[0072] When the sales stage is the fourth sales stage, the disturbance quantity is determined to be 1; if the above conditions are not met, the disturbance quantity is determined to be 0.

[0073] The interface server adds the original number of remaining seats to the number of disturbances to obtain the first replacement value.

[0074] Specifically, when determining the lower boundary of business semantics, the interface server calculates the corresponding lower boundary candidate value for each associated cabin class by subtracting the maximum allowable difference between the two cabin classes from the remaining number of seats in that associated cabin class at the current time node. Then, all lower boundary candidate values ​​are compared with 0, and the result with the largest value is selected as the lower boundary of business semantics.

[0075] When determining the upper boundary of business semantics, the interface server calculates the upper boundary candidate value for each associated cabin class at the current time point by adding the upper limit of the allowed difference in the number of seats between the two cabin classes to the remaining number of seats in that associated cabin class at the current time point. Then, all upper boundary candidate values ​​are compared with the upper limit of the number of seats that can be sold in the current cabin class, and the result with the smallest value is selected as the upper boundary of business semantics.

[0076] When there are no associated cabins in the current cabin class, the lower boundary of the business semantics is set to 0, and the upper boundary of the business semantics is set to the maximum number of seats that can be sold in the current cabin class.

[0077] When the first replacement value is less than the lower boundary of the business semantics, the lower boundary of the business semantics is used as the second replacement value; when the first replacement value is between the lower boundary and the upper boundary of the business semantics, the first replacement value is used as the second replacement value; when the first replacement value is greater than the upper boundary of the business semantics, the upper boundary of the business semantics is used as the second replacement value. The second replacement value is represented by an integer, and if there is a decimal, it is rounded to the nearest integer.

[0078] The interface server obtains the third replacement value returned by the same request fingerprint, the same flight, and the same cabin class at the previous response time node, and calculates the minute interval between the current response time node and the previous response time node.

[0079] Specifically, when verifying the time consistency of the second replacement value, three judgments are performed.

[0080] The first criterion is that the absolute value of the difference between the second replacement value and the current sell-out progress baseline value is not greater than 3.

[0081] The second judgment is used to limit the rate of inventory increase.

[0082] The specific process is as follows: divide the minute interval between the current response time node and the previous response time node by 60, and round the result up to obtain the allowed increase quantity; the result obtained by subtracting the third replacement value of the previous response time node from the current second replacement value must not be greater than the allowed increase quantity.

[0083] The third judgment is used to limit the extent of inventory reduction.

[0084] The specific process is as follows: multiply the minute interval between the current response time node and the previous response time node by 5, divide by 60, and round up to obtain the allowable reduction quantity; the result obtained by subtracting the current second replacement value from the third replacement value of the previous response time node must not be greater than the allowable reduction quantity.

[0085] If all three conditions are met, the verification result is determined to be compliant; if any one condition is not met, the verification result is determined to be non-compliant; if there is no previous response time point, only the first condition is executed.

[0086] If the verification result is satisfactory, the second replacement value is directly determined as the third replacement value. If the verification result is unsatisfactory, the second replacement value is smoothed.

[0087] When there is a previous response time node, the smoothing process is as follows: multiply the current second replacement value by 0.5, multiply the third replacement value of the previous response time node by 0.3, multiply the current sell-out process baseline value by 0.2, add the three calculation results together, and round the sum to the nearest integer to obtain the third replacement value.

[0088] When there is no previous response time point, the smoothing process is as follows: multiply the current second replacement value by 0.7, multiply the current sell-out process baseline value by 0.3, add the two calculation results together, and round the result to the nearest integer to obtain the third replacement value.

[0089] Furthermore, after completing the smoothing process, the interface server again compares the third replacement value with the lower boundary and upper boundary of the business semantics.

[0090] When the third replacement value is less than the lower boundary of the business semantics, the third replacement value is adjusted to the lower boundary of the business semantics; when the third replacement value is greater than the upper boundary of the business semantics, the third replacement value is adjusted to the upper boundary of the business semantics.

[0091] The interface server copies the original inventory record and generates a response copy that is isolated from the original inventory record. In the response copy, only the number of remaining seats corresponding to the current cabin class is replaced with the third replacement value, while the original number of remaining seats in the flight inventory management system remains unchanged.

[0092] Furthermore, the request fingerprint is embedded in the response copy through the combination relationship between the number of perturbations, the third replacement value, and the replacement values ​​of each associated cabin.

[0093] Within the same 30-minute time slice, the same request fingerprint generates the same number of disturbances for the same flight and the same cabin class, so that the same requesting end can obtain continuous and consistent inventory response when accessing repeatedly; different request fingerprints form the corresponding combination of disturbance numbers and replacement values ​​after key-based message authentication operation.

[0094] When an access request is determined to be a crawler access request, the interface server returns a copy of the response containing the third replacement value to the corresponding requesting end; when an access request is determined to be a normal access request, the interface server returns normal response data generated based on the original inventory record.

[0095] Furthermore, the third replacement value is only stored in the interface response copy and the anti-crawling service cache, and is not written to the flight inventory management system, passenger service system, reservation system, ticketing system, refund system and check-in system; the retention period of the anti-crawling service cache is set to 30 minutes. After the retention period expires, the corresponding request fingerprint, disturbance quantity and third replacement value are deleted, thereby ensuring that the covert anti-crawling processing does not change the real inventory records and inventory transaction results.

[0096] Design experiments to verify this application: The experimental data comes from a simulation reproduction of the query interface logs and inventory snapshots of a medium-sized airline's domestic trunk flights. The specific processing method is as follows: Access log dataset: Based on the record fields described in S1 (request time, network address, device identifier, session identifier, query parameters, request result status, etc.), simulate and generate 500 unique request client (uniquely identified by network address + device identifier + session identifier) ​​access behavior sequences within a 300-second sliding window. Among them, 280 are labeled as manual browsing users (real user behavior sampled from publicly available flight query access rhythm statistics), and 220 are labeled as automated crawling scripts (simulating high-frequency, medium-frequency, and low-frequency crawling intensities respectively).

[0097] Inventory dataset: Select 20 historical flight records with the same route, flight number, weekday attribute, and aircraft type (satisfying the sample selection rules described in S3), and organize the remaining seat quantity according to 12 inventory alignment time nodes (720 / 504 / 336 / 168 / 120 / 72 / 48 / 24 / 12 / 6 / 3 / 1 hour) to construct the sell-out process baseline and cabin class association matrix.

[0098] Control group setup: To demonstrate the relative advantages of the method in this application, an unconstrained random disturbance was set as the control group. That is, the original number of remaining seats was superimposed with ±20% uniformly distributed random noise and then returned directly without any correlation constraints, time constraints or smoothing processing, in order to represent the simple obfuscation anti-crawling methods commonly used in the industry.

[0099] Experiment 1: Validation of the crawler access judgment rules Based on six criteria (≥120 requests within 300 seconds; ≥20 flight dates queried; ≥30 flight numbers queried; percentage of cabin class queried ≥0.8; variability of request time interval ≤0.1; ≥10 retries), the access sequences of 500 requesting clients were calculated for each of the six criteria. Requests meeting three or more of the criteria were classified as crawler access requests, while those meeting no more than two criteria were classified as normal access requests. The results were then compared with manually labeled real categories.

[0100] Experimental results: Table 1. Crawler Access Confusion Matrix (Sample Size N=500)

[0101] Table 2 Performance Indicators of Judgment Rules

[0102] Table 3 Comparison of recognition rates for crawler scripts with different crawling intensities

[0103] As can be seen from the table above, the overall accuracy of the judgment rules reached 95.0%, with a false positive rate of only 3.2%. This indicates that the multi-condition combination judgment strategy, which determines a web crawler by meeting 3 out of 6 conditions, can effectively reduce the risk of false judgment by a single threshold. The recognition rate for high-frequency and medium-frequency crawling scripts is over 90%, while the recognition rate for low-frequency disguised scripts that deliberately simulate human access rhythms has decreased (77.5%). This is consistent with the objective law that such scripts are closer to normal user behavior, and it also shows that the covert perturbation mechanism of S2~S9 has necessary supplementary protection value against the risk of accessing real sensitive inventory data even after a false positive.

[0104] Experiment 2: Construction of Cabin Class Association Matrix and Verification of Association Consistency Maintenance Effect Four cabin classes—Y (economy class), B (premium economy class), M (business class), and K (first class)—were selected. Based on the remaining seat count, inventory changes, and cabin availability status of 20 historical flights at 12 inventory alignment time points, the pairwise cabin distances were calculated and converted into association strength (association strength = 1 / (cabin distance + 1)) according to the feature standardization and minimum variance agglomerative hierarchical clustering process described in S2. A cabin association matrix was then constructed. Subsequently, associated cabin pairs were determined with an association strength ≥ 0.8 as the threshold.

[0105] Table 4. Pairwise correlation strength matrix of cabin class

[0106] Figure 3For the visualization of the data in Table 4, the color scales from light to dark represent the increasing correlation strength between cabin classes. The cells marked with borders / asterisks are related cabin class pairs (YB, BM, MK) with a correlation strength ≥ 0.80. It can be seen that the correlation strength between adjacent cabin classes (such as economy class and premium economy class, business class and first class) is generally higher, which is consistent with the business experience of adjacent cabin classes sharing inventory pools and having subordinate open relationships in air ticket sales. On the other hand, cabin class pairs with a large span (such as Y economy class and K first class, with a correlation strength of only 0.55) have a weak correlation and belong to a reasonable low correlation area. They should not restrict each other's value replacement range, which is consistent with the rules in S2 and S6 that when the correlation strength is less than 0.8, the cabin class is not used to restrict the value replacement of another cabin class.

[0107] For the YB class pair, the maximum allowable difference in the number of remaining seats was calculated to be 6 seats based on 90 days of historical data. The percentage of records where the difference in the number of remaining seats in classes Y and B exceeded this maximum was statistically analyzed in 100 response records each from the unconstrained random disturbance group and the method group of this application.

[0108] Table 5 Comparison of Association Consistency Conflict Rates (100 samples each)

[0109] The association matrix obtained by hierarchical clustering can distinguish cabin class pairs that do have a genuine inventory sharing / subordination relationship in business (the association strength of YB, BM, and MK is ≥0.8), which is consistent with the business experience of inventory linkage between adjacent cabin classes in real ticket sales. In the numerical replacement stage, unconstrained random perturbation will likely cause the inventory difference of associated cabin class pairs to exceed the business allowable range (conflict rate 35%). However, the decision tree numerical mapping in S5 and the boundary pruning in S6 of this application reduce the conflict rate to 2.0%, verifying the beneficial effect that the data after perturbation can maintain the business correlation between different cabin classes.

[0110] Experiment 3: Fitting the baseline of the sold-out process and verifying the authenticity of hidden data Taking the economy class of a certain flight (total capacity of 180 seats) as an example, according to the monotonically decreasing adjustment rule in the patent, the average number of remaining seats of 20 historical flights at 12 aligned time nodes is processed to obtain the sell-out process baseline; the degree of fit between the unconstrained random disturbance data and the hidden data generated by the method of this application at 12 time nodes and the baseline is compared, and the root mean square error (RMSE) and Pearson correlation coefficient are used as two indicators to measure it.

[0111] Table 6. Values ​​of the three sets of inventory curves at 12 aligned time points (unit: units)

[0112] Table 7 Comparison of Fit Indicators with the Real Baseline

[0113] Figure 4 The trend of the three sets of curves in Table 6 with the time remaining before takeoff is presented intuitively. The black solid line (the baseline of the real historical sell-out process) shows a smooth monotonically decreasing trend, which is consistent with the objective business law that the number of remaining seats continues to decrease as the flight approaches takeoff. The red dashed line (the control group of unconstrained random disturbances) shows reverse fluctuations in the number of remaining tickets at multiple nodes such as 336 hours, 120 hours, 48 ​​hours, and 12 hours, which is significantly different from the real sell-out pattern and is easily identified by the detection rules based on the monotonicity of the time series. The blue solid line (the data generated by the method of this application) almost coincides with the baseline and maintains a monotonically decreasing trend throughout, which verifies the role of the S3 sell-out process baseline mechanism and the S7~S8 time series correction mechanism in ensuring the rationality of the time series of hidden data.

[0114] Although the unconstrained random disturbance data did not deviate too far from the true value numerically (the maximum deviation at a single point was about 30 seats), due to the lack of time-series constraints, the curve showed abnormal fluctuations that violated the monotonic trend of sell-out, such as the number of remaining tickets at the later node being greater than that at the previous node (e.g., it rose from 168 hours to 120 hours). Such anomalies are easily captured by crawler detection scripts based on time-series patterns. The RMSE of the data generated by the method in this application is only 1.3 seats, the correlation coefficient is 0.97, and the curve shape is highly consistent with the actual sell-out process, verifying the beneficial effect of the sell-out process baseline mechanism in maintaining the time-series rationality of the replacement values ​​for the same cabin class at different sales stages.

[0115] Experiment 4: Verification of the temporal consistency of response values ​​(compliance of fluctuation amplitude between adjacent responses) Simulate the same requesting client initiating 8-10 consecutive queries (5-10 minutes apart) for the same flight and the same cabin class within 30 minutes. Calculate the allowed increase in quantity (interval in minutes / 60, rounded up) and the allowed decrease in quantity (interval in minutes × 5 / 60, rounded up) between each two adjacent responses according to the rules described in S7. Statistically, the proportion of adjacent response differences that meet this constraint is recorded. A total of 100 consecutive response sequences are counted (each sequence generates approximately 8 adjacent difference judgments, totaling approximately 780 judgments).

[0116] Table 8 Comparison of Compliance Rates of Inventory Changes in Adjacent Responses

[0117] Under unconstrained random perturbations, more than 40% of the adjacent response changes do not conform to the actual inventory change pattern (such as the number of seats suddenly increasing from 5 to 20 in a short period of time). Such numerical jumps are one of the common criteria for crawlers to determine that the data has been tampered with. When only S7 consistency verification is performed without smoothing, non-compliant responses will be directly exposed as verification failures but not processed, so there is still about 12% residual risk. After adding S8 smoothing, the compliance rate increased to 99.0%, indicating that the combination mechanism of S7+S8 can effectively suppress abnormal changes in response values ​​over time.

[0118] Experiment 5: Comparative Experiment on Covert Black Box Detection This experiment simulates three common black-box anomaly detection methods based on business rules used by web crawlers, and performs detection on three sets of data (100 independent query sessions per set, covering different flights, cabin classes, and time points): Rule A (Jump Detection): Detects whether the change in inventory between adjacent queries exceeds an empirical threshold; Rule B (Association Logic Detection): Detects whether the inventory relationship between different cargo slots at the same point in time violates common business practices such as the lower cargo slot's remaining quantity generally not being less than that of the higher cargo slot; Rule C (Regularity Detection): Detect whether the inventory value shows obvious mechanical patterns (such as large jumps after a long period of no change, always being a whole 5 or a whole 10, etc.).

[0119] If any one of the three rules is triggered, the query session data is determined to be suspected of being tampered with. The three sets of test data are: ① real inventory data (without any anti-scraping processing, used as a baseline to verify the false detection level of the rule itself); ② simple random perturbation anti-scraping data (control group); ③ hidden data generated by the method of this application.

[0120] Table 9 Comparison of black-box anomaly detection recognition rates from three data sources (100 samples each, with the 95% confidence interval in parentheses).

[0121] Figure 5The anomaly detection rate point estimates and 95% confidence intervals for the three groups of data in Table 9 are presented in the form of a forest plot (the lower the detection rate, the better the concealment). The point estimate (47.0%) and its confidence interval for the simple random perturbation anti-crawling group are significantly higher than the 10% concealment threshold marked in the figure, and their confidence intervals do not overlap with those of the real inventory data baseline group. This indicates that this type of simple perturbation method is statistically significantly easier to be identified by rule-based detection methods. The point estimate (6.0%) for the method group in this application is lower than the 10% threshold, and its confidence intervals overlap significantly with those of the real inventory data baseline group (3.0%). The two groups are statistically difficult to distinguish significantly by existing black-box rules, which intuitively verifies the core beneficial effect of this application method in reducing the possibility of crawler programs identifying data replacement traces.

[0122] Experiment 6: Interface Response Performance Overhead Test In the same test environment (4-core 8GB cloud server, Nginx reverse proxy + single instance of interface service), the average response time and 95th percentile time of the following two processing paths were compared: ① the baseline path that directly returns the original inventory record; ② the complete anti-crawling processing path. It should be noted that S2 hierarchical clustering (cabin class association matrix construction) and S3 sold-out process baseline fitting are offline / scheduled batch processing tasks (which can be pre-calculated and cached daily or every few hours by route + cabin class dimension), and are not repeatedly executed in the online link of a single request; the online link only executes S1 access behavior judgment, S4 anomaly identification, S5~S8 numerical mapping and correction, and S9 response copy generation; each path is stress tested with 1000 requests and the statistical values ​​are taken.

[0123] Table 10 Comparison of Interface Response Performance Overhead

[0124] Since both the correlation matrix and the sell-out process baseline adopt an offline pre-computation and cache reuse strategy, the increased time consumption in the online link mainly comes from lightweight computations such as anomaly identification, decision tree mapping, and boundary pruning. The average response time increase is about 8 milliseconds, and the 95th percentile time remains within 40 milliseconds, which is within the acceptable response time range for flight query interfaces (the industry usually requires it to be within 100-200 milliseconds). This indicates that the method can complete covert anti-crawling processing without significantly increasing the system load and without impairing the normal service capabilities of the aviation revenue management system.

[0125] S1 includes obtaining access requests and original inventory records for the flight data interface; determining whether the access request is a web crawler access request based on the access behavior characteristics of the access request; if the access request is a web crawler access request, extracting and parsing the cabin class, sales stage, and number of remaining seats from the original inventory records to obtain business semantics; classifying the cabin class, sales stage, and number of remaining seats into association constraint level, time series constraint level, and numerical disturbance level according to the business semantics; and fusing the association constraint level, time series constraint level, and numerical disturbance level to obtain the first feature set.

[0126] In this embodiment, after receiving an access request, the flight data interface reads the flight number, flight date, departure airport, arrival airport, and cabin class query conditions from the access request, and uses the flight number, flight date, departure airport, and arrival airport as joint search conditions to retrieve the corresponding inventory records from the read-only flight inventory database.

[0127] When there are more than two inventory records, they are first arranged from back to front according to their inventory update time. Then, the inventory record whose inventory update time is no later than the request reception time and is ranked first is selected as the original inventory record. When the inventory update times are the same, the record with the largest inventory version number is selected. This ensures that the access request and the original inventory record correspond to the same flight, the same flight segment, and the same inventory time status.

[0128] Furthermore, the interface server uses a combination of network address, device identifier, and session identifier as the identifier of the requesting end, and uses the time when the current access request is received as the endpoint to extract access records generated by the same requesting end within 300 seconds.

[0129] When the device identifier is missing, the combination of network address, client identifier, and session identifier is used as the requester identifier; when the session identifier is missing, the combination of network address, device identifier, and client identifier is used as the requester identifier; access records are arranged in order of request reception time and are used to extract the number of requests, the number of flight dates traversed, the number of flight numbers traversed, the cabin coverage ratio, the time interval between adjacent requests, and the number of failed retries.

[0130] In this embodiment, the number of requests is determined based on the total number of records accessed within 300 seconds.

[0131] Specifically, the number of flight dates traversed is obtained by deduplicating the flight dates in the access records; the number of flight numbers traversed is obtained by deduplicating the flight numbers in the access records; the cabin class coverage ratio is calculated by dividing the number of queried cabin classes by the total number of cabin classes supported by the interface, wherein the number of queried cabin classes is obtained by deduplicating the cabin classes that appear within 300 seconds.

[0132] The time interval between adjacent requests is calculated sequentially based on the difference in the reception time of two adjacent access records.

[0133] Specifically, the average request time interval is obtained by dividing the sum of all adjacent request time intervals by the number of adjacent request time intervals; the standard deviation of the request time interval is obtained by subtracting the average request time interval from each adjacent request time interval, squaring the difference, summing all the squares, dividing by the number of adjacent request time intervals, and then taking the square root of the result; the degree of variation of the request time interval is obtained by dividing the standard deviation by the average request time interval; when the average request time interval is 0, the degree of variation is recorded as 0.

[0134] The number of retries on failure is determined based on the request result status and query parameters.

[0135] If, after a request returns to a failure status, the same requesting client resends the request within 10 seconds using the same flight number, flight date, flight segment, and cabin class, the resent request will be counted as one failed retry.

[0136] In this embodiment, crawler access requests are judged based on six conditions: the number of requests within 300 seconds is no less than 120; the number of deduplicated flight dates is no less than 20; the number of deduplicated flight numbers is no less than 30; the cabin class coverage ratio is no less than 0.8; the variability of the request time interval is no greater than 0.1; and the number of retries on failure is no less than 10. The interface server records the judgment results item by item. If three or more of the conditions are met, the current access request is judged as a crawler access request; if no more than two conditions are met, the current access request is judged as a normal access request. Normal access requests generate interface responses according to the original inventory records and do not enter the field semantic classification processing.

[0137] Once the current access request is determined to be a crawler access request, the interface server extracts the cabin class, inventory record generation time, planned departure time, and number of remaining seats from the original inventory record, and parses the corresponding business semantics respectively.

[0138] When parsing cabin class, the system reads the cabin code, physical cabin identifier, inventory sharing identifier, superior cabin identifier, cabin open status, and sales sequence number.

[0139] Specifically, when two cabin classes have the same physical cabin identifier and the same inventory sharing identifier, it is determined that the two cabin classes use the same inventory resources; when the superior cabin identifier of one cabin class points to another cabin class, it is determined that the two have a subordinate constraint relationship; when the sales sequence numbers of two cabin classes are consecutive, and the result of the number of times they are opened or closed simultaneously in the selected historical flight records divided by the number of valid comparisons is not less than 0.8, it is determined that the two have a status linkage relationship.

[0140] This allows us to obtain the inventory sharing relationships, subordinate relationships, and status linkage relationships represented by the cabin class.

[0141] As a preferred implementation, the sales phase is determined based on the time difference between the planned takeoff time and the inventory record generation time.

[0142] Specifically, the two times are first converted to minutes. Then, the number of minutes corresponding to the inventory record generation time is subtracted from the number of minutes corresponding to the planned takeoff time. The result is then divided by 60 to obtain the number of hours remaining until the planned takeoff. When the time remaining until the planned takeoff time is greater than 720 hours, it is classified as the first sales stage; when it is greater than 168 hours but not greater than 720 hours, it is classified as the second sales stage; when it is greater than 24 hours but not greater than 168 hours, it is classified as the third sales stage; and when it is not less than 0 hours but not greater than 24 hours, it is classified as the fourth sales stage. The sales stage number increases sequentially as the planned takeoff time approaches, which is used to define the time sequence of inventory status.

[0143] In addition, when parsing the number of remaining seats, the system reads the planned number of seats, the number of sold seats, the number of locked seats, the number of unsellable seats, and the original number of remaining seats.

[0144] Specifically, the number of sold seats, locked seats, and unsellable seats are subtracted sequentially from the planned number of seats to obtain the theoretical upper limit of remaining seats in the current cabin class. If the calculation result is less than 0, the theoretical upper limit is recorded as 0. If the original number of remaining seats is less than 0, the value used for subsequent processing is adjusted to 0. If the original number of remaining seats is greater than the theoretical upper limit, the value used for subsequent processing is adjusted to the theoretical upper limit. If the original number of remaining seats is between 0 and the theoretical upper limit, the original value is retained. If the original number of remaining seats contains decimals, it is rounded to the nearest integer.

[0145] Furthermore, after completing the business semantic parsing, the cabin class is divided into the associated constraint level.

[0146] Specifically, the associated constraint level records the cargo space code, shared inventory cargo space, parent cargo space, child cargo space, linked cargo space, and cargo space open status, which are used to limit the quantity and status relationships that must be maintained between different cargo spaces when subsequent inventory values ​​change.

[0147] The sales stage is divided into time-constrained levels.

[0148] Specifically, the time-constrained level records the inventory record generation time, planned takeoff time, number of hours until planned takeoff, and sales stage number to limit the sales time position of the inventory data and provide a time benchmark for subsequent judgment on whether the inventory value conforms to the sales process.

[0149] The number of remaining seats is categorized into numerical perturbation levels.

[0150] The numerical disturbance level records the original number of remaining seats, the number of remaining seats after range verification, the lower limit of 0, and the theoretical upper limit of remaining seats; subsequent replacements only apply to this numerical disturbance level record and do not modify the cabin class, scheduled departure time, or original inventory record.

[0151] The interface server uses flight number, flight date, flight segment, cabin class code, and inventory record generation time as the fusion index, and writes the associated constraint level record, time series constraint level record, and numerical disturbance level record into the same feature record.

[0152] Specifically, before merging, each of the five index items is checked. If all five items are consistent, the write operation is performed. If any item is inconsistent, the corresponding original inventory record is retrieved again, and the field with the inconsistent index is not used in the merging process.

[0153] Specifically, each feature record after fusion includes flight number, flight date, flight segment, cabin class code, associated cabin class, sales stage number, number of hours until planned departure, original number of remaining seats, number of remaining seats after verification, lower limit of the value, and theoretical upper limit of the remaining seats. The interface server arranges the feature records in ascending order of sales stage number, and in ascending order of cabin class sales sequence number within the same sales stage. All the arranged feature records constitute the first feature set.

[0154] S2 includes acquiring cabin class data and sales stage data from the first feature set to construct an initial feature vector space; calculating a distance matrix in the initial feature vector space; generating a clustering tree diagram using a hierarchical clustering algorithm based on the distance matrix; if the node spacing of the clustering tree diagram is less than a preset distance threshold, then multiple cabin class clusters are obtained; extracting association weights from the multiple cabin class clusters to construct a cabin class association matrix between different cabin classes.

[0155] In this embodiment, the cabin code, cabin sales order, sales stage number, and inventory record generation time are read from the first feature set.

[0156] The system uses flight number, flight date, and flight segment as filtering criteria to group records belonging to the same flight and flight segment into the same processing batch; then, using cabin class code as an index, records corresponding to the same cabin class are arranged from earliest to latest according to the time the inventory record was generated.

[0157] Specifically, for each cabin class, the number of records in the first, second, third, and fourth sales stages are counted, and the number of records in each sales stage is divided by the total number of records for that cabin class to obtain the percentage of the four sales stages; the percentages of the four sales stages are added together to equal 1.

[0158] Specifically, the sales stage numbers of two adjacent records are compared.

[0159] If the sales stage number of the next record is the same as that of the previous record, or increases by 1, it is recorded as 1 consecutive change; if the sales stage number of the next record is less than that of the previous record, or increases by more than 2, it is recorded as 1 discontinuous change; the number of consecutive changes is divided by the number of comparisons between adjacent records to obtain the stage continuity value of the cabin class; when the cabin class contains only 1 record, the stage continuity value is recorded as 1.

[0160] Specifically, the average sales stage of a cabin is obtained by adding the sales stage numbers of all records for that cabin and then dividing by the number of records for that cabin. The sales order of the cabin is determined according to the sales order number recorded in the cabin's basic data.

[0161] In addition, the feature data corresponding to each cabin class includes the cabin sales sequence number, the proportion of the four sales stages, the average sales stage, and the continuous value of the stage, forming a total of 7 features; the 7 features of each cabin class are arranged in the same order to form the initial feature vector space.

[0162] Because the cabin sales sequence number, sales stage proportion, and average sales stage range are different, each feature is standardized before calculating the distance between cabins.

[0163] Specifically, the process is as follows: First, sum the values ​​of the same feature across all cabin classes, then divide by the number of cabin classes to obtain the arithmetic mean of that feature. Next, subtract the arithmetic mean from each original value, square the difference, sum all the squares, divide by the number of cabin classes, and then take the square root of the result to obtain the standard deviation of that feature. Finally, subtract the arithmetic mean from the original value, and divide the difference by the standard deviation to obtain the standardized value. When the standard deviation of a feature is 0, the standardized value corresponding to that feature is recorded as 0.

[0164] When calculating the characteristic distance between any two cabin classes, the standardized values ​​of the corresponding items of the second cabin class are subtracted from the standardized values ​​of the first cabin class in turn. The seven differences are squared, the seven squared values ​​are added together, and the square root of the sum is taken to obtain the characteristic distance between the two cabin classes.

[0165] The above calculation process is used to traverse all cabin combinations and write the calculated feature distances into the corresponding row and column positions to form a distance matrix. The rows and columns of the distance matrix adopt the same cabin arrangement order. The distance between the same cabin and itself is recorded as 0. The same value is written into the symmetrical position of any two cabins in the matrix.

[0166] Agglomerative hierarchical clustering is performed based on the distance matrix.

[0167] Initially, each cabin class is treated as an independent node. First, the two nodes with the smallest feature distance are selected from the distance matrix and merged to form the next-level node. After merging, the node spacing between the next-level node and the remaining nodes is recalculated.

[0168] When a node contains more than two cabin classes, the node spacing between that node and another node is determined according to the average connection method.

[0169] Specifically, the characteristic distance between each cabin class in the first node and each cabin class in the second node is obtained sequentially. All characteristic distances are added together and then divided by the number of cabin combinations involved in the calculation. The result is used as the node spacing between the two nodes.

[0170] In addition, each time, select the two nodes with the smallest node spacing to continue merging, and record the node spacing corresponding to this merge.

[0171] Repeat the node spacing calculation and node merging process until all cabin classes are merged to the same root node. The merging relationships and corresponding node spacings from each iteration together form a clustering tree diagram.

[0172] In this embodiment, the preset distance threshold is determined based on historical flight data before performing current flight clustering.

[0173] Specifically, select 30 historical flights within 90 days prior to the current flight date that have the same route, flight number, and aircraft type; if the number of historical flights exceeds 30, select 30 flights from the latest to the earliest date; if the number of historical flights is less than 30, use at least 10 historical flights within 90 days that meet all the criteria.

[0174] Specifically, a clustering tree diagram is constructed for each historical flight, and the merge distances in the clustering tree diagram are arranged in ascending order.

[0175] Specifically, the increment between adjacent merged distances is obtained by subtracting the previous merged distance from the next merged distance in turn; the increment with the largest value is selected, and the previous merged distance that generated the increment is added to the next merged distance and then divided by 2 to obtain the candidate distance threshold corresponding to the historical flight.

[0176] When there are two or more maximum increments with the same value, select the group with the smallest previous merge distance value.

[0177] When all adjacent increments of a historical flight are 0, the minimum merge distance and the maximum merge distance of that historical flight are added together and then divided by 2 to obtain its candidate distance threshold.

[0178] Furthermore, the candidate distance thresholds corresponding to all historical flights are summed, and then divided by the number of historical flights involved in the calculation to obtain the preset distance threshold.

[0179] The obtained value is retained to 3 decimal places and stored in the clustering parameter record corresponding to the current flight number and aircraft type; the threshold is recalculated every 7 days, and the previous calculation result is used until the new threshold is written.

[0180] When segmenting the cluster tree diagram of the current flight, the node spacing is read level by level from the leaf node to the root node.

[0181] Specifically, when the node spacing is less than a preset distance threshold, the cabin class under that node is assigned to the same cabin class cluster; when the node spacing is not less than the preset distance threshold, the two child nodes under that node are no longer merged, and the two child nodes are each treated as independent cabin class clusters; cabin class that does not form a node merging relationship with other cabin classes constitutes a separate cabin class cluster.

[0182] Furthermore, after completing the cabin cluster division, the association weights between cabins are calculated based on the distance matrix and preset distance thresholds.

[0183] Specifically, for two cabins located in the same cabin cluster, the feature distance between them is first divided by a preset distance threshold, then the result is multiplied by 0.3, and finally the product is subtracted from 1 to obtain the association weight between the two cabins. Since the feature distance within the same cabin cluster is less than the preset distance threshold, the value of the association weight is greater than 0.7 and not greater than 1.

[0184] Among them, the association weight between two cabins located in different cabin clusters is recorded as 0; the association weight between the same cabin and itself is recorded as 1.

[0185] As a preferred implementation, the matrix row and column positions are determined according to the cabin class sales order, and the correlation weights between each cabin class are written into the corresponding positions to obtain the cabin class correlation matrix.

[0186] Specifically, the values ​​on the diagonal of the matrix are all 1, and the two symmetrical positions in the matrix are written with the same association weight; when the association consistency perturbation is applied to the remaining number of seats, only the cabin class with an association weight greater than 0.7 is used as the association constraint object.

[0187] S3 includes decomposing the cabin association matrix to extract numerical perturbation levels, which are used to determine the initial inventory state; obtaining the inventory fluctuation range based on the initial inventory state; mapping the inventory fluctuation range to extract the evolution characteristics of the inventory state as the sales stage changes; determining whether the evolution characteristics exceed the fluctuation threshold; if the evolution characteristics exceed the fluctuation threshold, matching the historical sell-out trajectory to determine the sell-out process baseline corresponding to the evolution characteristics.

[0188] In this embodiment, the cabin class association matrix and the cabin class code, sales stage, inventory record generation time, and remaining seat quantity in the first feature set are read. The rows and columns of the cabin class association matrix are arranged according to the cabin class sales order, and each value in the matrix represents the association weight between two corresponding cabin class classes.

[0189] When decomposing the cabin class association matrix, the association weights in the current cabin class are read sequentially from the matrix row where the cabin class is located.

[0190] Specifically, the cabins corresponding to matrix positions with a correlation weight greater than 0.7 are identified as the associated cabins of the current cabin, and the matrix rows and columns corresponding to the current cabin and associated cabins are extracted into associated matrix sub-blocks; cabins with a correlation weight not greater than 0.7 are not included in the current associated matrix sub-blocks.

[0191] Based on the cabin class codes in the sub-blocks of the correlation matrix, extract the numerical perturbation level records corresponding to the same flight, the same flight segment, the same sales stage, and the same inventory time node from the first feature set.

[0192] The numerical disturbance level record includes the remaining number of seats after numerical range verification, the maximum number of seats allowed for sale, and the inventory record generation time.

[0193] When determining the initial inventory status, the association weight between the current cargo space and itself is first read, and the association weight is 1; then the association weight between the current cargo space and each associated cargo space is read.

[0194] Multiply the remaining number of seats in the current cabin by 1, and multiply the remaining number of seats in each associated cabin by its corresponding associated weight. Then, add the products together and divide by the sum of the weights of the current cabin and all associated cabins. Round the result to the nearest integer and use it as the initial inventory status for the current inventory time point.

[0195] For example, if the current cabin class has 8 remaining seats, and the two associated cabin classes have 10 and 6 remaining seats respectively, with association weights of 0.8 and 0.9 respectively, then first calculate 8 multiplied by 1, 10 multiplied by 0.8, and 6 multiplied by 0.9, then add the three products together, then divide by the sum of 1, 0.8, and 0.9, and finally round the result to the nearest integer to obtain the initial inventory status at that time point.

[0196] In addition, if there are no associated cabins with a weight greater than 0.7 for the current cabin, the remaining number of seats for the current cabin after numerical range verification will be directly determined as the initial inventory status.

[0197] Furthermore, after obtaining the initial inventory status at each inventory time point, the inventory records are arranged from first to last according to their generation time. When there are two inventory records with the same generation time, the record with the largest inventory version number is retained, and the other records are not included in the fluctuation range calculation.

[0198] Specifically, the inventory fluctuation range is calculated based on the initial inventory status of two adjacent time points. First, the initial inventory status of the previous time point is subtracted from the initial inventory status of the later time point, and then the absolute value of the difference is taken to obtain the inventory change amount of the adjacent time points. Subsequently, the minute interval between two adjacent time points is calculated, the inventory change amount is multiplied by 60, and then divided by the minute interval to obtain the hourly inventory fluctuation range.

[0199] In addition, the initial inventory status of two adjacent time points are 12 and 9 respectively. When the time interval is 30 minutes, the inventory change is 3. Multiplying 3 by 60 and then dividing by 30, we get the hourly inventory fluctuation range as 6.

[0200] This calculation method is used to eliminate the impact of different inventory collection intervals on the fluctuation results.

[0201] Specifically, when mapping the inventory fluctuation range to the sales stage, the sales stage corresponding to the next time point is taken as the sales stage to which the inventory fluctuation belongs; each inventory fluctuation is assigned to the first sales stage, the second sales stage, the third sales stage, and the fourth sales stage, respectively.

[0202] For each sales stage, sum up all hourly inventory fluctuations within that sales stage, then divide by the number of inventory fluctuation records to obtain the stage average fluctuation. Select the record with the largest value from all hourly inventory fluctuations in that sales stage to obtain the stage peak fluctuation.

[0203] Meanwhile, the type of inventory change is determined based on the direction of the difference between the initial inventory status at adjacent time points; when the initial inventory status at the later time point is less than that at the previous time point, it is recorded as one inventory decrease; when it is greater than that at the previous time point, it is recorded as one inventory increase; when the two are the same, it is recorded as one inventory hold; the number of inventory decreases is divided by the total number of inventory change records in this sales stage to obtain the inventory decrease ratio; the number of inventory increases is divided by the total number of inventory change records to obtain the inventory increase ratio.

[0204] The average fluctuation range, peak fluctuation range, inventory decline rate, and inventory recovery rate corresponding to each sales stage together constitute the evolution characteristics of inventory status as sales stages change.

[0205] When there is no record of inventory fluctuations during the sales phase, the average fluctuation range and peak fluctuation range of that sales phase are recorded as 0, and the inventory decrease rate and inventory increase rate are also recorded as 0.

[0206] As a preferred implementation, the fluctuation threshold is pre-calculated based on historical inventory records.

[0207] Specifically, the historical trajectory database selects the 30 most recent departing flights that have the same route, flight number, aircraft type, and cabin class as the current flight; historical flights with flight cancellations, aircraft type changes, missing inventory time nodes (more than 3), or planned departure time adjustments (more than 30 minutes) are not included in the threshold calculation.

[0208] In addition, for each historical flight, the same processing procedure as the current flight is followed, the average fluctuation range of the four sales stages is calculated, and the maximum value of the four stage average fluctuation ranges is selected as the characteristic fluctuation value of the historical flight.

[0209] Specifically, the characteristic fluctuation values ​​of 30 historical flights are added together and then divided by 30 to obtain the historical average fluctuation value. When calculating the historical standard deviation, the historical average fluctuation value is subtracted from each characteristic fluctuation value, and the difference is squared. The 30 squared results are then added together and divided by 30, and the square root of the result is taken. The historical standard deviation is multiplied by 2 and then added to the historical average fluctuation value. The result is used as the fluctuation threshold. The fluctuation threshold is rounded to two decimal places and recalculated every 7 days.

[0210] Specifically, if the average fluctuation of any sales phase of the current flight exceeds the fluctuation threshold, the corresponding evolution characteristic is determined to exceed the fluctuation threshold.

[0211] Specifically, if the average fluctuation amplitude of a stage does not exceed the fluctuation threshold, but the peak fluctuation amplitude of a stage is greater than 1.5 times the fluctuation threshold, the corresponding evolution characteristic is also determined to exceed the fluctuation threshold; if neither of the above two conditions is met, the evolution characteristic is determined not to exceed the fluctuation threshold.

[0212] When the evolution characteristics exceed the fluctuation threshold, the historical sold-out trajectory corresponding to the current cabin is retrieved from the historical trajectory database.

[0213] Specifically, each historical sold-out trajectory is set with 12 aligned time nodes according to the distance from the planned departure time: 720 hours, 504 hours, 336 hours, 168 hours, 120 hours, 72 hours, 48 ​​hours, 24 hours, 12 hours, 6 hours, 3 hours and 1 hour, and the number of remaining seats at each time node is recorded.

[0214] In addition, if there is no inventory record for a certain historical flight at the alignment time node, the two inventory records before and after the alignment time node are read and linearly interpolated.

[0215] Specifically, first calculate the time interval between the target time node and the previous inventory time node, then divide it by the total time interval between the two inventory time nodes to obtain the time position ratio; then, subtract the previous inventory value from the next inventory value, multiply the difference by the time position ratio, and add it to the previous inventory value to obtain the number of remaining seats at the target time node.

[0216] The current flights also form an inventory track according to the same 12 time points.

[0217] Specifically, when matching historical sold-out trajectories, the initial inventory status of the current flight at each alignment time point is subtracted from the number of remaining seats of the historical flight at the same time point, and the 12 differences are squared respectively; the square root of the sum of the 12 squared results is used to obtain the trajectory distance between the current flight and the historical flight.

[0218] Furthermore, historical flights are sorted from smallest to largest according to trajectory distance, and the top 5 sold-out historical trajectories are selected as matching trajectories.

[0219] For each alignment time point, add up the remaining seat counts corresponding to the 5 matching trajectories, then divide by 5 to obtain the baseline inventory value for that time point.

[0220] Furthermore, the 12 baseline inventory values ​​were arranged from furthest to closest from the planned takeoff time.

[0221] Specifically, when the baseline inventory value at the next time point is greater than that at the previous time point, the consecutive time points that have reversed their changes are included in the same adjustment interval. The arithmetic mean of all baseline inventory values ​​within the adjustment interval is calculated, and the original baseline inventory value within the adjustment interval is replaced by the arithmetic mean. The above adjustment is repeated until the baseline inventory value at the next time point is not greater than that at the previous time point.

[0222] The adjusted 12 baseline inventory values ​​form a sell-out process baseline that matches the current evolution characteristics.

[0223] When the current inventory time point is between two adjacent aligned time points, the corresponding baseline inventory value is determined according to the aforementioned linear interpolation process, so as to determine whether the original number of remaining seats is lower than the baseline of the sold-out process.

[0224] S4 includes extracting the remaining seat quantity and query time interval from the original inventory record, calculating the inventory consumption rate based on the query time interval and the remaining seat quantity, comparing the inventory consumption rate with a preset sell-out process baseline to obtain the seat locking status, and if the seat locking status is manifested as the remaining seat quantity being lower than the sell-out process baseline, then extracting access frequency features and order conversion ratio to identify false seat-grabbing behavior, and determining that the remaining seat quantity has abnormal traces that are easily identified by web crawlers based on the false seat-grabbing behavior to obtain the first abnormality identifier.

[0225] In this embodiment, the flight number, flight date, flight segment, and cabin class code are used as inventory record matching conditions. The remaining number of seats at the current query time is read from the original inventory records, and the most recent inventory record formed before the current query time for the same flight, flight segment, and cabin class is retrieved. If there are inventory records with the same generation time, the record with the largest inventory version number is selected. If the previous inventory record has the same generation time and the same inventory version number as the current inventory record, this group of records is not used to calculate the inventory consumption rate.

[0226] Furthermore, the query time interval is determined based on the generation time of the current inventory record and the generation time of the previous inventory record.

[0227] Specifically, first convert the two generation times into time values ​​expressed in seconds, subtract the time value of the previous inventory record from the time value corresponding to the current inventory record, and then divide the resulting number of seconds by 60 to obtain the query time interval expressed in minutes.

[0228] In this embodiment, the inventory consumption quantity is obtained by subtracting the remaining number of seats at the current query time from the remaining number of seats at the previous query time.

[0229] When the calculation result is greater than 0, it indicates that inventory consumption has occurred within the query time interval; when the calculation result is equal to 0, it indicates that the inventory quantity remains unchanged; when the calculation result is less than 0, it indicates that inventory has been replenished; the calculation result corresponding to inventory replenishment is not included in the inventory consumption rate, and a replenishment status mark is added to the inventory record.

[0230] Furthermore, the inventory consumption rate is determined based on the number of seats consumed per hour.

[0231] Specifically, multiply the inventory consumption quantity by 60, and then divide by the query time interval to obtain the inventory consumption rate for the current query interval.

[0232] For example, if the number of remaining seats at the previous query time was 18, the number of remaining seats at the current query time was 12, and the query time interval was 30 minutes, then the inventory consumption was 6. Multiplying 6 by 60 and dividing by 30, we get an inventory consumption rate of 12 seats per hour.

[0233] Furthermore, the sell-out process baseline stores the baseline inventory value corresponding to each time point.

[0234] Specifically, the previous query time and the current query time are matched with the sell-out process baseline to obtain the baseline inventory value corresponding to the two query times; when the query time is between two adjacent baseline time nodes, the baseline inventory value corresponding to the query time is determined according to the linear interpolation process described above.

[0235] Furthermore, the baseline inventory value at the current query time is subtracted from the baseline inventory value at the previous query time to obtain the baseline inventory consumption quantity; the baseline inventory consumption quantity is multiplied by 60 and then divided by the query time interval to obtain the baseline inventory consumption rate corresponding to the same query interval.

[0236] If the number of remaining seats is not less than the baseline inventory value at the current query time, the seat locking status will be determined as a state within the baseline range.

[0237] If the number of remaining seats is less than the baseline inventory value at the current query time, and the inventory consumption rate is not greater than the baseline inventory consumption rate, the seat locking status will be determined as a normal consumption status.

[0238] If the number of remaining seats is less than the baseline inventory value at the current query time, and the inventory consumption rate is greater than the baseline inventory consumption rate, the seat locking status will be determined as an abnormal locking status.

[0239] In addition, to exclude instantaneous changes caused by single ticketing, group bookings, and manual inventory adjustments, status verification is performed on three consecutive query intervals. When at least two of the three consecutive query intervals are determined to be in an abnormal locked state, it is determined that the state of remaining seats being lower than the sell-out process baseline continues, and the process for identifying and handling false seat-grabbing behavior is initiated.

[0240] In this embodiment, the access frequency characteristic uses the requesting end identifier as the statistical object.

[0241] Specifically, the requester identifier is formed by combining the network address, device identifier, and session identifier; taking the current query time as the endpoint, the access records generated by the requester in the previous 300 seconds are extracted, and the total number of requests, the number of repeated queries for the current flight and the current cabin class, and the time interval between adjacent requests are counted.

[0242] As a preferred implementation, the number of accesses per minute is obtained by dividing the total number of requests within 300 seconds by 5; the duplicate query ratio is obtained by dividing the number of duplicate queries for the current flight and the current cabin class by the total number of requests within 300 seconds; when the total number of requests is 0, the duplicate query ratio is not calculated.

[0243] Furthermore, the time interval between adjacent requests is obtained sequentially based on the difference in the reception time of two adjacent access records.

[0244] Specifically, first, add up all the time intervals and then divide by the number of time intervals to obtain the average request time interval; then, subtract the average request time interval from each time interval, square the difference respectively, add up all the squared results and divide by the number of time intervals, then take the square root of the result to obtain the standard deviation of the request time interval; divide the standard deviation by the average request time interval to obtain the degree of variation of the request time interval; when the average request time interval is 0, the degree of variation is recorded as 0.

[0245] In this embodiment, the order conversion rate is obtained by dividing the number of valid orders generated by the requesting end within a 30-minute statistical period by the number of inventory queries.

[0246] Specifically, a valid order is an order in which passenger information has been submitted and a reservation record has been generated, and payment or ticketing has been completed within 15 minutes of the reservation record being generated; cancelled orders, orders with failed payments, and reservation records in which payment or ticketing has not been completed within 15 minutes are not counted in the number of valid orders.

[0247] For example, if the requesting end completes 80 inventory queries and forms 2 valid orders within 30 minutes, the order conversion rate is 0.025 when 2 is divided by 80; if the number of inventory queries is 0, the order conversion rate is recorded as 0.

[0248] As a preferred implementation, the access frequency threshold and order conversion threshold are determined based on normal access records within 30 days prior to the current date.

[0249] Specifically, normal access records are those that have completed real-name session verification, were not identified as crawler access requests, and generated normal interface responses; the threshold calculation sample is no less than 1,000 request clients.

[0250] In addition, when determining the access frequency threshold, the number of accesses per minute for each sample request client is calculated, and the total number of accesses per minute is added together and divided by the number of request clients to obtain the average access frequency.

[0251] Next, subtract the average access frequency from the number of accesses per minute for each requesting end, square the difference, add all the squared results together, divide by the number of requesting ends, and then take the square root of the result to get the standard deviation of access frequency; multiply the standard deviation of access frequency by 2 and add it to the average access frequency to get the access frequency threshold.

[0252] Furthermore, when determining the order conversion threshold, the order conversion ratio of each sample request is calculated separately. The average order conversion ratio is obtained by summing all the order conversion ratios and dividing by the number of requesters.

[0253] Then, following the calculation process of the standard deviation of access frequency, the standard deviation of order conversion ratio is obtained; the order conversion threshold is obtained by subtracting twice the standard deviation of order conversion ratio from the average order conversion ratio; when the calculation result is less than 0, the order conversion threshold is set to 0.

[0254] Specifically, when the number of accesses per minute on the requesting end is greater than the access frequency threshold, the repeated query ratio is not less than 0.7, the variation of the request time interval is not greater than 0.1, and the order conversion ratio is less than the order conversion threshold, the access behavior corresponding to the requesting end will be identified as false seat-grabbing behavior.

[0255] Furthermore, to confirm the correlation between false seat-grabbing behavior and inventory decline, the temporary seat-locking records generated by the requesting end within the same 30-minute statistical period are further read; if the number of temporary seat-locking instances triggered by the requesting end is not less than 5 times, and the result of dividing the number of temporary seat-locking instances that have not been converted into valid orders within 15 minutes by the total number of temporary seat-locking instances is not less than 0.8, then the false seat-grabbing behavior is confirmed.

[0256] When the seat lock status is abnormal and false seat-grabbing behavior is established, the number of remaining seats is identified as forming an abnormal downward trajectory that can be identified by the continuous query program, and the first abnormal flag is set to a valid state.

[0257] If the seat lock status is not an abnormal lock status, or if the false seat-grabbing behavior is not established, the first abnormal status will be set to an invalid status.

[0258] S5 includes obtaining the semantic level corresponding to the first anomaly identifier and the remaining seat quantity field; extracting field features of the original inventory records based on the first anomaly identifier; constructing decision tree nodes based on field features and semantic levels to generate branch conditions; dividing the original inventory records through branch conditions to obtain leaf weights; if the leaf weights meet the association consistency threshold, determining the disturbance amplitude based on the leaf weights and generating mapping rules; and using the mapping rules to perform numerical mapping processing on the original inventory records to obtain the first replacement value.

[0259] In this embodiment, the first anomaly identifier is read based on the flight number, flight date, flight segment, cabin class code, inventory record generation time, and request terminal identifier, and the semantic level corresponding to the remaining seat quantity field is obtained from the first feature set.

[0260] When the remaining seat quantity field is classified as a numerical perturbation level, it is allowed to proceed to subsequent numerical mapping processing; when the first anomaly identifier is invalid, numerical perturbation is not performed, and the original remaining seat quantity is directly determined as the first replacement value.

[0261] When the first anomaly is in a valid state, field features are extracted from the original inventory records, the sell-out process baseline, the cargo space association matrix, and the inventory consumption records.

[0262] Specifically, the extracted field features include the original number of remaining seats, the sell-out progress benchmark value at the current time point, the benchmark inventory difference, the sales stage number, the actual inventory consumption rate, the benchmark inventory consumption rate, the maximum number of seats allowed to be sold in the current cabin, and the associated inventory deviation.

[0263] Furthermore, the baseline inventory difference is obtained by subtracting the original number of remaining seats from the baseline value of the sell-out progress at the current time point.

[0264] When the calculation result is greater than 0, it indicates that the current number of remaining seats is lower than the baseline value of the sold-out process; when the calculation result is equal to 0, it indicates that the two are the same; when the calculation result is less than 0, the inventory record will not perform the mapping process of increasing the number of remaining seats.

[0265] Furthermore, the related inventory deviation is obtained based on the inventory quantity relationship between the current cargo space and the related cargo space.

[0266] Specifically, first, subtract the remaining number of seats in each associated cabin from the original remaining number of seats in the current cabin, and take the absolute value of the difference; then multiply each absolute value of the difference by the association weight between the current cabin and the corresponding associated cabin; add all the products together and divide by the sum of all association weights to get the associated inventory deviation; if there is no associated cabin with an association weight greater than 0.7 in the current cabin, the associated inventory deviation is recorded as 0.

[0267] In this embodiment, the decision tree is built using historical inventory records from the 90 days prior to the current flight date.

[0268] Specifically, historical records are limited to departed flight records with the same route, flight number, aircraft type, and cabin class code. Records with flight cancellations, aircraft type changes, missing more than three inventory time points, or manual batch inventory adjustments are not included in the training sample. If there are more than 30 eligible historical flights, 30 flights are selected from the latest to the earliest departure date. If there are 10 to 30 eligible historical flights, all records are used. If there are fewer than 10 flights, the sampling range is extended to 180 days.

[0269] For each historical inventory record, candidate perturbation results are generated for adding 1 seat, adding 2 seats, and adding 3 seats.

[0270] Among them, the corresponding historical record will be marked as a consistent sample when the candidate disturbance result meets the following conditions: the candidate disturbance result is not less than 0; it is not greater than the maximum number of seats allowed to be sold in the current cabin class; the difference in quantity between the candidate disturbance result and each associated cabin class does not exceed the determined allowable difference in quantity; the deviation from the benchmark value of the sell-out process is less than the determined sell-out threshold; if any one of the conditions is not met, the corresponding record will be marked as a non-consistent sample.

[0271] In addition, when constructing the decision tree, all training samples are placed at the root node, and the baseline inventory difference, associated inventory deviation, sales stage number, actual inventory consumption rate, baseline inventory consumption rate, and original remaining seat quantity are used as candidate branch fields.

[0272] For numerical fields, first arrange all sample values ​​of the field in ascending order, then add adjacent two values ​​together and divide by 2, and use the result as the candidate branch value.

[0273] Specifically, based on the candidate branch value, samples with field values ​​not greater than the candidate branch value are assigned to the first child node, and samples with field values ​​greater than the candidate branch value are assigned to the second child node. The sales stage numbers are branched according to the first to the fourth sales stages.

[0274] When determining the branching conditions, the degree of sample contamination at the current node is calculated first.

[0275] Specifically, the consistent sample ratio is obtained by dividing the number of consistent samples by the total number of node samples; the inconsistent sample ratio is obtained by dividing the number of inconsistent samples by the total number of node samples; the consistent sample ratio is multiplied by itself, and the inconsistent sample ratio is multiplied by itself, and then the sum of the two products is subtracted from 1 to obtain the sample mixing degree before the branch.

[0276] For each candidate branch condition, the sample confounding degree of the two child nodes is calculated respectively.

[0277] Specifically, the sample heterogeneity of the first child node is multiplied by the number of samples in the first child node, the sample heterogeneity of the second child node is multiplied by the number of samples in the second child node, and the two products are added together and divided by the total number of samples in the current node to obtain the weighted heterogeneity after the branch. The weighted heterogeneity after the branch is subtracted from the sample heterogeneity before the branch to obtain the split gain of the candidate branch condition.

[0278] Furthermore, the candidate branch condition with the largest split gain is selected as the branch condition for the current node.

[0279] When there are two or more candidate conditions with the same partition gain, the branch fields are determined in the following order: baseline inventory difference, associated inventory deviation, sales stage number, actual inventory consumption rate, baseline inventory consumption rate, and original remaining seat quantity.

[0280] Among them, if the number of samples in a node is less than 20, the node depth reaches 6 layers, the proportion of consistent samples in the node is not less than 0.95, or the splitting gain of all candidate branch conditions is not greater than 0.01, the splitting will stop and the node will be determined as a leaf node.

[0281] As a preferred implementation, the leaf weight is calculated based on the number of consistent samples and the number of inconsistent samples within the leaf node.

[0282] Specifically, the number of consistent samples is increased by 1, and the number of inconsistent samples is increased by 1. Then, the increased number of consistent samples is divided by the sum of the increased number of consistent samples and the number of inconsistent samples to obtain the leaf weight. Increasing by 1 is used to avoid the leaf weight being directly set to 0 or 1 when the leaf node contains only samples of a single class.

[0283] In addition, the association consistency threshold is determined based on the validation results of historical samples.

[0284] Specifically, historical samples are arranged chronologically, with the first 80% used to build a decision tree and the last 20% used for validation; 0.60, 0.65, 0.70, 0.75, 0.80, 0.85 and 0.90 are selected as candidate thresholds.

[0285] For each candidate threshold, count the number of validation samples whose leaf weight is not less than the candidate threshold, and count the number of samples that actually belong to the consistent sample.

[0286] The consistency accuracy is obtained by dividing the number of consistent samples by the number of validation samples whose leaf weights are not less than the candidate threshold.

[0287] In addition, among the candidate thresholds with a consistency accuracy of not less than 0.95, the candidate threshold that allows the largest number of perturbation samples is selected as the association consistency threshold.

[0288] Specifically, when the number of perturbation samples is the same, the candidate threshold with the larger value is selected; when there is no candidate threshold with a consistency accuracy of not less than 0.95, the association consistency threshold is set to 0.90; this threshold is stored separately according to route, aircraft type and cabin class code, and is recalculated once every 7 days.

[0289] Input the field features of the current original inventory record into the decision tree, and judge step by step according to the branch conditions of each node until the corresponding leaf node is entered, and read the leaf weight of the leaf node.

[0290] When the leaf weight is less than the association consistency threshold, the perturbation amplitude is set to 0.

[0291] Specifically, when the leaf weight is not less than the association consistency threshold and is less than 0.80, the initial perturbation amplitude is determined to be 1 seat; when the leaf weight is not less than 0.80 and is less than 0.90, the initial perturbation amplitude is determined to be 2 seats; when the leaf weight is not less than 0.90, the initial perturbation amplitude is determined to be 3 seats.

[0292] Furthermore, the initial disturbance magnitude is also limited by the baseline inventory difference.

[0293] Specifically, when the initial disturbance amplitude is greater than the benchmark inventory difference, the benchmark inventory difference is determined as the actual disturbance amplitude; when the initial disturbance amplitude is not greater than the benchmark inventory difference, the initial disturbance amplitude is retained; when the benchmark inventory difference is less than 1, the actual disturbance amplitude is determined as 0; when the sales stage is the fourth sales stage, the actual disturbance amplitude shall not exceed 1 seat.

[0294] Furthermore, mapping rules are generated based on the actual disturbance amplitude.

[0295] Specifically, when the actual disturbance amplitude is 0, the mapping rule is to keep the original number of remaining seats unchanged; when the actual disturbance amplitude is greater than 0, the request fingerprint is converted into a non-negative integer, and then the non-negative integer is divided by the actual disturbance amplitude to obtain the remainder of the division, and 1 is added to the remainder. The result is used as the mapping increment; the mapping increment is not less than 1 and not greater than the actual disturbance amplitude.

[0296] When processing the original inventory records using mapping rules, the original number of remaining seats is added to the mapping increment to obtain the first replacement value.

[0297] For example, if the actual disturbance amplitude is 3, and the remainder after dividing the non-negative integer obtained by the fingerprint conversion by 3 is 1, then the mapping increment is 2; when the original number of remaining seats is 4, the first replacement value is 6.

[0298] S6 includes obtaining a first replacement value, calculating the semantic deviation of the first replacement value within the business semantic range defined by the cabin association matrix, determining whether the semantic deviation exceeds a preset threshold, determining that the first replacement value deviates from the business semantic range if the semantic deviation exceeds the preset threshold, generating a boundary trimming instruction, calculating the out-of-bounds correction value based on the semantic constraints according to the boundary trimming instruction, and performing boundary trimming on the first replacement value using the out-of-bounds correction value to obtain a second replacement value.

[0299] In this embodiment, the first replacement value is read based on the flight number, flight date, flight segment, cabin class code, inventory record generation time and request terminal identifier, and the association weight between the current cabin class and other cabin classes is obtained from the cabin class association matrix.

[0300] Cabins with an association weight greater than 0.7 are used as the association constraint objects for the current cabin, while cabins with an association weight less than 0.7 are not included in the calculation of the semantic scope of this business.

[0301] The business semantic scope of the current cabin class consists of a lower numerical boundary and an upper numerical boundary.

[0302] Specifically, before calculating the boundary, 30 flights that have already taken off within 90 days prior to the current flight date, with the same route, flight number, aircraft type, and sales stage, are selected. Flights that have been canceled, had their aircraft type changed, had more than 3 missing inventory records, or had been subject to manual bulk inventory adjustments are not included in the calculation sample.

[0303] For the current cabin class and each associated cabin class, read the number of remaining seats for historical flights at the same inventory time point, subtract the number of remaining seats for associated cabin classes from the number of remaining seats for the current cabin class, and take the absolute value of the difference; add up all the absolute values ​​of the differences and divide by the difference quantity to obtain the historical average quantity difference.

[0304] Specifically, the standard deviation of the historical quantity difference is calculated as follows: subtract the historical average quantity difference from the absolute value of each difference, square the result, add all the squared results together and divide by the quantity of the difference, and finally take the square root of the result; multiply the standard deviation by 2, add it to the historical average quantity difference, and round the result up to obtain the allowable quantity difference between the current cabin class and the associated cabin class.

[0305] When determining the lower boundary of the value, the corresponding allowable number difference is subtracted from the remaining number of seats in each associated cabin at the current time node to form the candidate value of the lower boundary.

[0306] Compare all candidate values ​​for the lower boundary with 0, and take the largest value as the lower boundary.

[0307] When determining the upper boundary of the value, the remaining number of seats in each associated cabin class at the current time node is added to the corresponding allowable number difference to form the candidate value of the upper boundary.

[0308] Then compare all the upper boundary candidate values, the maximum number of seats allowed to be sold in the current cabin class, and the value after increasing the sell-out progress benchmark value of the current time node by 3, and take the result with the smallest value as the upper boundary of the value.

[0309] If there are no associated cabins with a weight greater than 0.7 for the current cabin class, the lower boundary of the value is set to 0. The upper boundary of the value is then compared with the upper boundary of the value after the sell-out progress baseline is increased by 3. The smaller value is taken as the upper boundary of the value.

[0310] Furthermore, after obtaining the business semantic range, the first replacement value is compared with the lower boundary and the upper boundary of the value respectively; when the first replacement value is not less than the lower boundary and not greater than the upper boundary, the semantic deviation is recorded as 0.

[0311] When the first replacement value is less than the lower boundary of the value, the first replacement value is subtracted from the lower boundary of the value to obtain the downward deviation amount; when the first replacement value is greater than the upper boundary of the value, the first replacement value is subtracted from the upper boundary of the value to obtain the upward deviation amount.

[0312] When the upper boundary of a numerical value is greater than the lower boundary of a numerical value, the degree of semantic deviation is obtained by dividing the deviation amount by the difference between the upper and lower boundaries of the numerical value.

[0313] When the upper boundary of a numerical value equals the lower boundary of a numerical value, if the first replacement value is equal to that boundary value, the semantic deviation is recorded as 0; if the first replacement value is not equal to that boundary value, the semantic deviation is recorded as 1.

[0314] In this embodiment, the preset threshold is determined based on historical disturbance records that have completed boundary verification within 30 days prior to the current date, and there are no fewer than 1,000 historical disturbance records involved in the calculation; each record includes a first replacement value, a lower boundary of the value, an upper boundary of the value, a degree of semantic deviation, and a verification result of whether the response data has a conflict in cabin quantity relationship.

[0315] Furthermore, 0.02, 0.05, 0.08, 0.10, 0.15 and 0.20 were selected as candidate thresholds in turn.

[0316] Specifically, for each candidate threshold, the number of records whose semantic deviation is no greater than the candidate threshold is counted, and the number of records among them that do not have conflicts in cabin number relationships is counted; the number of records that do not have conflicts is divided by the number of records whose semantic deviation is no greater than the candidate threshold to obtain the semantic consistency rate corresponding to the candidate threshold.

[0317] Among the candidate thresholds with a semantic consistency rate of not less than 0.98, the candidate threshold with the largest value is selected as the preset threshold.

[0318] If there is no candidate threshold with a semantic consistency rate of not less than 0.98, the preset threshold is set to 0.02. The preset threshold is stored separately according to the route, aircraft type and cabin class code, and is recalculated once every 7 days.

[0319] When the semantic deviation is no greater than a preset threshold, no boundary clipping instruction is generated, and the first replacement value is directly used as the second replacement value.

[0320] When the semantic deviation exceeds a preset threshold, the first replacement value is determined to deviate from the business semantic range, and a boundary trimming instruction is generated.

[0321] Specifically, the boundary trimming instruction includes flight number, flight date, flight segment, cabin class code, first replacement value, lower boundary of the value, upper boundary of the value, deviation direction, and semantic deviation degree; when the first replacement value is less than the lower boundary of the value, the deviation direction is recorded as downward boundary crossing; when the first replacement value is greater than the upper boundary of the value, the deviation direction is recorded as upward boundary crossing.

[0322] Furthermore, the out-of-bounds correction value is calculated based on the boundary clipping command.

[0323] Specifically, when a downward bound occurs, the first replacement value is subtracted from the lower boundary of the value to obtain the upward correction amount, and the lower boundary of the value is determined as the bounds correction value; when an upward bound occurs, the upper boundary of the value is subtracted from the first replacement value to obtain the downward correction amount, and the upper boundary of the value is determined as the bounds correction value.

[0324] Furthermore, after generating the out-of-bounds correction value, it is verified again whether the value meets three semantic constraints: the out-of-bounds correction value must not be less than 0, must not be greater than the maximum number of seats allowed to be sold in the current cabin class, and the difference in quantity between the correction value and each associated cabin class must not exceed the corresponding allowable quantity difference.

[0325] If all three conditions are met, the out-of-bounds correction value is retained; if any one condition is not met, the value is re-constrained according to the lower and upper boundaries until the correction result is within the scope of business semantics.

[0326] As a preferred embodiment, the first replacement value is trimmed at the boundary using an out-of-bounds correction value.

[0327] Specifically, when the first replacement value is less than the lower boundary of the value, it is adjusted to the lower boundary of the value; when the first replacement value is greater than the upper boundary of the value, it is adjusted to the upper boundary of the value; when the first replacement value does not exceed the deviation allowed by the preset threshold, the first replacement value is retained.

[0328] When the cropping result contains a decimal, it is rounded to the nearest integer.

[0329] If the rounding result is less than 0, adjust it to 0; if the rounding result is greater than the maximum number of seats that can be sold in the current cabin class, adjust it to the maximum number of seats that can be sold, thus obtaining the second replacement value.

[0330] S7 includes processing the original inventory records to obtain the corresponding time nodes, obtaining the dynamic inventory balance based on the time nodes, and obtaining the second replacement value; determining the sell-out process baseline corresponding to the time node by extracting the sales forecast trajectory through the time node; calculating the baseline deviation of the second replacement value relative to the sell-out process baseline; determining whether the second replacement value meets the sell-out process baseline, including if the baseline deviation is less than the preset sell-out critical threshold, then determining that the second replacement value meets the sell-out process baseline at the time node, and obtaining the verification result.

[0331] In this embodiment, the planned departure time, inventory record generation time, remaining seat quantity, and inventory version number are read from the original inventory record according to the flight number, flight date, flight segment, and cabin class code.

[0332] If there are two or more inventory records with the same generation time, they are sorted by inventory version number from largest to smallest, and the record with the largest inventory version number is selected as the current inventory record. The other records are not included in this verification.

[0333] When processing the original inventory records by time, the planned takeoff time and the inventory record generation time are first converted into minutes accumulated from a unified timing starting point. Then, the minutes corresponding to the inventory record generation time are subtracted from the minutes corresponding to the planned takeoff time to obtain the remaining minutes until the planned takeoff. The remaining minutes are divided by 60 to obtain the hours until the planned takeoff. The current time node is identified by both the inventory record generation time and the number of hours.

[0334] Specifically, if the number of hours remaining until the scheduled departure is greater than 720, the time point will be classified into the first sales stage; if it is greater than 168 but not greater than 720, it will be classified into the second sales stage; if it is greater than 24 but not greater than 168, it will be classified into the third sales stage; if it is not less than 0 but not greater than 24, it will be classified into the fourth sales stage; if the number of hours remaining until the scheduled departure is less than 0, the corresponding record will be formed after the scheduled departure time, and the sell-out process verification will not be performed.

[0335] Furthermore, after determining the time point, the remaining number of seats in the current inventory snapshot is read, and the reservation change records between the generation of the inventory snapshot and the current query time are retrieved.

[0336] Specifically, the reservation change record includes the number of newly valid reservations, the number of temporary reservations, the number of cancellations and releases, and the number of reservations released after timeout.

[0337] In addition, dynamic inventory balance is obtained as follows: first, subtract the number of newly added valid reservations from the number of remaining seats in the inventory snapshot, then subtract the number of temporary seat locks, and then add the number of cancellations and seat locks released after timeout; if the calculation result is less than 0, the dynamic inventory balance is adjusted to 0; if the calculation result is greater than the maximum number of seats allowed to be sold in the current cabin class, the dynamic inventory balance is adjusted to the maximum number of seats.

[0338] For example, if the remaining number of seats in the inventory snapshot is 20, the number of newly valid reservations is 4, the number of temporary locked seats is 3, the number of cancelled and released seats is 2, and the number of locked seats released after timeout is 1, then subtract 4 from 20, subtract 3, add 2 and add 1 in sequence, and the resulting dynamic inventory balance is 16.

[0339] Furthermore, based on the flight number, flight date, flight segment, cabin class code, and requester identifier, a second replacement value is obtained after boundary trimming, and this second replacement value is associated with the current time node and dynamic inventory balance. When the second replacement value is less than 0, it is adjusted to 0; when it is greater than the maximum number of seats allowed to be sold in the current cabin class, it is adjusted to the maximum number of seats. The dynamic inventory balance is used to represent the real-time inventory status at the current time node, does not replace the second replacement value, and is only used as inventory reference data in subsequent trajectory verification.

[0340] The sales forecast trajectory uses the established sell-out progress baseline.

[0341] Specifically, the sell-out process baseline is set with 12 trajectory nodes according to the time from the planned takeoff: 720 hours, 504 hours, 336 hours, 168 hours, 120 hours, 72 hours, 48 ​​hours, 24 hours, 12 hours, 6 hours, 3 hours and 1 hour. Each trajectory node stores the corresponding baseline inventory value.

[0342] Specifically, when extracting the sales forecast trajectory based on the current time point, the trajectory segment from the current time point to 1 hour before the planned takeoff is retained.

[0343] When the current time node coincides with any trajectory node, the baseline inventory value of that trajectory node is directly determined as the baseline value for the sold-out process corresponding to the current time node.

[0344] When the current time node is located between two adjacent trajectory nodes, the corresponding sell-out progress baseline value is obtained through linear interpolation.

[0345] Specifically, first calculate the time interval between the current time node and the previous trajectory node, then calculate the total time interval between the previous trajectory node and the next trajectory node, and divide the aforementioned time interval by the total time interval to obtain the position ratio of the current time node between two adjacent trajectory nodes.

[0346] Subsequently, the baseline inventory value of the previous trajectory node is subtracted from the baseline inventory value of the next trajectory node. The difference is multiplied by the position ratio and then added to the baseline inventory value of the previous trajectory node. The result is the baseline value of the sell-out process corresponding to the current time node. If the calculation result contains decimals, two decimal places are retained for the calculation of the baseline deviation.

[0347] Furthermore, after obtaining the sell-out process baseline value, the second replacement value is subtracted from the sell-out process baseline value, and the absolute value of the difference is taken to obtain the baseline deviation amount.

[0348] When the sell-out progress benchmark value is greater than 0, the benchmark deviation amount is divided by the sell-out progress benchmark value to obtain the benchmark deviation range.

[0349] When the sell-out process baseline value is equal to 0 and the second replacement value is equal to 0, the baseline deviation is recorded as 0; when the sell-out process baseline value is equal to 0 and the second replacement value is greater than 0, the baseline deviation is recorded as 1.

[0350] In this embodiment, the sell-out threshold is determined based on historical verification records within 30 days prior to the current date.

[0351] Specifically, historical verification records are limited to those where the route, flight number, aircraft type, and cabin class code are all the same as the current record, and the corresponding flight has already taken off; records with flight cancellations, aircraft type changes, planned departure time adjustments exceeding 30 minutes, or missing more than 3 of the 12 trajectory nodes are not included in the threshold calculation.

[0352] In addition, there must be no fewer than 1,000 historical verification records involved in the threshold calculation; if there are fewer than 1,000 records that meet the criteria within 30 days, the statistical range will be extended to 60 days; if there are still fewer than 1,000 records within 60 days, the statistical range will be extended to 90 days.

[0353] Specifically, each historical verification record includes a second replacement value, the sell-out progress benchmark value for the corresponding time node, the benchmark deviation range, and the verification results of whether abnormal jumps occurred in the three consecutive inventory time nodes after the record; if the inventory change at any adjacent time node in the three consecutive inventory time nodes exceeds the sum of the historical average change for the corresponding sales stage and twice the standard deviation, the historical verification record is recorded as having an abnormal jump; the remaining records are recorded as not having an abnormal jump.

[0354] Furthermore, 0.05, 0.08, 0.10, 0.12, 0.15 and 0.20 were successively selected as candidate sell-out thresholds.

[0355] For each candidate sell-out threshold, count the number of historical verification records whose baseline deviation is less than the candidate threshold, and count the number of records that did not have abnormal jumps. Divide the number of records that did not have abnormal jumps by the number of historical verification records whose baseline deviation is less than the corresponding candidate threshold to obtain the trajectory conformity rate corresponding to the candidate threshold.

[0356] As a preferred embodiment, the candidate value with the largest value is selected as the sell-out threshold from the candidate sell-out thresholds with a trajectory conformity rate of not less than 0.98.

[0357] If there are no candidate values ​​with a trajectory matching rate of not less than 0.98, the sell-out threshold is set to 0.05. The sell-out threshold is stored separately according to the route, aircraft type and cabin class code, and is recalculated once every 7 days.

[0358] Furthermore, the baseline deviation corresponding to the second replacement value is compared with the sell-out threshold.

[0359] Specifically, if the deviation from the benchmark is less than the sell-out threshold, the second replacement value is determined to meet the sell-out process benchmark at the current time point, and the verification result is recorded as compliant; if the deviation from the benchmark is not less than the sell-out threshold, the second replacement value is determined to not meet the sell-out process benchmark at the current time point, and the verification result is recorded as non-compliant.

[0360] S8 includes extracting abnormal fluctuation features corresponding to the verification result to determine the deviation amplitude if the obtained verification result is not compliant; obtaining a neighborhood sampling set by truncating the time window where the second replacement value is located through the deviation amplitude; calculating the weight allocation matrix of the neighborhood sampling set and obtaining the local weighted mean based on the weight allocation matrix; smoothing the second replacement value through the local weighted mean to obtain the third replacement value.

[0361] In this embodiment, the generated verification result is retrieved based on the flight number, flight date, flight segment, cabin class code, inventory record generation time, and requester identifier.

[0362] If the verification result is satisfactory, the second replacement value is directly determined as the third replacement value; if the verification result is unsatisfactory, the second replacement value, the sell-out progress benchmark value at the current time node, the inventory value at the previous time node, and the inventory reference value at the next time node are extracted to determine the abnormal fluctuation characteristics.

[0363] In addition, the inventory value at the previous time point is taken from the most recent response record generated by the same requesting party for the same flight, the same flight segment, and the same cabin class.

[0364] When there is no previous response record, the sell-out progress baseline value at the current time node is used as the inventory reference value at the previous time node; when no actual inventory record has been formed at the next time node, the baseline inventory value of the most recent trajectory node after the current time node is read from the sell-out progress baseline and used as the inventory reference value for the next time node.

[0365] Specifically, the abnormal fluctuation characteristics include the number of benchmark deviations, the number of forward jumps, and the number of backward jumps. The number of benchmark deviations is obtained by subtracting the benchmark value of the sell-out process at the current time point from the second replacement value and taking the absolute value. The number of forward jumps is obtained by subtracting the inventory value at the previous time point from the second replacement value and taking the absolute value. The number of backward jumps is obtained by subtracting the inventory reference value at the next time point from the second replacement value and taking the absolute value.

[0366] Furthermore, the number of baseline deviations, forward jumps, and backward jumps are compared, and the result with the largest value is taken as the deviation magnitude. The maximum value is used to determine the deviation magnitude, so that the time window is constrained by both baseline deviation and jumps at adjacent time nodes.

[0367] In this embodiment, the deviation limit used to divide the time window is determined based on the historical smoothing records within 30 days prior to the current date.

[0368] Specifically, the historical records are limited to records with the same route, flight number, aircraft type, and cabin class code, and which have been verified through the sold-out process after smoothing. The number of records included in the calculation shall not be less than 300.

[0369] Furthermore, by summing the deviation ranges of all historical records and dividing by the number of records, we obtain the historical average deviation.

[0370] When calculating the standard deviation, the historical average deviation is subtracted from the deviation range of each record, the difference is squared, all squared results are summed and then divided by the number of records. Finally, the square root of the result is taken.

[0371] The historical average deviation is used as the first deviation limit, and the sum of the historical average deviation and the standard deviation of the deviation is used as the second deviation limit. The deviation limits are saved separately according to the route, aircraft type and cabin class code, and are recalculated once every 7 days.

[0372] Specifically, when the current deviation is not greater than the first deviation limit, 30 minutes are taken forward and 30 minutes are taken backward, centered on the time node where the second replacement value is located; when the current deviation is greater than the first deviation limit but not greater than the second deviation limit, 60 minutes are taken forward and 60 minutes are taken backward; when the current deviation is greater than the second deviation limit, 120 minutes are taken forward and 120 minutes are taken backward.

[0373] In addition, within a defined time window, retrieve inventory records corresponding to the same flight, the same flight segment, the same cabin class, and the same requesting party.

[0374] Specifically, each inventory record includes the recording time, the replacement value after boundary trimming, the sell-out progress benchmark value at the corresponding time node, and the dynamic inventory balance.

[0375] When there are two or more inventory records with the same recording time, the record with the largest inventory version number is retained; when the number of records in the time window exceeds 7, they are arranged in ascending order of the interval between each record time and the current time node, and the first 7 records are retained.

[0376] If there are fewer than 3 inventory records within the time window, the trajectory node closest to the current time node is added from the sold-out process baseline.

[0377] For each new trajectory node, the baseline inventory value of that node is used as the sample value until the number of neighboring records reaches 3. The inventory records formed after filtering or addition constitute the neighboring sample set.

[0378] For each record in the neighborhood sampling set, calculate the time distance weight, benchmark deviation weight, and dynamic inventory weight respectively.

[0379] Specifically, the calculation process for the time distance weight is as follows: divide the minute interval between the sampled record and the current time node by 30, add 1 to the result, and then divide 1 by the increased result. When the sampled record coincides with the current time node, the time distance weight is 1.

[0380] The calculation process for the baseline deviation weight is as follows: subtract the baseline value of the sold-out process corresponding to the sampling time from the sampled value, and take the absolute value of the difference; add 1 to the absolute value of the difference, and then divide 1 by the result after the addition.

[0381] The calculation process for dynamic inventory weight is as follows: subtract the dynamic inventory balance corresponding to the sampling time from the sampled value, and take the absolute value of the difference; add 1 to the absolute value of the difference, and then divide 1 by the result after the addition.

[0382] Specifically, the initial weight of each sampling record is obtained by multiplying its time distance weight, benchmark deviation weight, and dynamic inventory weight; all initial weights are added together to obtain the total weight; then, the initial weight of each sampling record is divided by the total weight to obtain the allocated weight of that record; all allocated weights are added together to equal 1.

[0383] When the total weight is equal to 0, 1 is divided by the number of records in the neighborhood sampling set, and the result is used as the weight assigned to each sampling record.

[0384] Specifically, a weight allocation matrix is ​​established according to the time order of each record in the neighborhood sampling set; the number of rows and columns of the matrix are equal to the number of sampling records. The allocation weight of each sampling record is written into the corresponding diagonal position, and 0 is written into the remaining positions, so that each sampling value is consistent with the corresponding allocation weight.

[0385] When calculating the local weighted mean, the sampled value of each sampled record is multiplied by its assigned weight, and then all the products are added together. The result is rounded to two decimal places and used as the local weighted mean at the current time point.

[0386] When smoothing the second replacement value using the local weighted mean, multiply the local weighted mean by 0.7, multiply the second replacement value by 0.3, add the two calculation results together, and round them to the nearest integer to obtain the smoothed candidate value.

[0387] In this embodiment, the smoothed candidate values ​​are compared with the determined lower and upper boundaries of the values.

[0388] Specifically, when the smoothing candidate value is less than the lower boundary of the value, the lower boundary of the value is used as the third replacement value; when the smoothing candidate value is greater than the upper boundary of the value, the upper boundary of the value is used as the third replacement value; when the smoothing candidate value is between the lower boundary and the upper boundary of the value, the smoothing candidate value is used as the third replacement value.

[0389] Furthermore, after obtaining the third replacement value, the absolute value of the difference between it and the current time node's sell-out progress baseline value is recalculated.

[0390] Specifically, if the absolute value of the difference is less than the baseline deviation amount corresponding to the second replacement value, the third replacement value is retained; if the absolute value of the difference is not less than the baseline deviation amount corresponding to the second replacement value, the local weighted average is rounded to the nearest integer and restricted according to the lower and upper boundaries of the value, and the restricted value is determined as the third replacement value.

[0391] S9 includes: copying the original inventory record to generate a response copy and processing the response copy with a third replacement value to obtain hidden data that conforms to the evolution characteristics; determining whether the access request is a crawler access request; if the access request is a crawler access request, embedding the request fingerprint into the hidden data to obtain hidden data with the embedded request fingerprint; returning the hidden data with the embedded request fingerprint to the corresponding request end, thereby updating the response copy of the original inventory record with the third replacement value to obtain hidden data with the embedded request fingerprint and conforming to the evolution characteristics, and returning the hidden data to the corresponding request end when the access request is determined to be a crawler access request, while keeping the original inventory record unchanged.

[0392] In this embodiment, the original inventory record and the third replacement value are read according to the flight number, flight date, flight segment, cabin class code, inventory record generation time and request identifier, respectively.

[0393] The original inventory record is taken from a read-only copy of the flight inventory management system, and the third replacement value is taken from the smoothing record corresponding to the current access request.

[0394] Specifically, when generating a response copy, a deep copy is performed on the original inventory record, writing the flight number, flight date, flight segment, scheduled departure time, cabin class code, cabin class availability status, fare data, original number of remaining seats, and inventory version number into a separate response object; the response object and the original inventory record use different storage addresses, and modifications to the fields of the response object are not propagated to the original inventory record.

[0395] Furthermore, the remaining seat quantity field in the response copy is located according to the cabin class code, and the value of this field is replaced with a third replacement value; the flight number, flight date, flight segment, cabin class, cabin availability status and fare data are kept as they were when copied, thus forming hidden data to be verified.

[0396] Specifically, the hidden data to be verified undergoes evolution feature verification. First, the third replacement value is compared with the determined lower and upper boundaries of the value. The third replacement value must not be less than the lower boundary and must not be greater than the upper boundary. Second, the sell-out progress benchmark value at the current time point is subtracted from the third replacement value, and the absolute value of the difference is taken. When the sell-out progress benchmark value is greater than 0, the absolute value of the difference is divided by the sell-out progress benchmark value, and the resulting benchmark deviation should be less than the determined sell-out critical threshold. When the sell-out progress benchmark value is equal to 0, the third replacement value should also be equal to 0.

[0397] Furthermore, the inventory values ​​returned by the same requesting party for the same flight, the same flight segment, and the same cabin class at the previous response time point are read again, and the absolute value is taken after subtracting the inventory value at the previous response time point from the third replacement value.

[0398] Among these conditions, the difference must not exceed the largest adjacent change in the inventory value in the neighborhood sampling set; when all of the above conditions are met, the response copy will be identified as hidden data that conforms to the evolution characteristics.

[0399] Furthermore, the type of access request is determined based on the crawler's judgment results.

[0400] Specifically, when reading the judgment result, the request identifier, requester identifier, flight number, flight date, and request reception time are checked; if all the verification results are consistent and the judgment result is a crawler access request, the request fingerprint is embedded; if the judgment result is a normal access request, the third replacement value and request fingerprint are not used, and a normal response is generated directly based on the original inventory record.

[0401] The request fingerprint is generated from the requester identifier, flight number, flight date, flight segment, cabin class code, query parameters, and time slice number.

[0402] Specifically, the requester identifier is formed by connecting the network address, device identifier, and session identifier; the time slice length is set to 30 minutes, the request reception time is converted into cumulative seconds, the cumulative seconds are divided by 1800 and the decimal part is discarded to obtain the time slice number.

[0403] Furthermore, the fields are concatenated in the order of requester identifier, flight number, flight date, flight segment, cabin class code, query parameters, and time slice number, and a 256-bit keyed hash operation is performed using the server key to obtain the request fingerprint value.

[0404] Specifically, when the same requesting client queries the same flight and the same cabin class within the same 30-minute time slice, the same request fingerprint value is generated.

[0405] In this embodiment, the request fingerprint is embedded by combining inventory values ​​in the response copy.

[0406] Specifically, for the current cabin class and the associated cabin classes with an associated weight greater than 0.7, the corresponding qualified candidate values ​​are determined respectively. The qualified candidate values ​​are obtained according to the following process: enumerate integers one by one between the lower boundary and the upper boundary of the value, calculate the benchmark deviation of each integer relative to the benchmark value of the sold-out process, and retain integers whose benchmark deviation is less than the sell-out critical threshold.

[0407] In addition, the qualified candidate values ​​for each cabin are arranged in ascending order of the absolute value of the difference between them and the corresponding third replacement value; when the absolute values ​​of the difference are the same, the candidate value with the smaller value is arranged first.

[0408] The candidate values ​​of the current cabin class and related cabin classes are combined sequentially, and combinations that do not meet the allowed difference in the number of cabin classes are deleted. The remaining combinations constitute the fingerprint state set.

[0409] The allowable difference in the number of cabins is determined in S6.

[0410] For any two associated cabin classes, subtract the two candidate values ​​and take the absolute value. If the result is not greater than the corresponding allowable quantity difference, the combination is retained; if it exceeds the allowable quantity difference, the combination is deleted.

[0411] Furthermore, the requested fingerprint value is converted into a non-negative integer, and this non-negative integer is divided by the number of combinations in the fingerprint state set to obtain the remainder of the division.

[0412] Specifically, according to the order of combination, the combination of values ​​whose position is equal to the remainder plus 1 is used as the fingerprint combination corresponding to the current request, and the response copy is updated with the values ​​of each cabin in the combination.

[0413] For example, if the fingerprint state set contains 6 sets of numerical combinations, and the remainder of the non-negative integer obtained by the fingerprint conversion is 2 when divided by 6, then the numerical combination in the 3rd position is selected as the embedding result. Through this process, different request fingerprints correspond to different inventory numerical combinations, and the correspondence of the same request fingerprint remains unchanged within the same time slice.

[0414] Furthermore, after completing the request fingerprint embedding, it is verified again whether the value of each cabin is between the corresponding lower and upper boundaries, whether the benchmark deviation is less than the sell-out threshold, and whether the quantity difference between related cabins does not exceed the allowed quantity difference.

[0415] When all verifications pass, hidden data containing the embedded request fingerprint and conforming to evolutionary characteristics is obtained.

[0416] When returning hidden data to the requesting end, the response copy is serialized according to the predetermined field order and data type of the flight data interface; the serialization result does not add fingerprint field, anomaly identifier field, or disturbance description field, and the interface response header, field name, and field level are consistent with the normal inventory response.

[0417] Furthermore, after the hidden data is returned, the request identifier, requester identifier, request fingerprint value, time slice number, flight number, cabin class code, third replacement value for each cabin class, and embedded inventory value are written into the anti-crawling audit record.

[0418] The anti-crawling audit records are not written into the flight inventory management system, nor are they involved in seat reservations, ticketing, refunds, check-in, or inventory settlement.

[0419] In addition, throughout the entire process of responding to copy replication, writing third replacement values, embedding request fingerprints, and returning hidden data, the original inventory record remains in a read-only state; the interface server does not perform update operations on the original remaining seat quantity, thereby keeping the real inventory data and inventory transaction results unchanged when returning hidden data with request fingerprints to the crawler request end.

[0420] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A covert anti-scraping method for flight data based on field semantic hierarchical classification and association consistency perturbation, characterized in that, include: S1. Obtain the access request for the flight data interface and the original inventory record of the flight. Divide the cabin class, sales stage and remaining seat quantity in the original inventory record into the association constraint level, time series constraint level and numerical perturbation level respectively to obtain the first feature set. S2. Cluster the cabin class at the association constraint level and the sales stage at the time constraint level to obtain the cabin class association matrix between different cabin classes. S3. Extract the evolution characteristics of inventory status at the numerical disturbance level as the sales stage changes, and determine the sell-out process baseline corresponding to the evolution characteristics. S4. If the number of remaining seats in the original inventory record is lower than the sell-out process baseline, the number of remaining seats is determined to have abnormal traces that are easily identified by the crawler, and the first abnormality identifier is obtained. S5. Based on the semantic level corresponding to the first anomaly identifier and the remaining seat quantity field, perform numerical mapping processing on the original inventory record to obtain the first replacement value. S6. If the first replacement value deviates from the business semantic range defined by the cabin association matrix, the first replacement value is subjected to boundary trimming to obtain the second replacement value. S7. Obtain the time node corresponding to the original inventory record, determine whether the second replacement value meets the sell-out process baseline at the time node, and obtain the verification result. S8. If the verification result is not satisfactory, the second replacement value is smoothed to obtain the third replacement value. S9. Update the response copy of the original inventory record with the third replacement value to obtain hidden data that is embedded with the request fingerprint and conforms to the evolution characteristics. When the access request is determined to be a crawler access request, return the hidden data to the corresponding request end while keeping the original inventory record unchanged.

2. The method for covert anti-crawling of flight data based on field semantic hierarchical classification and association consistency perturbation as described in claim 1, characterized in that: S1 includes: Obtain access requests and original inventory records for the flight data interface; Determine whether an access request is a web crawler access request based on the access behavior characteristics of the access request; If the access request is a web crawler access request, then extract the cabin class, sales stage and remaining seat quantity from the original inventory record and parse it to obtain the business semantics; Based on business semantics, cabin class, sales stage and remaining seat quantity are respectively divided into association constraint level, time sequence constraint level and numerical disturbance level. The correlation constraint level, temporal constraint level, and numerical perturbation level are fused to obtain the first feature set.

3. The method for covert anti-crawling of flight data based on field semantic hierarchical classification and association consistency perturbation as described in claim 1, characterized in that: S2 includes: Obtain cabin class data and sales stage data from the first feature set, and construct an initial feature vector space; The distance matrix is ​​calculated from the initial feature vector space, and a hierarchical clustering algorithm is used to generate a clustering tree diagram based on the distance matrix; If the node spacing of the clustering tree diagram is less than a preset distance threshold, then multiple cabin clusters are obtained. By extracting association weights from multiple cabin clusters, a cabin association matrix is ​​constructed between different cabin classes.

4. The method for covert anti-crawling of flight data based on field semantic hierarchical classification and association consistency perturbation as described in claim 1, characterized in that: S3 includes: Numerical perturbation levels are extracted from the cabin association matrix, and these numerical perturbation levels are used to determine the initial inventory status. Obtain the inventory fluctuation range based on the initial inventory status; The evolution characteristics of inventory status as sales stages are extracted by mapping the magnitude of inventory fluctuations. Determine whether the evolutionary characteristics exceed the fluctuation threshold; If the evolution characteristics exceed the fluctuation threshold, the baseline of the sell-out process corresponding to the evolution characteristics is determined by matching the historical sell-out trajectory.

5. The method for covert anti-crawling of flight data based on field semantic hierarchical classification and association consistency perturbation as described in claim 1, characterized in that: S4 includes: Extract the remaining seat quantity and query time interval from the original inventory records, and calculate the inventory consumption rate based on the query time interval and the remaining seat quantity. The seat locking status is determined by comparing the inventory consumption rate with a preset sell-out progress baseline. If the seat locking status indicates that the number of remaining seats is lower than the sell-out progress baseline, then the access frequency features and order conversion ratio are extracted to identify false seat-grabbing behavior. Based on the false seat-grabbing behavior, the remaining seat quantity is determined to have abnormal traces that are easily identified by web crawlers, and a first abnormality marker is obtained.

6. The method for covert anti-crawling of flight data based on field semantic hierarchical classification and association consistency perturbation as described in claim 1, characterized in that: S5 includes: Obtain the semantic level corresponding to the first anomaly identifier and the remaining seat quantity field, and extract the field features of the original inventory record based on the first anomaly identifier; Decision tree nodes are constructed based on field features and semantic levels to generate branching conditions. The original inventory records are then divided based on the branching conditions to obtain leaf weights. If the leaf weights meet the association consistency threshold, then the perturbation magnitude is determined based on the leaf weights and a mapping rule is generated. The original inventory records are numerically mapped using mapping rules to obtain the first replacement value.

7. The method for covert anti-crawling of flight data based on field semantic hierarchical classification and association consistency perturbation as described in claim 1, characterized in that: S6 includes: Obtain the first replacement value and calculate the semantic deviation of the first replacement value within the business semantic range defined by the cabin class association matrix; Determine whether the degree of semantic deviation exceeds a preset threshold; If the semantic deviation exceeds the preset threshold, the first replacement value is determined to deviate from the business semantic range, and a boundary trimming instruction is generated. The out-of-bounds correction value is calculated based on the boundary clipping instruction and semantic constraints. The first replacement value is trimmed to obtain the second replacement value by using the out-of-bounds correction value.

8. The method for covert anti-crawling of flight data based on field semantic hierarchical classification and association consistency perturbation as described in claim 1, characterized in that: S7 includes: Process the original inventory records to obtain the corresponding time nodes, obtain the dynamic inventory balance based on the time nodes, and obtain the second replacement value; The baseline for the sell-out process at each time point is determined by capturing the sales forecast trajectory at that time point. Calculate the baseline deviation of the second replacement value relative to the sell-out progress baseline; Determine whether the second replacement value meets the sell-out process baseline. If the deviation from the baseline is less than the preset sell-out threshold, then determine that the second replacement value meets the sell-out process baseline at the time point and obtain the verification result.

9. The method for covert anti-crawling of flight data based on field semantic hierarchical classification and association consistency perturbation as described in claim 1, characterized in that: S8 includes: If the obtained verification result is non-compliant, the abnormal fluctuation characteristics corresponding to the verification result are extracted to determine the deviation magnitude. The neighborhood sampling set is obtained by extracting the time window containing the second replacement value based on the deviation magnitude. The weight allocation matrix is ​​obtained by calculating the neighborhood sampling set, and the local weighted mean is obtained based on the weight allocation matrix; The second replacement value is smoothed by using a locally weighted average to obtain the third replacement value.

10. The method for covert anti-crawling of flight data based on field semantic hierarchical classification and association consistency perturbation as described in claim 1, characterized in that: S9 includes: The original inventory record is copied to generate a response copy, and the response copy is processed by a third replacement value to obtain hidden data that conforms to the evolution characteristics; Determine whether the access request is a web crawler access request; If the access request is a crawler access request, then the request fingerprint is embedded into the hidden data to obtain the hidden data with the embedded request fingerprint. The hidden data embedded with the request fingerprint is returned to the corresponding requesting end, thereby updating the response copy of the original inventory record through the third replacement value, obtaining the hidden data embedded with the request fingerprint and conforming to the evolution characteristics, and returning the hidden data to the corresponding requesting end when the access request is determined to be a crawler access request, while keeping the original inventory record unchanged.

Citation Information

Patent Citations

  • Semantic constraint playback generation method and device for database migration and medium

    CN122412395A

  • System and method for artificial intelligence driven blockchain framework supporting secure scalable smart city development

    US20260079896A1