Freight rate data management method and system, storage medium and electronic device

By acquiring and preprocessing freight data in real time and building a target database using memory mapping technology, the problem of slow storage and reading of freight data is solved, real-time, accurate and efficient access of data is achieved.

CN119762168APending Publication Date: 2025-04-04TRAVELSKY TECHNOLOGY LIMITED
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411974411.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

In the prior art, the storage and reading of freight rate data is slower and there is a lack of effective solutions.

Method used

By responding to data acquisition instructions, freight data is obtained from the data source in real time, preprocessing is performed to build initial data containing data and index data, and using memory mapping technology to map the initial data to the target location to build a target database.

Benefits of technology

Real-time update, fast retrieval and access of data is realized, the data reading speed is maximized, the timeliness, accuracy and access efficiency of data management are improved, and the problems of slow data processing speed and low query efficiency in traditional data management are solved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119762168A_ABST
    Figure CN119762168A_ABST
Patent Text Reader

Abstract

The invention provides a freight rate data management method, and relates to the technical field of big data. The method comprises the following steps that in response to a data acquisition instruction, freight rate data are acquired from a data source, and the freight rate data are used for representing flight ticket prices and flight information; preprocessing the freight rate data to obtain initial data, the initial data at least comprising data data and index data; by utilizing a memory mapping method, the initial data is mapped to the target position to obtain the target database, so that the problems of low data processing speed, low query efficiency and speed bottleneck in mass data processing and storage in traditional data management are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of big data technology, and in particular to a freight rate data management method, system, storage medium, and electronic device. Background Art

[0002] The fare system accepts external user requests. The response results of these requests include customized results required by customers, that is, fare data released by different users at different time points. The fare data features released by airlines and the preferences of customer requests are mined from these data. Certain data recommendations are made based on the mined data features, which can help airlines better manage data. For large quantities of data, efficient query tools are essential.

[0003] Therefore, how to quickly store and read data has become a key issue in the prior art. No effective solution has been proposed yet for the above problems. Summary of the invention

[0004] The embodiments of the present invention provide a method, system, storage medium, and electronic device for managing freight rate data, so as to at least solve the technical problem of slow data storage and reading speed in related technologies.

[0005] According to one embodiment of the present invention, a fare data management method is provided, the method comprising the following steps: in response to a data acquisition instruction, acquiring fare data from a data source, the fare data being used to represent flight fares and flight information; preprocessing the fare data to obtain initial data, the initial data at least including data data and index data; using a memory mapping method, mapping the initial data to a target location to obtain a target database.

[0006] Optionally, the method includes the following steps: in response to a data query instruction, obtaining target index value information; based on the target index value information, retrieving corresponding target data from a target database.

[0007] Optionally, preprocessing the freight rate data to obtain initial data includes the following steps: performing a first preprocessing on the full amount of data in the freight rate data to obtain initial data; wherein the full amount of data is used to represent all effective freight rate data.

[0008] Optionally, preprocessing the freight rate data to obtain initial data includes the following steps: performing a second preprocessing on incremental data in the freight rate data to obtain initial data; wherein the incremental data is used to represent updated freight rate data.

[0009] Optionally, in response to a data acquisition instruction, acquiring freight data from a data source includes the following steps: in response to a timed acquisition instruction in the data acquisition instruction, acquiring freight data from a data source, wherein the data source includes freight databases of multiple airlines.

[0010] Optionally, in response to a data query instruction, obtaining target index value information includes the following steps: in response to an http request instruction in the data query instruction, obtaining target index value information; wherein the http request instruction at least includes an http request instruction from a Web port.

[0011] Optionally, memory mapping technology is used to map the initial data into memory to obtain a memory database, including: obtaining current effective data and target historical data, the target historical data is used to represent historical data within a specified time range, and the current effective data is used to represent data currently being used or accessed; storing the current effective data and target historical data in the memory database.

[0012] According to another aspect of an embodiment of the present invention, a freight rate data management system is provided, including: an acquisition module, the acquisition module is used to obtain freight rate data from a data source in response to a data acquisition instruction; a preprocessing module, the preprocessing module is used to preprocess the freight rate data to obtain initial data, the initial data at least includes data data and index data; a mapping module, the mapping module is used to map the initial data to a target location using a memory mapping method to obtain a target database.

[0013] According to another aspect of the embodiments of the present invention, a non-volatile storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the freight rate data management method of the above embodiment when running.

