Customs declaration method, system and equipment and storage medium

By constructing declaration messages using message type templates and value mapping templates, the adaptability problem for different customs declaration requirements is solved, and data transmission security is solved through encryption, thereby improving the accuracy and efficiency of customs declarations.

CN121599734APending Publication Date: 2026-03-03SF TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411156364.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-21
Publication Date
2026-03-03

AI Technical Summary

Technical Problem

In the field of international logistics, how can we quickly generate compliant messages based on the latest customs document requirements and format templates, while ensuring the security of information transmission and avoiding the risk of data leakage?

Method used

By using message type templates and value mapping templates to construct declaration messages, we can flexibly adapt to the requirements of different customs authorities. We also encrypt the declaration messages to ensure data accuracy and consistency and prevent unauthorized access or tampering.

Benefits of technology

It enables the rapid generation of declaration messages that meet customs requirements, ensuring data accuracy and consistency, protecting sensitive information from tampering, and improving the accuracy and efficiency of customs declarations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121599734A_ABST
    Figure CN121599734A_ABST
Patent Text Reader

Abstract

The invention discloses a customs declaration method, system and device and a storage medium, and the method comprises the steps: responding to an order declaration request of an e-commerce platform, and obtaining the declaration configuration information of a corresponding target customs according to the order declaration request; calling a message type template and a value mapping template to construct the declaration configuration information into a declaration message; and encrypting the declaration message and sending the encrypted declaration message to a customs declaration system, so that the customs declaration system decrypts the declaration message and performs declaration verification. And the declaration message is constructed by using the message type template and the value mapping template, so that the requirements of different customs are flexibly met, and the accuracy and consistency of data are ensured. The encrypted declaration message protects sensitive information and prevents unauthorized access or tampering in the transmission process, and the accuracy and efficiency of customs declaration are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computers, and more specifically to a customs declaration method, system, device, and storage medium. Background Technology

[0002] In the field of international logistics, import and export business requires coordination with customs. This process demands that order information and detailed logistics information be accurately entered into the corresponding customs documents in strict accordance with the formats and standards stipulated by customs. Since different customs offices may have different declaration requirements and format templates, declarants need to continuously monitor and promptly respond to the latest notices issued by official customs authorities.

[0003] How to quickly generate compliant messages based on the latest customs declaration requirements and format templates, while ensuring information security during transmission and avoiding potential data leakage risks, is an urgent issue that needs to be optimized. Summary of the Invention

[0004] The main objective of this invention is to provide a customs declaration method, system, device, and storage medium. These methods utilize message type templates and value mapping templates to construct declaration messages, flexibly adapting to different customs requirements and ensuring data accuracy and consistency. Encrypted declaration messages protect sensitive information, preventing unauthorized access or tampering during transmission, thereby improving the accuracy and efficiency of customs declarations.

[0005] To achieve the above objectives, the embodiments of this application provide the following technical solutions:

[0006] According to a first aspect of the embodiments of this application, a customs declaration method is provided, the method comprising:

[0007] In response to an order declaration request from an e-commerce platform, the corresponding declaration configuration information of the target customs is obtained based on the order declaration request;

[0008] The declaration configuration information is constructed into a declaration message by calling the message type template and value mapping template;

[0009] The declaration message is encrypted and sent to the customs declaration system, so that the customs declaration system can decrypt the declaration message and verify the declaration.

[0010] Optionally, the call message type template and value mapping template construct the declaration configuration information into a declaration message, including:

[0011] A declaration configuration message is generated based on the declaration configuration information and the message type template; the message type template is specified by the target customs.

[0012] The application configuration message is preprocessed to obtain a preprocessed application configuration message.

[0013] The preprocessed declaration configuration message is adjusted according to the business logic of the e-commerce platform to obtain the adjusted declaration configuration message;

[0014] The adjusted declaration configuration message is merged with the value mapping template to generate the declaration message; the value mapping template is specified by the target customs.

[0015] Optionally, before merging the adjusted declaration configuration message with the value mapping template, the method further includes:

[0016] Convert the adjusted declaration configuration message into a declaration configuration message in the format specified by the target customs;

[0017] The value mapping template is read using the target customs-specified format parsing library to obtain the value mapping template under the target customs-specified format.

[0018] Optionally, the declaration configuration message is preprocessed to obtain a preprocessed declaration configuration message, including:

[0019] Adjust the declaration configuration message based on the target customs address length;

[0020] The adjusted declaration configuration message is subjected to character filtering and / or escaping to obtain a preprocessed declaration configuration message.

[0021] Optionally, the step of setting character filtering and / or escaping processing on the adjusted declaration configuration message to obtain a preprocessed declaration configuration message includes:

[0022] According to the filter character table set by the target customs, delete the characters in the adjusted declaration configuration message that exist in the filter character table; and / or

[0023] Based on the escape mapping table, characters in the adjusted declaration configuration message that exist in the escape mapping table are escaped.

[0024] Optionally, the preprocessed declaration configuration message is adjusted according to the business logic of the e-commerce platform to obtain an adjusted declaration configuration message, including:

[0025] The preprocessed declaration configuration message is processed to generate an order identifier, confirm package details, and / or remove duplicate addresses, resulting in an adjusted declaration configuration message.

[0026] Optionally, encrypting the declaration message and sending it to the customs declaration system includes:

[0027] The declaration message is encrypted according to the encryption method specified by the target customs to obtain an encrypted message;

[0028] The encrypted message is digitally signed to obtain a signed message;

[0029] The signed message is sent to the customs declaration system of the target customs office.

[0030] According to a second aspect of the embodiments of this application, a customs declaration system is provided, the system comprising:

[0031] The declaration configuration information module is used to respond to the order declaration request from the e-commerce platform and obtain the corresponding declaration configuration information of the target customs based on the order declaration request;

[0032] The declaration message construction module is used to call the message type template and the value mapping template to construct the declaration configuration information into a declaration message;

[0033] An encryption module is used to encrypt the declaration message and send it to the customs declaration system, so that the customs declaration system can decrypt the declaration message and verify the declaration.

[0034] According to a third aspect of the present application, an electronic device is provided, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method described in the first aspect above.

[0035] According to a fourth aspect of the embodiments of this application, a computer-readable storage medium is provided having computer-readable instructions stored thereon, the computer-readable instructions being executable by a processor to implement the method described in the first aspect above.

[0036] In summary, this application provides a customs declaration method, system, device, and storage medium. Responding to an order declaration request from an e-commerce platform, it obtains the corresponding target customs declaration configuration information based on the order declaration request; it constructs a declaration message from the declaration configuration information by calling a message type template and a value mapping template; it encrypts the declaration message and sends it to the customs declaration system, enabling the customs declaration system to decrypt and verify the declaration. Using message type templates and value mapping templates to construct the declaration message flexibly adapts to the requirements of different customs authorities, ensuring data accuracy and consistency. Encrypting the declaration message protects sensitive information, preventing unauthorized access or tampering during transmission, thus improving the accuracy and efficiency of customs declaration. Attached Figure Description

[0037] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the structures shown in these drawings without creative effort.

[0038] The structures, proportions, sizes, etc. illustrated in this specification are only for the purpose of assisting those skilled in the art in understanding and reading the content disclosed herein, and are not intended to limit the conditions under which the present invention can be implemented. Therefore, they have no substantial technical significance. Any modifications to the structure, changes in the proportions, or adjustments to the size, without affecting the effects and objectives that the present invention can produce, should still fall within the scope of the technical content disclosed in the present invention.

[0039] Figure 1 A schematic diagram of the customs declaration method provided in the embodiments of this application;

[0040] Figure 2 The overall customs declaration process provided for the embodiments of this application;

[0041] Figure 3 A block diagram of a customs declaration system provided for embodiments of this application;

[0042] Figure 4 This illustration shows a structural schematic diagram of an electronic device provided in an embodiment of this application;

[0043] Figure 5 A schematic diagram of a computer-readable storage medium provided in an embodiment of this application is shown.

[0044] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0045] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.

[0046] It should be noted that all directional indications (such as up, down, left, right, front, back, etc.) in the embodiments of the present invention are only used to explain the relative positional relationship and movement of each component in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indication will also change accordingly.

[0047] Furthermore, in this invention, descriptions involving "first," "second," etc., are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0048] Furthermore, the technical solutions of the various embodiments of the present invention can be combined with each other, but only if they are feasible for those skilled in the art. If the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such combination of technical solutions does not exist and is not within the scope of protection claimed by the present invention.

