Polling request data generation method and device and readable storage medium
By analyzing the user's historical request data to generate polling request data, the problem of cache refresh in civil aviation freight search system is solved, and efficient cache refresh and user response time are achieved.
Patent Information
- Application Number
- CN202411784373.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-05
- Publication Date
- 2025-04-01
AI Technical Summary
The existing technology is difficult to effectively refresh the cache of the civil aviation freight search system, which makes it difficult to ensure the freshness and availability of the cache, affecting the stability of user response time.
A method for generating poll request data is proposed. By collecting and analyzing the historical request data of users, multiple types of poll request data are generated, and the priority of poll requests is calculated according to the configured policies to actively refresh the cache.
By actively polling and refreshing the cache, the freshness and availability of the cache are ensured, the stability of user response time is improved, and the efficient search needs of the civil aviation freight search system is met.
Smart Images

Figure CN119739749A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of freight rate search, and in particular, relates to a method and device for generating polling request data, a computer-readable storage medium, an electronic device, and a computer program product. Background Art
[0002] The freight rate search system is a computationally intensive system with complex freight rate business logic and involves many freight rates and flights. For complex routes, the freight rate search system requires seconds to complete the search. However, user needs are diverse, and some users have very high requirements for system response time. Building a cache-based fast search product can not only meet user needs, but also fill the gap in freight rate search system products. In order to ensure the availability of the cache, it is far from enough to rely solely on user requests to refresh the cache. At this time, it is particularly important to design a system and mechanism for cache refresh.
[0003] Although the industry has developed some cache refresh methods, for example, the patent application "Cache Refresh Method, Device, Equipment and Storage Medium" (application number 202311451070.4, Tencent Technology (Shenzhen) Co., Ltd.) has disclosed a cache refresh method, device, equipment and storage medium. This method can avoid the target object reading old resources and reduce the bandwidth consumption and time delay of cache refresh. However, considering the business characteristics of the civil aviation fare search system, this technology is not applicable. Therefore, it is necessary to develop a more targeted cache refresh method suitable for the civil aviation fare search system. Summary of the invention
[0004] In order to better meet the application requirements of the civil aviation fare search system, this application proposes a new method and device for generating polling request data for cache refresh. This application is very suitable for the actual application scenarios in the field of civil aviation passenger transport, and can ensure the search effect through active polling, which helps to improve the service quality of the civil aviation system.
[0005] The present application aims to provide a method for generating polling request data for refreshing the cache of a freight rate search system. The method collects and analyzes the search requests of target users based on an active polling mechanism, generates a large number of active polling requests, and refreshes the cache by sending these active polling requests in advance. While ensuring the freshness and availability of the cache, the stability of the user response time is also guaranteed.
[0006] In order to achieve the above objectives, this application provides the following technical solutions:
[0007] A first aspect of the present application provides a method for generating polling request data, comprising:
[0008] Collect historical request data of users, convert the collected historical request data of users into internal storage structure, and send it to database for storage;
[0009] Read the user's historical request data from the database, conduct statistical analysis on it, filter out key information, and then score, sort, and organize the user's historical request data based on the key information;
[0010] Generates multiple types of polling request data based on the configured policies.
[0011] Optionally, in the present application method, the key information includes: popular OD city pairs, popular query dates;
[0012] The multiple types of polling request data include: one-way, round-trip, multi-segment, and calendar types of polling request data.
[0013] Optionally, the method of the present application comprises the following steps:
[0014] Establish a polling clock to perform data sorting and polling request data generation within a specified period; the specified period includes: hour, day, week, month, quarter;
[0015] Before entering the statistical cycle, the system waits silently. During the silent waiting period, the system performs data cleaning and system status printing.
[0016] Loading a core configuration file, wherein the core configuration file includes the following information: maximum number of polling requests in the system, priority configuration, polling date range, and response time statistical threshold;
[0017] Load the user's historical request data stored by the search engine from the database and convert it into the system's internal storage structure;
[0018] Classify the user's historical request data, and then make overall statistics according to different dimensions, filter out key information, and then score, sort and organize the user's historical request data based on the key information;
[0019] Generate polling request data based on pre-configured policies, calculate the priority of the polling request, and then schedule polling and refresh the cache based on the priority;
[0020] Write the polling request data generated in the previous step into the database for the scheduling service to retrieve and execute polling.
[0021] Optionally, in the method of the present application, when loading the user's historical request data from the database, if it is the first time to load, it is determined whether to load the full amount of historical data according to performance requirements;
[0022] The loaded user historical request data includes the following information: request response time, request type, and query time;
[0023] After completing a statistics of the user's historical request data, the intermediate results are stored in the database. When used subsequently, the intermediate results are directly loaded from the database without repeated calculations.
[0024] Optionally, in the method of the present application, the user historical request data is classified and then overall statistics are performed according to different dimensions, and the overall statistics include the following contents:
[0025] OD pair statistics: statistics of one-way and round-trip requests;
[0026] One-way date statistics: one-way flight travel date statistics;
[0027] Round trip date statistics: round trip flight travel date statistics;
[0028] One-way date deviation statistics: one-way flight travel date deviation statistics;
[0029] Round trip date offset statistics: round trip flight travel date offset statistics.
[0030] Optionally, in the method of the present application, the generating of polling request data based on a pre-configured strategy and calculating the priority of the polling request include the following two polling request processing flows:
[0031] (I) Polling request processing flow for a specific date
[0032] (1) Obtain a sorted OD statistical data;
[0033] (2) Determine whether enough requests are generated. If so, exit. If not, determine whether the OD data is a one-way OD.
[0034] (3) If the OD data is a one-way OD, obtain a sorted one-way date statistical data, then generate a polling request for the OD and date, and calculate the priority of the request. Finally, determine whether requests for enough dates have been generated. If so, return to step (1). If not, return to the starting point of this step and re-execute this step.
[0035] (4) If the OD data is not a one-way OD, obtain a sorted round-trip date statistical data, then generate a polling request for the OD and date, calculate the priority of the request, and finally determine whether requests for enough dates have been generated. If so, return to step (1); if not, return to the starting point of this step and re-execute this step;
[0036] (II) Date offset polling request processing flow
[0037] (1) Obtain a sorted OD statistical data;
[0038] (2) Determine whether enough requests are generated. If so, exit. If not, determine whether the OD data is a one-way OD.
[0039] (3) If the OD data is a one-way OD, obtain a sorted one-way date offset statistical data, then use the current system date + date offset to generate a polling request for the OD and date, and calculate the priority of the request. Finally, determine whether requests for enough dates have been generated. If so, return to step (1). If not, return to the starting point of this step and re-execute this step.
[0040] (4) If the OD data is not a one-way OD, obtain a sorted round-trip date offset statistical data, then use the current system date + date offset for the outbound date and the outbound date + number of days of stay for the return date to generate a polling request for the OD and date, and calculate the priority of the request. Finally, determine whether requests for enough dates have been generated. If so, return to step (1). If not, return to the starting point of this step and re-execute this step.
[0041] A second aspect of the present application provides a device for generating polling request data, comprising:
[0042] Data sending module: used to convert the user's request data into an internal storage structure and send it to the database for storage for use by other modules;
[0043] Data collection module: used to read the user's historical request data from the database, and provide it to the data analysis and processing module after preliminary screening and processing;
[0044] Data analysis and processing module: used to make overall statistics on user historical request data, sort out key information, and then score, sort and organize user historical request data based on the key information;
[0045] Polling data generation module: Generates various types of polling request data based on configured strategies.
[0046] A third aspect of the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the aforementioned method for generating polling request data are implemented.
[0047] A fourth aspect of the present application provides an electronic device, comprising: a memory and a processor;
[0048] Memory: used to store computer programs;
[0049] Processor: used to execute the computer program to implement the steps of the aforementioned method for generating polling request data.
[0050] Finally, the present application also provides a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, wherein the computer program contains program codes for executing the aforementioned method for generating polling request data.
[0051] In summary, this application proposes a method and device for generating polling request data for refreshing the cache of a freight rate search system. This method is based on the user's real historical request data, performs statistical analysis on the historical data, and generates polling requests. These polling requests can well meet the user's real needs; at the same time, the priority of these polling requests is calculated, so that when the freight rate search system has limited search resources, polling requests can be used more reasonably to refresh caches with higher value, ensuring cache quality while reducing the burden on the system. In addition, the polling requests generated using the method of this application have good performance in improving cache hit rate and reducing user response time.
[0052] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or understood by practicing the present application. The purpose and other advantages of the present application can be realized and obtained by the techniques indicated in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief introduction is given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0054] Figure 1 A system module diagram of a device according to an embodiment of the present application.
[0055] Figure 2 This is an overall flow chart of a method for generating polling request data according to an embodiment of the present application.
[0056] Figure 3 A flowchart of the steps of generating a polling request according to an embodiment of the present application.
[0057] Figure 4 This is an example diagram of configuration file data according to an embodiment of the present application.
[0058] Figure 5 This is a flowchart of loading historical request data according to an embodiment of the present application.
[0059] Figure 6A schematic diagram of the statistical analysis content of historical request data according to an embodiment of the present application.
[0060] Figure 7 This is a flowchart of polling request processing for a specific date according to an embodiment of the present application.
[0061] Figure 8 This is a flow chart of polling request processing for date offset according to an embodiment of the present application. DETAILED DESCRIPTION
[0062] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0063] The term "including" and its variations used in this document are open inclusions, i.e., "including but not limited to"; the term "based on" means "at least partly based on"; the term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments".
[0064] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless the context clearly indicates otherwise, it should be understood as "one or more".
[0065] Figure 1 The figure shows a polling request data generating device proposed in the present application, the device comprising:
[0066] Data sending module: responsible for converting the user's request data into an internal storage structure and sending it to the database for storage for use by subsequent modules.
[0067] Data collection module: responsible for reading the user's historical request data from the database, and after preliminary screening and processing, providing it to the data analysis and processing module for use.
[0068] Data analysis and processing module: responsible for overall statistics of user historical request data, sorting out information such as popular city pairs and popular query dates, and finally sorting, scoring, and organizing to prepare for the generation of polling data.
[0069] Polling data generation module: Generates various types of polling request data such as one-way, round-trip, multi-segment, calendar, etc. based on the configured strategy.
[0070] The middle storage part can use a conventional relational database or an in-memory database, such as redis, memcached, etc.
[0071] The device composed of the above modules implements the method for generating polling request data disclosed in this application when running.
[0072] Figure 2 The method for generating polling request data provided by the present application includes steps such as data collection, analysis and collation, and polling request generation, so as to realize background data refresh of the freight rate search cache system. The method includes the following steps:
[0073] Establish a polling clock to perform data sorting and polling request data generation within a specified period; the specified period includes: hour, day, week, month, quarter;
[0074] Before entering the statistical cycle, the system waits silently. During the silent waiting period, the system performs data cleaning and system status printing.
[0075] Loading a core configuration file, wherein the core configuration file includes the following information: maximum number of polling requests in the system, priority configuration, polling date range, and response time statistical threshold;
[0076] Load the user's historical request data stored by the search engine from the database and convert it into the system's internal storage structure;
[0077] Classify the user's historical request data, and then make overall statistics according to different dimensions, filter out key information, and then score, sort and organize the user's historical request data based on the key information;
[0078] Generate polling request data based on pre-configured policies, calculate the priority of the polling request, and then schedule polling and refresh the cache based on the priority;
[0079] Write the polling request data generated in the previous step into the database for the scheduling service to retrieve and execute polling.
[0080] Figure 3 The overall process of the polling request generation step in the present application method is shown, including:
[0081] Step 1: Establish a polling clock to perform data sorting, polling request data generation and other tasks within a specified period. The period supports hours, days, etc.
[0082] Step 2: The system waits silently. When it does not enter the statistical cycle, the system can perform data cleaning, system status printing, etc. during this time.
[0083] Step 3: Load the core configuration information. You need to collect configuration information such as the maximum number of polling requests, priority configuration, polling date range, and response time statistical threshold.
[0084] Step 4: Load the historical request data stored by the search engine from a storage medium (such as a database) and convert it into a system internal storage structure.
[0085] Step 5: Classify, count, sort, and filter historical request data.
[0086] The historical request data is counted according to different dimensions, such as departure-arrival airport / city (OD), one-way (OW), round-trip (RT), travel date, response time, etc., to filter out popular ODs, popular travel dates, etc.
[0087] Step 6: Generate polling requests. At this stage, the system will generate a pre-configured number of polling requests and calculate the priority of the polling request. Subsequently, polling will be arranged according to the priority to refresh the cache.
[0088] Step 7: Write the polling request generated in the previous step into the database for polling after the scheduling service is acquired.
[0089] In order to better understand the technical solution of the present application, the key steps in the implementation process of the method of the present application are further described in detail with examples of the following business scenarios.
[0090] 1. Load the core configuration file
[0091] The device of this application needs to maintain a unified configuration file for subsequent statistical analysis of each module and calculation of polling request priority, etc. Figure 4 Shown is part of the configuration information in a configuration file of an embodiment:
[0092] ow=30, which means that a single OD can generate one-way flights on up to 30 dates;
[0093] rt=90, which means that the round-trip OD generates a maximum of 90 round-trip flights with date pairs;
[0094] min_percentile=1, indicating that the program statistics end at the OD interval accounting for 1%;
[0095] max_requests=100000, indicating the total number of polling requests finally generated.
[0096] 2. Load historical request data
[0097] Figure 5The figure shows a historical request data loading process of an embodiment of the present application. The user historical request data can be stored in units of the minimum granularity - hours. During the loading process, the loading will be performed according to the following steps:
[0098] Connect to the database. When loading for the first time, determine whether to load the full amount of historical data for performance reasons. After completing a statistics of the user's historical request data, the intermediate results can be stored in the database. When used subsequently, it can be loaded directly from the database without repeated calculations.
[0099] Statistics on the day and hour dimensions are determined based on user configuration to determine whether hour-level accuracy is required. If not, it can be loaded according to the day dimension. In addition, periodic statistics on dimensions such as week, month, and quarter are also supported.
[0100] 3. Statistical analysis of historical request data
[0101] After loading the historical request data, an overall statistical analysis is performed on it in this step. The data loaded into the system's internal storage structure must include information such as request response time (i.e., the actual query time of requests that do not use cache), request type (one-way, round-trip), and query time.
[0102] Figure 6 The following is a statistical analysis of historical request data in one embodiment of the present application, including:
[0103] OD pair statistics: statistical results of one-way and round-trip requests, such as Beijing-Frankfurt, 1,000 queries per hour, 10,000 queries per day, and monthly...; Shanghai-New York-Shanghai, 1,000 queries per hour, 10,000 queries per day, and monthly...
[0104] One-way date statistics: one-way flight travel date statistics, such as Beijing-Frankfurt, October 1, 2024, 1,000 queries per hour, 10,000 queries per day, and monthly...
[0105] Round-trip date statistics: round-trip flight travel date statistics, such as Shanghai-New York-Shanghai, departure date October 1, 2024, return date October 6, 2024, 1,000 queries per hour, 10,000 queries per day, and monthly...
[0106] One-way date offset statistics: one-way flight travel date offset statistics, such as Beijing-Frankfurt, the travel date is October 1, 2024, and the query date is September 10, 2024, then the date offset is 20 days, that is, the concept of purchase lead time, 1000 queries per hour, 10,000 queries per day, and monthly...
[0107] Round-trip date offset statistics: round-trip flight travel date offset statistics, such as Shanghai-New York-Shanghai, departure date October 1, 2024, return date October 6, 2024, query date is September 10, 2024, then the date offset is 20 days, the stay time is 5 days, 1,000 queries per hour, 10,000 queries per day, and monthly...
[0108] Sort the above data by frequency and other dimensions to provide basic data for the generation of subsequent polling requests.
[0109] 4. Polling request data generation
[0110] Polling request data is divided into two types: one-way and round-trip; the OD pairs and dates involved are taken from the statistical results of the previous steps.
[0111] Figure 7 The figure shows a polling request processing flow for a specific date according to an embodiment of the present application, including:
[0112] 1. Obtain a sorted OD statistical data;
[0113] 2. Determine whether enough requests are generated. If so, exit. Otherwise, determine whether the OD data is a one-way OD.
[0114] 3. If the OD data is a one-way OD, obtain a sorted one-way date statistical data, then generate a polling request for the OD and date, calculate the priority of the request, and finally determine whether enough date requests have been generated. If so, return to step 1, otherwise return to the starting point of this step and re-execute this step;
[0115] 4. If the OD data is not a one-way OD, obtain a sorted round-trip date statistical data, then generate a polling request for the OD and date, calculate the priority of the request, and finally determine whether requests for enough dates have been generated. If so, return to step 1, otherwise return to the starting point of this step and re-execute this step.
[0116] Figure 8 The following is a polling request processing flow of a date offset according to an embodiment of the present application, including:
[0117] 1. Obtain a sorted OD statistical data;
[0118] 2. Determine whether enough requests are generated. If so, exit. Otherwise, determine whether the OD data is a one-way OD.
[0119] 3. If the OD data is a one-way OD, obtain a sorted one-way date offset statistical data, then use the current system date + date offset to generate a polling request for the OD and date, and calculate the priority of the request. Finally, determine whether requests for enough dates have been generated. If so, return to step 1. If not, return to the starting point of this step and re-execute this step.
[0120] 4. If the OD data is not a one-way OD, obtain a sorted round-trip date offset statistical data, then use the current system date + date offset for the outbound date and the outbound date + number of days of stay for the return date to generate a polling request for the OD and date, and calculate the priority of the request. Finally, determine whether requests for enough dates have been generated. If so, return to step 1. If not, return to the starting point of this step and re-execute this step.
[0121] The flow charts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the apparatus, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the module, program segment, or a part of a code contains one or more executable instructions for implementing the specified logical functions. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0122] The names of messages or data exchanged between multiple modules in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or data.
[0123] Furthermore, an embodiment of the present application also discloses an electronic device, including: a memory and a processor;
[0124] The memory is used to store a computer program, and the processor is used to run the computer program to implement the steps of the above-mentioned method for generating polling request data.
[0125] It is understandable that, in addition to the memory and the processor, the electronic device may also include an input device such as a keyboard, an output device such as a display, and a communication module. The input device, the output device, and the communication module communicate with the processor via an I / O interface (i.e., an input / output interface).
[0126] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0127] Furthermore, the present application also discloses a computer-readable storage medium. When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device can execute each step of the method for generating polling request data disclosed in the present application.
[0128] In the context of the present disclosure, a computer-readable storage medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A readable storage medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0129] In particular, according to an embodiment of the present disclosure, the process described in the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device, or installed from a ROM. When the computer program is executed by a processing device, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0130] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), etc.
[0131] Although several specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Certain features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination.
[0132] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0133] Those skilled in the art should also understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A method for generating polling request data, characterized in that: The method comprises: Collect historical request data of users, convert the collected historical request data of users into internal storage structure, and send it to database for storage; Read the user's historical request data from the database, conduct statistical analysis on it, filter out key information, and then score, sort, and organize the user's historical request data based on the key information; Generates multiple types of polling request data based on the configured policies.
2. The method according to claim 1, characterized in that The key information includes: popular OD city pairs, popular query dates; The multiple types of polling request data include: one-way, round-trip, multi-segment, and calendar types of polling request data.
3. The method according to claim 1, characterized in that The method comprises the following steps: Establish a polling clock to sort data and generate polling request data within a specified period; the specified period includes: hour, day, week, month, quarter; Before entering the statistical cycle, the system waits silently. During the silent waiting period, the system performs data cleaning and system status printing. Loading a core configuration file, wherein the core configuration file includes the following information: maximum number of polling requests in the system, priority configuration, polling date range, and response time statistical threshold; Load the user's historical request data stored by the search engine from the database and convert it into the system's internal storage structure; Classify the user's historical request data, and then make overall statistics according to different dimensions, filter out key information, and then score, sort and organize the user's historical request data based on the key information; Generate polling request data based on pre-configured policies, calculate the priority of the polling request, and then schedule polling and refresh the cache based on the priority; Write the polling request data generated in the previous step into the database for the scheduling service to retrieve and execute polling.
4. The method according to claim 3, characterized in that When loading user historical request data from the database, if it is the first time to load, determine whether to load the full amount of historical data based on performance requirements; The loaded user historical request data includes the following information: request response time, request type, and query time; After completing a statistics of the user's historical request data, the intermediate results are stored in the database. When used subsequently, the intermediate results are directly loaded from the database without repeated calculations.
5. The method according to claim 3, characterized in that: The user's historical request data is classified and then overall statistics are performed according to different dimensions. The overall statistics include the following contents: OD pair statistics: statistics of one-way and round-trip requests; One-way date statistics: one-way flight travel date statistics; Round trip date statistics: round trip flight travel date statistics; One-way date deviation statistics: one-way flight travel date deviation statistics; Round trip date offset statistics: round trip flight travel date offset statistics.
6. The method according to claim 3, characterized in that The method of generating polling request data based on a pre-configured strategy and calculating the priority of the polling request includes the following two polling request processing flows: (I) Polling request processing flow for a specific date (1) Obtain a sorted OD statistical data; (2) Determine whether enough requests are generated. If so, exit. If not, determine whether the OD data is a one-way OD. (3) If the OD data is a one-way OD, obtain a sorted one-way date statistical data, then generate a polling request for the OD and date, and calculate the priority of the request. Finally, determine whether requests for enough dates have been generated. If so, return to step (1). If not, return to the starting point of this step and re-execute this step. (4) If the OD data is not a one-way OD, obtain a sorted round-trip date statistical data, then generate a polling request for the OD and date, calculate the priority of the request, and finally determine whether requests for enough dates have been generated. If so, return to step (1); if not, return to the starting point of this step and re-execute this step; (II) Date offset polling request processing flow (1) Obtain a sorted OD statistical data; (2) Determine whether enough requests are generated. If so, exit. If not, determine whether the OD data is a one-way OD. (3) If the OD data is a one-way OD, obtain a sorted one-way date offset statistical data, then use the current system date + date offset to generate a polling request for the OD and date, and calculate the priority of the request. Finally, determine whether requests for enough dates have been generated. If so, return to step (1). If not, return to the starting point of this step and re-execute this step. (4) If the OD data is not a one-way OD, obtain a sorted round-trip date offset statistical data, then use the current system date + date offset for the outbound date and the outbound date + number of days of stay for the return date to generate a polling request for the OD and date, and calculate the priority of the request. Finally, determine whether requests for enough dates have been generated. If so, return to step (1). If not, return to the starting point of this step and re-execute this step.
7. A device for generating polling request data, characterized in that: The device comprises: Data sending module: used to convert the user's request data into an internal storage structure and send it to the database for storage for use by other modules; Data collection module: used to read the user's historical request data from the database, and provide it to the data analysis and processing module after preliminary screening and processing; Data analysis and processing module: used to make overall statistics on user historical request data, sort out key information, and then score, sort and organize user historical request data based on the key information; Polling data generation module: Generates various types of polling request data based on configured strategies.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for generating polling request data according to any one of claims 1 to 6 are implemented.
9. An electronic device, characterized in that: include: Memory and processor; Memory: used to store computer programs; Processor: used to execute the computer program to implement the steps of the method for generating polling request data according to any one of claims 1 to 6.
10. A computer program product, characterized in that The method comprises a computer program carried on a non-transitory computer-readable medium, wherein the computer program contains program codes for executing the method for generating polling request data according to any one of claims 1 to 6.
Citation Information
Patent Citations
Cache refreshing method and device, equipment and storage medium
CN117579698A