Foreign trade data storage method and system for cross-border e-commerce

By detecting the consistency of time fields and setting access sequence priority in the cross-border e-commerce platform, reordering asynchronous fields and building cross-currency archive paths, the consistency and efficiency problems in cross-border e-commerce foreign trade data storage are solved, and efficient and flexible data storage and retrieval are achieved.

CN120353974AInactive Publication Date: 2025-07-22温州青谷网络科技有限公司
View PDF 0 Cites 5 Cited by

Patent Information

Application Number
CN202510847319.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-24
Publication Date
2025-07-22
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the existing cross-border e-commerce foreign trade data storage, the consistency of multi-source heterogeneous data is difficult to ensure. The difference in format, field type and time of customs clearance data and settlement data leads to complex data integration, low storage efficiency, insufficient redundant data processing, lack of flexibility and dynamic adjustment capabilities, making it difficult to achieve rapid retrieval and efficient scheduling.

Method used

By obtaining customs clearance and settlement data packets of cross-border e-commerce platforms, detecting the consistency of time fields and setting the access sequence priority, generating cross-border data entry sequence marking groups; reordering asynchronous fields, building cross-currency field archive paths, calculating residence time and repetition ratios, generating foreign trade data field transfer configuration tables, and realizing structured archive storage.

Benefits of technology

Improve data accuracy and consistency, optimize storage retrieval efficiency, reduce cross-currency data storage complexity, reduce redundant storage, improve storage space utilization, ensure data traceability and integrity, and improve processing efficiency and scalability in big data environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120353974A_ABST
    Figure CN120353974A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data storage, in particular to a cross-border e-commerce-oriented foreign trade data storage method and system, and the method comprises the following steps: obtaining customs clearance and settlement data packets, reading time fields, detecting the consistency, judging the sequence, reordering auxiliary fields, generating a structure list, matching a currency mapping table, and constructing an archiving path. And calculating a residence time length and a repetition ratio to judge a transfer mode, performing grouping writing, establishing mapping and generating a cross-border e-commerce structured archiving storage data unit. According to the method, the consistency and the maintainability of data storage are improved by judging the synchronism and the access priority of the cross-border e-commerce platform data, optimizing integration of customs clearing data and settlement data, sorting fields and generating an asynchronous field positioning list, the storage logic is simplified by constructing a reasonable archiving path and performing segmentation management, and the storage efficiency is improved. The storage mode is flexibly adjusted according to the residence time and the repetition rate, redundant data is reduced, and the completeness and consistency of foreign trade data are ensured through accurate field binding.
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 storage, and particularly to a foreign trade data storage method and system for cross-border e-commerce. Background Art

[0002] The technical field of data storage encompasses technical content throughout the entire process of digital information collection, organization, storage, management, and access in different application scenarios. The core content mainly includes data structure design, database construction, selection and optimization of storage media, data consistency guarantee mechanisms, distributed storage strategies, data backup and recovery methods, as well as data access control and permission management. It is widely applied in various information systems and platforms and is a key fundamental support for ensuring information availability, integrity, and security. With the continuous growth of data scale and the emergence of diverse application scenarios, this technical field has continuously expanded to fields such as cloud computing, edge computing, the Internet of Things, and e-commerce, forming various storage solutions customized for different industries.

[0003] Among them, the foreign trade data storage method for cross-border e-commerce refers to a technical method for unified structured modeling, collection, and efficient storage of multi-source heterogeneous foreign trade data generated in the cross-border e-commerce business scenario. It covers the classification and standardization processing of multi-dimensional data such as order data, logistics information, customs clearance data, commodity codes, foreign exchange settlement, and national regulations information. By establishing a data model oriented to the characteristics of trade data, it optimizes the storage layout with a table index structure and adopts a transaction consistency strategy to complete data update and maintenance. Usually, it uses a hierarchical segmented storage method combined with a key-value mapping mechanism based on field mapping, and conducts logical grouping according to the dimensions of country, commodity classification, and time to achieve fast query and scheduling. Overall, it relies on an extensible data architecture system and adopts a format normalization conversion process when accessing business data to ensure the unity and sustainable maintainability between heterogeneous data sources.

[0004] During the existing cross-border e-commerce foreign trade data storage process, due to the existence of multi-source heterogeneous data, it is difficult to ensure data consistency. The differences in format, field type, and time difference between customs clearance data and settlement data make data integration complex and prone to data matching errors or losses. The existing technology lacks a refined storage strategy for multi-dimensional data, especially in the processing of cross-currency and cross-time period data, with low storage efficiency and difficulty in achieving fast retrieval and efficient scheduling. In addition, the existing storage method has a relatively simple handling of redundant data, with low utilization efficiency of storage space. Although there are data backup and recovery mechanisms, in the face of the storage requirements of large-scale data, it lacks sufficient flexibility and dynamic adjustment capabilities and cannot efficiently handle the continuous changes and complex processing of data. Summary of the Invention

[0005] The object of the present invention is to solve the disadvantages existing in the prior art, and to propose a foreign trade data storage method for cross-border e-commerce.

[0006] To achieve the above object, the present invention adopts the following technical solutions: A foreign trade data storage method for cross-border e-commerce, comprising the following steps: S1: Obtain the customs clearance data packet and settlement data packet of the cross-border e-commerce platform, read the customs clearance time field and settlement time field, detect the consistency of the field character length and character set type, calculate the interval second difference and judge the access primary and secondary order, and generate a cross-border data storage order mark group; S2: According to the primary order data and secondary order data fields of the cross-border data storage order mark group, compare the difference between the secondary order field and the primary field serial number, reorder the secondary field, and generate an asynchronous field structure positioning list; S3: Based on the settlement currency field of the asynchronous field structure positioning list, match it with the preset stable level mapping table, classify different currency filing logic segments and construct a combined filing path, and generate a cross-currency field filing path set; S4: Based on the cross-currency field filing path set, calculate the field residence duration and field write repetition ratio, compare with the field residence threshold and uniqueness ratio threshold to determine the transfer method, and generate a foreign trade data field transfer configuration table; S5: According to the foreign trade data field transfer configuration table, group the fields and write them into each currency level partition, establish a field traceability mapping, and generate a cross-border e-commerce structured filing storage data unit.

[0007] As a further solution of the present invention, the cross-border data storage order mark group includes primary order data, secondary order data, access order priority, time difference tolerance interval, field character length, character set type, standard timestamp structure, matching degree, customs clearance time field, settlement time field. The asynchronous field structure positioning list includes field name, field serial number, and the asynchronous field structure positioning list includes the position difference of the field serial number, the field difference range, and the original position information. The cross-currency field filing path set includes filing segment, currency filing logic segment, filing path, belonging field group, stable level mapping table. The foreign trade data field transfer configuration table includes residence start time, residence duration, field write frequency, field value repetition times, field write repetition ratio, residence threshold, uniqueness ratio threshold, transfer method. The cross-border e-commerce structured filing storage data unit includes structured filing partition, field belonging path, field content, field unique traceability ID code.

