Cross-border e-commerce foreign exchange settlement declaration processing method, electronic device and computer-readable medium

Through the data collection mechanism of the distributed framework and task scheduling framework, combined with hot and cold separation storage and data cleaning, the difficulties in collecting and storing transaction information in cross-border e-commerce foreign exchange settlement declarations are solved, and efficient foreign exchange settlement declaration management and data conversion are achieved.

CN120430788BActive Publication Date: 2025-09-19HANGZHOU PINGPONG INTELLIGENT TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510947252.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-10
Publication Date
2025-09-19
Estimated Expiration
2045-07-10

AI Technical Summary

Technical Problem

There are problems in cross-border e-commerce foreign exchange settlement declarations, such as difficulty in collecting and storing transaction information, difficulty in effective management and control, and complex and time-sensitive conversion of declaration data, which affect the efficiency of foreign exchange settlement declarations.

Method used

It adopts a data collection mechanism based on a distributed framework and task scheduling framework. By configuring multiple collection task consumption queues and consumption threads, it performs data cleaning and stores it according to the store's unique identifier and order time, realizes hot and cold separation storage, calculates the amount that can be withdrawn, and sends the declaration data to the downstream declaration agency.

Benefits of technology

It effectively reduces the difficulty of data collection and storage, improves the security and efficiency of foreign exchange settlement declaration, simplifies the data conversion process, and improves data conversion efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120430788B_ABST
    Figure CN120430788B_ABST
Patent Text Reader

Abstract

The present application discloses a cross-border e-commerce foreign exchange settlement declaration processing method, electronic device, and computer-readable medium. According to the store type of the e-commerce platform, multiple collection task consumption queues are configured and a consumption thread is allocated to each of the consumption queues; the initial order data collected by the consumption thread when executing the collection task is cleansed, and the cleaned order data is stored according to the store unique identifier and order time; based on the stored cleaned order data and preset label classification rules, the cashable amount is calculated for the source store of the initial order data; based on the cashable amount, the declaration data is sent to the downstream declaration agency to convert the cashable amount into foreign exchange and then transfer it to the domestic account of the source store. This reduces the difficulty of data collection and storage, thereby improving the efficiency of data collection and storage, improving the security and efficiency of foreign exchange settlement declaration management and control, simplifying the data conversion process, and improving data conversion efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of cross-border foreign exchange settlement declaration, and specifically to a cross-border e-commerce foreign exchange settlement declaration processing method, electronic equipment and computer-readable medium. Background Art

[0002] In cross-border e-commerce foreign exchange settlement declaration scenarios, payment institutions should establish a transaction information collection system. Based on the principles of authenticity, traceability, and non-tamperability, they should collect transaction information from major e-commerce platforms to ensure that the source of transaction information is objective, reliable, and legal. In principle, transaction information should include necessary information such as the name and type of goods or services, quantity, transaction currency, amount, transaction parties and country, and order time.

[0003] However, the current cross-border e-commerce foreign exchange settlement declaration business generally has many serious drawbacks, such as difficulties in collecting and storing transaction information, difficulty in effectively controlling foreign exchange settlement, complex and time-consuming conversion of declaration data, which seriously affects the efficiency of foreign exchange settlement declaration. Summary of the Invention

[0004] This application aims to solve one of the technical problems in the related art to a certain extent. To this end, this application provides a cross-border e-commerce foreign exchange settlement declaration processing method, electronic device and computer-readable medium.

[0005] As a first aspect of the present application, a method for processing cross-border e-commerce foreign exchange settlement declaration is provided, wherein the method comprises:

[0006] According to the store type of the e-commerce platform, multiple collection task consumption queues are configured and consumption threads are allocated to each consumption queue;

[0007] Cleaning the initial order data collected by the consumer thread when executing the collection task, and storing the cleaned order data according to the store unique identifier and order time;

[0008] Calculate the cashable amount for the source store of the initial order data based on the stored cleaned order data and preset label classification rules;

[0009] Based on the withdrawable amount, the declaration data is sent to the downstream reporting agency to convert the withdrawable amount into RMB and then transfer it to the domestic account of the source store.

[0010] Optionally, storing the cleaned order data according to the store unique identifier and order time includes:

[0011] The cleaned order data with the same unique store identifier are stored in a hot partition storage medium and a cold partition storage medium of the same shard according to the order time; wherein the hot partition storage medium is used to store the cleaned order data of no more than a first preset number of months, and the cold partition storage medium is used to store the cleaned order data of no more than a second preset number of months;