[0014] According to another aspect of an embodiment of the present invention, there is provided an electronic device including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the freight rate data management method of the above embodiment.

[0015] According to another aspect of the embodiments of the present invention, a non-volatile storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute any of the above-mentioned freight rate data management methods when running.

[0016] According to another aspect of the embodiments of the present invention, a processor is provided, and the processor is used to run a program, wherein the program is configured to execute any of the above-mentioned freight rate data management methods when running.

[0017] In an embodiment of the present invention, by responding to a data acquisition instruction, fare data, including flight fares and flight information, are acquired from a data source in real time. By preprocessing the acquired fare data, initial data including data data and index data are constructed. The preprocessed initial data is mapped to a target location using memory mapping technology to construct a target database, thereby achieving the purposes of real-time data update, rapid data retrieval and access, and maximization of data reading speed, thereby achieving the timeliness and accuracy of data, high-speed response to data queries, and extremely high data access efficiency. The technical effects solve the problems of slow data processing speed, low query efficiency, and speed bottlenecks in large-scale data processing and storage in traditional data management. In summary, the fare data management method significantly improves the real-time, accuracy, and access efficiency of data management through real-time data acquisition, efficient data preprocessing, and memory mapping technology. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0019] Figure 1 This is a hardware structure block diagram of a computer terminal of a freight rate data management method according to one embodiment of the present invention;

[0020] Figure 2 is a flow chart of a method for managing freight rate data according to one optional embodiment of the present invention;

[0021] Figure 3 is a structural diagram of a freight rate data management system according to one optional embodiment of the present invention;

[0022] Figure 4 is a structural diagram of a freight rate data management system according to another optional embodiment of the present invention;

[0023] Figure 5 is a schematic diagram of a memory address space structure of a freight rate data management system according to one optional embodiment of the present invention;

[0024] Figure 6 is a schematic diagram of the structure of the data area corresponding to the data file of the freight rate data management system according to one embodiment of the present invention;

[0025] Figure 7 Schematic diagram of the internal structure of the data area of ​​a freight rate data management system according to one embodiment of the present invention. DETAILED DESCRIPTION

[0026] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0028] Example 1

[0029] According to an embodiment of the present application, a method embodiment of a freight rate data management method is also provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0030] The method embodiment provided in the first embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 The hardware structure block diagram of a computer terminal (or mobile device) for implementing the freight rate data management method is shown. Figure 1 As shown, the computer terminal 10 (or mobile device) may include one or more (shown as 102a, 102b, ..., 102n in the figure) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 1The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.

[0031] It should be noted that the one or more processors 102 and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 10 (or mobile device). As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).

[0032] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the freight data management method in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, the above-mentioned freight data management method is realized. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0033] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0034] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 (or mobile device).

[0035] Under the above operating environment, this application provides Figure 2The freight rate data management method shown. Figure 2 It is a flowchart of the freight rate data management method according to Example 1 of the present application.

[0036] Step S101, in response to a data acquisition instruction, acquiring fare data from a data source, wherein the fare data is used to represent flight fares and flight information;

[0037] In step S101, the above data sources include at least: an internal database, an industry data exchange platform, and a historical data archive, wherein the internal database stores detailed data on flight pricing, discounts, policies, seat inventory, and reservation information.

[0038] Step S102, preprocessing the freight rate data to obtain initial data, wherein the initial data at least includes data data and index data;

[0039] In step S102, the above preprocessing is to combine different fields of different data tables in each data file into different indexes, so as to obtain the above initial data. By establishing a data index area structure, it is convenient for the application to query efficiently, and an access interface for the application is provided, through which the application can access the initial data.

[0040] The above data is the actual freight rate information and flight data, and the above index data such as flight number, date, flight segment and other indexes are used to quickly locate and query data.

[0041] Step S103, using a memory mapping method, mapping the initial data to a target location to obtain a target database.

[0042] In step S103, the pre-processed data is mapped to the address space of the process through mmap (memory mapped file) technology to form a target database. The above target location is the memory, and the above target database is a memory database. The mmap technology allows the data file to be directly mapped to the memory space of the process, thereby avoiding multiple data copies when reading data by traditional I / O, and significantly improving the data access speed. In addition, memory mapping can realize read-only access to data, protect the integrity of the data, and also use the memory management mechanism of the operating system (such as LRU algorithm) to cache hot data, further enhancing the query performance.