[0008] As a further solution of the present invention, the specific steps for obtaining the cross-border data storage order mark group are as follows: S111: Obtain and read the customs clearance time field and settlement time field in the customs clearance data packet and settlement data packet, respectively extract the character length and character set type of the customs clearance time and settlement time, detect the character set consistency and length matching degree between the two, and obtain the matching degree value of the customs clearance time and settlement time field; S112: Based on the matching degree value of the customs clearance time and settlement time field, combined with the standard timestamp structure, compare the field types, and determine whether they are homologous asynchronous data, calculate the second difference between the customs clearance time and settlement time, and set a tolerance interval according to the calculation result to generate a matching degree judgment result; S113: According to the matching degree judgment result, calculate the access order priority of the two, sort the data based on the matching tolerance value, and mark the data as the main order data and secondary order data to generate a cross-border data storage order marking group.

[0009] As a further solution of the present invention, the steps for obtaining the asynchronous field structure positioning list are specifically as follows: S211: Based on the main order data field in the cross-border data storage order marking group, extract the field name and field serial number, establish a corresponding mapping relationship between the field serial number and the field name by storing the data structure of the field serial number, and at the same time convert the field number into a standardized sequence structure to generate a field serial number mapping matrix; S212: According to the field serial number mapping matrix, read the secondary order data field, compare its field number and calculate the field position difference with the main serial number structure, determine whether the difference falls within the specified difference interval range, extract the qualified field serial numbers as the intermediate position fields, and generate a field difference interval set; S213: Based on the field difference interval set, reorder the secondary field order according to the field position difference range, and at the same time record the original numbers of the fields in the main and secondary structures, calculate and compare the serial number difference, difference distribution, and difference direction before and after sorting, and use the formula: ; Calculate the asynchronous field structure difference value , reposition the standard position of the secondary field in the asynchronous structure according to the difference value to obtain the asynchronous field structure positioning list, where, represents the serial number of the th field in the main structure, represents the serial number of the th field in the secondary structure, represents the relative difference position of the th field in the main structure, represents the relative difference position of the th field in the secondary structure, represents the The square difference of the position numbers of the fields in the original structure, represents the total number of fields.

[0010] As a further solution of the present invention, the steps for obtaining the cross-currency field filing path set are specifically as follows: S311: Based on the settlement currency fields extracted from the asynchronous field structure positioning list, call the currency level field values in the preset stability level mapping table, match the two field values, identify the currencies with different field values and extract the corresponding level difference value intervals, and classify the fields according to the currency stability level intervals to obtain a set of currency level difference intervals; S312: According to the set of currency level difference intervals, classify the settlement currency fields into each filing logic segment according to the level difference, obtain the level value and the field storage timestamp corresponding to each currency field in the logic segment, construct a combined filing path for the fields under the same filing logic segment, and use the formula: ; Calculate the filing path construction value , sort the filing paths and determine the order of the fields within the logic segment, register the path attribution in combination with the field grouping information, and establish a cross-currency field filing path set, where, represents the currency level value of the th field, represents the corresponding matching level value of the th field, represents the field storage timestamp of the th field, represents the maximum value in the field storage timestamps, represents the total number of fields under the current logic segment;

[0011] As a further solution of the present invention, the steps for obtaining the foreign trade data field transfer configuration table are specifically as follows: S411: Based on the cross-currency field filing path set, collect the residence start time and the current time of the fields in each filing segment, calculate the field residence duration, and obtain the residence duration data; S412: Based on the cross-currency field filing path set, read the write frequency and the field value repetition times of each field, calculate the repetition ratio of the field writes, and obtain the field write repetition ratio data; S413: Compare the residence duration data with the residence duration threshold. If the residence duration exceeds the limit and the write repetition ratio data of the field is lower than the uniqueness ratio threshold, determine that the transfer and storage method is merging; otherwise, it is direct transfer and storage. Use the formula: ; Obtain the transfer and storage determination value of the field. Obtain the foreign trade data field transfer and storage configuration table according to the determination value. Among them, represents the residence duration value of the field, is the residence duration threshold, represents the write repetition ratio value of the

[0012] As a further solution of the present invention, the steps for obtaining the cross-border e-commerce structured archiving and storage data unit are specifically as follows: S511: Based on the foreign trade data field transfer and storage configuration table, write to the corresponding structured archiving partition in sequence, record the starting position and write time of each group of foreign trade data in the target partition, and obtain the write time and position record of each group of data; S512: Based on the foreign trade data field transfer and storage configuration table, structurally bind the field attribution path, field content, and field unique traceability ID code corresponding to each group of foreign trade data to obtain the structured binding result of field attribution and traceability ID; S513: Combine the write time and position record and the structured binding result of field attribution and traceability ID, and perform structured archiving and storage on each field to generate the cross-border e-commerce structured archiving and storage data unit.

[0013] A foreign trade data storage system for cross-border e-commerce includes: The data synchronization and verification module obtains the customs clearance and settlement data packets, detects the time field length and character set, performs type comparison in combination with the standard timestamp structure, calculates the customs clearance and settlement time interval, determines the access order priority according to the matching tolerance value, and generates a cross-border data storage order mark group; The field structure rearrangement module extracts the field name and serial number to form a field main table according to the main order field in the cross-border data storage order mark group, reads the secondary order field and judges it based on the difference between the serial numbers of the main table fields, and generates an asynchronous field structure positioning list; The currency archiving mapping module extracts the settlement currency field based on the asynchronous field structure positioning list, matches it with the preset stable level mapping table, classifies the currency archiving logic segment, and generates a cross-currency field archiving path set; The field transfer and storage configuration module calculates the field residence duration and duplication ratio based on the cross-currency field archiving path set, compares the residence threshold and uniqueness ratio, determines the transfer and storage method, and generates a foreign trade data field transfer and storage configuration table; The archiving storage management module writes to the archiving partition according to the foreign trade data field transfer and storage configuration table, records the data start position and writing time, binds the field path and unique traceability ID, and obtains a cross-border e-commerce structured archiving storage data unit.