[0049] In cross-border e-commerce declarations, there is a correspondence between message type and sending entity. For example, electronic orders are sent by e-commerce companies, payment vouchers are sent by payment companies, and logistics waybill information is sent by logistics companies.

[0050] Figure 1 This application illustrates a customs declaration method provided in an embodiment, the method comprising:

[0051] Step 101: In response to the order declaration request from the e-commerce platform, obtain the corresponding declaration configuration information of the target customs based on the order declaration request;

[0052] Step 102: Use the message type template and value mapping template to construct the declaration configuration information into a declaration message;

[0053] Step 103: Encrypt the declaration message and send it to the customs declaration system so that the customs declaration system can decrypt the declaration message and verify the declaration.

[0054] In one possible implementation, step 102 involves invoking a message type template and a value mapping template to construct a declaration message from the declaration configuration information, including:

[0055] A declaration configuration message is generated based on the declaration configuration information and the message type template; the message type template is specified by the target customs. Field preprocessing is performed on the declaration configuration message to obtain the preprocessed declaration configuration message. The preprocessed declaration configuration message is adjusted according to the business logic of the e-commerce platform to obtain the adjusted declaration configuration message. The adjusted declaration configuration message is merged with the value mapping template to generate the declaration message; the value mapping template is specified by the target customs.

[0056] In one possible implementation, the method further includes, before merging the adjusted declaration configuration message with the value mapping template:

[0057] Convert the adjusted declaration configuration message into a declaration configuration message in the format specified by the target customs; use the target customs-specified format parsing library to read the value mapping template and obtain the value mapping template in the format specified by the target customs.

[0058] In one possible implementation, the declaration configuration message undergoes field preprocessing to obtain a preprocessed declaration configuration message, including:

[0059] Adjust the declaration configuration message based on the target customs address length; perform character filtering and / or escaping on the adjusted declaration configuration message to obtain the preprocessed declaration configuration message.

[0060] In one possible implementation, the adjusted declaration configuration message is subjected to character filtering and / or escaping processing to obtain a preprocessed declaration configuration message, including:

[0061] By comparing the target customs's filtered character table, characters present in the filtered character table in the adjusted declaration configuration message are deleted; and / or, based on the escape mapping table, characters present in the escape mapping table in the adjusted declaration configuration message are escaped.

[0062] By preprocessing fields and adjusting business logic, we can improve data accuracy and reduce reporting problems caused by data errors.

[0063] In one possible implementation, the preprocessed declaration configuration message is adjusted according to the business logic of the e-commerce platform to obtain an adjusted declaration configuration message, including:

[0064] The preprocessed declaration configuration message is processed to generate an order identifier, confirm package details, and / or remove duplicate addresses, resulting in an adjusted declaration configuration message.

[0065] In one possible implementation, step 103, encrypting the declaration message and sending it to the customs declaration system, includes:

[0066] The declaration message is encrypted according to the encryption method specified by the target customs to obtain an encrypted message; the encrypted message is digitally signed to obtain a signed message; and the signed message is sent to the customs declaration system of the target customs.

[0067] The use of message type templates and value mapping templates to construct declaration messages allows for flexible adaptation to different customs requirements, ensuring data accuracy and consistency. Encrypted declaration messages protect sensitive information from unauthorized access or tampering during transmission, improving the accuracy and efficiency of customs declarations.

[0068] The methods provided in the embodiments of this application will be explained in detail below with reference to the accompanying drawings.

[0069] In the first stage, the corresponding customs template configuration information is obtained based on the order declaration requests from the e-commerce platform.

[0070] Step 1: Receive the order declaration request sent by the e-commerce platform; the order declaration request carries order information and logistics information, such as order number, product details, quantity, value, shipping location, destination, etc.

[0071] Step 2: Match the customs declaration corresponding to the order based on the order information and logistics information, and obtain the declaration configuration information of the target customs.

[0072] The customs code for the template declaration can be determined through built-in logic or by querying the database. Further, the database can be queried using order information and the customs code to find the corresponding customs declaration template configuration information. The declaration template configuration information includes: declaration form format, required fields, specific requirements, coding rules, etc.

[0073] Phase 2: Construct a thread class compatible with the old configuration based on the customs template configuration information.

[0074] Due to system upgrades or migrations, the physical location of class files in the file system has changed. Because of this change, all code referencing this class needs to be updated to reflect the new file path. This may involve modifying import statements, changing the classpath in configuration files, or specifying the new classpath directly in the code.