[0012] In the case that the hot partition storage medium stores more than a first preset number of months of cleaning order data, the cleaning order data of the earliest month stored in the hot partition storage medium is migrated to the cold partition storage medium.

[0013] Optionally, the step of calculating the withdrawable amount for the source store of the initial order data based on the stored cleaned order data and preset label classification rules includes:

[0014] According to the cleaned order data stored in the hot partition storage medium and the preset label classification rules, the cashable amount is calculated for the source store of the initial order data; wherein, the hot partition storage medium includes a solid state drive SSD.

[0015] Optionally, the step of calculating the withdrawable amount for the source store of the initial order data based on the stored cleaned order data and preset label classification rules includes:

[0016] Calculate the declaration upper limit amount for the source store of the initial order data based on the stored cleaned order data and the preset label classification rules;

[0017] When a withdrawal request is received from the source store, the withdrawable amount is calculated for the source store based on the declared upper limit amount and the balance of the overseas account of the source store.

[0018] Optionally, the step of calculating the declaration upper limit amount for the source store of the initial order data based on the stored cleaned order data and preset label classification rules includes:

[0019] Identify the core data domains that match the core data model from the stored cleansed order data;

[0020] Tagging the stored cleaned order data according to the core data domain;

[0021] Classify the stored cleaned order data according to the preset label classification rules;

[0022] Searching for cleaned order data belonging to the source store and belonging to the target category from the stored cleaned order data;

[0023] Based on the queried cleaned order data, the declaration upper limit amount is calculated for the source store.

[0024] Optionally, the performing data cleaning on the initial order data collected by the consumer thread when executing the collection task includes:

[0025] Obtaining standardized data cleaning rules and a data cleaning template corresponding to the e-commerce platform from which the initial order data originates; wherein the data cleaning template includes a mapping relationship between e-commerce platform data fields and standardized data fields;

[0026] Mapping the initial order data into standardized order data according to the data cleaning template;

[0027] The order standardized data is cleaned according to the standardized data cleaning rules to obtain cleaned order data.

[0028] Optionally, sending declaration data to a downstream declaration agency based on the withdrawable amount includes:

[0029] Obtaining a declaration data mapping relationship corresponding to the downstream declaration agency; wherein the declaration data mapping relationship includes a mapping relationship between a standardized data field and a declaration data field of the downstream declaration agency;

[0030] According to the mapping relationship between the declaration data and the withdrawable amount, encapsulate and obtain the declaration data that meets the requirements of the downstream declaration agency;

[0031] Sending the declaration data to the downstream declaration agency.

[0032] Optionally, in the collection task consumption queue, a store is used as a seed collection task, and the priority of the seed collection task is determined by the earliest time when the order has been collected. The priority of the queue head element is higher than the priority of the queue tail element.

[0033] As a second aspect of the present application, an electronic device is provided, wherein the electronic device includes:

[0034] one or more processors;

[0035] A memory having one or more computer programs stored thereon, wherein when the one or more computer programs are executed by the one or more processors, the one or more processors implement the cross-border e-commerce foreign exchange settlement declaration processing method according to the first aspect of the present application.

[0036] As a third aspect of the present application, a computer-readable medium is provided, on which a computer program is stored, wherein when the computer program is executed by a processor, the cross-border e-commerce foreign exchange settlement declaration processing method according to the first aspect of the present application is implemented.

[0037] The cross-border e-commerce settlement declaration processing method provided in this application is realized by configuring multiple collection task consumption queues according to the store type of each e-commerce platform and allocating consumption threads to each consumption queue, realizing parallel collection of multi-source data based on a distributed framework and a task scheduling framework, and performing data cleaning on the initial order data collected by the consumer thread when executing the collection task and then storing the cleaned order data according to the store unique identifier and order time, realizing standardization of order data and hot and cold separation storage, and finally effectively reducing the difficulty of data collection and storage, thereby improving data collection and storage efficiency. By calculating the cashable amount for the source store of the initial order data based on the stored cleaned order data and the preset label classification rules, it is realized that sufficient data support is provided for the settlement declaration business of the store based on complex transaction information, and finally improving the security and efficiency of settlement declaration management. By sending the declaration data to the downstream declaration agency in a targeted manner according to the cashable amount to settle the cashable amount and then transfer it to the domestic account of the source store, it is realized that the data conversion between the standardized data and the declaration data of the downstream declaration agency is realized, and finally the data conversion process is simplified and the data conversion efficiency is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] The present application will be further described below with reference to the accompanying drawings:

[0039] Figure 1 This is a flowchart of an implementation method of the cross-border e-commerce foreign exchange settlement declaration processing method provided in the embodiment of the present application;

[0040] Figure 2 This is a flowchart of another implementation method of the cross-border e-commerce foreign exchange settlement declaration processing method provided in the embodiment of the present application;

[0041] Figure 3 This is a flowchart of another embodiment of the cross-border e-commerce foreign exchange settlement declaration processing method provided in the embodiment of the present application;

[0042] Figure 4 This is a flowchart of another embodiment of the cross-border e-commerce foreign exchange settlement declaration processing method provided in the embodiment of the present application;

[0043] Figure 5 This is a flowchart of another implementation method of the cross-border e-commerce foreign exchange settlement declaration processing method provided in the embodiment of the present application;

[0044] Figure 6This is a flowchart of another embodiment of the cross-border e-commerce foreign exchange settlement declaration processing method provided in the embodiment of the present application;

[0045] Figure 7 This is a flowchart of another embodiment of the cross-border e-commerce foreign exchange settlement declaration processing method provided in the embodiment of the present application;

[0046] Figure 8 This is a module diagram of an implementation of a cross-border e-commerce foreign exchange settlement declaration processing system provided in an embodiment of the present application;

[0047] Figure 9 This is a schematic diagram of an implementation method for processing cross-border e-commerce foreign exchange settlement declarations for collected multi-source heterogeneous data provided by an embodiment of the present application;

[0048] Figure 10 This is a module diagram of an implementation of an electronic device provided in an embodiment of the present application;

[0049] Figure 11 It is a schematic diagram of the computer-readable medium provided in an embodiment of the present application.

[0050] Description of Reference Numerals

[0051] 101: Processor 102: Memory

[0052] 103: I / O interface 104: bus DETAILED DESCRIPTION

[0053] The embodiments of the present application are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described in the embodiments are intended to be used to explain the present application and are not to be construed as limiting the present application.

[0054] References in this specification to "one embodiment," "an example," or "an example" mean that a particular feature, structure, or characteristic described in connection with the embodiment itself can be included in at least one embodiment disclosed herein. The appearances of the phrase "in one embodiment" in various places in the specification are not necessarily all referring to the same embodiment.

[0055] In cross-border e-commerce foreign exchange settlement declaration scenarios, payment institutions should establish a transaction information collection system, collecting transaction information in accordance with the principles of authenticity, traceability, and non-tamperability, ensuring that the source of transaction information is objective, reliable, and legal. In principle, transaction information should include necessary information such as the name and type of goods or services, quantity, transaction currency, amount, transaction parties and country, and order time.

[0056] Transaction information originates from various e-commerce platforms and is characterized by multiple sources across multiple locations, heterogeneous data, and a massive volume. This presents significant challenges to the collection and storage of transaction information, including source data acquisition, source data cleansing, effective data screening and filtering, data analysis, and standardized processing, making transaction information extremely complex. Furthermore, in the context of e-commerce customers' foreign exchange settlement declarations, effective foreign exchange settlement control over customers must be established based on the core domain data within internal standardized transaction information, ensuring that each transaction has sufficient transaction information for declaration. However, complex transaction information makes effective foreign exchange settlement declaration control difficult to implement. Finally, when making foreign exchange settlement declarations to downstream third-party payment institutions and banks, different payment institutions and banks may have different declaration data systems. The varying capital transaction chains dictate that internal standardized transaction information must be converted into the declaration data required by downstream platforms. This complex and time-consuming data conversion process is complex and often inefficient.

[0057] In view of this discovery, the applicant of this application proposed to establish a data collection mechanism based on a distributed framework and task scheduling framework, then introduce a data cleaning mechanism, and finally store data based on the store's unique identifier and order time, which can effectively reduce the difficulty of data collection and storage, thereby improving data collection and storage efficiency; calculate the cashable amount for the store based on the stored data and the preset label classification rules, which can ensure that each foreign exchange settlement declaration business has sufficient transaction information support; finally, send the declaration data to the downstream reporting agency in a targeted manner according to the reflectable amount, which can simplify the data conversion process and improve data conversion efficiency.

[0058] As a first aspect of the embodiment of the present application, a cross-border e-commerce foreign exchange settlement declaration processing method is provided, such as Figure 1 As shown, the method includes:

[0059] Step S110: configuring multiple collection task consumption queues according to the store type of the e-commerce platform and allocating consumption threads to each of the consumption queues;

[0060] Step S120: Cleaning the initial order data collected by the consumer thread when executing the collection task, and storing the cleaned order data according to the store unique identifier and order time;

[0061] Step S130, calculating the cashable amount for the source store of the initial order data based on the stored cleaned order data and the preset tag classification rules;

[0062] Step S140: Sending declaration data to a downstream declaration agency based on the withdrawable amount, so as to convert the withdrawable amount into RMB and then transfer it to the domestic account of the source store.

[0063] The cross-border e-commerce foreign exchange settlement declaration processing method provided in the embodiments of this application can be applied to third-party platforms that are independent of the e-commerce platform and downstream reporting institutions. Typically, the order amount will be transferred to an overseas account. When the store applies for a cash withdrawal from the third-party platform, the third-party platform will make a foreign exchange settlement declaration to the downstream reporting institution, and the cashable amount will be converted into foreign exchange and then transferred to the store's domestic account.

[0064] Before collecting initial order data from each e-commerce platform, it is necessary to investigate the data interface types of each major e-commerce platform and obtain data access permissions. This will not be discussed here.

[0065] Among them, the embodiments of the present application do not impose any special restrictions on how to divide the store types of the e-commerce platform and how to allocate consumption threads to the consumption queues according to the store types, as long as resource isolation and priority control can be achieved. For example, the store types of the e-commerce platform can be divided into large stores (stores with relatively large order volumes), new stores (stores with relatively recent opening times), and ordinary stores (neither large stores nor new stores). The consumption queue that stores the collection tasks of large stores is allocated with the most consumption threads, and the consumption queue that stores the collection tasks of ordinary stores is allocated with the least consumption threads. In this way, resource isolation and queue-level priority control can be achieved.

[0066] To enable parallel data collection from multiple sources based on a distributed framework and task scheduling framework, parameters such as the e-commerce platform name, consumer queue name, consumer thread parameters for each consumer queue, and collection time step can be pre-configured. Horizontal expansion can be triggered through hot updates to meet the needs of massive data collection. Configuration parameters can be saved to the distributed coordination service (ZooKeeper, ZK) using the lightweight, readable data serialization format (YAML). Online modification is provided through the configuration platform, which pushes the updated configuration parameters to ZK for overwriting whenever an update occurs. When producers and consumers detect configuration parameter updates on ZK, they reparse the parameters: 1. If a new consumer queue is added, a new thread pool is created to asynchronously consume the new queue, enabling queue expansion. 2. If a consumer queue's consumer thread configuration is modified, the old thread pool is destroyed and a new thread pool is generated based on the new parameters, enabling concurrency adjustment. 3. Priority control is achieved by allocating a larger thread pool to high-priority consumer queues.

[0067] The cross-border e-commerce settlement declaration processing method provided in the embodiment of the present application is realized by configuring multiple collection task consumption queues according to the store type of each e-commerce platform and allocating consumption threads to each consumption queue, realizing parallel collection of multi-source data based on a distributed framework and a task scheduling framework, and performing data cleaning on the initial order data collected by the consumption thread to perform the collection task and then storing the cleaned order data according to the store unique identifier and order time, realizing standardization of order data and hot and cold separation storage, and finally effectively reducing the difficulty of data collection and storage, thereby improving data collection and storage efficiency. By calculating the cashable amount for the source store of the initial order data based on the stored cleaned order data and the preset label classification rules, it is realized that sufficient data support is provided for the settlement declaration business of the store based on complex transaction information, and finally improving the security and efficiency of settlement declaration management. By sending the declaration data to the downstream declaration agency in a targeted manner according to the cashable amount to settle the cashable amount and then transfer it to the domestic account of the source store, it is realized that the data conversion between the standardized data and the declaration data of the downstream declaration agency is realized, and finally the data conversion process is simplified and the data conversion efficiency is improved.

[0068] In some embodiments, as Figure 2 As shown, the storing of the cleaned order data according to the store unique identifier and the order time (ie, involved in step S120) may include:

[0069] Step S210: The post-cleaning order data with the same unique store identifier is stored in a hot partition storage medium and a cold partition storage medium of the same shard according to the order time; wherein the hot partition storage medium is used to store post-cleaning order data of no more than a first preset number of months, and the cold partition storage medium is used to store post-cleaning order data of no more than a second preset number of months;