[0014] Compared with the prior art, the advantages and positive effects of the present invention are as follows: In the present invention, by accurately identifying the data synchronization in the cross-border e-commerce platform, combining the timestamp structure and character set comparison, optimizing the integration of customs clearance data and settlement data, and setting the priority of the data access order, the problem of data chaos caused by asynchronous data sources is effectively solved, the data accuracy is improved, the influence of inconsistent data on subsequent processing is reduced, the data fields are structured and sorted, and the asynchronous field positioning list is obtained based on the field position information, so as to enhance the data consistency and maintainability during the storage process. In cross-currency data processing, by constructing a reasonable archiving path and segmented management, the retrieval efficiency and accuracy of data storage are optimized. Especially when dealing with the storage logic of different currencies, the complexity of cross-currency data storage is reduced. When data is transferred and stored, by analyzing the residence time and duplication ratio, the data transfer and storage strategy is flexibly judged, redundant storage is reduced, and the utilization rate of storage space is improved. By accurately binding fields and storage paths, the traceability and integrity of data are realized, and the consistency and accessibility of data in different partitions are ensured, thereby improving the processing efficiency and scalability of foreign trade data in the big data environment. Description of the Drawings

[0015] Figure 1 is the main step flow chart of the present invention; Figure 2 is the flow chart for obtaining the cross-border data warehousing sequence marking group of the present invention; Figure 3 is the flow chart for obtaining the asynchronous field structure positioning list of the present invention; Figure 4 is the flow chart for obtaining the cross-currency field archiving path set of the present invention; Figure 5 is the flow chart for obtaining the foreign trade data field transfer and storage configuration table of the present invention; Figure 6 is the flow chart for obtaining the cross-border e-commerce structured archiving storage data unit of the present invention. Detailed Embodiments

[0016] In order to make the objectives, technical solutions and advantages of the present invention clearer and more understandable, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0017] In the description of the present invention, it should be understood that the orientation or positional relationship indicated by the terms "length", "width", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc. is based on the orientation or positional relationship shown in the accompanying drawings, and is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the present invention. In addition, in the description of the present invention, the meaning of "a plurality of" is two or more, unless otherwise specifically defined.

[0018] Please refer to Figure 1 , a foreign trade data storage method for cross-border e-commerce, including the following steps: S1: Obtain the customs clearance data packet and settlement data packet in the cross-border e-commerce platform, read the customs clearance time field and settlement time field in the two types of data packets, detect whether the character lengths and character set types of the fields are consistent, perform type comparison in combination with the standard timestamp structure, determine whether the two types of data are homologous asynchronous data according to the character type matching degree and the time difference tolerance interval, calculate the interval second difference between the customs clearance time and the settlement time, judge the access order priority according to the matching tolerance value, and mark them as main order and secondary order data to generate a cross-border data storage order mark group; S2: According to the main order data fields in the cross-border data storage order mark group, extract the field names and field numbers to form a field main table, read the secondary order data fields and judge the position difference of the field numbers with the field main table, reorder the secondary fields according to the field difference range, record the original position information of each field in the main order data and secondary order data structures, and generate an asynchronous field structure positioning list; S3: Based on the settlement currency fields extracted from the asynchronous field structure positioning list, perform field value matching with a preset stable level mapping table, classify the currencies with different stability levels into different currency filing logic segments, construct a combined filing path according to the currency level field value and the field storage timestamp field value in the filing logic segment, record the belonging field group in the filing path, and generate a cross-currency field filing path set; S4: Based on the cross-currency field archiving path set, collect the residence start time and the current time of the fields in each archiving segment, calculate the field residence duration, read the field write frequency and the field value repetition count, and then calculate the field write repetition ratio. Compare the field residence duration with the field residence threshold, and at the same time compare the field repetition ratio with the uniqueness ratio threshold. If the residence time exceeds the limit and the repetition ratio is lower than the threshold, determine that the transfer method is merging; otherwise, it is direct transfer, and generate a foreign trade data field transfer configuration table. S5: According to the foreign trade data field transfer configuration table, write to the corresponding structured archiving partition in sequence, record the start position and write time of each group of foreign trade data in the target partition, and perform structure binding on the field attribution path, field content, and field unique traceability ID code corresponding to each group of foreign trade data to obtain a cross-border e-commerce structured archiving storage data unit.

[0019] The cross-border data storage order marking group includes main order data, secondary order data, access order priority, time difference tolerance interval, field character length, character set type, standard timestamp structure, matching degree, customs clearance time field, settlement time field. The asynchronous field structure positioning list includes field name and field serial number. The asynchronous field structure positioning list includes the position difference of the field serial number, the field difference range, and the original position information. The cross-currency field archiving path set includes archiving segment, currency archiving logic segment, archiving path, attributed field group, and stability level mapping table. The foreign trade data field transfer configuration table includes residence start time, residence duration, field write frequency, field value repetition count, field write repetition ratio, residence threshold, uniqueness ratio threshold, and transfer method. The cross-border e-commerce structured archiving storage data unit includes structured archiving partition, field attribution path, field content, and field unique traceability ID code.

[0020] Please refer to Figure 2 , step S1 is as follows: S111: Obtain and read the customs clearance time field and the settlement time field in the customs clearance data packet and the settlement data packet, extract the character length and character set type of the customs clearance time and the settlement time respectively, detect the character set consistency and length matching degree between the two, and obtain the field matching degree value of the customs clearance time and the settlement time. First, obtain and read the customs clearance time field and the settlement time field in the customs clearance data packet and the settlement data packet, and then extract the character lengths and character set types of these two fields. When analyzing the character set, by checking whether the characters conform to the standard timestamp structure, it is possible to verify whether the fields conform to the expected format. For the consistency of the character set type, assume that the data in the customs clearance time field is in UTC format, while the settlement time field uses Beijing time format. In this case, corresponding conversions need to be performed on these two fields to make them unified to the same time standard, avoiding deviations in the subsequent analysis process due to inconsistent character sets. Assume that the data in the customs clearance time field is "2025-04-07T14:30:00Z", and the settlement time field is "2024-04-07 22:30:00+08:00", where the former is the standard UTC time and the latter is Beijing time with a time zone offset. First, the time zone of the settlement time field needs to be converted to UTC format. The converted result is "2024-04-07T14:30:00Z". At this time, the consistency of the two fields is guaranteed, and then the length and character set matching judgment can be carried out. By analyzing the character lengths of these two time fields, assuming they are both 20 characters, it can be further confirmed that they meet the consistency requirements. Finally, by matching the character set type, assuming the matching degree value is 0.9, the customs clearance time and the settlement time field can be considered as homologous asynchronous data. For the setting of the matching degree value of 0.9, this value reflects the consistency of the timestamp character sets of the customs clearance time and the settlement time fields. The basis for this value setting is through the test analysis of a large amount of historical data on cross-border e-commerce platforms. Based on the effect after character set comparison and time zone conversion, 0.9 is used as a reasonable tolerance interval to ensure that the data can be fully matched in terms of accuracy. At this time, the matching degree value of 0.9 can better capture the consistency in character length and character set type between the two, thus providing effective support for subsequent operations.

