Search

CN-116340333-B - Order data storage method and device

CN116340333BCN 116340333 BCN116340333 BCN 116340333BCN-116340333-B

Abstract

The application discloses a method and a device for storing order data, which relate to the field of databases, and adopt the method of receiving a first response message from a first order service interface for a first order, obtaining the increment data of the first order according to a first version baseline of the first order and the first response message, storing the increment data of the first order into the database, dynamically calculating information required by updating the order data by comparing the change of the information in the first version baseline of the first order and the first response message returned by the first order service interface, thereby storing the increment data of the first order into the database to realize the update of the order data.

Inventors

  • WU JIAN
  • LIU KAI
  • SUN DONGMING
  • LIU YANG
  • XIE JIA
  • KE JIN

Assignees

  • 中国民航信息网络股份有限公司

Dates

Publication Date
20260512
Application Date
20230404

Claims (8)

  1. 1. A method of storing order data, the method comprising: Receiving a first response message from a first order service interface for a first order; the method comprises the steps of receiving a first response message from a first order service interface, receiving a second response message from a second order service interface aiming at a first order, responding to an order processing type identifier corresponding to the first response message, indicating the second order service interface to be an order creation interface, and generating a first version baseline of the first order according to the first response message, wherein the order processing type identifier is pre-return order back information and current return order back information; responding to the order processing type identification corresponding to the first response message to indicate that the first order service interface is a non-order creation interface, and obtaining incremental data of the first order according to a first version baseline of the first order and the first response message; And storing the incremental data of the first order to a database.
  2. 2. The method of claim 1, wherein generating a first version baseline of the first order from the second response message comprises: Converting the second response message into a message of 182 version to obtain a second response message of 182 version; And generating a first version baseline of the first order according to the second response message of the 182 version.
  3. 3. The method of claim 1, wherein the obtaining incremental data for the first order from the first version baseline for the first order and the first response message further comprises: And adding the incremental data of the first order in the first version base line to obtain a second version base line of the first order.
  4. 4. The method of claim 1, wherein generating a first version baseline of the first order from the second response message comprises: And generating a first version baseline of the first order according to the order information, the aviation unit information, the aviation section information, the passenger information and the human aviation section information in the second response message.
  5. 5. The method of claim 1, wherein the first order service interface is an additional service purchase interface, the first response message is a response message to an additional service purchase request, and the incremental data of the first order includes at least one of additional service, seat information, order number information, and payment information.
  6. 6. The method of claim 1, wherein the first order service interface is a pay-out interface, the first response message is a pay-out request response message, and the first order delta data includes at least one of order number information, ticket information, and price details.
  7. 7. The storage device of the order data is characterized by comprising a receiving unit, an acquisition unit and a storage unit; the receiving unit is used for receiving a first response message from the first order service interface aiming at the first order; The acquisition unit is used for acquiring the incremental data of the first order according to the first version baseline of the first order and the first response message; the storage unit is used for storing the incremental data of the first order into a database; the receiving unit is further used for receiving a second response message from the second order service interface aiming at the first order; The generation unit is used for responding to the order processing type identifier corresponding to the second response message to indicate that the second order service interface is an order creation interface and generating a first version baseline of the first order according to the second response message; The acquiring unit is specifically configured to respond to an order processing type identifier corresponding to the first response message to indicate that the first order service interface is a non-order creation interface, and acquire incremental data of the first order according to a first version baseline of the first order and the first response message.
  8. 8. A computer device comprising a processor coupled to a memory, the memory having stored therein at least one computer program instruction that is loaded and executed by the processor to cause the computer device to implement the method of any of claims 1-6.

Description

Order data storage method and device Technical Field The present application relates to the field of databases, and in particular, to a method and an apparatus for storing order data. Background In recent years, airlines have used a set of unified XML format message-based data transmission standards through new distribution capabilities (new distribution capability, NDC) to achieve data interactions over the unified standards. In systems built based on NDC, the various transaction data stored are referred to as order data. In the prior art, when order data updating operation is triggered, if the information in the response message of the order service interface is insufficient, the information is acquired from the response of the past order service interface to complement the information required in order data updating, so that the acquisition and assembly of warehouse-in data are realized. However, when updating order data is realized by the prior art, the defect that the update flow of the order data is difficult to maintain exists. Disclosure of Invention In view of this, the present application provides a method and apparatus for storing order data, so as to achieve the purpose of facilitating maintenance of the update flow of order data. The method for storing order data provided by the application is realized by the following steps: Receiving a first response message from a first order service interface for a first order; acquiring incremental data of the first order according to the first version baseline of the first order and the first response message; Incremental data for the first order is stored to a database. Optionally, before receiving the first response message returned from the first order service interface, the method further includes: receiving a second response message from the second order service interface for the first order; And generating a first version baseline of the first order according to the second response message. Optionally, generating the first version baseline of the first order according to the second response message includes: Converting the second response message into a message of 182 version to obtain a second response message of 182 version; a first version baseline for the first order is generated based on the second response message of version 182. Optionally, generating the first version baseline of the first order according to the second response message includes: And responding to the order processing type identifier corresponding to the second response message to indicate the second order service interface to create an interface for the order, and generating a first version baseline of the first order according to the second response message. Optionally, after obtaining the incremental data of the first order according to the first version baseline of the first order and the first response message, the method further includes: And adding the incremental data of the first order in the first version base line to obtain a second version base line of the first order. Optionally, generating a first version baseline of the first order according to the second response message includes: And generating a first version baseline of the first order according to the order information, the aviation unit information, the aviation section information, the passenger information and the human aviation section information in the second response message. Optionally, obtaining the incremental data of the first order according to the first version baseline of the first order and the first response message includes: responding to the order processing type identification corresponding to the first response message to indicate that the first order service interface is a non-order creation interface, and obtaining incremental data of the first order according to the first version baseline of the first order and the first response message. Optionally, the first order service interface is an additional service purchase interface, the first response message is a response message of an additional service purchase request, and the incremental data of the first order includes at least one of additional service, seat information, order number information, and payment information. Optionally, the first order service interface is a payment ticket outlet interface, the first response message is a response message for paying a ticket outlet request, and the incremental data of the first order includes at least one of order number information, ticket information and price details. The application also provides a storage device of the order data, which comprises a receiving unit, an obtaining unit and a storage unit; the receiving unit is used for receiving a first response message from the first order service interface aiming at the first order; the acquisition unit is used for acquiring the incremental data of the first order according to the first version baseline of the first order and the fi