Data processing method and device based on freight rate release

The freight data is recorded through log tables and historical tables, which solves the problem of low data operation efficiency in freight data release, realizes data traceability and efficient management, and improves the management efficiency during freight data release.

CN119201956APending Publication Date: 2024-12-27TRAVELSKY TECHNOLOGY LIMITED
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411363501.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-27
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

During the release of freight data, a large amount of effective data and uneffective data in the existing technology are recorded through a data table, resulting in inefficient data operation, lack of historical records and difficult to trace and modify records, affecting the efficiency of the data chain.

Method used

The freight rate data and change operations are recorded through log tables, data tables and historical tables, distinguish between effective and uneffective data, record change history, avoid data confusion, and realize data traceability and efficient management.

Benefits of technology

It improves the data management efficiency during the freight data release process, ensures data traceability and operation history, and avoids the reduction in management efficiency caused by excessive data volume.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119201956A_ABST
    Figure CN119201956A_ABST
Patent Text Reader

Abstract

The invention discloses a data processing method and device based on freight rate release. Relates to the technical field of data processing. The method comprises the steps that a data change request is received, the data change request is recorded to a log table, and the data change request is used for requesting to change data in a first data table; determining a change type of the data change request; on the basis of the log table, the first data table and the change type, a second data table and a target historical table are determined, the second data table comprises a data table obtained after data in the first data table is changed on the basis of the data change request, and the target historical table comprises a data table obtained after changed data is recorded to a specified historical table. According to the method and the device, the technical problem of poor data operation effect due to the fact that a large amount of valid data and non-valid data are recorded through one data table in the process of issuing the freight rate data in related technologies is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and in particular to a data processing method and device based on freight rate publication. Background Art

[0002] With the rapid development of the civil aviation industry, the freight rate business of airlines has become more diversified and three-dimensional, the sources and types of freight rate data have become more diverse, and the release and use of freight rate data have become more frequent. Due to the large volume of freight rate data and the large number of upstream and downstream related software, data optimization has always been the biggest obstacle.

[0003] In the related art, freight rate data is recorded in a data table. Due to the large number of users, data repudiation sometimes occurs. For example, a data table lacks the historical record of freight rate data modification. In the event of an error, it is impossible to prove the responsible party, that is, the modification record is not traceable. In addition, a large amount of effective and ineffective data are mixed together. As time goes by, the amount of data in the data table becomes larger and larger, and the efficiency of data operation gradually decreases to the extent that it affects the efficiency of the entire data chain.

[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0005] The embodiment of the present invention provides a data processing method and device based on freight rate publication, so as to at least solve the technical problem in the related art that in the process of publishing freight rate data, a large amount of effective data and ineffective data are recorded in one data table, resulting in poor data operation effect.

[0006] According to one aspect of an embodiment of the present invention, a data processing method based on fare publication is provided, comprising: receiving a data change request, recording the data change request in a log table, wherein the data change request is used to request a change to data in a first data table, the log table is used to record a log of data changes to the first data table, and the first data table is used to record fare data associated with a target vehicle; determining a change type of the data change request, wherein the change type includes one of the following: adding new data, modifying data, and deleting data; based on the log table, the first data table, and the change type, determining a second data table and a target history table, wherein the second data table includes: a data table obtained by changing the data in the first data table based on the data change request, the target history table includes: a data table obtained by recording the changed data in a designated history table, the changed data includes: data with difference changes between the first data table and the second data table, and the designated history table is used to record all historical records of data changes to the first data table.

[0007] Further, based on the log table, the first data table and the change type, a second data table and a target history table are determined, including: when the change type is the newly added data, the data to be added carried by the data change request is added to the first data table to obtain the second data table, and the changed data is recorded to the designated history table to obtain the target history table; when the change type is the modified data, based on the data change request, the data to be modified in the first data table is determined, and according to the data status of the data to be modified, the data to be modified is modified in the first data table to obtain the second data table, and the changed data is recorded to the designated history table to obtain the target history table, wherein the data status is used to characterize whether the data in the second data table is effective; when the change type is the deleted data, based on the data change request, the data to be deleted in the first data table is determined, and based on the data status of the data to be deleted, the second data table and the target history table are determined.

[0008] Further, in a case where the change type is the newly added data, the data to be added carried by the data change request is added to the first data table to obtain the second data table, including: in a case where the change type is the newly added data, a first data identifier is generated, wherein the first data identifier is used to uniquely identify the data to be added in the second data table, the first data identifier and the data to be added are added to the first data table, and the data status of the data to be added in the first data table is set to not effective, to obtain the second data table.

[0009] Further, in the case where the change type is the modified data, the data to be modified is modified in the first data table according to the data status of the data to be modified to obtain the second data table, including: when the data status of the data to be modified is not effective, the data to be modified is modified in the first data table to obtain the second data table; when the data status of the data to be modified is effective, the data to be modified is modified in the first data table, and the data status of the target modified data in the first data table is changed to effective and modified to obtain the second data table, wherein the target modified data includes: data obtained after modifying the data to be modified.

[0010] Further, in the case where the change type is the modified data, the changed data is recorded to the designated history table to obtain the target history table, including: obtaining the identifier of the data change request in the log table to obtain the target log identifier, wherein the target log identifier is used to uniquely identify the data change request in the log table; obtaining the data identifier of the changed data in the second data table to obtain the second data identifier, and determining the serial number of the second data identifier in the designated history table to obtain the target serial number, wherein the serial number in the designated history table is used to record the modification record of the data with the same data identifier, and the data identifier is used to identify each data in the first data table or the second data table; based on the target log identifier and the target serial number, the changed data is added to the designated history table to obtain the target history table.

[0011] Further, in the case where the change type is the deletion of data, based on the data status of the data to be deleted, the second data table and the target history table are determined, including: determining the data identifier of the data to be deleted in the second data table to obtain the second data identifier; in the case where the data status of the data to be deleted is ineffective, adding the second data identifier, the target log identifier, the data to be deleted and the preset sequence number to the designated history table to obtain the target history table, and deleting the data to be deleted in the first data table to obtain the second data table; in the case where the data status of the data to be deleted is effective, setting the data status of the data to be deleted in the first data table to effective and deleted to obtain the second data table, and adding the second data identifier, the target log identifier, the data to be deleted and the preset sequence number to the designated history table to obtain the target history table.

[0012] Furthermore, after determining the second data table and the target history table based on the log table, the first data table and the change type, it also includes: in the second data table, deleting the data whose data status is effective and deleted, and in the second data table, making effective the data whose data status is not effective, effective and modified.

[0013] Further, after determining the second data table and the target history table based on the log table, the first data table and the change type, it also includes receiving a data query request, wherein the data query request includes at least one of the following: querying the operation records of the first data table, querying the data status of the specified data; when the data query request indicates to query the operation records of the first data table, querying the operation records of the first data table based on the target history table and the log table; when the data query request indicates to query the data status of the specified data, querying the data status of the specified data based on the second data table.

[0014] Furthermore, recording the data change request to a log table includes: determining target data based on the data change request, wherein the target data includes at least one of the following: an identifier of the second data table, a user identifier of a user who initiates the data change request, and the change type; generating a target log identifier for the data change request, and adding the target log identifier and the target data to the log table.