[0021] S112: Based on the matching degree value of the customs clearance time and the settlement time fields, combined with the standard timestamp structure, compare the field types, and determine whether they are homologous asynchronous data, calculate the second difference between the customs clearance time and the settlement time, and set a tolerance interval based on the calculation result to generate a matching degree judgment result; Based on the character matching degree value of the customs clearance time field and the settlement time field, by combining with the standard timestamp structure for comparison, it is determined whether the two time fields belong to homologous asynchronous data. First, calculate the time difference between the customs clearance time field and the settlement time field. If the customs clearance time is "2024-04-07T14:30:00Z" and the settlement time is "2024-04-07T14:31:30Z", the time difference is 90 seconds. According to the set time difference tolerance interval of 180 seconds, assuming the tolerance interval is 180 seconds (i.e., valid data pairs within 3 minutes), at this time the time difference is 90 seconds, which meets the tolerance interval condition. The setting basis of the 180-second tolerance interval comes from the actual transaction turnover speed of cross-border e-commerce data. Considering the transaction data and customs clearance processes of most e-commerce platforms, the time difference of data is usually within the normal range within 3 minutes. The selection of this tolerance interval ensures that during the processing, the fluctuation of the time difference will not affect the accuracy of data judgment due to data delay or synchronization problems. Next, perform field type comparison. If both the customs clearance time field and the settlement time field are in the UTC standard time format, it meets the comparison condition. If the character matching degree value in the customs clearance time field and the settlement time field is 0.95, it means that these two data are homologous and asynchronous, and subsequent sorting operations can be continued. For example, when the customs clearance time is "2024-04-07T14:30:00Z" and the settlement time is "2024-04-07T14:32:00Z", the calculated second difference is 120 seconds. Assuming the tolerance interval is 180 seconds, the matching degree value between them will be considered relatively high. Further calculate the interval second difference value between the customs clearance time and the settlement time as 120 seconds, and then generate a matching degree judgment result.

[0022] S113: According to the matching degree judgment result, calculate the access order priority of the two, sort the data based on the matching tolerance value, and mark the data as the main order data and the secondary order data to generate a cross-border data warehousing order marking group; Based on the judgment result of the matching degree between the customs clearance time and the settlement time, calculate the access order priority. First, set a rule for the access order priority. Assume that the basis for determining the priority is the matching degree value. If the matching degree value is greater than 0.9, the data is marked as the main order data, and if the matching degree value is less than 0.9, it is marked as the secondary order data. For example, if the matching degree value of a pair of customs clearance time and settlement time is 0.92, it meets the main order condition; if the matching degree value is 0.85, it belongs to the secondary order data. Next, when sorting the data, the main order data will be ranked in front, and the secondary order data will be ranked behind. After sorting the data, a cross-border data storage order marking group is generated, which can ensure that the main order data with a higher matching degree is processed first during storage, while the secondary order data with a lower matching degree enters subsequent processing. Assume that the matching degree values of the customs clearance time field and the settlement time field are 0.91 and 0.88 respectively. In this case, the matching degree of 0.91 will be given the main order, and the matching degree of 0.88 will be classified as the secondary order, and a marking group will be finally generated after sorting, and finally a cross-border data storage order marking group will be generated.

[0023] Please refer to Figure 3 , step S2 is: S211: Based on the main order data fields in the cross-border data storage order marking group, extract the field names and field numbers. By performing data structured storage on the field numbers, establish the corresponding mapping relationship between the field numbers and the field names, and at the same time convert the field numbers into a standardized sequence structure to generate a field number mapping matrix; Based on the main sequence data field in the cross-border data storage order marking group, it is necessary to first extract and encode and organize each field name and field serial number in this field set. In the actual operation process, assume that there are 5 main sequence fields, and their field names are "Customer ID", "Transaction Number", "Transaction Time", "Transaction Amount", and "Payment Method" in sequence. The storage order numbers of the corresponding fields in the data structure are 1, 2, 3, 4, and 5. Then, in this process, a key-value mapping of the field name and field number is performed one by one to form a basic mapping dictionary; further, in order to realize the structured representation of data, the above mapping relationship needs to be solidified in the form of a standardized array, for example, represented by the main field sequence array {F1, F2, F3, F4, F5}, where F1 = "Customer ID", F2 = "Transaction Number", etc. At the same time, during the execution process, the consistency of the arrangement order between field numbers needs to be considered. If there are cases where the field names are the same but the orders are different, the fields need to be renumbered, and the relative position difference of the fields in the sequence group is used for number rescaling operation; in specific practice, if the field number of the "Transaction Amount" field is 4, but the storage order in another system is 2, it is necessary to record that the number difference is 2, indicating that there is a disordered situation; in addition, to ensure the uniqueness of field matching, it is necessary to check whether there are cases of duplicate field names or conflicting field numbers during the data storage process. If there are multiple field names mapped to the same number, for example, "Transaction Number" and "Order Number" both correspond to number 2, then it is necessary to perform a naming conflict determination and distinguish them through the field source system identifier, for example, label them in the form of "Transaction Number_A" and "Order Number_B"; in the actual processing flow, the system needs to sequentially read the field set in the original marking group, obtain its storage order number for each field through the field acquisition interface, and store it in the main field mapping table to construct a two-dimensional array structure of field name to field number; for the convenience of subsequent difference analysis and structure comparison, the main field serial number structure can be further constructed into a matrix form, such as expanding the field serial number into a row vector in the matrix , the name structure is a column vector ["Customer ID", "Transaction Number", "Transaction Time", "Transaction Amount", "Payment Method"], and the main structure field order is standardized through the field structure matrix, and finally a field serial number mapping matrix is established.

[0024] S212: According to the field serial number mapping matrix, read the secondary sequence data field, compare its field number and calculate the field position difference with the main sequence structure, judge whether the difference falls within the specified difference interval range, extract the qualified field serial numbers as the intermediate position fields, and generate a field difference interval set; According to the field sequence number mapping matrix, it is necessary to read the secondary sequence data field set and extract the sequence number of each field in its data structure. If the secondary structure fields are "transaction number", "payment method", "transaction amount", "transaction time" and "customer ID", their corresponding sequence numbers are 1, 2, 3, 4, and 5. The system needs to compare the difference with the primary structure field number and calculate the difference between the primary field number and the secondary field number in turn. For example, the "transaction number" field number in the primary structure is 2, and in the secondary structure it is 1, and the difference is 1. If the difference interval threshold is set to ±2, the field can be considered to be similar in sequence; on this basis, the system performs difference calculations on each pair of field names in turn to obtain a set of difference arrays {1, 3, 1, 1, 4}, where each value represents the degree of deviation between the secondary field and the primary field in position numbering. In order to further screen the field sequence in the secondary field that is closest to the primary field structure, it is necessary to determine whether each difference falls within the set difference interval of ±2; for example, " The difference of the "Transaction Amount" field is 1, which meets the requirements, while the difference of the "Customer ID" field is 4, which exceeds the set range, and it is marked as a structural misaligned field. To facilitate the result collation, all fields that meet the difference within ±2 are constructed as a difference field set, and their field names and corresponding differences are recorded. The judgment process can be achieved by comparing the absolute value of the difference between the field pairs one by one to see if it is less than the set value of 2. If true, the field enters the difference set, otherwise it is eliminated, and the field abnormality type is marked as "serial number offset" in the data structure. To improve the rationality of the screening, the threshold ±2 needs to be set according to the proportion of the total number of fields. For example, if the total number of fields is 5, the maximum tolerable field misalignment ratio is 40%, and the corresponding difference threshold range is ±2. If the number of fields increases to 10, it needs to be adjusted to ±3 or higher accordingly. Referring to the above set conditions, the qualified fields are finally aggregated into a structural data structure, and the field names and their respective numbers in the primary and secondary structures and their differences are recorded to generate a field difference interval set.