[0043] Through the above steps, by responding to the data acquisition instruction, the freight data, including flight fares and flight information, are acquired from the data source in real time. By preprocessing the acquired freight data, initial data including data data and index data are constructed, and the preprocessed initial data is mapped to the target location using the memory mapping technology to construct the target database, thereby achieving the purpose of real-time data update, fast data retrieval and access, and maximizing data reading speed, thereby achieving the timeliness and accuracy of the data, the high-speed response of data query, and the technical effect of extremely high data access efficiency, and solving the speed bottleneck problems of slow data processing speed, low query efficiency, and large-scale data processing and storage in traditional data management. In summary, the freight data management method significantly improves the real-time, accuracy and access efficiency of data management through real-time data acquisition, efficient data preprocessing and memory mapping technology.

[0044] Optionally, the method comprises the following steps:

[0045] Step S104, in response to the data query instruction, obtaining target index value information;

[0046] In step S104, the data query instruction includes specific query conditions, such as flight number, departure place, destination, date, etc.

[0047] The above target index value information is generated according to the index structure established in the preprocessing stage, and can quickly locate specific data records in the data file.

[0048] Step S105: based on the target index value information, retrieve corresponding target data from the target database.

[0049] In step S105, the indexing and mapping mechanism of the memory database is used to achieve rapid retrieval of data, ensuring that user query requests can receive timely and accurate responses.

[0050] Through the above steps, efficient and accurate query of large-scale freight rate data is achieved through the process of responding to data query instructions, obtaining target index value information and retrieving target data from the target database.

[0051] Optionally, preprocessing the freight rate data to obtain initial data includes the following steps:

[0052] Step S1021, performing a first preprocessing on the full amount of data in the freight rate data to obtain initial data; wherein the full amount of data is used to represent all effective freight rate data.

[0053] In step S1021, the above-mentioned full data is used to represent all effective fare data released at a certain point in time, including all relevant pricing information and additional conditions such as fare details, applicable rules, booking conditions, etc. of each flight.

[0054] The first preprocessing process mentioned above includes: data cleaning, data format standardization, index construction, data partitioning and organization. The specific steps are as follows:

[0055] Data cleaning: During pre-processing, the system will check and correct errors or inconsistencies in the data, such as processing invalid fare records, unifying date and time formats, and verifying the integrity of flight information. Data cleaning ensures the accuracy and reliability of the data.

[0056] Data format standardization: Convert the freight rate data into a unified format for subsequent processing and storage. This includes converting the data into JSON, XML or other predefined data exchange formats, and ensuring the standardization of data fields, such as uniformly defining fare units, flight number formats, etc.

[0057] Index construction: According to the characteristics of freight rate data and user query requirements, the preprocessing process will construct corresponding indexes. The index may include flight number index, departure and destination index, date index, etc. These indexes can quickly locate data and improve query efficiency.

[0058] Data partitioning and organization: During the preprocessing phase, the system may partition and organize the data based on its characteristics, such as by airline, route, or time, to create favorable conditions for memory mapping and data query.

[0059] Through the above steps, the data is converted into a format that is easier to manage and store through preprocessing, which provides preparation for the subsequent construction of the target database using memory mapping technology.

[0060] Optionally, preprocessing the freight rate data to obtain initial data includes the following steps:

[0061] Step S1022, performing a second preprocessing on the incremental data in the freight rate data to obtain initial data; wherein the incremental data is used to represent the updated freight rate data.

[0062] In step S1022, the incremental data is used to represent the freight rate update information for specific parts or attributes that is newly released after the full data. These updates may be price adjustments, rule changes, space opening or closing, etc.

[0063] It should be noted that the second preprocessing process described above is consistent with the first preprocessing process in the above step S1021.

[0064] The above steps ensure that the system can quickly and accurately process the update of freight rate data, maintain the timeliness, consistency and integrity of the data, and provide users with the most real-time and accurate freight rate information query service.

[0065] Optionally, in response to the data acquisition instruction, acquiring freight rate data from a data source comprises the following steps:

[0066] Step S1011, in response to the timed acquisition instruction in the data acquisition instruction, acquiring the freight rate data from the data source, wherein the data source includes the freight rate databases of multiple airlines.

[0067] In step S1011, the above-mentioned timed acquisition instruction is used to control the data acquisition component to automatically and regularly acquire freight rate data, ensuring that the system can automatically acquire the latest data from the freight rate databases of multiple airlines at predetermined time intervals, thereby realizing real-time updating of freight rate information.