[0015] According to another aspect of an embodiment of the present invention, a data processing device based on fare publishing is also provided, including: a first processing unit, used to receive a data change request, and record the data change request in a log table, wherein the data change request is used to request a change to data in a first data table, and the log table is used to record a log of data changes to the first data table, and the first data table is used to record fare data associated with a target transportation tool; a first determination unit, used to determine a change type of the data change request, wherein the change type includes one of the following: adding data, modifying data, and deleting data; a second determination unit, used to determine a second data table and a target history table based on the log table, the first data table, and the change type, wherein the second data table includes: a data table obtained by changing the data in the first data table based on the data change request, and the target history table includes: a data table obtained by recording the changed data in a designated history table, and the changed data includes: data with differences between the first data table and the second data table, and the designated history table is used to record all historical records of data changes to the first data table.

[0016] Further, the second determination unit includes: a first processing sub-unit, which is used to add the data to be added carried by the data change request to the first data table when the change type is the new data, to obtain the second data table, and record the changed data to the designated history table to obtain the target history table; a second processing sub-unit, which is used to determine the data to be modified in the first data table based on the data change request when the change type is the modified data, modify the data to be modified in the first data table according to the data status of the data to be modified, to obtain the second data table, and record the changed data to the designated history table to obtain the target history table, wherein the data status is used to characterize whether the data in the second data table is effective; a third processing sub-unit, which is used to determine the data to be deleted in the first data table based on the data change request when the change type is the deleted data, and determine the second data table and the target history table based on the data status of the data to be deleted.

[0017] Further, the first processing sub-unit includes: a generation module, used to generate a first data identifier when the change type is the new data, wherein the first data identifier is used to uniquely identify the data to be added in the second data table; a first processing module, used to add the first data identifier and the data to be added to the first data table, and set the data status of the data to be added in the first data table to not effective, so as to obtain the second data table.

[0018] Further, the second processing sub-unit includes: a modification module, which is used to modify the data to be modified in the first data table when the data status of the data to be modified is not effective, so as to obtain the second data table; a second processing module, which is used to modify the data to be modified in the first data table when the data status of the data to be modified is effective, and modify the data status of the target modified data in the first data table to effective and modified, so as to obtain the second data table, wherein the target modified data includes: data obtained after modifying the data to be modified.

[0019] Furthermore, the second processing sub-unit also includes: an acquisition module, used to obtain the identifier of the data change request in the log table, and obtain the target log identifier, wherein the target log identifier is used to uniquely identify the data change request in the log table; a third processing module, used to obtain the data identifier of the changed data in the second data table, obtain the second data identifier, and determine the serial number of the second data identifier in the designated history table, and obtain the target serial number, wherein the serial number in the designated history table is used to record the modification record of the data with the same data identifier, and the data identifier is used to identify each data in the first data table or the second data table; an adding module, used to add the changed data to the designated history table based on the target log identifier and the target serial number, and obtain the target history table.

[0020] Further, the third processing sub-unit includes: a determination module, used to determine the data identifier of the data to be deleted in the second data table to obtain the second data identifier; a fourth processing module, used to, when the data status of the data to be deleted is ineffective, add the second data identifier, the target log identifier, the data to be deleted and the preset serial number to the designated history table to obtain the target history table, and delete the data to be deleted in the first data table to obtain the second data table; a fifth processing module, used to, when the data status of the data to be deleted is effective, set the data status of the data to be deleted in the first data table to effective and deleted, to obtain the second data table, and add the second data identifier, the target log identifier, the data to be deleted and the preset serial number to the designated history table to obtain the target history table.

[0021] Furthermore, the data processing device based on freight rate publication also includes: a second processing unit, which is used to delete the data whose data status is effective and deleted in the second data table after determining the second data table and the target history table based on the log table, the first data table and the change type, and to validate the data whose data status is not effective, effective and modified in the second data table.

[0022] Furthermore, the data processing device based on freight rate publication also includes: a receiving unit, which is used to receive a data query request after determining the second data table and the target history table based on the log table, the first data table and the change type, wherein the data query request includes at least one of the following: querying the operation record of the first data table, querying the data status of the specified data; a first query unit, which is used to query the operation record of the first data table based on the target history table and the log table when the data query request indicates to query the operation record of the first data table; and a second query unit, which is used to query the data status of the specified data based on the second data table when the data query request indicates to query the data status of the specified data.

[0023] Furthermore, the first processing unit includes: a determination subunit, used to determine the target data based on the data change request, wherein the target data includes at least one of the following: an identifier of the second data table, a user identifier of a user who initiates the data change request, and the change type; a fourth processing subunit, used to generate a target log identifier for the data change request, and add the target log identifier and the target data to the log table.

[0024] According to another aspect of an embodiment of the present invention, there is also provided an electronic device, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute any one of the above-mentioned data processing methods based on freight rate publication by executing the executable instructions.

[0025] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, which stores a computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute any one of the above-mentioned data processing methods based on freight rate publication.

[0026] In the present invention, a data change request is received, and the data change request is recorded in a log table, wherein the data change request is used to request a change in the data in the first data table, the log table is used to record the log of the data change in the first data table, and the first data table is used to record the fare data associated with the target transportation tool; the change type of the data change request is determined, wherein the change type includes one of the following: adding data, modifying data, and deleting data; based on the log table, the first data table, and the change type, a second data table and a target history table are determined, wherein the second data table includes: a data table obtained after the data in the first data table is changed based on the data change request, the target history table includes: a data table obtained after recording the changed data in the designated history table, the changed data includes: data with difference changes between the first data table and the second data table, and the designated history table is used to record all historical records of data changes in the first data table. This solves the technical problem that in the process of publishing fare data in the related art, a large amount of effective data and ineffective data are recorded through a data table, and the data operation effect is poor.

[0027] In the present invention, the freight rate data and the change operation are recorded through the log table, the data table and the history table, so as to avoid the situation in the related art that in the process of publishing the freight rate data, a large amount of effective data and ineffective data are recorded through one data table, the amount of data in one data table is too large, the efficiency of freight rate data management is reduced, and the lack of historical records makes it difficult to trace the modification records, thereby achieving the technical effect of improving the data management efficiency in the process of publishing the freight rate data. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] 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:

[0029] Figure 1 is a flow chart of an optional data processing method based on freight rate publication according to an embodiment of the present invention;

[0030] Figure 2 is a flow chart of an optional data operation based on freight rate publishing according to an embodiment of the present invention;

[0031] Figure 3 is a schematic diagram of existing data in an optional data table TABLE according to an embodiment of the present invention;

[0032] Figure 4 This is a schematic diagram of an optional operation log table LOG record according to an embodiment of the present invention. Figure 1 ;

[0033] Figure 5TABLE is an example of an optional operation data table record according to an embodiment of the present invention. Figure 1 ;

[0034] Figure 6 This is a schematic diagram of an optional operation history table HIST record according to an embodiment of the present invention;

[0035] Figure 7 This is a schematic diagram of an optional operation log table LOG record according to an embodiment of the present invention. Figure 2 ;

[0036] Figure 8 TABLE is an example of an optional operation data table record according to an embodiment of the present invention. Figure 2 ;

[0037] Fig. 9 This is a schematic diagram of an optional operation history table HIST record according to an embodiment of the present invention. Figure 2 ;

