CN112783908A - Efficient machine ticket data caching method - Google Patents

Efficient machine ticket data caching method Download PDF

Info

Publication number
CN112783908A
CN112783908A CN202110002517.4A CN202110002517A CN112783908A CN 112783908 A CN112783908 A CN 112783908A CN 202110002517 A CN202110002517 A CN 202110002517A CN 112783908 A CN112783908 A CN 112783908A
Authority
CN
China
Prior art keywords
data
interface
airline
cache
caching method
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110002517.4A
Other languages
Chinese (zh)
Inventor
陈冬东
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chongqing Zhouyou Technology Co ltd
Original Assignee
Chongqing Zhouyou Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chongqing Zhouyou Technology Co ltd filed Critical Chongqing Zhouyou Technology Co ltd
Priority to CN202110002517.4A priority Critical patent/CN112783908A/en
Publication of CN112783908A publication Critical patent/CN112783908A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2365Ensuring data consistency and integrity
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24552Database cache management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to the field of data processing, and particularly discloses an efficient ticket data caching method which comprises the following steps of firstly, acquiring all data of an airline company to local data through an interface; step two, data import is carried out through two interfaces, wherein one interface is used for inquiring a cache database, and the other interface is used for directly inquiring an airline company; step three, when the client side inquires, a cache data interface is called firstly for browsing the client side, and meanwhile, the server can record browsed data and times; according to the invention, the data is cached by an efficient air ticket data caching method, the information can be updated in time, the updating and replying speed is high each time, and the interface is used for carrying out data transmission of an airline company, so that the method is convenient and fast.

Description

Efficient machine ticket data caching method
Technical Field
The disclosure relates to the field of data processing, in particular to an efficient ticket data caching method.
Background
The traditional caching scheme is that after being acquired from a ticket provider interface, such as an airline interface, all the data is cached in a local database, then the data is provided for a front-end client to inquire and display, and then the time is cut off and the interface is updated. The advantage of this scheme is that the query is quick, but the disadvantage is fatal, one is that the information can not be updated in time, and one is that the updating speed is slow because the data volume is huge in each updating. If the cache is not made, the airline interface is fetched every time, not only the speed is slow, but also the airline is charged accordingly.
Disclosure of Invention
The present invention aims to solve the problems mentioned in the background art.
In order to achieve the above object, the basic scheme of the present invention provides an efficient ticket data caching method, which includes the following steps:
acquiring all data of an airline company to local data through an interface;
step two, data import is carried out through two interfaces, wherein one interface is used for inquiring a cache database, and the other interface is used for directly inquiring an airline company;
step three, when the client side inquires, a cache data interface is called firstly for browsing the client side, and meanwhile, the server can record browsed data and times;
step four, when the customer determines to place the order, the interface of the direct inquiry navigation department is called, the data of the customer terminal is updated, and the customer can see the latest data at that time;
step five, a copy of data is synchronized to update local cache data while new data is inquired from the airline company;
step six, when a client inquires data of a certain airline, if the returned data is null data, a mechanism for directly calling an airline company interface and updating the cache data is triggered;
step seven, according to the statistical data of the step three, a threshold value is specified, all cache values of the whole airline are updated immediately when the query times of a certain airline exceed 100 times within 1 hour, and meanwhile, the query times of the airline are cleared for preparing new data at the next time;
and step eight, if the threshold value is not exceeded, the cache server automatically acquires data from the airline company interface once every 6 hours from high to low according to the number of times of the latest airline inquiry.
Further, in step four, the latest data content viewed by the client is price, time and seat.
Further, in the fifth step, a copy of data is synchronized to update the local cache data, so that the airline interface is inquired once.
Further, in the sixth step, the presentation form of the data at the client is a progress bar, which indicates that the data is being obtained latest, and please do the operation later.
The principle and the effect of the invention are as follows:
according to the invention, the data is cached by an efficient air ticket data caching method, information can be updated in time, the speed of replying for updating each time is high, the data transmission of an airline company is carried out by using the interface, the method is convenient and fast, and the problems that the information cannot be updated in time in the prior art, the updating speed is very low because the data volume is huge for updating each time, and the airline company interface is taken each time are solved, so that the speed is low, and the airline company can charge accordingly.
Description of the drawings:
fig. 1 is a flowchart of an efficient ticket data caching method according to this embodiment.
Detailed Description
The following is further detailed by the specific embodiments:
example (b):
a method for efficiently caching ticket data, as shown in FIG. 1, comprises the following steps,
firstly, acquiring all data of an airline company to local data through an interface at one time, wherein the operation is only performed once although the operation is long;
developing an interface for inquiring a cache database and an interface for directly inquiring an airline company;
step three, when the client side inquires, the cache data interface is called firstly for browsing the client side, and meanwhile, the server can record which data and times are browsed;
step four, when the customer determines to place the order, the interface for directly inquiring the navigation department is called, and the data of the client (or h5) is updated, so that the customer can see the latest (possibly unchanged) data at the moment, such as price, time, seats and the like;
step five, when the airline company inquires new data, a part of data is synchronized to update local cache data, so that the airline company interface is inquired for one time;
and step six, when a client inquires data of a certain airline, if null data is returned, a mechanism for directly calling an airline company interface and updating the cache data is triggered. The display form at the client is a progress bar which indicates that the data is obtaining the latest data and please operate later;
step seven, according to the statistical data of the step three, a threshold value is specified, if the inquiry frequency of a certain route exceeds 100 times within 1 hour, all cache values of the whole route are updated immediately, and the inquiry frequency of the route is cleared to be ready for new data at the next time;
and step eight, if the threshold value is not exceeded, the cache server automatically acquires data from the airline company interface once every 6 hours from high to low according to the number of times of the latest airline inquiry.
The foregoing is merely an example of the present invention and common general knowledge of known specific structures and features of the embodiments is not described herein in any greater detail. It should be noted that, for those skilled in the art, without departing from the structure of the present invention, several changes and modifications can be made, which should also be regarded as the protection scope of the present invention, and these will not affect the effect of the implementation of the present invention and the practicability of the patent. The scope of the claims of the present application shall be determined by the contents of the claims, and the description of the embodiments and the like in the specification shall be used to explain the contents of the claims.

