Customs declaration data processing method, device and electronic equipment
By using data loading, distribution and declaration components for parallel processing in the customs declaration system, the problem of low efficiency in customs declaration data processing is solved and an efficient and stable data processing process is achieved.
Patent Information
- Application Number
- CN202010456661.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-05-26
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2040-05-26
AI Technical Summary
The customs declaration system's data processing of payment information is inefficient, resulting in long processing times and affecting the efficiency of cross-border e-commerce.
The customs declaration data is distributed to multiple processes for parallel processing through the data loading component. The data distribution component and the data declaration component are used to process each category of sub-payment data respectively, and the declaration data is sent through the text transfer protocol proxy component to achieve flexible data processing. sex and efficiency.
It improves the efficiency and stability of customs declaration data processing, ensures the parallelism and independence of data processing, avoids the failure of a single process to affect the processing of other processes, and simplifies the data processing process.
Smart Images

Figure CN113722386B
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and more specifically, to a method, device and electronic equipment for processing customs declaration data. Background Art
[0002] With the development of computer technology and network technology, cross-border e-commerce has developed rapidly, and users can purchase overseas goods through various e-commerce platforms. When users purchase overseas goods on e-commerce platforms, they need to submit payment information, product information, and logistics information to various electronic ports of China Customs to complete the declaration. After receiving the successful declaration receipt issued by the customs, the e-commerce platform can send the corresponding goods to the purchaser.
[0003] After users complete payment for overseas goods on e-commerce platforms, merchants need to process the payment information through the customs declaration system to obtain data that meets the customs declaration requirements, and then call the customs electronic port declaration interface to submit the declaration message. At present, when the customs declaration system processes payment information, it mixes all kinds of data from all electronic ports, which results in low data processing efficiency and a long time consumption. Summary of the invention
[0004] The present application provides a customs declaration data processing method, device and electronic equipment, which can solve the problems existing in the prior art.
[0005] The specific technical solutions provided by the embodiments of this application are as follows:
[0006] The present application provides a method for processing customs declaration data, the method comprising:
[0007] Obtain payment data corresponding to at least one customs electronic port in the customs declaration data through the data loading component, and distribute the payment data to at least two processes of the data loading component to obtain sub-payment data corresponding to each process;
[0008] The sub-payment data corresponding to each process is sent to the data reporting component through the data distribution component;
[0009] The data declaration component determines the declaration data corresponding to each customs electronic port based on the sub-payment data corresponding to each process.
[0010] In a possible implementation, the data loading component includes at least two processes, and distributing the payment data to the at least two processes of the data loading component includes:
[0011] Distributing the payment data corresponding to the first number of customs electronic ports in at least one customs electronic port corresponding to each data loading component to at least two processes of the data loading component;
[0012] The method further includes:
[0013] The payment data corresponding to each customs electronic port other than the first number of customs electronic ports are backed up through each data loading component.
[0014] In a possible implementation, for any data processing component, wherein the data processing component is a data loading component, a data distribution component, or a data reporting component, the data processing component includes at least two, and for any one of the at least two data processing components, the method further includes:
[0015] If any of the data processing components fails, the processing task corresponding to the any of the data processing components is switched to at least one data processing component other than the any of the data processing components.
[0016] In a possible implementation, the payment data corresponding to the first number of customs electronic ports is determined in the following manner:
[0017] Determining, by each of the at least two data loading components, a corresponding data processing time;
[0018] The payment data acquired within the respective corresponding data processing time range is used as the payment data corresponding to the respective first number of customs electronic ports.
[0019] In a possible implementation, the payment data is distributed to at least two processes of the data loading component, and the sub-payment data corresponding to each process is obtained, including:
[0020] Divide the payment data according to category information to obtain sub-payment data corresponding to each category;
[0021] The sub-payment data corresponding to each category is allocated to the process corresponding to each category, so as to obtain the sub-payment data corresponding to each process.
[0022] Category information includes any of the following:
[0023] First declaration data, failed declaration data, and customs non-response data.
[0024] In a possible implementation, the data distribution component or the data reporting component includes at least two components respectively, and the sub-payment data corresponding to each process is sent to the data reporting component through the data distribution component, including:
[0025] Obtain the health information corresponding to each data reporting component through each data distribution component;
[0026] The sub-payment data corresponding to each process is sent to the data reporting component whose health information meets the preset conditions.
[0027] In a possible implementation, the data declaration component determines the declaration data corresponding to each customs electronic port based on the sub-payment data corresponding to each process, including:
[0028] Obtain at least one customs identification information in each sub-payment data;
[0029] Allocate each sub-payment data to the process corresponding to each customs electronic port based on the customs identification information, and obtain the sub-payment data corresponding to each customs electronic port;
[0030] Based on the sub-payment data corresponding to each customs electronic port, the declaration data corresponding to each customs electronic port is determined.
[0031] In a possible implementation, based on the sub-payment data corresponding to each customs electronic port, the declaration data corresponding to each customs electronic port is determined, including:
[0032] Through at least two data declaration components, the sub-payment data corresponding to each customs electronic port is processed according to the processing rules corresponding to each customs electronic port to obtain the declaration data corresponding to each customs electronic port.
[0033] In a possible implementation, after determining the declaration data corresponding to each customs electronic port, the method further includes:
[0034] A text transfer protocol data channel is established through at least two text transfer protocol proxy components, and the declaration data corresponding to each customs electronic port is sent to each customs electronic port through the text transfer protocol data channel.
[0035] In a possible implementation, for any text transfer protocol proxy component, the text transfer protocol proxy component includes at least two, and the method further includes:
[0036] If any one of the at least two text transfer protocol proxy components fails, the processing task corresponding to the text transfer protocol proxy component is switched to at least one text transfer protocol proxy component other than the text transfer protocol proxy component.
[0037] The embodiment of the present application provides a customs declaration data processing device, which includes:
[0038] An acquisition module, used to acquire payment data corresponding to at least one customs electronic port in the customs declaration data through a data loading component, and distribute the payment data to at least two processes of the data loading component to obtain sub-payment data corresponding to each process;
[0039] A sending module, used for sending the sub-payment data corresponding to each process to the data reporting component through the data distribution component;
[0040] The determination module is used to determine the declaration data corresponding to each customs electronic port based on the sub-payment data corresponding to each process through the data declaration component.
[0041] An embodiment of the present application provides an electronic device, the electronic device comprising:
[0042] one or more processors;
[0043] Memory;
[0044] One or more computer programs, wherein the one or more computer programs are stored in a memory and configured to be executed by one or more processors, and the one or more programs are configured to: execute the customs declaration data processing method provided in the embodiments of the present application.
[0045] An embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the customs declaration data processing method provided in the embodiment of the present application is executed.
[0046] The beneficial effects of the technical solution provided by this application are:
[0047] The present application provides a customs declaration data processing method, device and electronic device, which processes the payment data in the customs declaration data through data processing components with different functions: a data loading component, a data distribution component, and a data declaration component, so as to facilitate the independent contraction and expansion of each data processing component and enhance the flexibility of data processing; in addition, the data processing component processes data through at least two processes inside, and each process processes its corresponding data in parallel, and each process does not affect each other, and the data processing of other processes will not be affected by the failure of one of the processes, thereby improving the efficiency of data processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in describing the embodiments of the present application are briefly introduced below.
[0049] Figure 1 A schematic diagram of the multi-party relationship in the customs declaration process provided in the embodiment of the present application;
[0050] Figure 2 A flowchart of a method for processing customs declaration data provided in an embodiment of the present application;
[0051] Figure 3 A schematic diagram of a payment data processing process in the prior art provided for an embodiment of the present application;
[0052] Figure 4 A schematic diagram of the payment data processing process provided in an embodiment of the present application;
[0053] Figure 5a A schematic diagram of data processing of a host data component in a normal operating state provided by an embodiment of the present application;
[0054] Figure 5b A schematic diagram of data processing of a host data component in a fault state provided by an embodiment of the present application;
[0055] Figure 6 A schematic diagram of the structure of a customs declaration data processing device provided in an embodiment of the present application;
[0056] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0057] The embodiments of the present application are described in detail below, and 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 below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be interpreted as limiting the present application.
[0058] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present application refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be an intermediate element. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.
[0059] In order to better understand and illustrate the solution provided by the embodiment of the present application, the application scenario of the technical solution of the present application is first briefly described below.
[0060] The multi-party relationships in the customs declaration process are as follows Figure 1 As shown in Figure 1, when users purchase overseas goods on e-commerce platforms, they need to submit customs declaration data to various electronic ports of China Customs for declaration. Customs declaration data includes: payment data, product data, and logistics data. In actual operation, payment companies will submit payment data (such as Figure 1 The “payment slip” shown in the figure) is processed by the customs declaration system and then sent to the customs; the e-commerce enterprise sends the product data (such as Figure 1 The customs broker sends the logistics data (such as Figure 1 The e-commerce platform will send the "list" shown in the form to the customs. The customs will check the overlapping information in the list, such as whether the purchaser, payer, and consignee are consistent after receiving the payment data, product data, and logistics data. Only after the review is passed can the e-commerce platform send the corresponding goods to the purchaser.
[0061] The customs declaration data processing method provided in the embodiment of the present application is as follows: Figure 1 The customs declaration system shown in the figure is executed, and the customs declaration system can be run on a single server or on a server cluster consisting of multiple servers, and the running status of the servers where each component is located is monitored by the monitoring server. The specific implementation process of the customs declaration data processing method is shown in the following embodiment.
[0062] The present application embodiment provides a method for processing customs declaration data, such as Figure 2 As shown, the method includes:
[0063] Step S101, obtaining payment data corresponding to at least one customs electronic port in the customs declaration data through the data loading component, and distributing the payment data to at least two processes of the data loading component to obtain sub-payment data corresponding to each process;
[0064] The customs declaration data processing method provided in the embodiment of the present application is divided into different components according to different functions for processing, and each component is independently deployed, which can be deployed on one server, or two or more components with different functions can be deployed on the same server. The independent deployment of components facilitates independent contraction and expansion of a single function. Among them, the server includes but is not limited to a physical server and a cloud server.
[0065] When users purchase overseas goods on e-commerce platforms, they need to make a customs declaration after the order payment is completed, and obtain the payment data in the customs declaration data from the e-commerce platform, including: payer's real-name information, e-commerce orders, product prices, taxes, etc.
[0066] When processing payment data, the payment data can be distributed to at least two processes of the data loading component for parallel processing. Each process processes its corresponding sub-payment data. When data processing of one of the processes fails, data processing of other processes is not affected.
[0067] Among them, the allocation of payment data to several processes for processing and which payment data to allocate to one process can be set according to specific needs.
[0068] Among them, at least two processes can be processes in the same subject, so that the corresponding payment sub-data are processed in parallel by at least two processing processes in the same subject. This solves the problem that all data in one subject are mixed and processed serially through one process, and when part of the data processing fails, the processing of other data in the subject is affected, and when the amount of data processed is large, the data processing efficiency is low.
[0069] Step S102, sending the sub-payment data corresponding to each process to the data reporting component through the data distribution component;
[0070] The data loading component sends the processed payment data to the corresponding data distribution component, and the data distribution component sends the received sub-payment data to the corresponding data reporting component.
[0071] Step S103, the data declaration component determines the declaration data corresponding to each customs electronic port based on the sub-payment data corresponding to each process.
[0072] Specifically, the sub-payment data of each process may include multiple payment orders. The customs electronic ports for customs declaration of goods in different payment orders are different. The same payment order may also include multiple sub-payment orders. The customs electronic ports for customs declaration of goods in each sub-payment order may also be different. Therefore, it is necessary to determine the declaration data corresponding to each customs electronic port through the data declaration component based on the sub-payment data in each process, and declare at the corresponding customs electronic port.
[0073] Steps S101 to S103 in the technical solution of the present application may be executed by the same server, or may be executed by two or more servers. For example, steps S101 to S102 may be executed by one server, and step S103 may be executed by another server.
[0074] The specific method of allocating payment data to at least two processes is as follows:
[0075] In a possible implementation, the data loading component includes at least two processes, and distributing the payment data to the at least two processes of the data loading component includes:
[0076] Distributing the payment data corresponding to the first number of customs electronic ports in at least one customs electronic port corresponding to each data loading component to at least two processes of the data loading component;
[0077] The method further includes:
[0078] The payment data corresponding to each customs electronic port other than the first number of customs electronic ports are backed up through each data loading component.
[0079] In actual applications, the number of data loading components can be at least two, which are deployed in different servers respectively. After each data loading component obtains the payment data corresponding to at least one customs electronic port in the customs declaration data, it processes the payment data corresponding to the first number of customs electronic ports in all the customs declaration data obtained, and backs up the payment data corresponding to the customs electronic ports other than the first number of customs electronic ports. The monitoring server monitors whether each component is operating normally. When the server where other data loading components are located fails, since the current data loading component has backed up the data processed by other data loading components, it can switch to the current data loading component according to the instructions of the monitoring server to directly process the backup data, thereby improving the stability of data processing.
[0080] Among them, the payment data corresponding to the first number of customs electronic ports may be all or part of the obtained customs declaration data. When the obtained customs declaration data is the payment data corresponding to a customs electronic port, the payment data corresponding to the first number of customs electronic ports may be all the obtained customs declaration data.
[0081] In a possible implementation, the payment data corresponding to the first number of customs electronic ports is determined in the following manner:
[0082] Determining, by each of the at least two data loading components, a corresponding data processing time;
[0083] The payment data acquired within the respective corresponding data processing time range is used as the payment data corresponding to the respective first number of customs electronic ports.
[0084] In practical applications, the payment data corresponding to the first number of customs electronic ports processed by each data loading component can be determined by the data processing time corresponding to each data loading component. The time windows controlled by each data loading component are different. Each data loading component determines the corresponding data processing time and processes the payment data obtained within the corresponding data processing time range. In the disclosed embodiment, each data loading component determines the corresponding processing data through the time window controlled by each data loading component. Each data loading component can be deployed indiscriminately, and the same functions are realized through the same data processing process, which is convenient for shrinking and expanding the data loading component.
[0085] In the technical solution of the present application, each sub-payment data can be allocated to different processes according to different categories, and the specific implementation method is as follows.
[0086] In a possible implementation, the payment data is distributed to at least two processes of the data loading component, and the sub-payment data corresponding to each process is obtained, including:
[0087] Divide the payment data according to category information to obtain sub-payment data corresponding to each category;
[0088] The sub-payment data corresponding to each category is allocated to the process corresponding to each category, so as to obtain the sub-payment data corresponding to each process.
[0089] Category information includes any of the following:
[0090] First declaration data, failed declaration data, and customs non-response data.
[0091] In practical applications, payment data can be divided into sub-payment data according to different categories, and the sub-payment data of each category can be assigned to different processes for processing. The first declaration data, the declaration failure data, and the customs non-response data can be processed in different processes respectively, wherein the first declaration data is the data that needs to be declared for the first time; the declaration failure data is the data that has been submitted before but has not been successfully declared and needs to be re-declared; the customs non-response data is the data that has been submitted before but has not been responded to by the customs and needs to be re-declared. In this embodiment, the first declaration data, the declaration failure data, and the customs non-response data are assigned to different processes for processing, and the processes do not affect each other, so that the first submitted data can be processed in time, which solves the problem that when all data are processed by one process, the data is processed according to the time of data acquisition, and the failed data and the customs non-response data are acquired earlier than the first declared data, resulting in the failed data and the customs non-response data being processed first, while the first declaration data is processed later, thereby improving the processing capacity of the first declaration data.
[0092] In a possible implementation, the data distribution component or the data reporting component includes at least two components respectively, and the sub-payment data corresponding to each process is sent to the data reporting component through the data distribution component, including:
[0093] Obtain the health information corresponding to each data reporting component through each data distribution component;
[0094] The sub-payment data corresponding to each process is sent to the data reporting component whose health information meets the preset conditions.
[0095] In actual applications, the data distribution component or the data reporting component includes at least two components respectively. The server where each data loading component is located regularly reports the health information corresponding to the data loading component to the monitoring server, and the monitoring server can determine whether each component is operating normally based on the health information. The data distribution component can send a data acquisition request to the monitoring server to obtain the health information corresponding to each data reporting component, that is, the health information of each data reporting component, or the health information of the server where each data reporting component is located. The health information indicates whether the component is operating normally. When the health information meets the preset conditions, it means that the data reporting component can operate normally, and the data distribution component can send the data to the data reporting component for processing.
[0096] Each data distribution component or data declaration component can be deployed independently in a server, or deployed in the same server as the data loading component. After receiving the sub-payment data from the data loading component, each data distribution component distributes each sub-payment data to the corresponding process of each customs electronic port and determines the speed of data distribution.
[0097] In the disclosed embodiments, each data distribution component or data reporting component determines its corresponding processing data through its own controlled time window. Each component can be deployed indiscriminately and achieves exactly the same functions through the same data processing process, making it easy to shrink and expand each component.
[0098] In the technical solution of the present application, each sub-payment data can also be allocated to different processes according to different customs electronic ports. The specific implementation method is as follows.
[0099] In a possible implementation, the data declaration component determines the declaration data corresponding to each customs electronic port based on the sub-payment data corresponding to each process, including:
[0100] Obtain at least one customs identification information in each sub-payment data;
[0101] Allocate each sub-payment data to the process corresponding to each customs electronic port based on the customs identification information, and obtain the sub-payment data corresponding to each customs electronic port;
[0102] Based on the sub-payment data corresponding to each customs electronic port, the declaration data corresponding to each customs electronic port is determined.
[0103] In actual applications, each sub-payment data includes data corresponding to different customs electronic ports. After parsing each sub-payment data, the customs identification information is extracted. The customs identification information is the unique identification corresponding to each customs electronic port. According to the customs identification information, the customs electronic ports corresponding to different payment data can be distinguished. The specific form of customs identification information may include numbers, letters, or a combination of numbers and letters. Allocating each sub-payment data to different processes for processing according to the customs identification information solves the problem of affecting the processing of data corresponding to other customs electronic ports when the data corresponding to one customs electronic port fails when processing all the data corresponding to the customs electronic ports through one process, thereby improving the efficiency of data processing.
[0104] In the technical solution of this application, the data corresponding to each customs electronic port needs to be further processed to obtain the final declaration data, as shown in the following embodiment.
[0105] In a possible implementation, based on the sub-payment data corresponding to each customs electronic port, the declaration data corresponding to each customs electronic port is determined, including:
[0106] The sub-payment data corresponding to each customs electronic port are processed according to the processing rules corresponding to each customs electronic port through at least two data declaration components to obtain the declaration data corresponding to each customs electronic port.
[0107] In actual applications, since each customs electronic port has different requirements for the data format of the declared data, it is necessary to process the data into a data format that meets the requirements of each customs electronic port. Specifically, the data format of the declared data is processed according to the electronic declaration protocol used for import and export declarations formulated by each customs electronic port. For example, the field content, field naming, and data tamper-proof security inspection method required by each electronic declaration protocol are different. According to the corresponding processing rules of each electronic declaration protocol, the data is processed into data that meets the requirements of each electronic declaration protocol, so that each customs electronic port can review the declared data. Among them, the processing rules can be set according to the requirements of the electronic declaration protocol formulated by each customs electronic port.
[0108] Among them, each data reporting component is independent of each other. Each data reporting component is deployed in a server. The operating status of each component is monitored by the monitoring server. The server where each data reporting component is located regularly reports the operating status to the monitoring server. If one of the servers fails, it can be switched to other servers for processing.
[0109] In a possible implementation, for any data processing component, wherein the data processing component is a data loading component, a data distribution component, or a data reporting component, the data processing component includes at least two, and for any one of the at least two data processing components, the method further includes:
[0110] If any of the data processing components fails, the processing task corresponding to the any of the data processing components is switched to at least one data processing component other than the any of the data processing components.
[0111] Wherein, if any data processing component fails, the server where the data processing component is located fails, and the data processing task corresponding to the data processing component is switched to other data processing components with the same function for processing. The processing tasks corresponding to any data processing component include the tasks corresponding to any one of the data loading component, the data distribution component or the data reporting component. When the failure is resolved, the processing task can be switched back to the original data processing component. By switching between data processing components with the same function, the stability of data processing is enhanced.
[0112] In a possible implementation, after determining the declaration data corresponding to each customs electronic port, the method further includes:
[0113] An FTP data channel is established through at least two File Transfer Protocol (FTP) proxy components, and the declaration data corresponding to each customs electronic port is sent to each customs electronic port through the FTP data channel.
[0114] In actual application, an FTP data channel is established between the server where the data declaration component is located and the terminals of each customs electronic port through at least two FTP proxy components, and the declaration data is sent to the terminals of each customs electronic port through the FTP data channel. Sending data through the FTP data channel can ensure the continuous smoothness of the data channel, and solve the problem that when sending FTP commands through the server for data transmission, the connection needs to be re-established each time data is sent; moreover, sending data through the FTP data channel can directly send data, without the need to upload the data in the form of files through the FTP client script, which simplifies the data processing process and improves the data processing efficiency.
[0115] In a possible implementation, for any FTP proxy component, the FTP proxy component includes at least two, and the method further includes:
[0116] If any one of the at least two FTP proxy components fails, the processing task corresponding to the any one FTP proxy component is switched to at least one FTP proxy component other than the any one FTP proxy component.
[0117] Among them, the failure of the FTP proxy component includes the failure of the server where the FTP proxy component is located. Each FTP proxy component is independent of each other. Each FTP proxy component can be deployed in a different server. The running status of each component is monitored by a monitoring server. The server where each FTP proxy component is located regularly reports the running status to the monitoring server. If one of the servers fails, it can be switched to the server where the other FTP proxy components are located for processing.
[0118] The customs declaration data processing method provided in the embodiment of the present application processes the payment data in the customs declaration data through data processing components with different functions: a data loading component, a data distribution component, and a data declaration component, which facilitates the independent contraction and expansion of each data processing component and enhances the flexibility of data processing; in addition, the data processing component processes data through at least two processes inside, and each process processes its corresponding data in parallel. The processes do not affect each other, and the data processing of other processes will not be affected by the failure of one of the processes, thereby improving the efficiency of data processing.
[0119] In order to explain the technical solution of the present application in detail, the solution in the prior art is compared with the technical solution of the present application through specific embodiments.
[0120] The payment data processing process in the prior art is as follows: Figure 3 As shown in the figure, the e-commerce system sends the payment data of users who purchase overseas goods to the synchronous acquiring component, and the synchronous acquiring component stores the payment data in the database. There can be multiple asynchronous customs declaration components. Figure 3 In the example, two asynchronous customs declaration components, asynchronous customs declaration component 1 and asynchronous customs declaration component N, are used for explanation. Each asynchronous customs declaration component reads a part of the payment data from the database. When there are two asynchronous customs declaration components, each asynchronous customs declaration component processes half of the total data. Each asynchronous customs declaration component processes the payment data corresponding to all customs mixed in series through a single process, and generates an FTP file for the processed data and sends it to the client of each customs electronic port (such as Figure 3 The asynchronous customs declaration component also receives and processes the receipt sent by the customs.
[0121] The following is a specific example to illustrate the payment data processing process in the technical solution of this application. Figure 4As shown, the technical solution of the present application includes various data processing components: a data loading component, a data distribution component, a data declaration component and an FTP proxy component (as shown in the figure "protocol component"), each data processing component includes at least two, and each data processing component in the figure is illustrated by taking two components as an example. Each data loading component and each data distribution component are deployed in the same server (as shown in the figure Machine 1, Machine 2), each data declaration component and each FTP proxy component are deployed in the same server (as shown in the figure Machine 3, N (the specific value of N is set as needed)), in addition, it also includes a customs receipt processing component for processing receipts sent by customs.
[0122] The e-commerce system sends the payment data to the synchronous acquiring component through the real-time reporting interface, and the synchronous acquiring component stores the data that meets the requirements in the database.
[0123] The data loading component reads payment data from the database, including payment data corresponding to four customs electronic ports A, B, C, and D. Each data loading component caches the payment data read and distributes it to multiple processes according to different data categories (first declaration data, failed declaration data, and customs non-response data) to obtain the sub-payment data corresponding to each process.
[0124] The sub-payment data corresponding to each process is sent to the data distribution component. The data distribution component distributes each sub-payment data to the corresponding process according to different customs electronic ports A, B, C, and D. Then, according to the health information of each data declaration component, any normally operating data declaration component is selected to distribute the data in each process to the corresponding data declaration component. The data declaration group processes the received data into a data format that meets the requirements according to the processing rules corresponding to each customs electronic port, and sends it to the FTP proxy component.
[0125] The FTP proxy component establishes an FTP data channel and sends the declaration data to the client corresponding to the customs electronic port through the FTP data channel (Customs A agent and Customs B agent as shown in the figure, two of which are taken as an example in the figure, Customs C agent and Customs D agent are not shown), and finally the data is declared through the local customs of China.
[0126] The client corresponding to the customs electronic port sends the receipt of data declaration to the customs receipt processing component, which downloads and processes it.
[0127] Among them, each data loading component caches the same payment data and processes it through at least two internal processes. The data processed in the same time period is different. As shown in the figure, the data loading component in machine 1 processes the data corresponding to Customs A and Customs B, and backs up the data corresponding to Customs C and Customs D. The data loading component in machine 2 processes the data corresponding to Customs C and Customs D, and backs up the data corresponding to Customs A and Customs B. The data distribution component and the data declaration component support the data corresponding to Customs A, Customs B, Customs C, and Customs D. When machine 1 fails, it can switch to machine 2 for data processing. When machine 3 fails, it can switch to machine N for data processing.
[0128] In the technical solution of the present application, different components (data loading component, data distribution component, data declaration component, FTP proxy component, customs receipt processing component) are divided according to different functions for processing, and single functions can be quickly shrunk and expanded, and corresponding data processing components can be increased or decreased. Each component of the data loading component, data distribution component, and data declaration component is processed in parallel by at least two processes, and the processes do not affect each other, which speeds up the data processing. Moreover, the first declaration data, declaration failure data, and customs non-response data are assigned to different processes for processing, which can ensure the timely processing of the first declaration data. In addition, an FTP data path is established through the FTP proxy component, and data is sent through the FTP data path. There is no need to upload the data in the form of a file through the script of the FTP client, which simplifies the data processing process and improves the data processing efficiency.
[0129] Combine the following Figure 4 , the process of data switching between components in the technical solution of this application is described in detail through a specific embodiment. Figure 5a As shown, the host data component represents Figure 4 The host data component represents the components in machine 1 and machine 3, and the standby data component represents the corresponding components in machine 2 and machine N. For example, the host data component represents the data loading component in machine 1, and the standby data component represents the data loading component in machine 2.
[0130] The host data component and the standby data component control different time windows. When machine 1 is operating normally, the host data component processes data to be processed within 0-15 minutes (such as Figure 5a The standby data component processes the data to be processed 15 minutes ago (such as Figure 5a "No data sent 15 minutes ago" as shown in the figure), when the host data component is operating normally (such as Figure 5a Due to the different control time windows, the standby data component does not process data within 0-15 minutes (such as Figure 5a “No data” shown).
[0131] When a host data component fails (such as Figure 5b If the "Host Failure" is shown in the Figure 5b As shown, the data that has not been processed within 0-15 minutes is switched to the standby data component for processing (such as Figure 5b ), thereby achieving free switching between the host data component and the standby data component. When a failure occurs, data processing is not affected and the problem of data duplication does not occur.
[0132] Based on Figure 2 Based on the same principle as the method shown in , the embodiment of the present disclosure also provides a customs declaration data processing device 60, such as Figure 6 As shown, the customs declaration data processing device 60 includes:
[0133] An acquisition module 61 is used to acquire payment data corresponding to at least one customs electronic port in the customs declaration data through a data loading component, and distribute the payment data to at least two processes of the data loading component to obtain sub-payment data corresponding to each process;
[0134] A sending module 62, used to send the sub-payment data corresponding to each process to the data reporting component through the data distribution component;
[0135] The determination module 63 is used to determine the declaration data corresponding to each customs electronic port based on the sub-payment data corresponding to each process through the data declaration component.
[0136] In a possible implementation, the data loading component includes at least two acquisition modules 61, which are specifically used to:
[0137] Distributing the payment data corresponding to the first number of customs electronic ports in at least one customs electronic port corresponding to each data loading component to at least two processes of the data loading component;
[0138] The customs declaration data processing device 60 further includes a backup module for:
[0139] The payment data corresponding to each customs electronic port other than the first number of customs electronic ports are backed up through each data loading component.
[0140] In a possible implementation, the payment data corresponding to the first number of customs electronic ports is determined in the following manner:
[0141] Determining, by each of the at least two data loading components, a corresponding data processing time;
[0142] The payment data acquired within the respective corresponding data processing time range is used as the payment data corresponding to the respective first number of customs electronic ports.
[0143] In a possible implementation, the acquisition module 62 is specifically configured to:
[0144] Divide the payment data according to category information to obtain sub-payment data corresponding to each category;
[0145] The sub-payment data corresponding to each category is allocated to the process corresponding to each category, so as to obtain the sub-payment data corresponding to each process.
[0146] Category information includes any of the following:
[0147] First declaration data, failed declaration data, and customs non-response data.
[0148] In a possible implementation, the data distribution component or the data declaration component includes at least two components respectively, and the sending module 62 is specifically used to:
[0149] Obtain the health information corresponding to each data reporting component through each data distribution component;
[0150] The sub-payment data corresponding to each process is sent to the data reporting component whose health information meets the preset conditions.
[0151] In a possible implementation, the determination module 63 is specifically configured to:
[0152] Obtain at least one customs identification information in each sub-payment data;
[0153] Allocate each sub-payment data to the process corresponding to each customs electronic port based on the customs identification information, and obtain the sub-payment data corresponding to each customs electronic port;
[0154] Based on the sub-payment data corresponding to each customs electronic port, the declaration data corresponding to each customs electronic port is determined.
[0155] In a possible implementation, the determination module 63 is specifically configured to:
[0156] The sub-payment data corresponding to each customs electronic port are processed according to the processing rules corresponding to each customs electronic port through at least two data declaration components to obtain the declaration data corresponding to each customs electronic port.
[0157] In a possible implementation, the customs declaration data processing device 60 further includes:
[0158] The channel establishment module is used to establish a text transfer protocol data channel through at least two text transfer protocol proxy components, and send the declaration data corresponding to each customs electronic port to each customs electronic port through the text transfer protocol data channel.
[0159] The customs declaration data processing device of the embodiment of the present disclosure can execute the customs declaration data processing method provided by the embodiment of the present disclosure, and the implementation principle is similar. The actions performed by each module in the customs declaration data processing device in the embodiment of the present disclosure correspond to the steps in the customs declaration data processing method in each embodiment of the present disclosure. For the detailed functional description of each module of the customs declaration data processing device, please refer to the description in the corresponding customs declaration data processing method shown in the previous text, which will not be repeated here.
[0160] The customs declaration data processing device provided in the embodiment of the present application processes the payment data in the customs declaration data through data processing components with different functions: a data loading component, a data distribution component, and a data declaration component, which facilitates the independent contraction and expansion of each data processing component and enhances the flexibility of data processing; in addition, the data processing component processes data through at least two processes inside, and each process processes its corresponding data in parallel. The processes do not affect each other, and the data processing of other processes will not be affected by the failure of one of the processes, thereby improving the efficiency of data processing.
[0161] The above embodiment introduces a customs declaration data processing device from the perspective of a virtual module. The following describes an electronic device from the perspective of a physical module, as shown below:
[0162] The present application embodiment provides an electronic device, such as Figure 7 As shown, Figure 7 The electronic device 5000 shown includes: a processor 5001 and a memory 5003. The processor 5001 and the memory 5003 are connected, such as through a bus 5002. Optionally, the electronic device 5000 may also include a transceiver 5004. It should be noted that in actual applications, the transceiver 5004 is not limited to one, and the structure of the electronic device 5000 does not constitute a limitation on the embodiments of the present application.
[0163] Processor 5001 may be a CPU, a general-purpose processor, a DSP, an ASIC, an FPGA or other programmable logic device, a transistor logic device, a hardware component or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. Processor 5001 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0164] The bus 5002 may include a path to transmit information between the above components. The bus 5002 may be a PCI bus or an EISA bus, etc. The bus 5002 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0165] The memory 5003 may be a ROM or other type of static storage device that can store static information and instructions, a RAM or other type of dynamic storage device that can store information and instructions, or an EEPROM, a CD-ROM or other optical disk storage, an optical disk storage (including a compressed optical disk, a laser disk, an optical disk, a digital versatile disk, a Blu-ray disk, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited to these.
[0166] The memory 5003 is used to store application code for executing the solution of the present application, and the execution is controlled by the processor 5001. The processor 5001 is used to execute the application code stored in the memory 5003 to implement the content shown in any of the above method embodiments.
[0167] An embodiment of the present application provides an electronic device, and the electronic device in the embodiment of the present application includes: a memory and a processor; at least one program, stored in the memory, and used to obtain payment data corresponding to at least one customs electronic port in the customs declaration data through a data loading component when executed by the processor, and distribute the payment data to at least two processes of the data loading component to obtain sub-payment data corresponding to each process; send the sub-payment data corresponding to each process to the data declaration component through the data distribution component; determine the declaration data corresponding to each customs electronic port based on the sub-payment data corresponding to each process through the data declaration component.
[0168] An embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer-readable storage medium is run on a computer, the computer can execute the corresponding content in the aforementioned method embodiment.
[0169] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0170] The above descriptions are only some embodiments of the present invention. It should be pointed out that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for processing customs declaration data, characterized in that: The method comprises: Acquire payment data corresponding to at least one customs electronic port in the customs declaration data through a data loading component, and distribute the payment data to at least two processes of the data loading component to obtain sub-payment data corresponding to each process; Sending the sub-payment data corresponding to each process to the data reporting component through the data distribution component; Determine, by the data declaration component, the declaration data corresponding to each customs electronic port based on the sub-payment data corresponding to each process; The step of distributing the payment data to at least two processes of the data loading component to obtain sub-payment data corresponding to each process includes: Dividing the payment data according to category information to obtain sub-payment data corresponding to each category; Allocating the sub-payment data corresponding to each category to the process corresponding to each category, and obtaining the sub-payment data corresponding to each process; The category information includes any of the following: First declaration data, failed declaration data, and customs non-response data; Among them, the first declaration data refers to the data that needs to be declared for the first time; the failed declaration data refers to the data that was previously submitted but was not successfully declared and needs to be re-declared; the customs unresponded data refers to the data that was previously submitted but the customs did not respond and needs to be re-declared.
2. The method according to claim 1, characterized in that The data loading component includes at least two processes, and the at least two processes of allocating the payment data to the data loading component include: Distributing the payment data corresponding to the first number of customs electronic ports in the at least one customs electronic port corresponding to each data loading component to at least two processes of the data loading component; The method further comprises: The payment data corresponding to each customs electronic port other than the first number of customs electronic ports are backed up through each data loading component.
3. The method according to claim 2, characterized in that The payment data corresponding to the first number of customs electronic ports is determined in the following manner: Determining, by each of the at least two data loading components, a corresponding data processing time; The payment data acquired within the respective corresponding data processing time range is used as the payment data corresponding to the respective first number of customs electronic ports.
4. The method according to claim 2, characterized in that: Different data loading components are deployed in different servers, and the method further includes: In the event that the server where the first data loading component is located fails, the second data loading component processes the payment data corresponding to the first data loading component based on the backup data; The first data loading component is any data loading component, and the second data loading component is a data loading component deployed in a normally operating server.
5. The method according to any one of claims 1 to 3, characterized in that: The data distribution component or the data reporting component comprises at least two components respectively, and the sending of the sub-payment data corresponding to each process to the data reporting component through the data distribution component comprises: Obtaining health information corresponding to each data reporting component through each of the data distribution components; The sub-payment data corresponding to each process is sent to the data reporting component where the health information meets the preset conditions.
6. The method according to any one of claims 1 to 3, characterized in that: The data declaration component determines the declaration data corresponding to each customs electronic port based on the sub-payment data corresponding to each process, including: Obtaining at least one customs identification information in each of the sub-payment data; Allocating each of the sub-payment data to a process corresponding to each customs electronic port based on the customs identification information, and obtaining the sub-payment data corresponding to each customs electronic port; Based on the sub-payment data corresponding to each customs electronic port, the declaration data corresponding to each customs electronic port is determined.
7. The method according to claim 6, characterized in that The method of determining the declaration data corresponding to each customs electronic port based on the sub-payment data corresponding to each customs electronic port includes: Through at least two of the data declaration components, the sub-payment data corresponding to each customs electronic port is processed according to the processing rules corresponding to each customs electronic port, so as to obtain the declaration data corresponding to each customs electronic port.
8. The method according to claim 7, characterized in that After determining the declaration data corresponding to each customs electronic port, the method further includes: A text transfer protocol data channel is established through at least two text transfer protocol proxy components, and the declaration data corresponding to each customs electronic port is sent to each customs electronic port through the text transfer protocol data channel.
9. A customs declaration data processing device, characterized in that: The device comprises: An acquisition module, used to acquire payment data corresponding to at least one customs electronic port in the customs declaration data through a data loading component, and distribute the payment data to at least two processes of the data loading component to obtain sub-payment data corresponding to each process; A sending module, used for sending the sub-payment data corresponding to each process to the data reporting component through the data distribution component; A determination module, used to determine the declaration data corresponding to each customs electronic port based on the sub-payment data corresponding to each process through the data declaration component; Wherein, when the acquisition module distributes the payment data to at least two processes of the data loading component and obtains the sub-payment data corresponding to each process, it is used to: Dividing the payment data according to category information to obtain sub-payment data corresponding to each category; allocating the sub-payment data corresponding to each category to a process corresponding to each category to obtain sub-payment data corresponding to each process; The category information includes any one of the following: first declaration data, failed declaration data, and customs non-response data; among which, the first declaration data is the data that needs to be declared for the first time; the failed declaration data is the data that was previously submitted but not successfully declared and needs to be re-declared; the customs non-response data is the data that was previously submitted but the customs did not respond and needs to be re-declared.
10. The device according to claim 9, characterized in that The data loading components include at least two; When the acquisition module distributes the payment data to at least two processes of the data loading component, the acquisition module is specifically used to: Distributing the payment data corresponding to the first number of customs electronic ports in the at least one customs electronic port corresponding to each data loading component to at least two processes of the data loading component; The device also includes: The backup module is used to back up the payment data corresponding to the customs electronic ports other than the first number of customs electronic ports through each data loading component.
11. The device according to claim 10, characterized in that The payment data corresponding to the first number of customs electronic ports is determined in the following manner: Determining, by each of the at least two data loading components, a corresponding data processing time; The payment data acquired within the respective corresponding data processing time range is used as the payment data corresponding to the respective first number of customs electronic ports.
12. The device according to claim 10, characterized in that Different data loading components are deployed in different servers, and the device also includes: A fault switching module, configured to, in the event that a server where the first data loading component is located fails, cause the second data loading component to process the payment data corresponding to the first data loading component based on the backup data; The first data loading component is any data loading component, and the second data loading component is a data loading component deployed in a normally operating server.
13. The device according to any one of claims 9 to 11, characterized in that: The data distribution component or the data reporting component comprises at least two components respectively; The sending module is specifically used for: Obtaining health information corresponding to each data reporting component through each of the data distribution components; The sub-payment data corresponding to each process is sent to the data reporting component where the health information meets the preset conditions.
14. The device according to any one of claims 9 to 11, characterized in that: The determination module is specifically used for: Obtaining at least one customs identification information in each of the sub-payment data; Allocating each of the sub-payment data to a process corresponding to each customs electronic port based on the customs identification information, and obtaining the sub-payment data corresponding to each customs electronic port; Based on the sub-payment data corresponding to each customs electronic port, the declaration data corresponding to each customs electronic port is determined.
15. The device according to claim 14, characterized in that The determination module is specifically used to determine the declaration data corresponding to each customs electronic port based on the sub-payment data corresponding to each customs electronic port: Through at least two of the data declaration components, the sub-payment data corresponding to each customs electronic port is processed according to the processing rules corresponding to each customs electronic port, so as to obtain the declaration data corresponding to each customs electronic port.
16. The device according to claim 15, characterized in that The device also includes: The channel establishment module is used to establish a text transfer protocol data channel through at least two text transfer protocol proxy components, and send the declaration data corresponding to each customs electronic port to each customs electronic port through the text transfer protocol data channel.
17. An electronic device, characterized in that: The electronic device comprises: one or more processors; Memory; One or more computer programs, wherein the one or more computer programs are stored in the memory and configured to be executed by the one or more processors, and the one or more computer programs are configured to: execute the method according to any one of claims 1 to 8.
18. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