[0038] Fig.10 This is a schematic diagram of an optional operation log table LOG record according to an embodiment of the present invention. Figure 3 ;

[0039] Fig.11 TABLE is an example of an optional operation data table record according to an embodiment of the present invention. Figure 3 ;

[0040] Fig.12 This is a schematic diagram of an optional operation history table HIST record according to an embodiment of the present invention. Figure 3 ;

[0041] Fig.13 This is a schematic diagram of an optional operation log table LOG record according to an embodiment of the present invention. Figure 4 ;

[0042] Fig.14 TABLE is an example of an optional operation data table record according to an embodiment of the present invention. Figure 4 ;

[0043] Fig.15 This is a schematic diagram of an optional operation history table HIST record according to an embodiment of the present invention. Figure 4 ;

[0044] Fig.16 This is a schematic diagram of an optional operation log table LOG record according to an embodiment of the present invention. Figure 5 ;

[0045] Fig.17TABLE is an example of an optional operation data table record according to an embodiment of the present invention. Figure 5 ;

[0046] Fig.18 This is a schematic diagram of an optional operation history table HIST record according to an embodiment of the present invention. Figure 5 ;

[0047] Fig.19 is a schematic diagram of data in a data table TABLE after an optional operation according to an embodiment of the present invention;

[0048] Fig. 20 It is a schematic diagram of data status in a data table TABLE after optional data takes effect according to an embodiment of the present invention;

[0049] Fig.21 is a schematic diagram of an optional data processing device based on freight rate publication according to an embodiment of the present invention;

[0050] Fig. 22 is a schematic diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0051] 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.

[0052] 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.

[0053] It should be noted that the user information (including but not limited to user device information, user personal information, etc.), collected information and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with the relevant laws, regulations and standards of the relevant regions, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0054] Embodiment 1

[0055] According to an embodiment of the present invention, an optional method embodiment of a data processing method based on freight rate publication is 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.

[0056] Figure 1 is a flow chart of an optional data processing method based on freight rate publication according to an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:

[0057] Step S101, receiving a data change request, and recording the data change request in a log table, wherein the data change request is used to request changes to data in a first data table, the log table is used to record logs of data changes to the first data table, and the first data table is used to record fare data associated with a target vehicle.

[0058] The above data change request can be used to request to change the data in the first data table. The first data table is used to record the fare data associated with the target transportation tool, for example, the fare data to be released and the fare data that has been released. The data change request can be a user USER requesting to operate the data table TABLE (corresponding to the first data table), adding / deleting / modifying data, and the target transportation tool can be an airplane. The fields in the first data table can include: data unique mark UUID (or called data identifier), creator C_U, creation time C_T, modifier L_U_U, modification time L_U_T, data status STATUS.

[0059] The above-mentioned log table is used to record the log of data changes made to the first data table. The log table (LOG) can be used to record the summary of each data change initiated by the user. The fields in the log table can include: log unique mark TID (referred to as log identifier, used to uniquely identify each data change request initiated by the user in the log table), user USER (user identifier, such as user name), data type TABLE (for example, data table identifier (for example, table name of the data table)), operation type ACTION (corresponding to the change type, such as adding / deleting / modifying data).

[0060] Step S102, determining the change type of the data change request, wherein the change type includes one of the following: adding new data, modifying data, and deleting data.

[0061] In this embodiment, the change type of the data change request may be determined, for example, adding new data, modifying data, and deleting data.

[0062] Step S103, based on the log table, the first data table and the change type, determine the second data table and the target history table, wherein the second data table includes: a data table obtained after changing the data in the first data table based on the data change request, the target history table includes: a data table obtained after recording the changed data to the designated history table, the changed data includes: data with differential changes between the first data table and the second data table, and the designated history table is used to record all historical records of data changes to the first data table.

[0063] The second data table may refer to a data table obtained after changing the data in the first data table based on the data change request. The target history table may include: a data table obtained after recording the changed data to the specified history table. The target history table (HIST) may be used to record: according to the log table and the data table (the first data table and the second data table), the change process of each data in the data table is recorded one by one, which may include the log unique mark TID, the data unique mark UUID, the change sequence SEQ, the creator C_U, the creation time C_T, the modifier L_U_U, the modification time L_U_T, the data status STATUS, etc.

[0064] Through the above steps, in this embodiment, the freight rate data and change operations are recorded through the log table, data table and history table, which avoids the situation in the related art that in the process of publishing freight rate data, a large amount of effective data and ineffective data are recorded through one data table, the data volume of one data table is too large, the freight rate data management efficiency is reduced, and the lack of historical records makes it difficult to trace the modification records, thereby achieving the technical effect of improving the data management efficiency in the process of publishing freight rate data. In addition, the technical problem that in the process of publishing freight rate data in the related art, a large amount of effective data and ineffective data are recorded through one data table, and the data operation effect is poor is solved.

[0065] Figure 2 is a flow chart of an optional data operation based on freight rate publishing according to an embodiment of the present invention, such as Figure 2 As shown, including:

[0066] 1. Data change: Receive data change requests, where the user USER requests to operate the data table TABLE, for example, add / delete / modify data, and record logs LOG.

[0067] 2. Record logs to the log table: only add new records and generate a unique log tag TID (target log identifier) ​​to record that the user USER has added / deleted / modified the ACTION of the data table TABLE and changed the data TABLE.

[0068] 3. The data table TABLE changes data and the history table records history:

[0069] 4. The data takes effect, and the data status STATUS of the ineffective data is changed to P (effective) in batches.

[0070] 5. Query and display: the log table LOG, the data table TABLE, and the history table HIST can be jointly queried to obtain the evolution history of each piece of data and displayed as needed.

[0071] Optionally, based on the log table, the first data table and the change type, the second data table and the target history table are determined, including: when the change type is adding new data, the data to be added carried by the data change request is added to the first data table to obtain the second data table, and the changed data is recorded to the designated history table to obtain the target history table; when the change type is modifying data, based on the data change request, the data to be modified in the first data table is determined, and according to the data status of the data to be modified, the data to be modified is modified in the first data table to obtain the second data table, and the changed data is recorded to the designated history table to obtain the target history table, wherein the data status is used to characterize whether the data in the second data table is effective; when the change type is deleting data, based on the data change request, the data to be deleted in the first data table is determined, and based on the data status of the data to be deleted, the second data table and the target history table are determined.

[0072] In this embodiment, when the change type is new data, the data to be added carried by the data change request can be added to the first data table, a data identifier of the data to be added can be generated, the data to be added and the data identifier of the data to be added can be added to the first data table, and the data status of the added new data can be set to ineffective to obtain a second data table, and then the changed data can be recorded to the specified history table to obtain the target history table.

[0073] When the change type is data modification, the data to be modified in the first data table can be determined based on the data change request, the data to be modified can be modified in the first data table, and the data status of the data to be modified can be adjusted to obtain the second data table. The changed data can then be recorded to the specified history table to obtain the target history table. It should be noted that the data status can be used to characterize whether the data in the second data table is effective.