[0025] S213: Based on the field difference interval set, the sub-field sequence is reordered according to the field position difference range, and the original number of the field in the primary and secondary structures is recorded. The difference, difference distribution, and difference direction before and after the sorting are calculated and compared using the formula: ; Calculate the difference value of asynchronous field structure , reposition the standard position of the subfield in the asynchronous structure according to the difference value, and obtain the asynchronous field structure positioning list, where, Representative The ordinal number of the field in the main structure, Representative The ordinal number of the field in the substructure, Representative The relative position of the difference between the fields in the main structure, Represents the relative position of the difference of the field in the secondary structure, represents the square difference of the position numbers of the field in the original structure; According to the set of field difference intervals, it is necessary to perform a reordering operation according to the differences of each secondary field, relocate the secondary field structure and sort it in descending order according to the absolute value of the difference, so as to form a new order arrangement plan for the secondary fields. At the same time, record the comparison relationship table between the original number and the adjusted number during the execution process, and structure the order correspondence between the main field and the secondary field; assume that the original number of the field "Customer ID" in the secondary structure is 5, and the number in the main structure is 1, and the difference is 4, then it needs to be placed at the end of the structure according to the sorting logic, while the original number of the field "Transaction Number" is 1, and the main number is 2, and the difference is 1, so it is ranked at the front; in the actual scenario, by comparing the absolute values of the differences of all fields sorting is performed to form a sorted list of secondary fields {"Transaction Number", "Transaction Time", "Transaction Amount", "Payment Method", "Customer ID"}; in order to evaluate the rationality of the field reordering in the secondary structure, it is necessary to further analyze the difference structure of the field sequence numbers before and after reordering, calculate the number difference, difference direction and their distribution before and after sorting. For the "Transaction Number" field , , the difference is 1, construct the field number direction factor , , the square difference of the numbers , the sum of the absolute values of all field differences is , substituting into the formula for calculation, we can get: ; By performing the above calculations on each field, a complete array of asynchronous field structure difference values {0.027, 0.045, 0.036, 0.090, 0.109} is obtained. The larger the difference value, the stronger the field asynchrony. Determine the final secondary field order plan according to the sorting, and establish a standard mapping relationship table between the secondary field numbers and the main field numbers; Table 1 Asynchronous Field Difference Value Table: ; As shown in Table 1, the numbering differences of each field in the primary and secondary structures can be calculated by a formula to obtain the specific degree of difference. Based on the sorting result of the difference values, the secondary field structure is rearranged, and the structure rearrangement list is recorded in combination with the numbering relationship before and after sorting. Finally, the asynchronous field structure positioning list is obtained. By introducing the field structure numbering direction factor and the numbering difference for joint operation, and combining the square difference and the total difference to form the denominator structure, the quantitative evaluation of the field order asynchrony is realized, providing a basis for the positioning of secondary fields.

[0026] Please refer to Figure 4 , and the S3 step is as follows: S311: Based on the settlement currency field extracted from the asynchronous field structure positioning list, call the currency level field value in the preset stability level mapping table, match the two field values, identify the currencies with different field values and extract their corresponding level difference value intervals, and classify the fields according to the currency stability level intervals to obtain the currency level difference interval set; When matching the field value of the settlement currency field extracted from the asynchronous field structure positioning list with the stability level mapping table, first identify each field recorded in the asynchronous field structure positioning list item by item, extract the data units with currency identifiers, such as "USD", "CNY", "JPY", etc., and determine their sequence numbers in the data table structure. Subsequently, judge whether the currency field value appears in the preset column of the stability level mapping table through character matching. Suppose the currency stability level mapping values are as follows: 3 for USD, 2 for CNY, 1 for JPY, etc. The set range of stability level values is from 1 to 5. If the extracted field value cannot match any currency item in the mapping table, mark this field value as "abnormal matching status" and do not participate in the subsequent stability level difference calculation. For the fields with successful matching, extract their stability level values as the basis for subsequent calculations. In actual operation, if a field value is "EUR", look up the table to get its level as 4. Compared with the current standard level 3, its level difference is 1. The judgment method is to directly calculate whether its difference exceeds the threshold 1. If it exceeds, it is classified into the difference field set. For example, the level of EUR is 4 and the standard is 3, so the difference is 1, which is within the allowable range and can be classified into the logical segment with a level difference of 1. If the field value is "MXN", the corresponding level is 5 and the level difference is 2, then it is classified into the logical segment with a level difference of 2, and record the corresponding level difference and structure sequence number of this currency. During the whole process, for all successfully matched currencies, the system maps their stability level difference values to the sequence numbers within the structure one by one, and constructs a difference level field value set with the structure field number as the index. Among them, a difference field index set is established with the difference as the key and the field number as the value, so as to directly call this set for classification when dividing the subsequent execution path archive logical segments. Finally, the currency level difference interval set is obtained.

[0027] S312: According to the collection of currency grade difference intervals, classify the settlement currency fields into each filing logic segment according to the grade difference, obtain the grade value and the field storage timestamp corresponding to each currency field within the logic segment, construct a combined filing path for the fields under the same filing logic segment, and use the formula: ; Calculate the filing path construction value , sort the filing paths and determine the field order within the logic segment, register the path attribution in combination with the field grouping information, and establish a cross-currency field filing path set, where represents the currency grade value of the th field, represents the corresponding matching grade value of the th field, represents the field storage timestamp of the th field, represents the maximum value in the field storage timestamps, represents the total number of fields under the current logic segment; According to the collection of currency grade difference intervals, classify the settlement currency fields into the corresponding logic segments according to the grade difference, obtain the grade value and the field storage timestamp of the fields within the logic segment, and perform a combined path calculation using the filing path construction formula. First, clarify the grade value , the mapped grade value and the corresponding storage timestamp of each field. Taking 3 fields in the filing logic segment as an example, their values are shown in Table 2: Table 2 Field Value Table of the Filing Logic Segment: ; As shown in Table 2, the grade differences corresponding to fields a, b, and c are 1, 1, and 2 respectively. Substitute the data in the table into the formula.