[0070] Step S220 , when the hot partition storage medium stores more than a first preset number of months of cleaning order data, the cleaning order data of the earliest month stored in the hot partition storage medium is migrated to the cold partition storage medium.

[0071] In this embodiment, cleaned order data is distributed across different shards based on the hash result of the distribution key sellerid value (sellerid is the unique store identifier on the e-commerce platform). Furthermore, cleaned order data with the same sellerid value is stored in the same shard. This ensures that subsequent calculations for the same sellerid value can be completed within the same shard, reducing data shuffling and thereby improving query performance and lowering latency. Crucially, cleaned order data is separated into hot and cold storage based on order time. Hot partitioned storage media handles high-frequency access, while cold partitioned storage media reduces storage costs.

[0072] The embodiments of the present application do not specifically limit the hot partition storage medium and the cold partition storage medium; they can be high-performance storage medium and low-cost storage medium, respectively. For example, the hot partition storage medium and the cold partition storage medium can be solid-state drives (SSDs) and object storage services (OSSs), respectively.

[0073] The embodiment of the present application does not specifically limit the first preset number and the second preset number, and can be set based on factors such as actual storage resources, average exchange settlement period, etc. For example, the configuration can be based on the following configuration statement:

[0074] PARTITION BY VALUE(`DATE_FORMAT(orderdate,'%Y%m')`) / / Partition by the year and month (YYYYMM) of the order date

[0075] LIFECYCLE 3650 / / Set the data life cycle to 120 months, and automatically clean up when it expires

[0076] STORAGE_POLICY='MIXED' / / Enable mixed storage policy (separate storage of hot and cold data)

[0077] HOT_PARTITION_COUNT=25 / / Specify the most recent 25 partitions as hot partitions, which are preferentially stored on high-performance media.

[0078] The embodiment of the present application separates the cleaned order data into hot and cold storage, and can directly and quickly access the data of the hot partition storage medium for calculation when declaring foreign exchange settlement, and quickly calculate the amount that can be withdrawn, thereby improving the efficiency of foreign exchange settlement declaration. Figure 3 As shown, the calculation of the withdrawable amount for the source store of the initial order data (i.e., involved in step S130) based on the stored cleaned order data and the preset label classification rules may include:

[0079] Step S310, calculating the withdrawable amount for the source store of the initial order data based on the cleaned order data stored in the hot partition storage medium and the preset label classification rules; wherein the hot partition storage medium includes a solid state drive SSD.

[0080] In some embodiments, as Figure 4 As shown, the calculation of the withdrawable amount for the source store of the initial order data (i.e., involved in step S130) based on the stored cleaned order data and the preset label classification rules may include:

[0081] Step S410, calculating the declaration upper limit amount for the source store of the initial order data based on the stored cleaned order data and the preset label classification rules;

[0082] Step S420: Upon receiving a cash withdrawal request from the source store, the cash withdrawal amount is calculated for the source store based on the declared upper limit amount and the overseas account balance of the source store.

[0083] It's understood that the declared maximum amount refers to the remaining available foreign exchange settlement amount at the source store. Let's denote the source store's overseas account balance, declared maximum amount, and available withdrawal amount as a, b, and c, respectively. The available withdrawal amount can be calculated using the following formula: c = min(a, b). In other words, the available withdrawal amount is the minimum of the declared maximum amount and the overseas account balance.

[0084] In some embodiments, as Figure 5 As shown, the calculation of the declaration upper limit amount for the source store of the initial order data (i.e., involved in step S410) based on the stored cleaned order data and the preset label classification rules may include:

[0085] Step S510 , identifying core data fields that match the core data model from the stored cleaned order data;

[0086] Step S520 , labeling the stored cleaned order data according to the core data domain;

[0087] Step S530, classifying the stored cleaned order data according to a preset label classification rule;

[0088] Step S540 , searching the stored cleaned order data for cleaned order data belonging to the source store and belonging to the target category;

[0089] Step S550: Calculate the upper limit amount of declaration for the source store based on the queried cleaned order data.

[0090] In this embodiment, whenever new initial order data is collected, it can be cleaned, stored separately for hot and cold data, and tagged, triggering the calculation of the declaration limit amount. Therefore, it can be understood that steps S510-S530 only need to tag data that has not yet been tagged (i.e., the cleaned order data that has just been stored), while step S540 queries all data.

[0091] Among them, the embodiment of the present application does not make any specific limitations on the core data model. For example, the core data model may include transaction amount, currency, product information, order status, etc.