Claims (4)

1. An efficient ticket data caching method is characterized by comprising the following steps:
acquiring all data of an airline company to local data through an interface;
step two, data import is carried out through two interfaces, wherein one interface is used for inquiring a cache database, and the other interface is used for directly inquiring an airline company;
step three, when the client side inquires, a cache data interface is called firstly for browsing the client side, and meanwhile, the server can record browsed data and times;
step four, when the customer determines to place the order, the interface of the direct inquiry navigation department is called, the data of the customer terminal is updated, and the customer can see the latest data at that time;
step five, a copy of data is synchronized to update local cache data while new data is inquired from the airline company;
step six, when a client inquires data of a certain airline, if the returned data is null data, a mechanism for directly calling an airline company interface and updating the cache data is triggered;
step seven, according to the statistical data of the step three, a threshold value is specified, all cache values of the whole airline are updated immediately when the query times of a certain airline exceed 100 times within 1 hour, and meanwhile, the query times of the airline are cleared for preparing new data at the next time;
and step eight, if the threshold value is not exceeded, the cache server automatically acquires data from the airline company interface once every 6 hours from high to low according to the number of times of the latest airline inquiry.
2. The ticket data efficient caching method of claim 1, wherein: in the fourth step, the latest data content viewed by the client is price, time and seat.
3. The ticket data efficient caching method according to claim 1 or 2, wherein: and step five, synchronizing a copy of data to update the local cache data, thereby inquiring the airline interface once less.
4. The ticket data efficient caching method of claim 3, wherein: in the sixth step, the display form of the data at the client is a progress bar which indicates that the data is being obtained latest and please operate later.
CN202110002517.4A 2021-01-04 2021-01-04 Efficient machine ticket data caching method Pending CN112783908A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110002517.4A CN112783908A (en) 2021-01-04 2021-01-04 Efficient machine ticket data caching method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110002517.4A CN112783908A (en) 2021-01-04 2021-01-04 Efficient machine ticket data caching method