[0075] In the third stage, the aforementioned thread class is started, and the message type template and value mapping template are called to construct the declaration configuration information into a declaration message.

[0076] Step 1: Generate the declaration configuration message based on the declaration configuration information and message type template; the message type template is specified by the target customs.

[0077] The aforementioned message type template can be a CEB511 message. The CEB511 message type is an electronic waybill, a message format used in customs electronic data interchange for declaring logistics-related information. The message name will include the message type (e.g., CEB311 or CEB511), the sender's enterprise code (senderId), and a timestamp and serial number. The message structure typically includes a message header and specific business data. The message header may include a unique message ID (MessageID), message type (MessageType), enterprise organization code or unified social credit code (OrgCode), and transmitting enterprise code (CopCode), etc. Specific message formats and content may vary depending on the requirements of different customs authorities and different versions of data interchange standards. Therefore, in practice, it is necessary to refer to the latest customs data interchange specifications and guidelines.

[0078] Step 2: Perform field preprocessing on the declaration configuration message to obtain the preprocessed declaration configuration message.

[0079] Write functions to process fields according to configuration files or preset rules. Field configuration optimization includes data cleaning and validation processes to ensure data conforms to specific formats and business rules, ensuring message security and compatibility. Processing includes dynamically adjusting address field lengths, filtering special characters, and escaping, ensuring address fields comply with specific customs system restrictions.

[0080] Address length control: Defines maximum and minimum length limits, truncates addresses that exceed the length or pads addresses that are insufficient.

[0081] Special character filtering: Determine which characters are allowed and which are not, and remove or replace the disallowed characters.

[0082] Escape handling: For certain special characters, such as quotation marks and backslashes, escaping may be necessary to avoid parsing errors. Use appropriate escaping rules, such as replacing double quotation marks with \".

[0083] Other special processing: Depending on business needs, formatting, standardization, or regular expression matching may be required.

[0084] Step 3: Adjust the preprocessed declaration configuration message according to the business logic of the e-commerce platform to obtain the adjusted declaration configuration message.

[0085] Write logic processing functions for the e-commerce platform's business rules, including but not limited to order number mapping, package quantity processing, and address deduplication.

[0086] Order ID Mapping: Depending on the requirements of the e-commerce platform, it may be necessary to map the original order number to a new order number that conforms to a specific format. This may involve generating a unique identifier (UUID), adding a prefix or suffix, etc.

[0087] Package Counting: Determine how many packages should be generated for each order. This may depend on the quantity and type of goods, or logistics requirements. For single orders containing multiple packages, sub-orders or tracking numbers may need to be created.

[0088] Address deduplication: Addresses are standardized and validated using a Geographic Information System (GIS). GIS identifies and removes duplicate addresses, ensuring data accuracy and consistency.

[0089] Step 4: Convert the adjusted declaration configuration message into a declaration configuration message in the format specified by the target customs, such as the XML format required by customs.

[0090] Use regular expressions or string replacement methods to automatically escape all special characters, ensuring that all XML special characters are correctly escaped to avoid parsing errors. The steps for escaping XML special characters are as follows: Check if the string contains XML special characters; use the escaping rules described above to replace the special characters with their escape forms. You can use string replacement or regular expressions to achieve this escaping, ensuring that the escaped string can be correctly parsed by the XML parser.

[0091] Step 5: Use the target customs-specified format parsing library to read the value mapping template and obtain the value mapping template under the target customs-specified format.

[0092] Based on the template file's format (e.g., XML, JSON, CSV), the corresponding parser is used to parse the file content, mapping the parsed data structure to the data fields required for customs declaration. For example, an XML parsing library is used to read the template file and parse it into an operable XML DOM structure, loading the XML-formatted customs message template. If customs declaration requirements change, the value mapping template is updated promptly, and testing and verification are performed again.

[0093] Step 6: Combine the XML compatibility parameters from Step 4 and the XML template from Step 5, fill the parameters into the template, and generate the declaration message.

[0094] The template is combined with actual business parameters for logical integration and data binding to generate a standardized message structure. The XML template is traversed, placeholders are found and replaced with the processed parameter values, and then the actual business parameter values ​​are replaced with the placeholders. The business parameters are then populated into the XML template to generate a complete message.

[0095] Step 7: Encrypt the declaration message.