[0074] In the case where the change type is data deletion, the data to be deleted in the first data table can be determined based on the data change request, and based on the data status of the data to be deleted, and when the data status of the data to be deleted is not effective, the data to be deleted is first recorded in the designated history table to record the history of deletion of the data to be deleted, and then the data to be deleted is directly deleted from the first data table. In the case where the data status of the data to be deleted is effective, in order to facilitate the deletion of the data after the execution data takes effect, the data status of the data to be deleted can be first adjusted to effective and deleted in the first data table, and then the deletion record of the data to be deleted is recorded in the designated history table to obtain the target history table.

[0075] For example, if the operation is new addition (that is, the change type is new data addition), a data unique identifier UUID can be generated in the first data table, and new data can be inserted with creator C_U, creation time C_T, modifier L_U_U, modification time L_U_T, and data status STATUS as A. The newly added data can be copied as a whole to the history table HIST (corresponding to the specified history table) and added to the log unique identifier TID in the log table LOG. SEQ (sequence number) can be 0.

[0076] If the operation is modification (that is, the change type is to modify data):

[0077] (1) If the modified data has taken effect, the modifier L_U_U, modification time L_U_T, and data status STATUS can be updated in the data table. The modified data is copied to the history table HIST as a whole and added to the log unique identifier TID in the log table LOG. SEQ is the largest SEQ+1 among the unique identifiers UUID of the same data that already exist in the history table HIST.

[0078] (2) If the modified data is not effective, the modifier L_U_U, modification time L_U_T, and data status STATUS are updated in the data table and remain A. The modified data is copied to the history table HIST and added to the log unique identifier TID in the log table LOG. SEQ is the largest SEQ+1 among the unique identifiers UUID of the same data that already exist in the history table HIST.

[0079] If the operation is to delete (that is, the change type is to delete data):

[0080] (1) If the effective data is deleted, the modifier L_U_U, modification time L_U_T, and data status STATUS can be updated in the data table to D. The deleted data is copied to the history table HIST as a whole, and the log unique identifier TID in the log table LOG is added, and SEQ is -1;

[0081] (2) If the deletion of ineffective data is ineffective, the data to be deleted is copied to the history table HIST as a whole, and the log unique identifier TID in the log table LOG is added, the SEQ is -1, the data status is updated to C, and the data in the data table TABLE is deleted.

[0082] It should be noted that the above-mentioned SEQ can be set as follows: 0: NEW (new data), 1-∞: UPDATE (modify data), -1: DELETE (delete data), that is, when the change type is new data, the sequence number of the new data in the history table can be set to 0; when the change type is modify data, in the history table, the maximum sequence number of all sequence numbers corresponding to the data identifier of the modified data in the history table can be added by 1, as the sequence number of the modified data; when the change type is delete data, in the history table, -1 can be used as the sequence number of the deleted data.

[0083] For the data status STATUS in this embodiment, P may indicate that it has taken effect, A may indicate that it has not taken effect, U may indicate that it has taken effect and has been modified, D may indicate that it has taken effect and has been deleted, and C may indicate that it has not taken effect and has been deleted.

[0084] By recording data in a data table and using a history table to record the data operation history, the purpose of recording the operation records of all data in the data table is achieved, and the purpose of improving the traceability of the operation history of freight rate data is achieved. At the same time, it also avoids the situation where all data is stored in one data table, the amount of data is increasing, and the management efficiency of freight rate data is affected.

[0085] Optionally, when the change type is new data, the data to be added carried by the data change request is added to the first data table to obtain a second data table, including: when the change type is new data, generating a first data identifier, wherein the first data identifier is used to uniquely identify the data to be added in the second data table, adding the first data identifier and the data to be added to the first data table, and setting the data status of the data to be added in the first data table to not effective, to obtain a second data table.

[0086] Figure 3 is a schematic diagram of an optional data table TABLE according to an embodiment of the present invention, such as Figure 3 As shown, the data table TABLE is not empty and already contains some existing data, including: data unique identifier (UUID), field 1, creator (C_U), creation time (C_T), modifier (L_U_U), modification time (L_U_T), data status (STATUS), and TIME_POINT can represent the operation record of the data (TIME_POINT may not be included in actual applications).

[0087] Example 1, (TIME_POINT=1): User Jack needs to add two pieces of data, field 1 is A, G, and the unique log identifier is T1.

[0088] Step 1: The log table records logs. Figure 4This is a schematic diagram of an optional operation log table LOG record according to an embodiment of the present invention. Figure 1 ,like Figure 4 As shown, a log record is added to the log table, with TIME_POINT being 1, the log unique identifier TID being T1, the user USER being Jack, the data type TABLE (i.e., the data table identifier) ​​being FFY, and the operation type ACTION being ADD (adding new data).

[0089] Step 2: Add data to the data table: Figure 5 TABLE is an example of an optional operation data table record according to an embodiment of the present invention. Figure 1 ,like Figure 5 As shown, the data unique identifier UUID is generated as 1 and 5, and new data is inserted. The creator C_U is Jack, the creation time C_T is 2023-10-10, 01:01:01, the modifier L_U_U is Jack, the modification time L_U_T is 2023-10-10, 01:01:01, and the data status STATUS is A.

[0090] Step 3: Record history, insert data into the history table HIST (there are also some existing data in the history table). Figure 6 FIG. 1 is a schematic diagram of an optional operation history table HIST record according to an embodiment of the present invention. Figure 6 As shown, two pieces of data in the data table (ie, data with UUIDs 1 and 5) can be copied as a whole to the history table, and added to the log table LOG with a unique identifier T1, and SEQ is 0.

[0091] In this embodiment, when new data is added, the data status, the time when the data is added, and the creator are recorded to facilitate querying the data status in the previous data table.

[0092] Optionally, when the change type is to modify data, the data to be modified is modified in the first data table according to the data status of the data to be modified to obtain a second data table, including: when the data status of the data to be modified is not effective, the data to be modified is modified in the first data table to obtain a second data table; when the data status of the data to be modified is effective, the data to be modified is modified in the first data table, and the data status of the target modified data in the first data table is changed to effective and modified to obtain a second data table, wherein the target modified data includes: data obtained after modifying the data to be modified.

[0093] When the data status of the data to be modified is not effective, the data to be modified is modified in the first data table, for example, the field, modifier, modification time, etc. of the data are modified, and the data status may not be modified to obtain the second data table.

[0094] When the data status of the data to be modified is effective, the data to be modified is modified in the first data table. For example, the data field, modifier, modification time, etc. can be modified, and the data status of the target modified data in the first data table is modified to effective and modified to obtain a second data table, wherein the target modified data includes: data obtained after modifying the data to be modified.

[0095] Example 2 (TIME_POINT=2): User Tim needs to modify a piece of data, the data unique identifier UUID is 1, field 1 is changed from A to B, and the log unique identifier TID is T2.

[0096] Step 1: Log table LOG records logs, Figure 7 This is a schematic diagram of an optional operation log table LOG record according to an embodiment of the present invention. Figure 2 ,like Figure 7 As shown, a log record with TIME_POINT of 2, log unique identifier TID of T2, user USER of Tim, data type TABLE (ie, data table identifier) ​​of FFY, and operation type ACTION of UPDATE (modify data) can be added to the log table.