[0068] Through the above steps, by setting the timed acquisition instructions, the data acquisition process is fully automated, reducing the need for manual operation. At the same time, since the acquisition process is carried out at a specific time point, the use of network resources and server resources can be optimized, thereby improving the efficiency of data acquisition.

[0069] Optionally, in response to a data query instruction, obtaining target index value information includes the following steps:

[0070] Step S1041, in response to the http request instruction in the data query instruction, obtaining target index value information; wherein the http request instruction at least includes an http request instruction from a Web port.

[0071] In step S1041, the above-mentioned http request instruction is sent from the Web port in the form of an HTTP request. The above-mentioned target index value information includes: flight number, departure place, destination and date, etc., which are used for subsequent index queries.

[0072] Through the above steps, the system can effectively parse and respond to user query needs, use index information to quickly locate and retrieve target data, thereby providing timely and accurate query results, and enhancing the practicality and efficiency of the entire freight rate data processing and query method.

[0073] Optionally, the initial data is mapped into the memory using a memory mapping technique to obtain a target database, including:

[0074] Step S1031, obtaining current effective data and target historical data, where the target historical data is used to represent historical data within a specified time range, and the current effective data is used to represent data currently being used or accessed;

[0075] In step S1031, by distinguishing the currently effective data from the target historical data, the system can organize and manage the data more effectively and avoid mixing all the data together, thereby improving the query efficiency and accuracy.

[0076] Step S1032, storing the current effective data and target historical data into the target database.

[0077] In step S1032, the target database is a memory database. Memory has a higher read and write speed than disk storage. By storing data in memory, the delay in data retrieval can be significantly reduced, providing nearly instantaneous query response. By properly managing memory space, the system can ensure that the most frequently accessed data persists in memory, while less frequently accessed data may be temporarily replaced out of memory to optimize the use of memory resources.

[0078] Through the above steps, the system can not only efficiently store and manage the current effective data, but also accurately process the target historical data. The constructed in-memory database takes into account the high performance of real-time query and the flexibility of historical data query, which greatly improves the overall performance and user experience of the data processing and query system.

[0079] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0080] Example 2

[0081] The embodiment of the present application also provides a freight rate data management system. It should be noted that the freight rate data management system of the embodiment of the present application can be used to execute the freight rate data management method provided in the embodiment of the present application. The freight rate data management system provided in the embodiment of the present application is introduced below.

[0082] According to an embodiment of the present application, a system for implementing the above-mentioned freight rate data management method is also provided. Figure 3 As shown, the system includes: an acquisition module, which is used to respond to a data acquisition instruction to acquire freight rate data from a data source; a preprocessing module, which is used to preprocess the freight rate data to obtain initial data, and the initial data at least includes data data and index data; a mapping module, which is used to map the initial data to a target location using a memory mapping method to obtain a target database.

[0083] The fare data management system provided in the embodiment of the present application obtains fare data, including flight fares and flight information, from a data source in real time in response to a data acquisition instruction, constructs initial data including data data and index data by preprocessing the acquired fare data, maps the preprocessed initial data to a target location using memory mapping technology, and constructs a target database, thereby achieving the purposes of real-time data update, rapid data retrieval and access, and maximization of data reading speed, thereby achieving the timeliness and accuracy of data, high-speed response to data queries, and extremely high data access efficiency. The technical effects solve the problems of slow data processing speed, low query efficiency, and speed bottlenecks in large-scale data processing and storage in traditional data management. In summary, the fare data management method significantly improves the real-time, accuracy, and access efficiency of data management through real-time data acquisition, efficient data preprocessing, and memory mapping technology.

[0084] Example 3

[0085] The present application also provides a freight rate data management system. Figure 4 As shown, the system includes: a data acquisition component, a data processing component, and a data query component.

[0086] Data acquisition component: DataScheduler obtains effective data related to freight rates in the database DB, adds tag information to the data file, and pushes the data to the message queue Message Queue.

[0087] Data processing component: Get the freight rate related data pushed based on time series from the message queue. The dispatcher in the component calls different workers (snapshot and update) according to the data tag to process the data. The processed data generates the memory database memorymap.

[0088] Data query component: The dbinfoserver in the data query component accepts the http request of the external web call, calls the memory database memorydb in the data processing component, and returns the freight rate data that the user needs to find.

[0089] The present application also provides a method for managing fare data, which is described by taking domestic air ticket fare data as an example. The method includes the following steps:

[0090] Step 1: Scheduled data push