[0096] The declaration message is encrypted according to the encryption method specified by the target customs authority, resulting in an encrypted message. The encrypted message is then digitally signed, resulting in a signed message. The message content is further encrypted according to customs settings, such as the configuration of the authentication machine. Pre-configured customs authentication machine settings are read and applied, and an encryption algorithm is applied according to the configuration to obtain the encrypted message.

[0097] Based on configuration or user input, select the data format and encryption method to construct personalized messages, including different formats (such as JSON / XML), different encryption methods, and different signature verification methods. By calling a built-in or externally integrated signature service, digitally sign the encrypted message to generate a legally valid digitally signed message. For example, use a digital signature library (such as OpenSSL) to generate the signature.

[0098] In the fourth stage, the encrypted declaration message is sent to the customs system.

[0099] Step 1: Send the encrypted message to the designated interface or server address of the customs system using the selected protocol.

[0100] Based on the requirements and security standards of the customs system, choose either HTTP or FTP protocol for message transmission. Construct an appropriate request format according to the selected sending method. For HTTP, this might be a POST request; for FTP, it might be an upload command.

[0101] Step 2: After receiving the message, the customs system decrypts it.

[0102] Step 3: The customs system verifies the format of the decrypted message to ensure it conforms to customs message specifications. It then further reviews the message content according to preset rules and standards to determine whether the declaration is approved.

[0103] Step 4: If the customs system returns a result indicating that corrections are needed, make the corresponding adjustments based on the feedback. If the declaration is approved, receive the response information from the customs system and proceed with subsequent operations.

[0104] Phase 5: Store any results returned by the customs system and the contents of the declaration messages in the database.

[0105] Collect all necessary data from the customs system's responses, including but not limited to declaration status, error messages, and timestamps. Format the collected data into a database-appropriate format, such as JSON, XML, or key-value pairs. By storing the results returned by the customs system and the contents of the declaration messages in a database, import and export operations can be better managed and analyzed, while ensuring data persistence and traceability.

[0106] In summary, this application provides a customs declaration method that, in response to an order declaration request from an e-commerce platform, obtains the corresponding target customs declaration configuration information based on the order declaration request; constructs a declaration message from the declaration configuration information by calling a message type template and a value mapping template; encrypts the declaration message and sends it to the customs declaration system, enabling the customs declaration system to decrypt and verify the declaration. Using message type templates and value mapping templates to construct the declaration message flexibly adapts to the requirements of different customs authorities, ensuring data accuracy and consistency. Encrypting the declaration message protects sensitive information, preventing unauthorized access or tampering during transmission, thus improving the accuracy and efficiency of customs declaration.

[0107] Based on the same technical concept, embodiments of this application also provide a customs declaration system, such as... Figure 3 As shown, the system includes:

[0108] The declaration configuration information module 301 is used to respond to the order declaration request from the e-commerce platform and obtain the corresponding declaration configuration information of the target customs based on the order declaration request.

[0109] The declaration message construction module 302 is used to call the message type template and value mapping template to construct the declaration configuration information into a declaration message;

[0110] The encryption module 303 is used to encrypt the declaration message and send it to the customs declaration system so that the customs declaration system can decrypt the declaration message and verify the declaration.

[0111] This application also provides an electronic device corresponding to the method provided in the foregoing embodiments. Please refer to... Figure 4 The diagram illustrates an electronic device provided by some embodiments of this application. The electronic device 20 may include: a processor 200, a memory 201, a bus 202, and a communication interface 203. The processor 200, the communication interface 203, and the memory 201 are connected via the bus 202. The memory 201 stores a computer program that can run on the processor 200. When the processor 200 runs the computer program, it executes the method provided by any of the foregoing embodiments of this application.

[0112] The memory 201 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one physical port (which can be wired or wireless), such as the Internet, wide area network, local area network, or metropolitan area network.

[0113] Bus 202 can be an ISA bus, PCI bus, or EISA bus, etc. Buses can be divided into address buses, data buses, control buses, etc. Memory 201 is used to store programs. After receiving execution instructions, processor 200 executes the program. The methods disclosed in any of the foregoing embodiments of this application can be applied to processor 200, or implemented by processor 200.

[0114] The processor 200 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of the processor 200 or by instructions in software form. The processor 200 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules may reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory 201. The processor 200 reads the information in memory 201 and, in conjunction with its hardware, completes the steps of the above method.