[0097] Step 2: Modify data in the data table TABLE, Figure 8 TABLE is an example of an optional operation data table record according to an embodiment of the present invention. Figure 2 ,like Figure 8 As shown, the data with the unique identifier UUID of 1 is modified, the modifier L_U_U is updated to Tim, the modification time L_U_T is updated to 2023-10-10, 02:02:01, and the data status STATUS is A.

[0098] Step 3: Record history and insert data into the history table HIST. Fig. 9 This is a schematic diagram of an optional operation history table HIST record according to an embodiment of the present invention. Figure 2 ,like Fig. 9 As shown, the modified data in the data table TABLE can be copied as a whole to the history table, and a unique identifier T2 is added to the log table, and the SEQ is 0+1=1.

[0099] The data to be modified is modified according to its data status, and the modification operation is recorded in the history table, thereby recording the modified data in the data table and recording the modification operation in the history table, achieving the purpose of storing the modified data and the operation history separately.

[0100] Example 3 (TIME_POINT=3): User Bill needs to add two new pieces of data, field 1 is C and D, and the log unique identifier TID is T3.

[0101] Step 1: Log table LOG records logs, Fig.10 This is a schematic diagram of an optional operation log table LOG record according to an embodiment of the present invention. Figure 3 ,like Fig.10 As shown, a log record is added to the log table, with TIME_POINT being 3, the log unique identifier TID being T3, the user USER being Bill, the data type TABLE (i.e., the data table identifier) ​​being FFY, and the operation type ACTION being ADD (adding new data).

[0102] Step 2: Add data to the data table TABLE, Fig.11 TABLE is an example of an optional operation data table record according to an embodiment of the present invention. Figure 3 ,like Fig.11 As shown, the generated data unique identifier UUID is 2 and 3, and new data is inserted. The creator C_U is Bill, the creation time C_T is 2023-10-10, 03:02:02, the modifier L_U_U is Bill, the modification time L_U_T is 2023-10-10, 03:02:02, and the data status STATUS is A.

[0103] Step 3: Record history and insert data into the history table HIST. Fig.12 This is a schematic diagram of an optional operation history table HIST record according to an embodiment of the present invention. Figure 3 ,like Fig.12 As shown, two pieces of data in the data table (i.e., UUIDs 2 and 3) are copied as a whole to the history table HIST, and the unique identifier T3 in the log table is added, and the SEQ is 0.

[0104] Optionally, when the change type is data modification, the changed data is recorded in a designated history table to obtain a target history table, including: obtaining the identifier of the data change request in the log table to obtain a target log identifier, wherein the target log identifier is used to uniquely identify the data change request in the log table; obtaining the data identifier of the changed data in the second data table to obtain a second data identifier, and determining the serial number of the second data identifier in the designated history table to obtain a target serial number, wherein the serial number in the designated history table is used to record modification records of data with the same data identifier, and the data identifier is used to identify each piece of data in the first data table or the second data table; based on the target log identifier and the target serial number, the changed data is added to the designated history table to obtain a target history table.

[0105] In this embodiment, when the change type is to modify data, in the process of recording the changed data to the designated history table, the identifier of the data change request in the log table can be obtained to obtain the target log identifier, the data identifier of the changed data in the second data table can be obtained to obtain the second data identifier, and the serial number of the second data identifier in the designated history table can be determined to obtain the target serial number, wherein the serial number in the designated history table is used to record the modification record of the data with the same data identifier, and then the newly added data in the second data table can be copied to the history table, and the maximum serial number of all serial numbers of the second data identifier in the designated history table plus 1 can be used as the serial number of the modified data, and the target log identifier can be added to the designated history table to obtain the target history table.

[0106] Example 4, (TIME_POINT=4): User Tom needs to modify three pieces of data, the data unique identifier UUID (corresponding to the data identifier) ​​is 1, 3, and 6, field 1 is changed from B to E, D to F, and K to X, among which the data with the data unique identifier UUID of 6 is the effective data, and the log unique identifier TID (corresponding to the target log identifier) ​​is T4.

[0107] Step 1: Log table LOG records logs, Fig.13 This is a schematic diagram of an optional operation log table LOG record according to an embodiment of the present invention. Figure 4 ,like Fig.13 As shown, a log record is added to the log table, with TIME_POINT being 4, the log unique identifier TID being T4, the user USER being Tom, the data type TABLE (i.e., the data table identifier) ​​being FFY, and the operation type ACTION being UPDATE (modifying data).

[0108] Step 2: Modify data in the data table TABLE, Fig.14 TABLE is an example of an optional operation data table record according to an embodiment of the present invention. Figure 4 ,like Fig.14 As shown, the data with unique identifier UUID 1 and 3 are modified, the modifier L_U_U is updated to Tom, the modification time L_U_T is updated to 2023-10-10, 04:01:01, and the data status STATUS is A. The data with unique identifier UUID 6 is modified, the modifier L_U_U is updated to Tom, the modification time L_U_T is updated to 2023-10-10, 04:01:01, and the data status STATUS is U.

[0109] Step 3: Record history and insert data into the history table HIST. Fig.15 This is a schematic diagram of an optional operation history table HIST record according to an embodiment of the present invention. Figure 4 ,like Fig.15As shown, the three modified data in the data table are copied as a whole to the history table HIST, and added to the unique identifier T4 in the log table LOG. SEQ is the maximum SEQ+1 of the unique identifier UUID of each data.

[0110] Optionally, when the change type is data deletion, based on the data status of the data to be deleted, the second data table and the target history table are determined, including: determining the data identifier of the data to be deleted in the second data table to obtain the second data identifier; when the data status of the data to be deleted is not effective, adding the second data identifier, the target log identifier, the data to be deleted and the preset sequence number to the designated history table to obtain the target history table, and deleting the data to be deleted in the first data table to obtain the second data table; when the data status of the data to be deleted is effective, setting the data status of the data to be deleted in the first data table to effective and deleted to obtain the second data table, and adding the second data identifier, the target log identifier, the data to be deleted and the preset sequence number to the designated history table to obtain the target history table.

[0111] Example 5, (TIME_POINT=5): User Lucy needs to delete two pieces of data, the data unique identifiers UUID are 3 and 7, among which the data with digital unique identifier UUID 7 is the effective data, and the log unique identifier TID is T5.

[0112] Step 1: Log table LOG records logs, Fig.16 This is a schematic diagram of an optional operation log table LOG record according to an embodiment of the present invention. Figure 5 ,like Fig.16 As shown, a log record is added to the log table with TIME_POINT being 5, the log unique identifier TID being T5, the user USER being Lucy, the data type TABLE (ie, the data table identifier) ​​being FFY, and the operation type ACTION being DELETE / CANCEL (modify data / cancel).

[0113] Step 2: Delete data from the data table TABLE. Fig.17 TABLE is an example of an optional operation data table record according to an embodiment of the present invention. Figure 5 ,like Fig.17 As shown, the data with the unique identifier UUID 7 is modified, the modifier L_U_U is updated to Lucy, the modification time L_U_T is updated to 2023-10-10, 05:01:01, the data status STATUS is D, and after the data with the unique identifier UUID 3 is copied to the history table HIST, the data with the unique identifier UUID 3 is deleted from the data table TABLE.

