CN113377554B - Caching method, caching system, caching equipment and caching storage medium for air ticket price - Google Patents

Caching method, caching system, caching equipment and caching storage medium for air ticket price Download PDF

Info

Publication number
CN113377554B
CN113377554B CN202110702121.0A CN202110702121A CN113377554B CN 113377554 B CN113377554 B CN 113377554B CN 202110702121 A CN202110702121 A CN 202110702121A CN 113377554 B CN113377554 B CN 113377554B
Authority
CN
China
Prior art keywords
price
data
target
air ticket
historical
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110702121.0A
Other languages
Chinese (zh)
Other versions
CN113377554A (en
Inventor
高峰
林弘杰
黄金秋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ctrip Travel Information Technology Shanghai Co Ltd
Original Assignee
Ctrip Travel Information Technology Shanghai Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ctrip Travel Information Technology Shanghai Co Ltd filed Critical Ctrip Travel Information Technology Shanghai Co Ltd
Priority to CN202110702121.0A priority Critical patent/CN113377554B/en
Publication of CN113377554A publication Critical patent/CN113377554A/en
Application granted granted Critical
Publication of CN113377554B publication Critical patent/CN113377554B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/544Buffers; Shared memory; Pipes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0201Market modelling; Market analysis; Collecting market data
    • G06Q30/0206Price or cost determination based on market factors

Abstract

The invention provides a caching method, a caching system, caching equipment and a storage medium for air ticket prices, wherein the caching method comprises the following steps: acquiring a query period corresponding to a target route provided by a target provider, wherein the query period is calculated by the predicted air ticket price change times of the target provider; and accessing a data interface of the target provider according to the query period, querying the air ticket price data of the target air route, and caching the air ticket price data of the target air route to the local. The invention calculates the query period through the predicted air ticket price changing times of the target suppliers, can update the cached air ticket price data in real time aiming at the air route provided by the suppliers, reduces the access times to the data interfaces of the suppliers, reduces the related cost of a server, data flow query and the like, reflects the price changing condition of the air route more accurately, and has more accurate air ticket price query result.

Description

Caching method, caching system, caching equipment and caching storage medium for air ticket price
Technical Field
The invention relates to the technical field of OTA (Online Travel Agency, online travel), in particular to a caching method, a caching system, a caching device and a caching storage medium for air ticket prices.
Background
The engine system of the preset purchasing air ticket of the current travel service platform mainly enables an agent to enter a policy mainly through an air ticket price management system, and can sense change notifications of air ticket policies (one-way (including transfer), round trip and multiple passes), prices and the like in real time, and specifically:
when the engine receives external requests (such as a user request for buying an air ticket, a query request of a system of each distributor and a query request of an internal system), data of each air line, each flight and each quotation are required to be stored, meanwhile, the direct connection ports of suppliers are scanned through a timing task, the scanning time interval is the query interval calculated through an algorithm, in addition, the same external request is scanned for two times at intervals, the prices obtained by the two times of scanning of the same air line are compared, whether the data are changed or not is actively found, so that the query period is adjusted, namely, the data change information of the air ticket data of the same air line strategy at different moments is analyzed according to all the external requests, for example, the price of the air ticket rises and falls at different times, and the determined query period is obtained through big data analysis.
Because the daily price change times of each route are different, the price change times of each route need to be estimated, so that the time length of each route cache is obtained. The estimation of the number of price changes requires the use of historical price change data.
The existing engine system has the following problems:
1. the sample size of the variable price data (namely, system query data) obtained by external requests initiated by other systems except the engine system is enough, and the part of requests are large and cover all domestic route requests, the part of requests are always in existence, the external requests cannot be interrupted, if the part of requests find that the corresponding data does not exist in the cache, the part of requests are directly connected with a provider interface to obtain real-time (real) data, namely, the cache is actively constructed, the data generated by the part of requests are stored for analysis of big data, so that the system query data contains real data and cache data and is not the real variable price condition of the route. And the variable price data (i.e., user query data) obtained by the external request initiated by the user is a true variable price case. Overall, the query data obtained differs significantly from the true price change situation.
2. The manpower cost of the realization is higher, and the development period is too long.
Disclosure of Invention
The invention aims to overcome the defects that query data obtained by an engine system in the prior art have larger difference from a real price change condition, the realized labor cost is higher, and the development period is too long.
The invention solves the technical problems by the following technical scheme:
the invention provides a caching method of air ticket prices, which comprises the following steps:
acquiring a query period corresponding to a target route provided by a target provider, wherein the query period is calculated by the predicted air ticket price change times of the target provider;
and accessing a data interface of the target provider according to the query period, querying the air ticket price data of the target air route, and caching the air ticket price data of the target air route to the local.
Preferably, the query period corresponding to the target route is calculated by the following steps:
respectively acquiring historical price change data of the target route from two data sources;
predicting the number of air ticket price changes of the target route based on the historical price change data;
obtaining a maximum QPS (query-per-second) corresponding to the target provider;
and obtaining the query period of the target route based on the air ticket price changing times and the maximum QPS.
Preferably, the two data sources include a first data source and a second data source;
the step of respectively acquiring the historical price change data of the target route from two data sources specifically comprises the following steps:
acquiring the number of price changes per hour of the target route in a historical time period from the first data source, wherein the maximum number of price changes per hour of the current day is used as first historical price change data of the current day;
acquiring the price change times per hour of the target route in a historical time period from the second data source, and taking the maximum price change times per hour of the day as second historical price change data of the day;
the step of predicting the number of air ticket price changes of the target route based on the historical price change data specifically comprises the following steps:
and obtaining the air ticket price changing times of the target route based on the first historical price changing data and the second historical price changing data.
Preferably, the step of obtaining the number of air ticket price changes of the target route based on the first historical price change data and the second historical price change data specifically includes:
obtaining a first estimated air ticket price changing number of the target route based on the first historical price changing data;
obtaining second estimated air ticket price changing times of the target air route based on the second historical price changing data;
normalizing the second estimated ticket price changing times to obtain the price changing weight of the target route;
and obtaining the air ticket price changing times of the target air route based on the first estimated air ticket price changing times and the price changing weights.
Preferably, the query period TTL is calculated using the formula k,m
Q k,m =Q1 k,m *(1+W k,m );
W k,m =Q2 k,m /MAX(Q2 k,m );
Where N represents the number of airlines provided to vendor k, MQPS k Representing the maximum QPS, Q corresponding to vendor k k,m Representing the number of airline m airline ticket price changes, Q1, provided by supplier k k,m Representing a first estimated number of airline m price changes, W, provided by supplier k k,m Variable price weight, Q2, representing route m provided by supplier k k,m A second estimated number of air ticket prices representing the airline m provided by the supplier k, MAX (Q2 k,m ) Representing the maximum value of the number of times of price changes of the second estimated ticket corresponding to all airlines provided by the supplier k, j representing the historical time period as past j days, i representing one day in the historical time period, and P1 i,k,m Representing first historical price change data corresponding to route m provided by supplier k, P2 i,k,m Representing second historical price change data corresponding to route m provided by supplier k.
The invention also provides a cache system of the air ticket price, which comprises: a query period acquisition module and an air ticket price caching module;
the inquiry period acquisition module is used for acquiring an inquiry period corresponding to a target route provided by a target provider, wherein the inquiry period is obtained by calculating the predicted air ticket price change times of the target provider;
the air ticket price caching module is used for accessing the data interface of the target provider according to the query period, querying the air ticket price data of the target air route and caching the air ticket price data of the target air route to the local.
Preferably, the cache system further comprises: the system comprises a historical price change data acquisition module, an air ticket price change number prediction module, a maximum QPS acquisition module and a query period calculation module;
the historical price change data acquisition module is used for respectively acquiring historical price change data of the target route from two data sources;
the air ticket price change number prediction module is used for predicting the air ticket price change number of the target air route based on the historical price change data;
the maximum QPS acquisition module is used for acquiring a maximum QPS corresponding to the target provider;
the inquiry period calculation module is used for obtaining the inquiry period of the target route based on the air ticket price change times and the maximum QPS.
Preferably, the two data sources include a first data source and a second data source;
the historical variable price data acquisition module comprises: a first historical variable price data acquisition unit and a second historical variable price data acquisition unit;
the first historical price change data acquisition unit is used for acquiring the price change times per hour of the target route in a historical time period from the first data source, and taking the maximum price change times per hour of the day as first historical price change data of the day;
the second historical price change data acquisition unit is used for acquiring the price change times per hour of the target route in a historical time period from the second data source, and taking the maximum price change times per hour of the day as second historical price change data of the day;
the air ticket price change number prediction module is specifically used for obtaining the air ticket price change number of the target air route based on the first historical price change data and the second historical price change data.
Preferably, the air ticket price change number prediction module comprises: the first estimated air ticket price changing number obtaining unit, the second estimated air ticket price changing number obtaining unit, the price changing weight obtaining unit and the air ticket price changing number obtaining unit;
the first estimated air ticket price changing number obtaining unit is used for obtaining first estimated air ticket price changing number of the target air route based on the first historical price changing data;
the second estimated air ticket price changing number obtaining unit is used for obtaining second estimated air ticket price changing number of the target air route based on the second historical price changing data;
the variable price weight obtaining unit is used for normalizing the variable price times of the second estimated ticket to obtain the variable price weight of the target route;
the air ticket price changing number obtaining unit is used for obtaining the air ticket price changing number of the target air route based on the first estimated air ticket price changing number and the price changing weight.
Preferably, the query period TTL is calculated using the formula k,m
Q k,m =Q1 k,m *(1+W k,m );
W k,m =Q2 k,m /MAX(Q2 k,m );
Where N represents the number of airlines provided to vendor k, MQPS k Representing the maximum QPS, Q corresponding to vendor k k,m Representing the number of airline m airline ticket price changes, Q1, provided by supplier k k,m Representing a first estimated number of airline m price changes, W, provided by supplier k k,m Variable price weight, Q2, representing route m provided by supplier k k,m A second estimated number of air ticket prices representing the airline m provided by the supplier k, MAX (Q2 k,m ) Representing the maximum value of the number of times of price changes of the second estimated ticket corresponding to all airlines provided by the supplier k, j representing the historical time period as past j days, i representing one day in the historical time period, and P1 i,k,m Representing first historical price change data corresponding to route m provided by supplier k, P2 i,k,m Representing second historical price change data corresponding to route m provided by supplier k.
The invention also provides an electronic device, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor realizes the caching method of the air ticket price when executing the computer program.
The invention also provides a computer readable storage medium having stored thereon a computer program which when executed by a processor implements the aforementioned method of caching air ticket prices.
The invention has the positive progress effects that: the query period is obtained by calculating the predicted air ticket price change times of the target suppliers, the cached air ticket price data can be updated in time aiming at the air route provided by the suppliers, the access times to the data interfaces of the suppliers are reduced, the related costs of a server, data flow query and the like are reduced, the air route price change condition is reflected more accurately, and the air ticket price query result is more accurate.
Drawings
Fig. 1 is a flowchart of a method for caching air ticket prices according to embodiment 1 of the present invention.
Fig. 2 is a flowchart of an embodiment of a method for caching air ticket prices according to embodiment 1 of the present invention.
Fig. 3 is a flowchart of a specific embodiment of step S101 in the air ticket price caching method of embodiment 1 of the present invention.
Fig. 4 is a flowchart of a specific embodiment of step S21 in the air ticket price caching method of embodiment 1 of the present invention.
Fig. 5 is a schematic block diagram of a cache system for ticket prices according to embodiment 2 of the present invention.
Fig. 6 is a schematic structural diagram of an electronic device according to embodiment 3 of the present invention.
Detailed Description
The invention is further illustrated by means of the following examples, which are not intended to limit the scope of the invention.
Example 1
The embodiment provides a caching method for air ticket prices. Referring to fig. 1, the caching method includes the steps of:
s11, acquiring a query period corresponding to a target route provided by a target provider, wherein the query period is calculated by the predicted air ticket price change times of the target provider.
S12, accessing a data interface of the target provider according to the query period, querying the air ticket price data of the target air route, and caching the air ticket price data of the target air route to the local.
The execution subject of the air ticket price caching method may be a server (i.e., an entity of the engine system), and the local area refers to the local area of the server. For example, the ticket price data of the target route of inquiry can be for the journey within 90 days, and due to the special property of ticket selling, the user can purchase tickets after one year or two years, but the quantity of the ticket and the inquiry are very small, most of the purchase behaviors are generated within 90 days of the journey, and therefore the inquiry result for the journey within 90 days is sufficiently representative.
According to the method and the device, the query period is obtained through calculation of the predicted air ticket price changing times of the target suppliers, so that QPS (quality control system) can be reduced for the suppliers even if cached air ticket price data are updated for the air routes provided by the suppliers, the related costs of a server, data flow query and the like are reduced, the price changing condition of the air routes is reflected more accurately, the air ticket price query result is more accurate, the labor cost of implementation is reduced, and the development period is shortened.
In specific implementation, referring to fig. 2, the query period corresponding to the target route is calculated by:
s101, respectively acquiring historical variable price data of a target route from two data sources.
S102, predicting the air ticket price changing times of the target route based on the historical price changing data.
S103, obtaining the maximum QPS corresponding to the target provider.
S104, obtaining the query period of the target route based on the air ticket price change times and the maximum QPS.
According to the embodiment, a Gaussian mixture model is adopted, the number of air ticket prices of the target air route is predicted through historical price change data of two different data sources, the query period of the target air route is obtained by combining the maximum QPS corresponding to the target provider, the data sources of the two price change times (for example, the two data sources are data sources with more accurate mean values and larger standard deviation) are fused, the two data sources reflect the price change condition of the target air route more accurately than a single data source, and the number of air ticket prices of the target air route predicted on the basis is more accurate.
In particular implementations, the two data sources include a first data source and a second data source.
Referring to fig. 3, step S101 specifically includes:
s1011, acquiring the price change times per hour of the target route in a historical time period from a first data source, and taking the maximum price change times per hour of the day as first historical price change data of the day.
S1012, acquiring the price change times per hour of the target route in the historical time period from the second data source, and taking the maximum price change times per hour of the day as second historical price change data of the day.
The step S102 specifically includes:
s21, obtaining the air ticket price changing times of the target route based on the first historical price changing data and the second historical price changing data. (not shown in the drawings)
The present embodiment further reflects the historical price change per day for the target route in each data source over a historical period of time by the maximum number of price changes per hour per day.
In specific implementation, referring to fig. 4, step S21 specifically includes:
s211, obtaining first estimated air ticket price changing times of the target route based on the first historical price changing data.
S212, obtaining second estimated air ticket price changing times of the target route based on the second historical price changing data.
And S213, normalizing the second estimated air ticket variable price times to obtain the variable price weight of the target air route.
S214, obtaining the air ticket price changing times of the target air route based on the first estimated air ticket price changing times and the price changing weights.
The embodiment further provides a specific way for combining historical price change data of two data sources to obtain the air ticket price change times of the target route.
In the case of a specific implementation of the method,the following formula is adopted to calculate the TTL of the query period k,m
Q k,m =Q1 k,m *(1+W k,m )。
W k,m =Q2 k,m /MAX(Q2 k,m )。
Where N represents the number of airlines provided to vendor k, MQPS k Representing the maximum QPS, Q corresponding to vendor k k,m Representing the number of airline m airline ticket price changes, Q1, provided by supplier k k,m Representing a first estimated number of airline m price changes, W, provided by supplier k k,m Variable price weight, Q2, representing route m provided by supplier k k,m A second estimated number of air ticket prices representing the airline m provided by the supplier k, MAX (Q2 k,m ) Representing the maximum value of the number of times the second estimated ticket is changed for all airlines provided by the supplier k, j representing the past j days of the historical period, i representing one day of the historical period, and P1 i,k,m Representing first historical price change data corresponding to route m provided by supplier k, P2 i,k,m Representing second historical price change data corresponding to route m provided by supplier k.
For example: i=1 represents the last 1 day, i.e., the current time is 1 day before; i=7 represents the last 7 days, i.e. 7 days before the current time. i is larger, the farther the distance from the current time is, the smaller the influence on the price change times of the target supplier at the current time is, the time attenuation factors are added, and Q1 is calculated by using two sub-Gaussian models respectively k,m And Q2 k,m Reducing anomalous data pair results by exponential sliding averagingThe influence of occasional abnormal price changes on the query period is reduced. Normalization of distribution by computing z-score (zero-mean normalization), determination of Q1 k,m And Q2 k,m The gaussian distribution is met at a detection level of α=0.05, α representing the level of significance, i.e. the probability that estimating the overall parameter falls within a certain interval may make errors.
The embodiment further provides a specific calculation formula, further considers the influence of the time distance on the predicted air ticket price change times of the target suppliers, more accurately reflects the price change condition of the target airlines, and further accurately predicts the obtained air ticket price change times of the target airlines on the basis. After the air ticket price caching method of the embodiment is adopted, the daily price change rate is reduced from 16.81% to 11.92%, the daily price change rate standard deviation is reduced from 1.38% to 0.79%, the daily price change rate is lower and more stable, the accuracy of the query period is improved, and the accuracy of the query air ticket price is improved.
Example 2
The embodiment provides a cache system for air ticket prices. Referring to fig. 5, the cache system includes: a query period acquisition module 1 and an air ticket price caching module 2.
The query period acquisition module 1 is configured to acquire a query period corresponding to a target route provided by a target provider, where the query period is calculated from predicted number of air ticket price changes of the target provider.
The air ticket price caching module 2 is used for accessing the data interface of the target provider according to the query period, querying air ticket price data of the target air route, and caching the air ticket price data of the target air route to the local.
The execution subject of the air ticket price caching method may be a server (i.e., an entity of the engine system), and the local area refers to the local area of the server. For example, the ticket price data of the target route of inquiry can be for the journey within 90 days, and due to the special property of ticket selling, the user can purchase tickets after one year or two years, but the quantity of the ticket and the inquiry are very small, most of the purchase behaviors are generated within 90 days of the journey, and therefore the inquiry result for the journey within 90 days is sufficiently representative.
According to the method and the device, the query period is obtained through calculation of the predicted air ticket price changing times of the target suppliers, so that QPS (quality control system) can be reduced for the suppliers even if cached air ticket price data are updated for the air routes provided by the suppliers, the related costs of a server, data flow query and the like are reduced, the price changing condition of the air routes is reflected more accurately, the air ticket price query result is more accurate, the labor cost of implementation is reduced, and the development period is shortened.
In specific implementation, the cache system further includes: the system comprises a historical price change data acquisition module 3, an air ticket price change number prediction module 4, a maximum QPS acquisition module 5 and a query period calculation module 6.
The historical price change data acquisition module 3 is used for respectively acquiring the historical price change data of the target route from two data sources.
The air ticket price change number prediction module 4 is used for predicting the air ticket price change number of the target air route based on the historical price change data.
The maximum QPS acquiring module 5 is configured to acquire a maximum QPS corresponding to the target provider.
The query period calculation module 6 is used for obtaining the query period of the target route based on the air ticket price change times and the maximum QPS.
According to the embodiment, a Gaussian mixture model is adopted, the number of air ticket prices of the target air route is predicted through historical price change data of two different data sources, the query period of the target air route is obtained by combining the maximum QPS corresponding to the target provider, the data sources of the two price change times (for example, the two data sources are data sources with more accurate mean values and larger standard deviation) are fused, the two data sources reflect the price change condition of the target air route more accurately than a single data source, and the number of air ticket prices of the target air route predicted on the basis is more accurate.
In particular implementations, the two data sources include a first data source and a second data source.
The historical variable price data acquisition module 3 includes: a first historical variable price data acquisition unit 31 and a second historical variable price data acquisition unit 32.
The first historical price change data obtaining unit 31 is configured to obtain, from a first data source, the number of price changes per hour of the target route in the historical period, and take the maximum number of price changes per hour of the day as first historical price change data of the day.
The second historical price change data obtaining unit 32 is configured to obtain, from the second data source, the number of price changes per hour of the target route in the historical period, and take the maximum number of price changes per hour of the day as second historical price change data of the day.
The air ticket price change number prediction module 4 is specifically configured to obtain the air ticket price change number of the target air route based on the first historical price change data and the second historical price change data.
The present embodiment further reflects the historical price change per day for the target route in each data source over a historical period of time by the maximum number of price changes per hour per day.
In specific implementation, the air ticket price change number prediction module 4 includes: a first estimated ticket variable number obtaining unit 41, a second estimated ticket variable number obtaining unit 42, a variable weight obtaining unit 43, and a ticket variable number obtaining unit 44.
The first estimated air ticket price change number obtaining unit 41 is configured to obtain the first estimated air ticket price change number of the target route based on the first historical price change data.
The second estimated air ticket price change number obtaining unit 42 is configured to obtain the second estimated air ticket price change number of the target air route based on the second historical price change data.
The variable price weight obtaining unit 43 is used for normalizing the variable price times of the second estimated air ticket to obtain the variable price weight of the target air route.
The air ticket price change number obtaining unit 44 is configured to obtain the air ticket price change number of the target air route based on the first estimated air ticket price change number and the price change weight.
The embodiment further provides a specific way for combining historical price change data of two data sources to obtain the air ticket price change times of the target route.
In specific implementation, the following formula is adopted to calculate the TTL of the query period k,m
Q k,m =Q1 k,m *(1+W k,m )。
W k,m =Q2 k,m /MAX(Q2 k,m )。
Where N represents the number of airlines provided to vendor k, MQPS k Representing the maximum QPS, Q corresponding to vendor k k,m Representing the number of airline m airline ticket price changes, Q1, provided by supplier k k,m Representing a first estimated number of airline m price changes, W, provided by supplier k k,m Variable price weight, Q2, representing route m provided by supplier k k,m A second estimated number of air ticket prices representing the airline m provided by the supplier k, MAX (Q2 k,m ) Representing the maximum value of the number of times the second estimated ticket is changed for all airlines provided by the supplier k, j representing the past j days of the historical period, i representing one day of the historical period, and P1 i,k,m Representing first historical price change data corresponding to route m provided by supplier k, P2 i,k,m Representing second historical price change data corresponding to route m provided by supplier k.
For example: i=1 represents the last 1 day, i.e., the current time is 1 day before; i=7 represents the last 7 days, i.e. 7 days before the current time. i is larger, the farther the distance from the current time is, the smaller the influence on the price change times of the target supplier at the current time is, the time attenuation factors are added, and Q1 is calculated by using two sub-Gaussian models respectively k,m And Q2 k,m The interference of abnormal data on results is reduced by an exponential moving average method, and the influence of sporadic abnormal price changes on the query period is reduced. Normalization of distribution by computing z-scoreMeasurement and determination of Q1 k,m And Q2 k,m The gaussian distribution is met at a detection level of α=0.05, α representing the level of significance, i.e. the probability that estimating the overall parameter falls within a certain interval may make errors.
The embodiment further provides a specific calculation formula, further considers the influence of the time distance on the predicted air ticket price change times of the target suppliers, more accurately reflects the price change condition of the target airlines, and further accurately predicts the obtained air ticket price change times of the target airlines on the basis. After the air ticket price caching method of the embodiment is adopted, the daily price change rate is reduced from 16.81% to 11.92%, the daily price change rate standard deviation is reduced from 1.38% to 0.79%, the daily price change rate is lower and more stable, the accuracy of the query period is improved, and the accuracy of the query air ticket price is improved.
Example 3
Fig. 6 is a schematic structural diagram of an electronic device according to embodiment 3 of the present invention. The electronic device includes a memory, a processor, and a computer program stored on the memory and executable on the processor, which when executed implements the method of caching air ticket prices in embodiment 1. The electronic device 30 shown in fig. 6 is merely an example, and should not be construed as limiting the functionality and scope of use of embodiments of the present invention.
The electronic device 30 may be in the form of a general purpose computing device, which may be a server device, for example. Components of electronic device 30 may include, but are not limited to: the at least one processor 31, the at least one memory 32, a bus 33 connecting the different system components, including the memory 32 and the processor 31.
The bus 33 includes a data bus, an address bus, and a control bus.
Memory 32 may include volatile memory such as Random Access Memory (RAM) 321 and/or cache memory 322, and may further include Read Only Memory (ROM) 323.
Memory 32 may also include a program/utility 325 having a set (at least one) of program modules 324, such program modules 324 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment.
The processor 31 executes various functional applications and data processing such as the caching method of the air ticket price in embodiment 1 of the present invention by running a computer program stored in the memory 32.
The electronic device 30 may also communicate with one or more external devices 34 (e.g., keyboard, pointing device, etc.). Such communication may be through an input/output (I/O) interface 35. Also, model-generating device 30 may also communicate with one or more networks, such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet, via network adapter 36. As shown, network adapter 36 communicates with the other modules of model-generating device 30 via bus 33. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in connection with the model-generating device 30, including, but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (disk array) systems, tape drives, data backup storage systems, and the like.
It should be noted that although several units/modules or sub-units/modules of an electronic device are mentioned in the above detailed description, such a division is merely exemplary and not mandatory. Indeed, the features and functionality of two or more units/modules described above may be embodied in one unit/module in accordance with embodiments of the present invention. Conversely, the features and functions of one unit/module described above may be further divided into ones that are embodied by a plurality of units/modules.
Example 4
The present embodiment provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the caching method of air ticket prices in embodiment 1.
More specifically, among others, readable storage media may be employed including, but not limited to: portable disk, hard disk, random access memory, read only memory, erasable programmable read only memory, optical storage device, magnetic storage device, or any suitable combination of the foregoing.
In a possible embodiment, the invention may also be implemented in the form of a program product comprising program code for causing a terminal device to carry out a caching method for realizing the ticket price in example 1, when said program product is run on the terminal device.
Wherein the program code for carrying out the invention may be written in any combination of one or more programming languages, which program code may execute entirely on the user device, partly on the user device, as a stand-alone software package, partly on the user device and partly on the remote device or entirely on the remote device.
While specific embodiments of the invention have been described above, it will be appreciated by those skilled in the art that this is by way of example only, and the scope of the invention is defined by the appended claims. Various changes and modifications to these embodiments may be made by those skilled in the art without departing from the principles and spirit of the invention, but such changes and modifications fall within the scope of the invention.

Claims (8)

1. A method for caching an air ticket price, the method comprising the steps of:
acquiring a query period corresponding to a target route provided by a target provider;
accessing a data interface of the target provider according to the query period, querying air ticket price data of the target air route, and caching the air ticket price data of the target air route to the local;
the query period corresponding to the target route is calculated by the following steps:
respectively acquiring historical price change data of the target route from two data sources;
predicting the number of air ticket price changes of the target route based on the historical price change data;
obtaining a maximum QPS corresponding to the target provider;
and obtaining the query period of the target route based on the air ticket price changing times and the maximum QPS.
2. The method of claim 1, wherein the two data sources include a first data source and a second data source;
the step of respectively acquiring the historical price change data of the target route from two data sources specifically comprises the following steps:
acquiring the number of price changes per hour of the target route in a historical time period from the first data source, wherein the maximum number of price changes per hour of the current day is used as first historical price change data of the current day;
acquiring the price change times per hour of the target route in a historical time period from the second data source, and taking the maximum price change times per hour of the day as second historical price change data of the day;
the step of predicting the number of air ticket price changes of the target route based on the historical price change data specifically comprises the following steps:
and obtaining the air ticket price changing times of the target route based on the first historical price changing data and the second historical price changing data.
3. The method for caching ticket prices according to claim 2, wherein,
the step of obtaining the air ticket price changing times of the target air route based on the first historical price changing data and the second historical price changing data specifically comprises the following steps:
obtaining a first estimated air ticket price changing number of the target route based on the first historical price changing data;
obtaining second estimated air ticket price changing times of the target air route based on the second historical price changing data;
normalizing the second estimated ticket price changing times to obtain the price changing weight of the target route;
and obtaining the air ticket price changing times of the target air route based on the first estimated air ticket price changing times and the price changing weights.
4. A cache system for ticket prices, the cache system comprising: a query period acquisition module and an air ticket price caching module;
the inquiry period acquisition module is used for acquiring an inquiry period corresponding to a target route provided by a target provider;
the air ticket price caching module is used for accessing the data interface of the target provider according to the query period, querying the air ticket price data of the target air route and caching the air ticket price data of the target air route to the local;
the cache system further comprises: the system comprises a historical price change data acquisition module, an air ticket price change number prediction module, a maximum QPS acquisition module and a query period calculation module;
the historical price change data acquisition module is used for respectively acquiring historical price change data of the target route from two data sources;
the air ticket price change number prediction module is used for predicting the air ticket price change number of the target air route based on the historical price change data;
the maximum QPS acquisition module is used for acquiring a maximum QPS corresponding to the target provider;
the inquiry period calculation module is used for obtaining the inquiry period of the target route based on the air ticket price change times and the maximum QPS.
5. The air ticket price caching system of claim 4 wherein the two data sources comprise a first data source and a second data source;
the historical variable price data acquisition module comprises: a first historical variable price data acquisition unit and a second historical variable price data acquisition unit;
the first historical price change data acquisition unit is used for acquiring the price change times per hour of the target route in a historical time period from the first data source, and taking the maximum price change times per hour of the day as first historical price change data of the day;
the second historical price change data acquisition unit is used for acquiring the price change times per hour of the target route in a historical time period from the second data source, and taking the maximum price change times per hour of the day as second historical price change data of the day;
the air ticket price change number prediction module is specifically used for obtaining the air ticket price change number of the target air route based on the first historical price change data and the second historical price change data.
6. The ticket price caching system of claim 5,
the air ticket price change number prediction module comprises: the first estimated air ticket price changing number obtaining unit, the second estimated air ticket price changing number obtaining unit, the price changing weight obtaining unit and the air ticket price changing number obtaining unit;
the first estimated air ticket price changing number obtaining unit is used for obtaining first estimated air ticket price changing number of the target air route based on the first historical price changing data;
the second estimated air ticket price changing number obtaining unit is used for obtaining second estimated air ticket price changing number of the target air route based on the second historical price changing data;
the variable price weight obtaining unit is used for normalizing the variable price times of the second estimated ticket to obtain the variable price weight of the target route;
the air ticket price changing number obtaining unit is used for obtaining the air ticket price changing number of the target air route based on the first estimated air ticket price changing number and the price changing weight.
7. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the caching method of the ticket price according to any of claims 1-3 when executing the computer program.
8. A computer-readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements a caching method of an air ticket price according to any of claims 1-3.
CN202110702121.0A 2021-06-24 2021-06-24 Caching method, caching system, caching equipment and caching storage medium for air ticket price Active CN113377554B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110702121.0A CN113377554B (en) 2021-06-24 2021-06-24 Caching method, caching system, caching equipment and caching storage medium for air ticket price

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110702121.0A CN113377554B (en) 2021-06-24 2021-06-24 Caching method, caching system, caching equipment and caching storage medium for air ticket price

Publications (2)

Publication Number Publication Date
CN113377554A CN113377554A (en) 2021-09-10
CN113377554B true CN113377554B (en) 2024-03-05

Family

ID=77578794

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110702121.0A Active CN113377554B (en) 2021-06-24 2021-06-24 Caching method, caching system, caching equipment and caching storage medium for air ticket price

Country Status (1)

Country Link
CN (1) CN113377554B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104751386A (en) * 2015-04-14 2015-07-01 携程计算机技术(上海)有限公司 Hotel distributed price comparison method
CN104794191A (en) * 2015-04-16 2015-07-22 北京京东尚科信息技术有限公司 Method and device for updating air ticket data
CN105631630A (en) * 2015-12-25 2016-06-01 中国民航信息网络股份有限公司 Passenger order data processing method and device
CN108628998A (en) * 2018-05-02 2018-10-09 百度在线网络技术(北京)有限公司 A kind of air ticket, which is looked into, to be ordered than control method, device, server and storage medium
CN109242579A (en) * 2018-11-21 2019-01-18 北京交通大学 Ticket price prediction technique based on convolutional neural networks
CN109978619A (en) * 2019-03-25 2019-07-05 携程旅游网络技术(上海)有限公司 Method, system, equipment and the medium of air ticket pricing Policy Filtering
CN112346882A (en) * 2020-03-26 2021-02-09 北京沃东天骏信息技术有限公司 Method and apparatus for transmitting information
CN112434067A (en) * 2020-11-24 2021-03-02 携程旅游网络技术(上海)有限公司 Method, system, equipment and medium for processing cache data of international freight rate
CN112699153A (en) * 2021-01-14 2021-04-23 上海交通大学 Cache survival time setting and collaborative updating method and system in air ticket query

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080262878A1 (en) * 2007-04-17 2008-10-23 Travelocity.Com Lp Systems, methods, and computer program products for generating and updating a cache of price and availability information for travel packages and components
US8756209B2 (en) * 2012-01-04 2014-06-17 International Business Machines Corporation Computing resource allocation based on query response analysis in a networked computing environment

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104751386A (en) * 2015-04-14 2015-07-01 携程计算机技术(上海)有限公司 Hotel distributed price comparison method
CN104794191A (en) * 2015-04-16 2015-07-22 北京京东尚科信息技术有限公司 Method and device for updating air ticket data
CN105631630A (en) * 2015-12-25 2016-06-01 中国民航信息网络股份有限公司 Passenger order data processing method and device
CN108628998A (en) * 2018-05-02 2018-10-09 百度在线网络技术(北京)有限公司 A kind of air ticket, which is looked into, to be ordered than control method, device, server and storage medium
CN109242579A (en) * 2018-11-21 2019-01-18 北京交通大学 Ticket price prediction technique based on convolutional neural networks
CN109978619A (en) * 2019-03-25 2019-07-05 携程旅游网络技术(上海)有限公司 Method, system, equipment and the medium of air ticket pricing Policy Filtering
CN112346882A (en) * 2020-03-26 2021-02-09 北京沃东天骏信息技术有限公司 Method and apparatus for transmitting information
CN112434067A (en) * 2020-11-24 2021-03-02 携程旅游网络技术(上海)有限公司 Method, system, equipment and medium for processing cache data of international freight rate
CN112699153A (en) * 2021-01-14 2021-04-23 上海交通大学 Cache survival time setting and collaborative updating method and system in air ticket query

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Locality in search engine queries and its implications for caching;Xie Yinglian 等;《Proceedings of the 21st Annual Joint Conference of the IEEE Computer and Communications Societies》;全文 *
基于用户行为分析的在线订票系统缓存优化策略研究;邱鹏;万怀宇;林友芳;刘宇;姚一;;计算机与现代化(05);全文 *
高性能实时数据分析平台在航空公司收益提升中的应用;张曦 等;《企业导报》;全文 *

Also Published As

Publication number Publication date
CN113377554A (en) 2021-09-10

Similar Documents

Publication Publication Date Title
ES2874055T3 (en) System and procedure for the distribution of electronic data
US20230188452A1 (en) Performance monitoring in a distributed storage system
CN110073382A (en) For showing the graphic user interface of the inventory data at merchant location
WO2019094910A1 (en) Building segment-specific executable program code for modeling outputs
US20150324844A1 (en) Advertising marketplace systems and methods
US20170103486A1 (en) Automatic update detection for regulation compliance
CN111415199A (en) Customer prediction updating method and device based on big data and storage medium
CN110679114A (en) Method for estimating deletability of data object
CN110766184A (en) Order quantity prediction method and device
CN110889725A (en) Online advertisement CTR estimation method, device, equipment and storage medium
CN110598183A (en) Flow distribution method, device, equipment and storage medium
US20210056451A1 (en) Outlier processing in time series data
CN113377554B (en) Caching method, caching system, caching equipment and caching storage medium for air ticket price
US10956920B1 (en) Methods and systems for implementing automated bidding models
CN112181376A (en) Code resource management method, device, electronic equipment and medium
CN109597724B (en) Service stability measuring method, device, computer equipment and storage medium
US20210035124A1 (en) System and method for management of sensor data based on high-value data model
WO2022111112A1 (en) Automatically adjusting data access policies in data analytics
US20180121937A1 (en) Method of correlating bid price to intrinsic value in a survey platform
CN117616436A (en) Joint training of machine learning models
Li et al. Generalization analysis for game-theoretic machine learning
CN112434067A (en) Method, system, equipment and medium for processing cache data of international freight rate
US20150149255A1 (en) Robust pricing solution for products and services
US10825062B1 (en) Methods and systems for implementing automated bidding models
US20210390511A1 (en) Computer implemented method of employment

Legal Events

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