[0091] Air ticket fare data is released in real time by domestic airlines, and different data files are distinguished by airline. DataScheduler is responsible for the data push function, which regularly pushes the required data files of different airlines to the message queue and plans a topic for each data file. DataScheduler can create a push task, write SQL for fare-related data table queries in the task to define the data range, and add tag content such as rich text or tables to organize the content of the push message (incremental data or full data). By configuring periodic tasks, data is pushed to the topic of the message queue at a regular time.

[0092] Step 2: Data preprocessing

[0093] The dispatcher is responsible for reading data from the message queue, distributing it to different workers according to the tag content of the message, and then preprocessing the data. After preprocessing, it generates a memory database memorydb based on mmap memory mapping, which contains data records and various indexes.

[0094] Data preprocessing is to combine different fields of different data tables in each data file into different indexes. After processing, the memorydb file contains data data and index data. By establishing the data index area structure, it is convenient for the application to query efficiently and provide an access interface for the application. The application can access the memorydb data through this interface. When reading data, memorydb will address and check the effective mark of the data record object in the data record list according to the index value. When the effective mark is in the effective state, the object is read, otherwise it is not read. For the data reading service, the data is read-only, and the service can quickly access the data through various index objects.

[0095] Step 3: Data Mapping Memory

[0096] In order to consider efficiency, mmap is used for memory data mapping, which supports obtaining and storing the current effective data and historical data within a specified time range as a memory database, and then storing them in the form of files on the hard disk after persistence.

[0097] When the memory is sufficient, all kinds of data files are completely cached in the memory and directly mapped to the application process space, reducing the data copying and memory addressing links, thereby achieving the ultimate reading efficiency except for the CPU cache (read and write latency is at the nanosecond level). MemoryDB provides data file mapping processing, address space management, data area management in the address space, etc. When the memory is insufficient, MemoryDB can still use the Linux kernel's LRU (Least Recently Used) algorithm to cache commonly used hot data in the memory to achieve high-speed reading.

[0098] MemoryDB supports the storage of multiple data files, where all data files share the process address space. In other words, the memoryDB library will ensure that the address spaces of each data file do not conflict. Before building a collection of data files, you need to complete the planning and allocation of the address space. In the process address space of a 64-bit operating system, there is a large amount of free space available for programs to use. These free spaces are divided into address intervals of sufficient size for each data file to use. The planned address space will be stored in the configuration file. Figure 5 Shows a memory address space structure containing multiple files.

[0099] In order to provide efficient address space management, memorydb implements support for data areas. A file can be divided into multiple data areas, each of which will have a continuous address space and will be dumped into a small data file during persistence. The size of a data area is determined by the size and number of data objects it contains. It is necessary to estimate the sufficient size of the data area before building the data. Figure 6 Shows the data area allocated for a data file.

[0100] The data area is logically divided into two parts: Header and Data, as follows Figure 7 shown.

[0101] The above Header part describes the metadata of the data file, including size, head and tail addresses. The Data part stores any data type and its nested type. In the data file, the Data area is an object generated based on the original data, while in the index data file, the Data area is used to store the index object of the Key-Value structure.

[0102] Step 4: Data query service

[0103] dbinfoserver is a component that provides an http service. It receives customized requests to query dffdb data and returns the queried data to the web in Json format.

[0104] Step 5: Web call

[0105] The Web port calls the dbinfoserver service through the http protocol to obtain data. The DBInfoQuery field is added to the header information of the http request, and the field value is on / off. When the DBInfoQuery field value is on, data can be queried. When the DBInfoQuery field value is off, data cannot be queried.

[0106] When querying data for the first time, the table information provided by dbinfoserver is obtained. When querying for the second time, a single table query is performed based on the table information. Each data table has a different index and name based on its construction. This needs to be explained in the body of the http request.

[0107] Example 4

[0108] An embodiment of the present application may provide an electronic device, which may include: one or more processors, a memory, a storage controller, and a peripheral interface, wherein the peripheral interface is connected to a radio frequency module, an audio module, and a display.

[0109] Among them, the memory can be used to store software programs and modules, such as program instructions / modules corresponding to the methods and devices in the embodiments of the present application, and the processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, realizing the above-mentioned method. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0110] The processor may call the information and application program stored in the memory through the transmission device to perform the following steps:

[0111] Step S101, in response to a data acquisition instruction, acquiring fare data from a data source, wherein the fare data is used to represent flight fares and flight information;