[0114] Step 3: Record history and insert data into the history table HIST. Fig.18 This is a schematic diagram of an optional operation history table HIST record according to an embodiment of the present invention. Figure 5 ,like Fig.18 As shown, the data SEQ with the data unique identifier UUID 3 that has been inserted into the history in step 2 is -1 (corresponding to the preset sequence number) and added to the unique identifier T5 in the log table LOG. The data status is C, and the data unique identifier UUID 7 is copied as a whole to the history table HIST and added to the unique identifier T5 in the log table LOG.

[0115] Fig.19 is a schematic diagram of data in a data table TABLE after an optional operation according to an embodiment of the present invention. In this case, the data in the data table TABLE is as follows: Fig.19 shown.

[0116] By recording the deletion records in the history table, the situation in the related art where the freight rate data is not traceable and it is difficult to query the deletion operation object of the deleted data is avoided.

[0117] Optionally, after determining the second data table and the target history table based on the log table, the first data table and the change type, it also includes: in the second data table, deleting the data whose data status is effective and deleted, and in the second data table, making effective the data whose data status is not effective, effective and modified.

[0118] Fig. 20 is a schematic diagram of data status in a data table TABLE after optional data takes effect according to an embodiment of the present invention. If the data in the data table TABLE is as follows Fig.19 As shown, at this time, the execution data takes effect, that is, after all the data in the data state other than P state execute the effective operation, the data state of the entire data table can be set to P, among which, after the data in the data state D executes the effective operation, it can be directly deleted, and the result is as follows Fig. 20 As shown in the data table, it should be noted that the effectiveness processing in this embodiment can also send the data in the current data table (that is, the data table with deleted data status D) to the downstream system, or publish the data in the current data table.

[0119] Optionally, after determining the second data table and the target history table based on the log table, the first data table and the change type, it also includes receiving a data query request, wherein the data query request includes at least one of the following: querying the operation records of the first data table, querying the data status of the specified data; when the data query request indicates to query the operation records of the first data table, querying the operation records of the first data table based on the target history table and the log table; when the data query request indicates to query the data status of the specified data, querying the data status of the specified data based on the second data table.

[0120] The above-mentioned data query request can be for querying the operation records of the first data table, querying the data status of the specified data, and the data query request can be initiated in a periodic manner, can be initiated by appointment, or can be initiated by the user. In the case where the data query request is for querying the operation records of the first data table, the operation records of the first data table can be queried based on the target history table and the log table. In the case where the data query request indicates to query the data status of the specified data, the data status of the specified data can be queried from the second data table.

[0121] The following is an example of a data query request:

[0122] 1. Query whether a user has operated on a data table at a certain time? In this case, you can query the log table.

[0123] 2. To query the current data status, just query the data table:

[0124] Effective: Data status STATUS = P;

[0125] Not effective: data status STATUS = A;

[0126] Not effective Deleted: Deleted;

[0127] Deleted after effective: data status STATUS = D;

[0128] The modification has taken effect: data status STATUS = U.

[0129] 3. Query what a certain user did to a certain data at a certain time. (1) Locate the user USER operation in the log table LOG and obtain the log unique identifier TID; (2) Query the history table HIST, the modifier is a certain user USER, the log unique identifier is TID, and the data obtained is the operation performed by a certain user on a certain data at a certain time.

[0130] 4. Query who has performed an operation on a certain data. (1) Locate the data in the data table TABLE and obtain the data's unique identifier UUID; (2) Query the history table HIST, where the data's unique identifier is UUID, and sort the SEQ in ascending order. If there is -1, sort the data corresponding to -1 at the end. The data obtained is who has performed what operation on the data.

[0131] Based on the content of the data query request, data query is performed using log tables, history tables, and data tables, achieving the purpose of tracing the history of data changes. The modification records of current data and historical data can be queried separately, avoiding the situation in related technologies where data is queried through the same data table, which is prone to table locking.

[0132] Optionally, recording the data change request to a log table includes: determining target data based on the data change request, wherein the target data includes at least one of the following: an identifier of a second data table, a user identifier of a user initiating the data change request, and a change type; generating a target log identifier for the data change request, and adding the target log identifier and the target data to the log table.

[0133] For example, based on the data change request, determine the target data, wherein the target data includes at least one of the following: an identifier of the second data table, a user identifier of a user who initiates the data change request (for example, a user name), and a change type; generate a target log identifier for the data change request, and add the target log identifier and the target data to the log table.

[0134] For example, if the operation is to add (i.e. the change type is to add new data), a data unique identifier UUID (corresponding to the target log identifier) ​​can be generated in the first data table, and new data can be inserted, with the creator C_U, creation time C_T, modifier L_U_U, modification time L_U_T, and data status STATUS being A. Taking Example 1 in this embodiment as an example, (TIME_POINT=1): User Jack needs to add two pieces of data, with Field 1 being A and G respectively, and the log unique identifier being T1. Figure 4 As shown, a log record is added to the log table with TIME_POINT being 1, the log unique identifier TID being T1 (corresponding to the target log identifier), the user USER being Jack (corresponding to the user identifier), the data type TABLE (corresponding to the identifier of the second data table) being FFY, and the operation type ACTION being ADD (newly added data).

[0135] Through this embodiment, the following purposes can be achieved: (1) Sending the full file without stopping the system: The full file only queries the historical table HIST data at a certain historical time point relative to the current time, and the data operation TABLE at the current time will not affect the historical data. (2) Since the full file can be sent without stopping the system, it can be sent by appointment and automatically sent periodically without human intervention. (3) No table lock will occur: Incremental data and full data query different tables, and there is no risk of operating the same data at the same time, and theoretically no table lock will occur. (4) All user operations will be recorded in the historical table to prevent denial. (5) The full data at any time can be customized, and after this time point, according to any period, the incremental file of this time point and this period can be generated. (6) The user can regret the deletion operation before the published data takes effect. All user operations are recorded, and any data can be easily restored from the historical table HIST. (7) The effective data and historical data are separated, and the effective data that is used most often and the data required to query the incremental data are greatly reduced, thereby improving the operation efficiency. (8) If the frequency of sending full data is high and the data volume is large, which affects the user's normal use, "HIST" can be "divided into a separate database", that is, the historical table can be stored in a separate database. (9) It does not rely on plug-ins and database technology, and natively supports 7*24 hours of non-stop data maintenance at the table design level. (10) For the situation where the existing data table TABLE has valid and invalid data mixed together, this design can be used to define invalid data according to the business, use select into + conditions, locate all invalid data, insert "HIST", and SEQ=-1, and delete it from the business table. The data table TABLE only has valid data. (11) When sending the full file, you can customize "effective data", "effective data" + "historical data" or other personalized needs as needed. In the HIST table, you can use simple conditions to find the desired results. Through this embodiment, the entire database can be rolled back or to a specified time point according to actual conditions.

[0136] In this embodiment, effective data and historical data are stored separately, and production activities only care about effective data. Historical data serves historical needs. Under existing data conditions, effective data and historical data can be simply separated, and all data operations will be recorded historically. Effective data and historical data can be redefined multiple times as needed. Continuous optimization can be performed at the data level, without relying on database plug-ins or third-party technologies, and completely using data structure design and implementation. It improves the data management efficiency of the data publisher, enhances the richness, robustness and traceability of the data, enriches the meaning of the data status, and provides more options for data push.

[0137] Embodiment 2