[0028] Calculate the sum of the absolute values of the grade differences: ; Calculate the sum of the square roots of the timestamps: ; Calculate the denominator term of the formula: ; Substitute all the values into the formula: ; The result shows that the value of the archived path construction under the current logical segment is 0.04395. This value will be used as the sorting basis for path distribution and field attribution order division. Combining the bit sequence numbers and grouping identifiers of the fields in the structure, the fields within the logical segment are sorted in ascending order of the path construction value. Finally, a cross-currency field archived path set is established. By combining the level difference and time factor to participate in the archived path construction, the dynamic change trend of field sorting can be reflected under the influence of time fluctuations.

[0029] S313: According to the attribution field group information in the cross-currency field archived path set, number and record the field paths within the attribution field group and classify the set identifiers, forming a structural organization of the archived fields, and extracting the complete path field value section from it to generate an archived path field value section set; After obtaining the attribution field group information in the cross-currency field archived path set, reconstruct and identify the field path numbers within the field group. First, according to the sorting structure obtained from the path construction value, extract the original structure numbers of the fields within the attribution field group, and set new logical numbers in the order of the path set. The number range is automatically generated according to the number of fields. For example, if there are 5 fields in the field group, the numbers 1 to 5 are set in sequence, and a mapping relationship is established between the original number and the new number. Subsequently, during the extraction process of the archived path field value section, the field section delimitation operation is based on this mapping relationship. In the actual process, if the fields in a certain set of field path sets are numbered 10, 12, 15, 18, 20 respectively, the new numbers are set as 1 to 5 and mapped to the path structure number sequence in turn. During the generation process of the field value section, the time periods to which they belong are distinguished according to the time stamp intervals of the fields. If the time stamp difference between field 10 and field 12 is 900 seconds, and the difference between field 15 and field 18 is 300 seconds, then fields 10 to 12 are set as one section, and fields 15 to 20 are set as another section, obtaining a structurally continuous archived path segment. Through the matching relationship of field number attribution, path construction value distribution interval, and level difference interval within the time period, it is summarized into a structural archived path field value section set, and finally an archived path field value section set is generated.

[0030] Please refer to Figure 5 , and the steps of S4 are as follows: S411: Based on the cross-currency field archived path set, collect the residence start time and the current time of the fields in each archived segment, calculate the residence duration of the fields, and obtain the residence duration data; First, collect the residence start time and the current time of the fields in each archived segment to calculate the residence duration of the fields. The calculation of the residence duration is obtained by taking the difference between the storage time of each field and the current time. For example, assume that the residence start time of a certain field A is January 1, 2025, and the current time is April 7, 2025. Then the calculation of the residence duration is as follows: ; The residence time reflects the retention time of the field in the database since it was entered into the database, and is one of the key factors in determining whether the field meets the conditions for subsequent transfer. The setting of the residence time threshold usually refers to the tolerance for long-term retention of the field in actual operation. For example, the threshold is set to 90 days, which is based on general industry standards and best practices for database management. Generally speaking, fields exceeding this threshold may cause waste of storage space or affect data processing efficiency. Therefore, 90 days as the residence time threshold is a reasonable and industry-based setting. When the residence time of a field exceeds this threshold, the field needs to enter further processing flow, such as merging or transfer. By setting a reasonable threshold, the efficiency of database management and the rational use of resources can be ensured. If the residence time exceeds 90 days, the residence time of field a is 96 days, then the field has exceeded the threshold and enters the subsequent judgment. After calculating the residence time of the field and comparing it with the threshold, it is determined whether it meets the conditions for the transfer operation, which provides a time basis for field archiving processing.

[0031] S412: Based on the cross-currency field archiving path set, read the write frequency and field value repetition times of each field, calculate the field write repetition ratio, and obtain field write repetition ratio data; The write frequency of a field and the number of field value repetitions are used to calculate the write repetition ratio of the field. For example, assuming that the write frequency of a field a is 20 times and the number of field value repetitions is 5 times, the write repetition ratio is calculated as: ; This ratio indicates the frequency ratio of field values being written repeatedly in the system, reflecting the uniqueness of the field. The setting of the uniqueness ratio threshold depends on the system's control requirements for data consistency and duplication. Usually, this value is set to 0.30. This means that if the duplication ratio of a field is lower than 0.30, it indicates that the value of the field has a high uniqueness, while if it exceeds 0.30, it may indicate that the value of the field has a high duplication and may require further merging or screening. The basis for setting this value is derived from the demand for database stability and the standard for duplicate data processing. In actual applications, this value can be fine-tuned according to different system requirements. Assuming that the duplication ratio of field a is 0.25, which is lower than the uniqueness ratio threshold of 0.30, it means that field a has a high uniqueness and therefore meets the predetermined storage requirements. By calculating the write duplication ratio, we can determine whether the field meets the uniqueness requirements for transfer.

[0032] S413: Compare the residence time data with the residence time threshold. If the residence time exceeds the limit and the field write duplication ratio data is lower than the uniqueness ratio threshold, the transfer mode is determined to be merge, otherwise it is direct transfer, using the formula: ; Obtain the dump determination value of the field, and obtain the foreign trade data field dump configuration table according to the determination value, where represents the residence duration value of the th field, is the residence duration threshold, represents the write repetition ratio value of the th field; is the uniqueness ratio threshold; First, compare the residence duration value of the field with the residence duration threshold. If the residence duration of the field exceeds the limit and the write repetition ratio is lower than the threshold of the uniqueness ratio, the field is determined to need to be merged, otherwise the field is directly dumped. For example, assume that the residence duration of a certain field d is 105 days, the residence duration threshold is 90 days, and its write repetition ratio is 0.15, and the threshold of the uniqueness ratio is 0.30. Then the judgment process is: ; ; Since the residence duration exceeds the limit and the write repetition ratio is lower than the threshold, the system will determine that the field is to be "merged". This judgment basis can help decide whether to merge the fields or directly dump them, ensuring more efficient and flexible data management. Finally, based on these decisions, a foreign trade data field dump configuration table is generated, recording the dump type (merge or direct dump) of each field and the relevant archive path information.

[0033] Table 3: Foreign trade data field dump configuration table: ; As shown in Table 3, the table records the residence duration, write repetition ratio of the field and the corresponding dump type.