[0112] Step S102, preprocessing the freight rate data to obtain initial data, wherein the initial data at least includes data data and index data;

[0113] Step S103, using a memory mapping method, mapping the initial data to a target location to obtain a target database.

[0114] The processor can also call the information and application programs stored in the memory through the transmission device to perform the following steps: in response to the data query instruction, obtain the target index value information; based on the target index value information, retrieve the corresponding target data from the target database.

[0115] The processor can also call the information and application programs stored in the memory through the transmission device to execute the following steps: perform a first preprocessing on the full amount of data in the freight rate data to obtain initial data; wherein the full amount of data is used to represent all effective freight rate data.

[0116] The processor can also call the information and application program stored in the memory through the transmission device to execute the following steps: perform a second preprocessing on the incremental data in the freight rate data to obtain initial data; wherein the incremental data is used to represent the updated freight rate data.

[0117] The processor can also call the information and application programs stored in the memory through the transmission device to perform the following steps: in response to the timing acquisition instruction in the data acquisition instruction, obtain the freight rate data from the data source, wherein the data source includes the freight rate databases of multiple airlines.

[0118] The processor can also call the information and application stored in the memory through the transmission device to perform the following steps: responding to the http request instruction in the data query instruction to obtain the target index value information; wherein the http request instruction at least includes the http request instruction from the Web port.

[0119] The processor can also call the information and applications stored in the memory through the transmission device to perform the following steps: obtain the current effective data and target historical data, the target historical data is used to represent the historical data within a specified time range, and the current effective data is used to represent the data currently being used or accessed; store the current effective data and target historical data in the memory database.

[0120] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0121] Example 5

[0122] The embodiment of the present application further provides a storage medium. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the freight rate data management method provided in the first embodiment.

[0123] Optionally, in this embodiment, the above storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.

[0124] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing the steps of the freight rate data management method.

[0125] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0126] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0127] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0128] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0129] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0130] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.

[0131] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A method for managing freight rate data, characterized in that: The method comprises the following steps: In response to the data acquisition instruction, acquiring fare data from a data source, wherein the fare data is used to represent flight fares and flight information; Preprocessing the freight rate data to obtain initial data, wherein the initial data at least includes data data and index data; The initial data is mapped to a target location using a memory mapping method to obtain a target database.

2. The method according to claim 1, characterized in that The method comprises the following steps: Responding to the data query instruction, obtaining target index value information; Based on the target index value information, corresponding target data is retrieved from the target database.

3. The method according to claim 1, characterized in that Preprocessing the freight rate data to obtain initial data includes the following steps: Performing a first preprocessing on all the data in the freight rate data to obtain the initial data; The full amount of data is used to represent all effective freight rate data.

4. The method according to claim 1, characterized in that: Preprocessing the freight rate data to obtain initial data includes the following steps: Performing a second preprocessing on the incremental data in the freight rate data to obtain the initial data; The incremental data is used to represent updated freight rate data.

5. The method according to claim 1, characterized in that In response to the data acquisition instruction, the freight rate data is acquired from the data source, including the following steps: In response to the timing acquisition instruction in the data acquisition instruction, the fare data is acquired from the data source, wherein the data source includes fare databases of multiple airlines.

6. The method according to claim 2, characterized in that In response to a data query instruction, obtaining target index value information includes the following steps: Responding to the http request instruction in the data query instruction, obtaining the target index value information; Wherein, the http request instruction at least includes an http request instruction from a Web port.

7. The method according to claim 1, characterized in that Using memory mapping technology, the initial data is mapped into the memory to obtain a target database, including: Acquire current effective data and target historical data, wherein the target historical data is used to represent historical data within a specified time range, and the current effective data is used to represent data currently being used or accessed; The currently effective data and target historical data are stored in the target database.

8. A freight rate data management system, characterized in that: include: An acquisition module, the acquisition module is used to acquire freight rate data from a data source in response to a data acquisition instruction; A preprocessing module, the preprocessing module is used to preprocess the freight rate data to obtain initial data, the initial data at least includes data data and index data; A mapping module is used to map the initial data to a target location using a memory mapping method to obtain a target database.

9. A non-volatile storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program is configured to execute the freight rate data management method described in any one of claims 1 to 7 when running.

10. An electronic device comprising a memory and a processor, characterized in that: The memory stores a computer program, and the processor is configured to run the computer program to execute the freight rate data management method described in any one of claims 1 to 7.

Citation Information

Cited By

  • Data caching method and device and storage medium

    CN120578828A