[0138] The second embodiment of the present invention provides an optional data processing device based on freight rate publication, and each implementation unit in the data processing device corresponds to each implementation step in the first embodiment.

[0139] Fig.21 is a schematic diagram of an optional data processing device based on freight rate publishing according to an embodiment of the present invention, such as Fig.21 As shown, the data processing device includes: a first processing unit 211, a first determining unit 212 and a second determining unit 213.

[0140] The first processing unit 211 is used to receive a data change request and record the data change request in a log table, wherein the data change request is used to request to change the data in the first data table, the log table is used to record the log of the data change in the first data table, and the first data table is used to record the fare data associated with the target transportation tool;

[0141] A first determining unit 212 is used to determine a change type of the data change request, wherein the change type includes one of the following: adding data, modifying data, and deleting data;

[0142] The second determination unit 213 is used to determine the second data table and the target history table based on the log table, the first data table and the change type, wherein the second data table includes: a data table obtained after changing the data in the first data table based on the data change request, and the target history table includes: a data table obtained after recording the changed data to the designated history table, and the changed data includes: data with differential changes between the first data table and the second data table, and the designated history table is used to record all historical records of data changes to the first data table.

[0143] In the data processing device based on fare publishing provided in the second embodiment of the present invention, a data change request can be received by the first processing unit 211, and the data change request can be recorded in a log table, wherein the data change request is used to request a change to the data in the first data table, the log table is used to record the log of the data change to the first data table, the first data table is used to record the fare data associated with the target transportation vehicle, and the change type of the data change request is determined by the first determining unit 212, wherein the change type includes one of the following: adding data, modifying data and deleting data, and the second determining unit 213 determines the second data table and the target history table based on the log table, the first data table and the change type, wherein the second data table includes: a data table obtained by changing the data in the first data table based on the data change request, the target history table includes: a data table obtained by recording the changed data to the designated history table, the changed data includes: data with difference changes between the first data table and the second data table, and the designated history table is used to record all historical records of data changes to the first data table. This solves the technical problem in the related art that, in the process of publishing freight rate data, a large amount of effective data and ineffective data are recorded in one data table, resulting in poor data operation effect.

[0144] In this embodiment, the freight rate data and the change operation are recorded through the log table, the data table and the history table, so as to avoid the situation in the related art that in the process of publishing the freight rate data, a large amount of effective data and ineffective data are recorded through one data table, the amount of data in one data table is too large, the efficiency of freight rate data management is reduced, and the lack of historical records makes it difficult to trace the modification records, thereby achieving the technical effect of improving the data management efficiency in the process of publishing the freight rate data.

[0145] Optionally, in the data processing device based on freight rate publication provided in Example 2 of the present invention, the second determination unit includes: a first processing sub-unit, which is used to add the data to be added carried by the data change request to the first data table when the change type is adding new data, to obtain the second data table, and record the changed data to the designated history table to obtain the target history table; a second processing sub-unit, which is used to determine the data to be modified in the first data table based on the data change request when the change type is modifying data, modify the data to be modified in the first data table according to the data status of the data to be modified, to obtain the second data table, and record the changed data to the designated history table to obtain the target history table, wherein the data status is used to characterize whether the data in the second data table is effective; a third processing sub-unit, which is used to determine the data to be deleted in the first data table based on the data change request when the change type is deleting data, and determine the second data table and the target history table based on the data status of the data to be deleted.

[0146] Optionally, in the data processing device based on freight rate publication provided in Embodiment 2 of the present invention, the first processing sub-unit includes: a generation module, used to generate a first data identifier when the change type is new data, wherein the first data identifier is used to uniquely identify the data to be newly added in the second data table; a first processing module, used to add the first data identifier and the data to be newly added to the first data table, and set the data status of the data to be newly added in the first data table to not effective, so as to obtain a second data table.

[0147] Optionally, in the data processing device based on freight rate publishing provided in Embodiment 2 of the present invention, the second processing sub-unit includes: a modification module, used to modify the data to be modified in the first data table when the data status of the data to be modified is not effective, so as to obtain a second data table; a second processing module, used to modify the data to be modified in the first data table when the data status of the data to be modified is effective, and modify the data status of the target modified data in the first data table to effective and modified, so as to obtain a second data table, wherein the target modified data includes: data obtained after modifying the data to be modified.

[0148] Optionally, in the data processing device based on freight rate publication provided in Example 2 of the present invention, the second processing sub-unit also includes: an acquisition module, used to acquire the identifier of the data change request in the log table, and obtain the target log identifier, wherein the target log identifier is used to uniquely identify the data change request in the log table; a third processing module, used to acquire the data identifier of the changed data in the second data table, obtain the second data identifier, and determine the serial number of the second data identifier in the specified history table, and obtain the target serial number, wherein the serial number in the specified history table is used to record the modification record of the data with the same data identifier, and the data identifier is used to identify each data in the first data table or the second data table; an adding module, used to add the changed data to the specified history table based on the target log identifier and the target serial number, and obtain the target history table.

[0149] Optionally, in the data processing device based on freight rate publishing provided in Example 2 of the present invention, the third processing sub-unit includes: a determination module, used to determine the data identifier of the data to be deleted in the second data table, and obtain the second data identifier; a fourth processing module, used to add the second data identifier, the target log identifier, the data to be deleted and the preset sequence number to the designated history table when the data status of the data to be deleted is not effective, and obtain the target history table, and delete the data to be deleted in the first data table to obtain the second data table; a fifth processing module, used to set the data status of the data to be deleted in the first data table to be effective and deleted when the data status of the data to be deleted is effective, and obtain the second data table, and add the second data identifier, the target log identifier, the data to be deleted and the preset sequence number to the designated history table to obtain the target history table.

[0150] Optionally, in the data processing device based on freight rate publishing provided in Embodiment 2 of the present invention, the data processing device based on freight rate publishing further includes: a second processing unit, for deleting, in the second data table, data whose data status is effective and deleted, after determining the second data table and the target history table based on the log table, the first data table and the change type, and performing validation processing on the data whose data status is ineffective, effective and modified in the second data table.

[0151] Optionally, in the data processing device based on freight rate publishing provided in Embodiment 2 of the present invention, the data processing device based on freight rate publishing further includes: a receiving unit, configured to receive a data query request after determining the second data table and the target history table based on the log table, the first data table and the change type, wherein the data query request includes at least one of the following: querying the operation records of the first data table, querying the data status of the specified data; a first query unit, configured to query the operation records of the first data table based on the target history table and the log table when the data query request indicates querying the operation records of the first data table; and a second query unit, configured to query the data status of the specified data based on the second data table when the data query request indicates querying the data status of the specified data.

[0152] Optionally, in the data processing device based on freight rate publication provided in Example 2 of the present invention, the first processing unit includes: a determination subunit, used to determine target data based on the data change request, wherein the target data includes at least one of the following: an identifier of the second data table, a user identifier of a user who initiates the data change request, and a change type; a fourth processing subunit, used to generate a target log identifier for the data change request, and add the target log identifier and the target data to the log table.

[0153] The above-mentioned data processing device based on freight rate publication may also include a processor and a memory. The above-mentioned first processing unit 211, first determination unit 212 and second determination unit 213 are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize corresponding functions.