[0115] The electronic devices and methods provided in the embodiments of this application are based on the same inventive concept and have the same beneficial effects as the methods they employ, operate, or implement.

[0116] This application also provides a computer-readable storage medium corresponding to the method provided in the foregoing embodiments. Please refer to... Figure 5 The computer-readable storage medium shown is an optical disc 30, on which a computer program (i.e., a program product) is stored. When the computer program is run by a processor, it executes the methods provided in any of the aforementioned embodiments.

[0117] It should be noted that examples of computer-readable storage media may also include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other optical and magnetic storage media, which will not be elaborated here.

[0118] The computer-readable storage medium provided in the above embodiments of this application and the method provided in the embodiments of this application are based on the same inventive concept and have the same beneficial effects as the methods adopted, run or implemented by the applications stored therein.

[0119] The above are merely preferred embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0120] The above description is only a preferred embodiment of the present invention and does not limit the patent scope of the present invention. All equivalent structural transformations made under the concept of the present invention using the contents of the present invention specification and drawings, or direct / indirect applications in other related technical fields, are included within the patent protection scope of the present invention.

Claims

1. A customs declaration method, characterized in that, The method includes: In response to an order declaration request from an e-commerce platform, the corresponding declaration configuration information of the target customs is obtained based on the order declaration request; The declaration configuration information is constructed into a declaration message by calling the message type template and value mapping template; The declaration message is encrypted and sent to the customs declaration system, so that the customs declaration system can decrypt the declaration message and verify the declaration.

2. The method as described in claim 1, characterized in that, The call message type template and value mapping template construct the declaration configuration information into a declaration message, including: A declaration configuration message is generated based on the declaration configuration information and the message type template; the message type template is specified by the target customs. The application configuration message is preprocessed to obtain a preprocessed application configuration message. The preprocessed declaration configuration message is adjusted according to the business logic of the e-commerce platform to obtain the adjusted declaration configuration message; The adjusted declaration configuration message is merged with the value mapping template to generate the declaration message; the value mapping template is specified by the target customs.

3. The method as described in claim 2, characterized in that, Before merging the adjusted declaration configuration message with the value mapping template, the method further includes: Convert the adjusted declaration configuration message into a declaration configuration message in the format specified by the target customs; The value mapping template is read using the target customs-specified format parsing library to obtain the value mapping template under the target customs-specified format.

4. The method as described in claim 2, characterized in that, The application configuration message is preprocessed to obtain a preprocessed application configuration message, including: Adjust the declaration configuration message based on the target customs address length; The adjusted declaration configuration message is subjected to character filtering and / or escaping to obtain a preprocessed declaration configuration message.

5. The method as described in claim 4, characterized in that, The step of setting character filtering and / or escaping processing for the adjusted declaration configuration message to obtain the preprocessed declaration configuration message includes: According to the filter character table set by the target customs, delete the characters in the adjusted declaration configuration message that exist in the filter character table; and / or Based on the escape mapping table, characters in the adjusted declaration configuration message that exist in the escape mapping table are escaped.

6. The method as described in claim 2, characterized in that, The preprocessed declaration configuration message is adjusted according to the business logic of the e-commerce platform to obtain the adjusted declaration configuration message, including: The preprocessed declaration configuration message is processed to generate an order identifier, confirm package details, and / or remove duplicate addresses, resulting in an adjusted declaration configuration message.

7. The method as described in claim 1, characterized in that, The process of encrypting the declaration message and sending it to the customs declaration system includes: The declaration message is encrypted according to the encryption method specified by the target customs to obtain an encrypted message; The encrypted message is digitally signed to obtain a signed message; The signed message is sent to the customs declaration system of the target customs office.

8. A customs declaration system, characterized in that, The system includes: The declaration configuration information module is used to respond to the order declaration request from the e-commerce platform and obtain the corresponding declaration configuration information of the target customs based on the order declaration request; The declaration message construction module is used to call the message type template and the value mapping template to construct the declaration configuration information into a declaration message; An encryption module is used to encrypt the declaration message and send it to the customs declaration system, so that the customs declaration system can decrypt the declaration message and verify the declaration.

9. An electronic device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor, when running the computer program, performs an action to implement the method as claimed in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, It stores computer-readable instructions that can be executed by a processor to implement the method as described in any one of claims 1-7.