[0034] Please refer to Figure 6 , the steps of S5 are: S511: Based on the foreign trade data field dump configuration table, write to the corresponding structured archive partition in sequence, record the start position and write time of each group of foreign trade data in the target partition, and obtain the write time and position record of each group of data; Based on the foreign trade data field transfer and storage configuration table, start writing to the target structured archival partition first. The writing process for each group of data first needs to identify the start position and end position within the target partition. By calculating the starting position of the current data group, insert the data at this position and mark the current writing time as a timestamp. Assume the target partition size is 10MB and the written data group contains 5MB of data. According to the remaining space and data size in the current partition, the writing process will start from the free starting position of the partition. For example, if the current timestamp is "2025-04-07 10:00:00", the writing time of this data group is this timestamp, and the target partition position will be updated accordingly to the next free position. The next group of data will start writing from the new position. Each time writing occurs, the specific position of the data in the target partition and the writing time will be recorded in the foreign trade data field transfer and storage configuration table. Through such operations, the structured archival of data is achieved, generating a record of the writing time and position. For example, if the starting position of the written data group is "1024MB" and the writing time is "2025-04-07 10:00:00", the record will show as "Data position: 1024MB, Writing time: 2025-04-07 10:00:00". Finally, a record of the writing time and position is generated, ensuring the accurate storage position and time of each group of foreign trade data in the target partition, ensuring that the data is traceable and queryable.

[0035] S512: Based on the foreign trade data field transfer and storage configuration table, structurally bind the field attribution path, field content, and field unique traceability ID code corresponding to each group of foreign trade data to obtain the structured binding result of field attribution and traceability ID; During the writing process of each group of foreign trade data, not only its position and time need to be recorded, but also the data fields need to be structurally bound. The field attribution path refers to the relationship between each field in the data group and its corresponding structural path in a file or database. For example, a data field may be in a column of a table or in an attribute of a JSON object. The field content refers to the actual data of these fields, and the field unique traceability ID code refers to the unique identifier generated for each field. The identifier ensures the immutability of the data. Assume a data group contains a "Goods Number" field with the field content "12345", the attribution path "OrderDetails / Item / ItemCode", and the field unique traceability ID code can be "ID12345". When the data is written to the target structured archival partition, this information will be recorded simultaneously. The field attribution path will ensure the position and structure of the field in the database, while the field content will ensure the written data value. The field unique traceability ID code provides a unique identifier for the data, facilitating subsequent data traceability and verification. The final result is the structured binding result of field attribution and traceability ID, which can ensure the integrity and traceability of the data fields.

[0036] S513: Combine the write time, location record, field attribution, and traceability ID structured binding result, and perform structured archiving storage for each field to generate a cross-border e-commerce structured archiving storage data unit; Based on the data records and structure binding information obtained above, further archive the data group into a structured storage system. At this time, first, it is necessary to determine the storage location of each data unit. Based on the write time and location record, determine the attribution partition of the data unit to ensure that the data is stored in an orderly and structured manner. According to the attribution path and content of each field, then bind the fields in the data group with their unique traceability ID codes to ensure that the data values of each field remain consistent and traceable throughout the archiving process. In this way, the finally generated cross-border e-commerce structured archiving storage data unit can meet the requirements of efficient storage and fast query, while ensuring the integrity, accuracy, and traceability of the data. For example, for the "goods number" field in a certain data unit, its attribution path is "OrderDetails / Item / ItemCode", the field content is "12345", and the unique traceability ID code is "ID12345". This field will combine this information and be saved as a structured data unit during storage. When other data is queried, the specific value of this field and the corresponding attribution path can be quickly located through this unique traceability ID code.

[0037] A foreign trade data storage system for cross-border e-commerce, comprising: The data synchronization and verification module obtains the customs clearance and settlement data packets, detects the time field length and character set, performs type comparison in combination with the standard timestamp structure, calculates the customs clearance and settlement time interval, determines the access order priority according to the matching tolerance value, and generates a cross-border data warehousing order marking group; The field structure rearrangement module extracts the field name and serial number to form a field main table according to the main order field in the cross-border data warehousing order marking group, reads the secondary order field and judges it according to the difference in the serial numbers of the main table fields, and generates an asynchronous field structure positioning list; The currency archiving mapping module extracts the settlement currency field based on the asynchronous field structure positioning list, matches it with the preset stable level mapping table, classifies the currency archiving logic segment, and generates a cross-currency field archiving path set; The field transfer configuration module calculates the field residence duration and repetition ratio based on the cross-currency field archiving path set, compares the residence threshold and uniqueness ratio and determines the transfer method, and generates a foreign trade data field transfer configuration table; The archiving storage management module writes to the archiving partition according to the foreign trade data field transfer configuration table, records the starting position and write time of the data, binds the field path and the unique traceability ID, and obtains the cross-border e-commerce structured archiving storage data unit.

[0038] The above are only the preferred embodiments of the present invention, and do not limit the present invention in other forms. Any person skilled in the art may use the technical content disclosed above to make changes or modifications into equivalent embodiments with equivalent changes and apply them to other fields. However, as long as it does not depart from the technical solution content of the present invention, any simple modification, equivalent change and modification made to the above embodiments based on the technical essence of the present invention still belong to the protection scope of the technical solution of the present invention.

Claims

1. A foreign trade data storage method for cross-border e-commerce, characterized in that It includes the following steps: S1: Obtain the customs clearance data packet and settlement data packet of the cross-border e-commerce platform, read the customs clearance time field and settlement time field, detect the consistency of the field character length and character set type, calculate the interval second difference and judge the access primary and secondary order, and generate a cross-border data storage order marking group; S2: According to the primary order data and secondary order data fields of the cross-border data storage order marking group, compare the difference between the secondary order field and the primary field serial number, reorder the secondary field, and generate an asynchronous field structure positioning list; S3: Based on the settlement currency field of the asynchronous field structure positioning list, match it with the preset stable level mapping table, classify different currency filing logic segments and construct a combined filing path, and generate a cross-currency field filing path set; S4: Based on the cross-currency field filing path set, calculate the field residence duration and field write repetition ratio, compare them with the field residence threshold and uniqueness ratio threshold to determine the transfer storage method, and generate a foreign trade data field transfer storage configuration table; S5: According to the foreign trade data field transfer storage configuration table, group the fields and write them into each currency level partition, establish a field traceability mapping, and generate a cross-border e-commerce structured filing storage data unit.

2. The foreign trade data storage method for cross-border e-commerce according to claim 1, wherein The cross-border data storage order marking group includes primary order data, secondary order data, access order priority, time difference tolerance interval, field character length, character set type, standard timestamp structure, matching degree, customs clearance time field, settlement time field. The asynchronous field structure positioning list includes field name, field serial number. The asynchronous field structure positioning list includes field serial number position difference, field difference range, original position information. The cross-currency field filing path set includes filing segment, currency filing logic segment, filing path, attributed field group, stable level mapping table. The foreign trade data field transfer storage configuration table includes residence start time, residence duration, field write frequency, field value repetition times, field write repetition ratio, residence threshold, uniqueness ratio threshold, transfer storage method. The cross-border e-commerce structured filing storage data unit includes structured filing partition, field attribution path, field content, field unique traceability ID code.