[0154] The processor includes a kernel, which retrieves the corresponding program unit from the memory. One or more kernels can be set, and the freight rate data and change operations are recorded through log tables, data tables and history tables by adjusting kernel parameters, thereby avoiding the situation in the related art that in the process of publishing freight rate data, a large amount of effective data and ineffective data are recorded through one data table, the amount of data in one data table is too large, the efficiency of freight rate data management is reduced, and the lack of historical records makes it difficult to trace the modification records, thereby achieving the technical effect of improving the data management efficiency in the process of publishing freight rate data.

[0155] The above-mentioned memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one storage chip.

[0156] According to another aspect of an embodiment of the present invention, there is also provided an electronic device, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute any one of the above-mentioned data processing methods based on freight rate publication by executing the executable instructions.

[0157] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, which stores a computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute any one of the above-mentioned data processing methods based on freight rate publication.

[0158] Fig. 22 is a schematic diagram of an electronic device according to an embodiment of the present invention, such as Fig. 22 As shown, an embodiment of the present invention provides an electronic device 220, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, any one of the above-mentioned data processing methods based on freight rate publication is implemented.

[0159] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0160] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0161] 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 can be 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.

[0162] 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 units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0163] In addition, each functional unit in each embodiment of the present invention 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.

[0164] 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 invention, 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 for 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 invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.

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

Claims

1. A data processing method based on freight rate publication, characterized in that: include: receiving a data change request, and recording the data change request in a log table, wherein the data change request is used to request to change the data in the first data table, the log table is used to record a log of the data change in the first data table, and the first data table is used to record the fare data associated with the target transportation tool; Determine the change type of the data change request, wherein the change type includes one of the following: adding new data, modifying data, and deleting data; Based on the log table, the first data table and the change type, a second data table and a target history table are determined, wherein the second data table includes: a data table obtained after changing the data in the first data table based on the data change request, and the target history table includes: a data table obtained after recording the changed data to a designated history table, and the changed data includes: data with differential changes between the first data table and the second data table, and the designated history table is used to record all historical records of data changes to the first data table.

2. The data processing method according to claim 1, characterized in that: Determining a second data table and a target history table based on the log table, the first data table, and the change type includes: In the case where the change type is the newly added data, the data to be added carried by the data change request is added to the first data table to obtain the second data table, and the changed data is recorded to the designated history table to obtain the target history table; In the case where the change type is the modified data, based on the data change request, determining the data to be modified in the first data table, modifying the data to be modified in the first data table according to the data status of the data to be modified to obtain the second data table, and recording the changed data to the designated history table to obtain the target history table, wherein the data status is used to indicate whether the data in the second data table is effective; In the case where the change type is the data deletion, the data to be deleted in the first data table is determined based on the data change request, and the second data table and the target history table are determined based on the data status of the data to be deleted.

3. The data processing method according to claim 2, characterized in that: In the case where the change type is the newly added data, adding the data to be added carried by the data change request to the first data table to obtain the second data table includes: In the case where the change type is the newly added data, a first data identifier is generated, wherein the first data identifier is used to uniquely identify the data to be added in the second data table; The first data identifier and the data to be added are added to the first data table, and the data status of the data to be added is set to ineffective in the first data table, so as to obtain the second data table.

4. The data processing method according to claim 2, characterized in that: In the case where the change type is the modified data, modifying the data to be modified in the first data table according to the data state of the data to be modified to obtain the second data table includes: When the data status of the data to be modified is not effective, modifying the data to be modified in the first data table to obtain the second data table; When the data status of the data to be modified is effective, the data to be modified is modified in the first data table, and the data status of the target modified data is modified in the first data table to effective and modified, to obtain the second data table, wherein the target modified data includes: data obtained after modifying the data to be modified.

5. The data processing method according to claim 4, characterized in that: In the case where the change type is the modified data, recording the changed data into the designated history table to obtain the target history table includes: Obtaining an identifier of the data change request in the log table to obtain a target log identifier, wherein the target log identifier is used to uniquely identify the data change request in the log table; Obtaining the data identifier of the changed data in the second data table to obtain the second data identifier, and determining the sequence number of the second data identifier in the specified history table to obtain the target sequence number, wherein the sequence number in the specified history table is used to record the modification record of the data with the same data identifier, and the data identifier is used to identify each piece of data in the first data table or the second data table; Based on the target log identifier and the target sequence number, the change data is added to the designated history table to obtain the target history table.

6. The data processing method according to claim 5, characterized in that: In the case where the change type is the deletion of data, determining the second data table and the target history table based on the data state of the data to be deleted includes: Determine the data identifier of the to-be-deleted data in the second data table to obtain a second data identifier; In the case where the data status of the data to be deleted is not effective, the second data identifier, the target log identifier, the data to be deleted and the preset sequence number are added to the designated history table to obtain the target history table, and the data to be deleted is deleted in the first data table to obtain the second data table; When the data status of the data to be deleted is effective, the data status of the data to be deleted is set to effective and deleted in the first data table to obtain the second data table, and the second data identifier, the target log identifier, the data to be deleted and the preset serial number are added to the designated history table to obtain the target history table.

7. The data processing method according to claim 4, characterized in that: After determining the second data table and the target history table based on the log table, the first data table and the change type, the method further includes: in the second data table, deleting the data whose data status is effective and deleted, and in the second data table, making effective the data whose data status is not effective, effective and modified.

8. The data processing method according to claim 1, characterized in that: After determining the second data table and the target history table based on the log table, the first data table and the change type, the method further includes: receiving a data query request, wherein the data query request includes at least one of the following: querying an operation record of a first data table, querying a data status of specified data; In a case where the data query request indicates to query the operation record of the first data table, querying the operation record of the first data table based on the target history table and the log table; In a case where the data query request indicates to query the data status of designated data, the data status of the designated data is queried based on the second data table.

9. The data processing method according to claim 1, characterized in that: The data change request is recorded in the log table, including: Determine target data based on the data change request, wherein the target data includes at least one of the following: an identifier of the second data table, a user identifier of a user initiating the data change request, and the change type; A target log identifier of the data change request is generated, and the target log identifier and the target data are added to the log table.

10. A data processing device based on freight rate publication, characterized in that: include: A first processing unit is configured to receive a data change request and record the data change request in a log table, wherein the data change request is used to request to change the data in the first data table, the log table is used to record a log of the data change in the first data table, and the first data table is used to record the fare data associated with the target transportation tool; A first determining unit, configured to determine a change type of the data change request, wherein the change type includes one of the following: adding new data, modifying data, and deleting data; A second determination unit is used to determine a second data table and a target history table based on the log table, the first data table and the change type, wherein the second data table includes: a data table obtained after changing the data in the first data table based on the data change request, and the target history table includes: a data table obtained after recording the changed data to a designated history table, and the changed data includes: data with differential changes between the first data table and the second data table, and the designated history table is used to record all historical records of data changes to the first data table.

Citation Information

Patent Citations

  • Data for exchanging data among homogenous and heterogenous DBMSs (database management systems) on basis of active database technology

    CN103064976A

  • Data synchronizing method and device based on log analysis

    CN107562882A

  • Data synchronization method and device, electronic device and storage medium

    CN107590277A

  • Data synchronization method, device and system

    CN113515569A

  • Operation processing method and device for application-level data

    CN113641691A