[0092] The present embodiment does not specifically limit tag types. For example, tag types may include: calculated amount, uncalculated amount, declared use, undeclared use, order status temporarily unavailable, abnormal order amount (less than or equal to 0), unsupported currency, and missing product details. Tag types are business-related, and accordingly, the target category, i.e., the declared use category, may include: "calculated amount" and "undeclared use." In addition to the target category, three other categories are also available: ① Calculated amount category: "uncalculated amount" and "undeclared use"; ② Uncalculated amount category: "calculated amount," "declared use," "order status temporarily unavailable," "abnormal order amount (less than or equal to 0)," "unsupported currency," or "missing product details"; and ③ Undeclarable use category: "uncalculated amount," "declared use," "order status temporarily unavailable," "abnormal order amount (less than or equal to 0)," "unsupported currency," or "missing product details."

[0093] The cleaned order data belonging to the source store and the target category are grouped and aggregated according to the order currency, and the upper limit of the declaration amount is calculated. For example, 、 、 The standard currency codes for US dollar, Japanese yen and RMB are defined as follows: , define each currency The corresponding order set is ,right The exchange rate is , the upper limit of declaration amount can be expressed as: Assume that the currency set 、 Order Collection 、 Order Collection 、 right exchange rate 、 right exchange rate , the upper limit of declaration amount can be calculated as follows: .

[0094] In some embodiments, as Figure 6 As shown, the data cleaning of the initial order data collected by the consumer thread when executing the collection task (ie, the step S120 involved) may include:

[0095] Step S610: Obtain standardized data cleaning rules and a data cleaning template corresponding to the e-commerce platform from which the initial order data originates; wherein the data cleaning template includes a mapping relationship between e-commerce platform data fields and standardized data fields;

[0096] Step S620: Mapping the initial order data into standardized order data according to the data cleaning template;

[0097] Step S630: Clean the standardized order data according to the standardized data cleaning rules to obtain cleaned order data.

[0098] The present embodiment converts initial order data into internal standardized order data by pre-acquiring data dictionaries from different e-commerce platforms and establishing mappings between e-commerce platform data fields and standardized data fields. Furthermore, by pre-establishing internal standardized data cleansing rules, dirty and invalid data can be eliminated.

[0099] Among them, the embodiments of the present application do not make specific limitations on dirty data and invalid data. For example, it may include data with empty order amounts, data in invalid order status (such as unpaid orders, refunded orders, canceled orders), etc.

[0100] Accordingly, the embodiment of the present application also pre-establishes a mapping relationship between the standardized data fields and the declaration data fields of the downstream declaration agency to achieve the packaging of declaration data that meets the requirements of the downstream declaration agency based on the amount of cash available. Figure 7 As shown, sending the declaration data to the downstream declaration agency based on the withdrawable amount (i.e., involved in step S140) may include:

[0101] Step S710: Acquire a declaration data mapping relationship corresponding to the downstream declaration institution; wherein the declaration data mapping relationship includes a mapping relationship between a standardized data field and a declaration data field of the downstream declaration institution;

[0102] Step S720: encapsulate and obtain the declaration data that meets the requirements of the downstream declaration agency based on the declaration data mapping relationship and the withdrawable amount;

[0103] Step S730: Send the declaration data to the downstream declaration agency.

[0104] The present embodiment does not specifically limit how to pre-establish the mapping relationship between the standardized data fields and the declaration data fields of the downstream declaration agencies. For example, the mapping relationship can be established by collecting the declaration data requirements of the downstream declaration agencies and analyzing and summarizing the common fields and different fields.

[0105] The present embodiment does not impose any specific restrictions on the data format of the mapping relationship between the standardized data fields and the declaration data fields of the downstream declaration agency. For example, to improve the speed and convenience of packaging, the mapping relationship can be composed into a JSON value and the storage key can be the downstream party code. The corresponding JSON value can be obtained based on the downstream party code and directly packaged.

[0106] Among them, the embodiment of the present application does not make specific restrictions on the requirements for downstream reporting agencies. Different downstream reporting agencies may have different requirements for file types and / or application programming interface (API) types.

[0107] The embodiments of this application do not specifically limit how to encapsulate and obtain declaration data that meets the requirements of downstream declaration agencies. For example, based on file type requirements, a universal data conversion file factory is established, and toolkits such as easy-excel and common-csv are used to implement a universal conversion channel for declaration data to Excel and CSV files. Based on API type requirements, the httpclient toolkit is used to implement a network channel for declaration data to the downstream API interface.