Publications (1)

Publication Number Publication Date
CN112783908A true CN112783908A (en) 2021-05-11

Family

ID=75753774

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110002517.4A Pending CN112783908A (en) 2021-01-04 2021-01-04 Efficient machine ticket data caching method

Country Status (1)

Country Link
CN (1) CN112783908A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104794191A (en) * 2015-04-16 2015-07-22 北京京东尚科信息技术有限公司 Method and device for updating air ticket data
CN107291901A (en) * 2017-06-23 2017-10-24 携程旅游网络技术(上海)有限公司 Main passive combination obtains method, system, equipment and the storage medium of air ticket data
CN107291920A (en) * 2017-06-28 2017-10-24 南京途牛科技有限公司 A kind of air ticket query caching method
CN107944039A (en) * 2017-12-07 2018-04-20 携程旅游网络技术(上海)有限公司 Air ticket data transfer method, system, storage medium and electronic equipment
CN109918387A (en) * 2019-02-11 2019-06-21 深圳市活力天汇科技股份有限公司 A kind of internal ticket data-updating method
CN112115172A (en) * 2020-09-28 2020-12-22 中国建设银行股份有限公司 Flight data caching method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104794191A (en) * 2015-04-16 2015-07-22 北京京东尚科信息技术有限公司 Method and device for updating air ticket data
CN107291901A (en) * 2017-06-23 2017-10-24 携程旅游网络技术(上海)有限公司 Main passive combination obtains method, system, equipment and the storage medium of air ticket data
CN107291920A (en) * 2017-06-28 2017-10-24 南京途牛科技有限公司 A kind of air ticket query caching method
CN107944039A (en) * 2017-12-07 2018-04-20 携程旅游网络技术(上海)有限公司 Air ticket data transfer method, system, storage medium and electronic equipment
CN109918387A (en) * 2019-02-11 2019-06-21 深圳市活力天汇科技股份有限公司 A kind of internal ticket data-updating method
CN112115172A (en) * 2020-09-28 2020-12-22 中国建设银行股份有限公司 Flight data caching method and device

Similar Documents

Publication Publication Date Title
US8370442B2 (en) Method and system for leveraging identified changes to a mail server
CN107944039B (en) Method and system for calling air ticket data, storage medium and electronic equipment
US20080059441A1 (en) System and method for enterprise-wide dashboard reporting
JP5433640B2 (en) Information providing apparatus, information providing method, information providing program, and recording medium
KR20200104789A (en) Method, apparatus, device and medium for storing and querying data
US20050097569A1 (en) Event notification in a clustered computing environments
US20090276523A1 (en) Expression-based web logger for usage and navigational behavior tracking
WO2004059531A1 (en) Optimization of temporal and spatial data processing in an object relational database system
CN109947668A (en) The method and apparatus of storing data
CN102867070A (en) Method for updating cache of key-value distributed memory system
CN103190123A (en) Method and apparatus for distributing published messages
US20180081975A1 (en) System and method for web content matching
CN112579695A (en) Data synchronization method and device
CN114398520A (en) Data retrieval method, system, device, electronic equipment and storage medium
JP2007094884A (en) Data search method and system
CN112783908A (en) Efficient machine ticket data caching method
KR20140111255A (en) Method and system for data filing systems
CN112130846A (en) Three-micro one-screen publishing engine system and publishing method
WO1999057656A1 (en) Method and apparatus for simultaneously accessing a plurality of dispersed databases
WO2008042379A2 (en) Online distribution of time-sensitive content
JP3811615B2 (en) Information distribution system, apparatus and method, and recording medium
US20160203175A1 (en) A system and method for managing partner feed index
US8782023B1 (en) Versioned database cache
CN113297222B (en) Report data acquisition method and device, electronic equipment and storage medium
US10769110B2 (en) Facilitating queries for interaction data with visitor-indexed data objects

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20210511

RJ01 Rejection of invention patent application after publication