3. The foreign trade data storage method for cross-border e-commerce according to claim 1, characterized in that The specific steps for obtaining the cross-border data storage order marking group are as follows: S111: Obtain and read the customs clearance time field and settlement time field in the customs clearance data packet and settlement data packet, respectively extract the character length and character set type of the customs clearance time and settlement time, detect the character set consistency and length matching degree between the two, and obtain the field matching degree value of the customs clearance time and settlement time; S112: Based on the field matching degree value of the customs clearance time and settlement time, combine the standard timestamp structure, compare the field types, and judge whether it is homologous asynchronous data, calculate the second difference between the customs clearance time and the settlement time, and set the tolerance interval according to the calculation result to generate a matching degree judgment result; S113: According to the matching degree judgment result, calculate the access order priority of the two, sort the data based on the matching tolerance value, and mark the data as primary order data and secondary order data to generate a cross-border data storage order marking group.

4. The foreign trade data storage method for cross-border e-commerce according to claim 1, wherein The specific steps for obtaining the asynchronous field structure positioning list are as follows: S211: Based on the main sequence data field in the cross-border data storage order marking group, extract the field name and field number. By performing data structured storage on the field number, establish a corresponding mapping relationship between the field number and the field name. At the same time, convert the field number into a standardized sequence structure to generate a field number mapping matrix; S212: According to the field number mapping matrix, read the secondary sequence data field, compare its field number and calculate the field position difference with the main sequence structure, determine whether the difference falls within the specified difference interval range, extract the qualified field numbers as the intermediate position fields, and generate a field difference interval set; S213: Based on the field difference interval set, reorder the secondary field sequence according to the field position difference range. At the same time, record the original numbers of the fields in the main and secondary structures, calculate and compare the sequence differences, difference distributions, and difference directions before and after sorting, using the formula: ; Calculate the difference value of the asynchronous field structure , relocate the standard position of the secondary field in the asynchronous structure according to the difference value, and obtain the asynchronous field structure positioning list, where represents the serial number of the field in the main structure, represents the serial number of the field in the secondary structure, represents the relative difference position of the field in the main structure, represents the relative difference position of the field in the secondary structure, indicates the squared difference of the position number of the field in the original structure, represents the total number of fields.

5. The foreign trade data storage method for cross-border e-commerce according to claim 1, characterized in that, The steps for obtaining the cross-currency field filing path set are specifically as follows: S311: Based on the settlement currency field extracted from the asynchronous field structure positioning list, call the currency level field value in the preset stable level mapping table, match the two field values, identify the currencies with different field values and extract the corresponding level difference value intervals, and classify the fields according to the currency stable level intervals to obtain a currency level difference interval set; S312: According to the currency level difference interval set, classify the settlement currency fields into each filing logic segment according to the level difference, obtain the level values and field storage timestamps corresponding to each currency field within the logic segment, and construct a combined filing path for the fields under the same filing logic segment, using the formula: ; Calculate the archive path construction value , sort the archive path and determine the field order within the logical segment, register the path attribution in combination with the field grouping information, and establish a cross-currency field archive path set, where represents the currency level value of the th field represents the corresponding matching level value of the th field represents the field storage timestamp of the th field represents the maximum value in the field storage timestamp represents the total number of fields under the current logical segment; S313: According to the ownership field group information in the cross-currency field filing path set, record the numbers of the field paths within the ownership field group and perform set classification identification to form a structural organization of the filing fields, and extract the complete path field value segments from them to generate a filing path field value segment set.

6. The foreign trade data storage method for cross-border e-commerce according to claim 1, characterized in that The steps for obtaining the foreign trade data field transfer and storage configuration table are specifically as follows: S411: Based on the cross-currency field filing path set, collect the residence start time and the current time of the fields in each filing segment, calculate the residence duration of the fields to obtain residence duration data; S412: Based on the cross-currency field filing path set, read the write frequency and the field value repetition times of each field, calculate the repetition ratio of the field writes to obtain field write repetition ratio data; S413: Compare the residence duration data with the residence duration threshold. If the residence duration exceeds the limit and the field write repetition ratio data is lower than the uniqueness ratio threshold, then determine that the transfer and storage method is merging, otherwise it is direct transfer, using the formula: ; Obtain the dump determination value of the field , and obtain the foreign trade data field dump configuration table according to the determination value, where represents the residence duration value of the field, is the residence duration threshold, represents the write repetition ratio value of the field, is the uniqueness ratio threshold.

7. The foreign trade data storage method for cross-border e-commerce according to claim 1, characterized in that The steps for obtaining the cross-border e-commerce structured filing and storage data unit are specifically as follows: S511: Based on the foreign trade data field transfer and storage configuration table, write to the corresponding structured filing partition in sequence, record the start position and write time of each group of foreign trade data in the target partition to obtain the write time and position record of each group of data; S512: Based on the foreign trade data field transfer and storage configuration table, structurally bind the field attribution path, field content, and field unique traceability ID code corresponding to each group of foreign trade data to obtain the structural binding result of field attribution and traceability ID; S513: Combine the write time and location record with the structural binding result of field attribution and traceability ID, and perform structured archival storage for each field to generate a cross-border e-commerce structured archival storage data unit.

8. A foreign trade data storage system for cross-border e-commerce, characterized in that, The system is used to implement the foreign trade data storage method for cross-border e-commerce described in any one of claims 1-7, including: The data synchronization verification module obtains the customs clearance and settlement data packets, detects the time field length and character set, performs type comparison in combination with the standard timestamp structure, calculates the customs clearance and settlement time interval, determines the access order priority according to the matching tolerance value, and generates a cross-border data storage order marker group; The field structure rearrangement module extracts the field name and serial number to form a field main table according to the main order field in the cross-border data storage order marker group, reads the secondary order field and judges it based on the difference between the serial numbers of the main table fields, and generates an asynchronous field structure positioning list; The currency archival mapping module extracts the settlement currency field based on the asynchronous field structure positioning list, matches it with the preset stable level mapping table, classifies the currency archival logic segment, and generates a cross-currency field archival path set; The field transfer and storage configuration module calculates the field residence duration and repetition ratio based on the cross-currency field archival path set, compares the residence threshold and uniqueness ratio, and determines the transfer and storage method to generate a foreign trade data field transfer and storage configuration table; The archival storage management module writes to the archival partition according to the foreign trade data field transfer and storage configuration table, records the starting position and write time of the data, binds the field path and the unique traceability ID, and obtains a cross-border e-commerce structured archival storage data unit.

Citation Information

Cited By

  • Financial transaction historical data storage optimization method

    CN121365043A

  • Data processing method and device, computer equipment and storage medium

    CN121501805A

  • Mobile application big data management method and system based on machine learning

    CN121579561A

  • Power distribution network cost file multi-table automatic analysis and structured storage method and system

    CN121636515A

  • Intelligent big data resource service method and system oriented to cross-domain collaboration

    CN121724562A