[0108] Among them, it is understandable that in addition to the amount that can be withdrawn, the declared data can usually also carry corresponding order data as supporting data for the amount that can be withdrawn, so it will not be elaborated here.

[0109] In some embodiments, in the collection task consumption queue, a store is used as a seed collection task, and the priority of the seed collection task is determined by the earliest time when the order has been collected. The priority of the queue head element is higher than the priority of the queue tail element.

[0110] In this embodiment of the application, each store is treated as an independent seed collection task. The earlier the currently collected orders are, the higher the priority of the seed collection task is, and the faster the initial order data of the corresponding store is collected. Through a fair polling algorithm based on a time window, a task queue, and a timestamp mechanism, data collection for all stores is ensured to maintain a relatively balanced frequency. This maximizes the timeliness of data collection while ensuring system stability.

[0111] like Figure 8 As shown, an example is given from the module dimension. The cross-border e-commerce foreign exchange settlement declaration processing system can include a data source module, a collection module, a distributed hot and cold storage module, a business calculation module and a downstream module. The data source module includes three e-commerce platforms A, B and C. The store types of each e-commerce platform include large stores, new stores and ordinary stores. The collection module is configured with a high priority queue, a medium priority queue and a low priority queue respectively, and consumer threads 1, 2 and 3 respectively consume the collection tasks in the three queues. The distributed hot and cold storage module stores the collected initial order data in the hot data area and the cold data area respectively. The business calculation module calculates the cashable amount for the store based on the data stored in the distributed hot and cold storage module and reports the data to the downstream module.

[0112] like Figure 9 As shown, let's take another example to illustrate this. The collected multi-source heterogeneous data is pushed to the Kafka platform. The Kafka data is consumed and the data cleaning rules of the corresponding e-commerce platform are loaded for data cleaning. After completing the standardized data processing, the data is stored in a distributed hot and cold separated database. Core data domain labels are loaded and standardized data processing is performed through label processing. Based on the transaction data that meets the reporting requirements, the declarable usage limit (i.e., the reporting limit amount) for the customer (i.e., store) dimension is aggregated and output. After a customer initiates a foreign exchange settlement transaction, the transaction rules match the customer with standardized data that meets the reporting requirements (including the cashable amount and corresponding order information). The data conversion templates of the corresponding institutions and banks are obtained and converted into reporting data for reporting.

[0113] As a second aspect of the embodiments of the present application, an electronic device is provided, wherein, Figure 10 As shown, the electronic device includes:

[0114] One or more processors 101;

[0115] The memory 102 stores one or more computer programs. When the one or more computer programs are executed by the one or more processors 101, the one or more processors 101 implement the cross-border e-commerce foreign exchange settlement declaration processing method provided in the first aspect of the embodiment of the present application.

[0116] The electronic device may further include one or more I / O interfaces 103 connected between the processor 101 and the memory 102 and configured to implement information exchange between the processor 101 and the memory 102 .

[0117] Among them, the processor 101 is a device with data processing capabilities, including but not limited to a central processing unit (CPU); the memory 102 is a device with data storage capabilities, including but not limited to random access memory (RAM, more specifically such as SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), and flash memory (FLASH); the I / O interface (read-write interface) is connected between the processor and the memory, and can realize information exchange between the processor and the memory, including but not limited to a data bus (Bus), etc.

[0118] In some embodiments, the processor 101 , the memory 102 , and the I / O interface 103 are connected to each other via a bus 104 , and further connected to other components of the computing device.

[0119] As a third aspect of the embodiment of this application, Figure 11 As shown, a computer-readable medium is provided, on which a computer program is stored, wherein when the computer program is executed by a processor, the cross-border e-commerce foreign exchange settlement declaration processing method provided in the first aspect of the embodiment of the present application is implemented.

[0120] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program. Accordingly, the computer program can be stored in a non-volatile computer-readable storage medium, and when the computer program is executed, it can implement the method of any of the above-mentioned embodiments. Among them, any reference to memory, storage, database or other media used in the embodiments provided in the embodiments of the present application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0121] The above are only specific embodiments of the present application, but the scope of protection of the present application is not limited thereto. Those skilled in the art should understand that the present application includes but is not limited to the contents described in the drawings and the above specific embodiments. Any modifications that do not deviate from the functional and structural principles of the present application are included within the scope of the claims.

Claims

1. A cross-border e-commerce foreign exchange settlement declaration processing method, characterized in that: The method comprises: According to the store type of the e-commerce platform, multiple collection task consumption queues are configured and consumption threads are allocated to each of the consumption queues; wherein the store types include large stores, new stores, and ordinary stores; and according to the store type of the e-commerce platform, the consumption threads are allocated to each of the consumption queues, including: allocating the most consumption threads to the consumption queue storing the collection tasks of large stores, and allocating the least consumption threads to the consumption queue storing the collection tasks of ordinary stores; Cleaning the initial order data collected by the consumer thread when executing the collection task, and storing the cleaned order data according to the store unique identifier and order time; Calculate the cashable amount for the source store of the initial order data based on the stored cleaned order data and preset label classification rules; Based on the withdrawable amount, the bank sends the declaration data to the downstream reporting institution, so that the withdrawable amount can be converted into RMB and then transferred to the domestic account of the source store; The step of calculating the withdrawable amount for the source store of the initial order data based on the stored cleaned order data and the preset label classification rules includes: Calculate the declaration upper limit amount for the source store of the initial order data based on the stored cleaned order data and the preset label classification rules; Upon receiving a withdrawal request from the source store, calculate the withdrawable amount for the source store based on the source store's declared upper limit amount and the balance of the overseas account; The calculation of the declaration upper limit amount for the source store of the initial order data based on the stored cleaned order data and the preset label classification rules includes: Identify the core data domains that match the core data model from the stored cleansed order data; Tagging the stored cleaned order data according to the core data domain; Classify the stored cleaned order data according to the preset label classification rules; Searching for cleaned order data belonging to the source store and belonging to the target category from the stored cleaned order data; Based on the queried cleaned order data, the declaration upper limit amount is calculated for the source store.

2. The method according to claim 1, characterized in that The storing of the cleaned order data according to the store unique identifier and order time includes: The cleaned order data with the same unique store identifier are stored in a hot partition storage medium and a cold partition storage medium of the same shard according to the order time; wherein the hot partition storage medium is used to store the cleaned order data of no more than a first preset number of months, and the cold partition storage medium is used to store the cleaned order data of no more than a second preset number of months; In the case that the hot partition storage medium stores more than a first preset number of months of cleaning order data, the cleaning order data of the earliest month stored in the hot partition storage medium is migrated to the cold partition storage medium.

3. The method according to claim 2, characterized in that The method of calculating the withdrawable amount for the source store of the initial order data based on the stored cleaned order data and the preset label classification rules includes: According to the cleaned order data stored in the hot partition storage medium and the preset label classification rules, the cashable amount is calculated for the source store of the initial order data; wherein, the hot partition storage medium includes a solid state drive SSD.

4. The method according to any one of claims 1 to 3, characterized in that The data cleaning of the initial order data collected by the consumer thread when executing the collection task includes: Obtaining standardized data cleaning rules and a data cleaning template corresponding to the e-commerce platform from which the initial order data originates; wherein the data cleaning template includes a mapping relationship between e-commerce platform data fields and standardized data fields; Mapping the initial order data into standardized order data according to the data cleaning template; The order standardized data is cleaned according to the standardized data cleaning rules to obtain cleaned order data.

5. The method according to claim 4, characterized in that The sending of declaration data to the downstream declaration agency based on the withdrawable amount includes: Obtaining a declaration data mapping relationship corresponding to the downstream declaration agency; wherein the declaration data mapping relationship includes a mapping relationship between a standardized data field and a declaration data field of the downstream declaration agency; According to the mapping relationship between the declaration data and the withdrawable amount, encapsulate and obtain the declaration data that meets the requirements of the downstream declaration agency; Sending the declaration data to the downstream declaration agency.

6. The method according to any one of claims 1 to 3, characterized in that In the collection task consumption queue, the store is used as the seed collection task. The priority of the seed collection task is determined by the earliest time when the order has been collected. The priority of the queue head element is higher than the priority of the queue tail element.

7. An electronic device, characterized in that: The electronic device comprises: one or more processors; A memory having one or more computer programs stored thereon, wherein when the one or more computer programs are executed by the one or more processors, the one or more processors implement the cross-border e-commerce foreign exchange settlement declaration processing method according to any one of claims 1 to 6.

8. A computer-readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the cross-border e-commerce foreign exchange settlement declaration processing method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Service message processing method and device, storage medium and electronic device

    CN116546055A

  • Mass data optimization method and device in e-commerce scene, equipment and readable medium

    CN117422489A

  • Cross-border e-commerce collection method, system and device and readable storage medium

    CN118379120A