CN115526587A - Method and device for generating customs message - Google Patents

Method and device for generating customs message Download PDF

Info

Publication number
CN115526587A
CN115526587A CN202211115414.XA CN202211115414A CN115526587A CN 115526587 A CN115526587 A CN 115526587A CN 202211115414 A CN202211115414 A CN 202211115414A CN 115526587 A CN115526587 A CN 115526587A
Authority
CN
China
Prior art keywords
attribute
customs
target
message
field
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211115414.XA
Other languages
Chinese (zh)
Inventor
任洪波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Zhenshi Information Technology Co Ltd
Original Assignee
Beijing Jingdong Zhenshi Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Zhenshi Information Technology Co Ltd filed Critical Beijing Jingdong Zhenshi Information Technology Co Ltd
Priority to CN202211115414.XA priority Critical patent/CN115526587A/en
Publication of CN115526587A publication Critical patent/CN115526587A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/10Office automation; Time management
    • G06Q10/103Workflow collaboration or project management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/186Templates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/08Logistics, e.g. warehousing, loading or distribution; Inventory or stock management

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Human Resources & Organizations (AREA)
  • Strategic Management (AREA)
  • Theoretical Computer Science (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Economics (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Tourism & Hospitality (AREA)
  • Quality & Reliability (AREA)
  • Operations Research (AREA)
  • General Business, Economics & Management (AREA)
  • Marketing (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Development Economics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a customs message generation method and device, and relates to the technical field of computers. One embodiment of the method comprises: acquiring a document to be processed and a customs message template; acquiring one or more target fields to be filled from a customhouse message template, and acquiring attribute services corresponding to the one or more target fields respectively; acquiring a field value corresponding to a target field from a document to be processed by using an attribute service; and filling the field value corresponding to the target field into a customs message template to generate a customs message. According to the method and the device, the attribute services corresponding to the target fields are used for respectively acquiring the corresponding field values from the document to be processed, so that independent execution among the attribute services is realized, and the final message generation failure caused by the failure of field value acquisition of a certain field can be avoided. Meanwhile, when the target field is changed, codes do not need to be rewritten, and only attribute service needs to be correspondingly obtained, so that the flexibility and maintainability are high.

Description

Method and device for generating customs message
Technical Field
The invention relates to the technical field of intelligent logistics, in particular to a customs message generation method and device.
Background
In import and export business of logistics, the logistics information needs to be docked with customs and filled in customs documents according to requirements of customs. The existing document generation process is to compile a fixed code according to a target field required in a customs document so as to extract target information corresponding to the target field from a logistics document. However, the target fields required in the customs documents are continuously updated, research and development personnel are required to pay attention to official notice of customs constantly, codes are rewritten according to the target fields required in the latest customs documents, and the codes are tested and put on line.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for generating a customs message, which may respectively obtain field values corresponding to target fields from a document to be processed through attribute services respectively corresponding to the target fields, and generate the customs message in response to the field values filled in a customs message template. The attribute services are independently executed, so that the process of acquiring the field value of each target field is not influenced mutually, and the final message generation failure caused by the field value acquisition failure of a certain field can be avoided. Meanwhile, when the target field is changed, codes do not need to be rewritten, and only attribute service needs to be correspondingly obtained, so that the flexibility and maintainability are high.
To achieve the above object, according to an aspect of the embodiments of the present invention, a method for generating a customs message is provided.
The method for generating the customs message comprises the following steps: acquiring a document to be processed and a customs message template; acquiring one or more target fields to be filled from the customhouse message template, and acquiring attribute services corresponding to the one or more target fields respectively; acquiring a field value of a corresponding target field from the document to be processed by using the attribute service; and filling the field value corresponding to the target field into the customs message template to generate a customs message.
Optionally, before the obtaining attribute services respectively corresponding to one or more of the target fields, the method further includes: configuring corresponding attribute services for one or more fields, and storing one or more attribute services into an attribute set;
the obtaining of the attribute service corresponding to one or more of the target fields includes: and acquiring attribute services respectively corresponding to one or more target fields from the attribute service set.
Optionally, the obtaining one or more target fields to be filled from the customs message template and obtaining attribute services corresponding to the one or more target fields respectively includes: respectively acquiring one or more target fields and attribute services corresponding to the target fields by utilizing one or more process nodes in a process arrangement engine; and the process nodes correspond to the target fields one by one.
Optionally, the obtaining attribute services respectively corresponding to one or more of the target fields includes: determining the service type of the bill to be processed and a target attribute service set corresponding to the service type; and acquiring attribute services respectively corresponding to one or more target fields from the target attribute service set by using one or more process nodes corresponding to the service types.
Optionally, the method further comprises: and configuring the arranging sequence of one or more process nodes, and the field, the service type and the attribute service corresponding to each process node.
Optionally, the obtaining attribute services respectively corresponding to one or more of the target fields further includes: and aiming at the condition that the target fields are multiple, sequentially utilizing the process nodes respectively corresponding to the target fields to acquire a plurality of corresponding attribute services according to the arrangement sequence.
Optionally, the obtaining, by using the attribute service, a field value of a corresponding target field from the to-be-processed document includes: and under the condition that any one attribute service obtains an execution result indicating execution failure, repeatedly executing the current attribute service until all the attribute services obtain the execution result indicating execution success or the repetition times are greater than a preset threshold value.
To achieve the above object, according to another aspect of the embodiments of the present invention, an apparatus for generating a customs message is provided.
The customs message generation device of the embodiment of the invention comprises: the acquisition module is used for acquiring the document to be processed and the customs message template; a determining module, configured to obtain one or more target fields to be filled from the customs message template, and obtain attribute services corresponding to the one or more target fields respectively; acquiring a field value of a corresponding target field from the document to be processed by using the attribute service; and the filling module is used for filling the field value corresponding to the target field into the customs message template to generate a customs message.
To achieve the above object, according to another aspect of the embodiments of the present invention, an electronic device for generating a customs message is provided.
An electronic device for generating a customs message according to an embodiment of the present invention includes: one or more processors; the storage device is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method for generating the customs message according to the embodiment of the invention.
To achieve the above object, according to still another aspect of embodiments of the present invention, there is provided a computer-readable storage medium.
A computer-readable storage medium according to an embodiment of the present invention stores thereon a computer program, and when the computer program is executed by a processor, the computer program implements a customs message generation method according to an embodiment of the present invention.
One embodiment of the above invention has the following advantages or benefits: and respectively acquiring the field values corresponding to the target fields from the documents to be processed through the attribute services respectively corresponding to the target fields, and filling the field values into a customs message template, namely, each attribute service is independently executed without mutual influence, and the final message generation failure caused by the failure of the acquisition of the field value of a certain field can be avoided. Meanwhile, when the target field is changed, codes do not need to be rewritten, and only attribute service needs to be correspondingly obtained, so that the flexibility and maintainability are high.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
fig. 1 is a flowchart of a method for generating a customs message according to an embodiment of the present invention;
fig. 2 is a flowchart of a method for generating a customs message for multiple service types according to an embodiment of the present invention;
fig. 3 is a flowchart of a specific method for generating a customs message according to an embodiment of the present invention;
fig. 4 is a block diagram of a structure of a customs message generation apparatus according to an embodiment of the present invention;
FIG. 5 is an exemplary system architecture diagram in which embodiments of the present invention may be applied;
fig. 6 is a schematic block diagram of a computer system suitable for use in implementing a terminal device or server of an embodiment of the invention.
Detailed Description
Exemplary embodiments of the invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
It should be noted that the embodiments of the present invention and the technical features of the embodiments may be combined with each other without conflict.
Fig. 1 is a flowchart of a method for generating a customs message according to an embodiment of the present invention.
As shown in fig. 1, the method for generating a customs message according to the embodiment of the present invention mainly includes the following steps:
step S101: acquiring a document to be processed and a customs message template;
step S102: acquiring one or more target fields to be filled from a customhouse message template, and acquiring attribute services corresponding to the one or more target fields respectively;
step S103: acquiring a field value corresponding to a target field from a document to be processed by using an attribute service;
step S104: and filling the field value corresponding to the target field into a customs message template to generate a customs message.
The document to be processed is a document that needs to be reported to customs, and in an optional embodiment, the document may include any one of the following multiple service types: payment order, shipping order, manifest. In the prior art, because fields contained in documents of various service types are different, for documents to be processed of different service types, codes need to be written separately to extract field values. In the invention, because the corresponding field value is obtained through the attribute service corresponding to the field, different attribute services only need to be developed according to the field, a whole set of codes does not need to be written, and only the attribute service corresponding to the field value is needed when the documents to be processed of different service types are faced.
It should be noted that the attribute service is a script file capable of acquiring a corresponding field value from the to-be-processed document, and each field corresponds to a unique attribute service, for example, to acquire an order code from the to-be-processed document, the corresponding attribute service is an order code service, to acquire an order amount from the to-be-processed document, and the corresponding attribute service is an order amount service.
In order to realize that the field value can be obtained by using the attribute service corresponding to the target field, in an optional embodiment, before obtaining the attribute service corresponding to one or more target fields respectively, the method may further include: configuring one or more fields with corresponding attribute services, and storing one or more attribute services into an attribute set. By configuring and storing the attribute services for the respective fields in advance, the step of obtaining the attribute services corresponding to one or more target fields in step S102 may further include: and acquiring attribute services respectively corresponding to one or more target fields from the attribute service set. By constructing the attribute set, the attribute services corresponding to different fields can be stored, when a required target field is changed in a customs message, codes do not need to be rewritten every time, and the attribute services corresponding to the target field can be directly obtained from the attribute set, so that the code compiling and developing time is greatly saved, and the generation efficiency of the customs message is improved.
In order to implement independent work between the attribute services, in an alternative embodiment, step S102 may further include: respectively acquiring one or more target fields and attribute services corresponding to the target fields by utilizing one or more process nodes in a process arrangement engine; wherein, the process nodes correspond to the target fields one by one. Different process nodes are respectively acquired by different process nodes in the process arrangement engine, so that the attribute services are not influenced mutually, and the normal acquisition of other target fields is not influenced even if some target fields are failed to be acquired, and the generation efficiency of the customs message is improved.
The process arrangement engine is an open source process arrangement engine commonly used in the field, and can set process nodes according to the requirements of users, a plurality of process nodes are usually set in the flow Cheng Bianpai engine, and each process node executes different script files respectively. According to the embodiment of the invention, the process nodes and the target fields are arranged in a one-to-one correspondence manner, so that the multiple process nodes can respectively acquire the attribute services corresponding to the target fields, and the decoupling between different attribute services is realized.
In a further optional embodiment, for a case that the document to be processed corresponds to multiple service types, step S102 may be as shown in fig. 2, and further includes:
step S201: determining the service type of the bill to be processed and a target attribute service set corresponding to the service type;
step S202: and acquiring attribute services respectively corresponding to one or more target fields from the target attribute service set by using one or more process nodes corresponding to the service types.
Since script logics for acquiring field values under different service types may be different, attribute services corresponding to different service types need to be distinguished, that is, a plurality of attribute services are divided into one or more attribute service sets in advance according to the service types, each attribute service set corresponds to one service type, and each finally obtained attribute service set is an attribute service corresponding to each field under the current service type.
For example, the order type and the waybill type may both involve fields of order codes, but the order codes in the order type and the waybill type cannot be obtained through one attribute service, so two attribute service sets need to be set: the attribute service set 1 corresponds to an order type and the attribute service set 2 corresponds to an invoice type. And when the document to be processed is the order type, acquiring the attribute service 1A corresponding to the order code from the attribute service set 1 to acquire the order code in the order type, and when the document to be processed is the shipping form type, acquiring the attribute service 2A corresponding to the order code from the attribute service set 1 to acquire the order code in the shipping form type. Furthermore, the fields involved in different traffic types are usually different, i.e. the attribute services contained in different sets of attribute services are also different. By classifying the attribute service sets according to the service types, the situation that the same target field is related to different service types but the script logic for acquiring the field value is different, and the acquisition fails can be avoided.
In an optional embodiment, the method for generating a customs message provided in the embodiment of the present invention further includes: and configuring the arranging sequence of one or more process nodes, and the corresponding field, service type and attribute service of each process node.
By configuring fields, service types and attribute services corresponding to each process node in advance, required node codes can be determined when different types of orders to be processed are aimed at, for example, 5 nodes with the node codes of 001 to 005 correspond to an order ID, an order amount, an order person name, a commodity code and an order person identification number in the order type respectively, and 5 nodes with the node codes of 006 to 010 correspond to an waybill ID, an operator name, the waybill amount, a goods weight and a transportation mode in the waybill type respectively. When the document to be processed is the order type, the process arrangement engine can select the nodes from 5 nodes with the node codes of 001 to 005 according to the target field, and does not select 5 nodes with the node codes of 006 to 010.
In addition, when one or more target fields have dependency, the field values need to be acquired in a fixed order, that is, the field value of the parent field is acquired first, so that the field values of the sub-fields can be acquired. For example, the field value of the city in direct jurisdiction must be acquired first, so that the field value of the city area can be acquired. Therefore, the process of acquiring the attribute service in step S102 may further include: and aiming at the condition that the target fields are multiple, sequentially utilizing the process nodes respectively corresponding to the target fields to acquire a plurality of corresponding attribute services according to the arrangement sequence. By configuring the arranging sequence of one or more process nodes, the efficiency of obtaining the field values can be improved, so that the field values of all the fields can be obtained sequentially according to the fixed arranging sequence when a user needs to be specific.
In order to avoid the failure of generating the entire customs message due to the failure of obtaining a certain field value, in an optional embodiment, the step of obtaining the field value of the corresponding target field from the document to be processed by using the attribute service includes: and under the condition that any one attribute service obtains an execution result indicating execution failure, repeatedly executing the current attribute service until all the attribute services obtain the execution result indicating execution success or the repetition times are greater than a preset threshold value.
The preset threshold value can be set according to actual conditions, if the execution times of the attribute service is greater than the preset threshold value, the target field corresponding to the attribute service is set as an abnormal field, and after a customs message is generated, the abnormal field is pushed to a user, so that the user can conveniently and manually supplement the abnormal field, and modify and optimize the script file of the attribute service corresponding to the abnormal field. By limiting the execution failure times, the target fields of the execution failure caused by short-term influence such as network reasons and the like can be prevented from being listed into abnormal fields, unnecessary labor cost is reduced, meanwhile, the repeated execution time can be limited, the situation that unconditional repeated execution is carried out all the time is avoided, and the generation efficiency of the customs message is improved.
In an optional embodiment, after the field values corresponding to the target fields are sequentially obtained according to the arrangement order, the current process is ended, and a customs message is generated according to the execution result of each attribute service.
Fig. 3 shows a specific method for generating a customs message according to an embodiment of the present invention, where the specific process includes:
step S301: acquiring a document to be processed and a customs message template;
step S302: acquiring a plurality of target fields to be filled from a customs message template by using a process arrangement engine;
step S303: determining a plurality of process nodes corresponding to a plurality of target fields to be filled in the stream Cheng Bianpai engine;
step S304: acquiring attribute services respectively corresponding to each process node;
step S305: acquiring field values of target fields corresponding to the attribute services from the document to be processed according to the arrangement sequence of the process nodes by using the attribute services;
step S306: and filling the corresponding target field of each field value into a customs message template to generate a customs message.
According to the method for generating the customs message, the field values corresponding to the target fields can be acquired from the documents to be processed respectively through the attribute services corresponding to the target fields respectively and filled into the customs message template, namely, the attribute services are executed independently without mutual influence, and the final message generation failure caused by the failure of acquiring the field values of a certain field can be avoided. Meanwhile, when the target field is changed, codes do not need to be rewritten, and only attribute service needs to be correspondingly obtained, so that the flexibility and maintainability are high.
Fig. 4 is a block diagram of a customs message generation apparatus according to an embodiment of the present invention.
As shown in fig. 4, a customs message generation apparatus 400 according to an embodiment of the present invention includes:
the acquiring module 401 is configured to acquire a document to be processed and a customs message template;
a determining module 402, configured to obtain one or more target fields to be filled from the customs message template, and obtain attribute services corresponding to the one or more target fields respectively; acquiring a field value corresponding to a target field from the document to be processed by using the attribute service;
a filling module 403, configured to fill the field value corresponding to the target field into the customs message template, so as to generate a customs message.
In an optional embodiment, the apparatus further includes a storage module, configured to configure corresponding attribute services for the one or more fields before the obtaining of the attribute services corresponding to the one or more target fields, respectively, and store the one or more attribute services into an attribute set; the determining module 402 is further configured to obtain, from the attribute service set, attribute services respectively corresponding to one or more of the target fields.
In an optional embodiment, the determining module 402 is further configured to, by using one or more process nodes in a process orchestration engine, respectively obtain one or more of the target fields and attribute services corresponding to the target fields; and the process nodes correspond to the target fields one by one.
In an optional embodiment, the determining module 402 is further configured to determine a service type of the to-be-processed document and a target attribute service set corresponding to the service type; and acquiring attribute services respectively corresponding to one or more target fields from the target attribute service set by using one or more process nodes corresponding to the service types.
In an optional embodiment, the determining module 402 is further configured to configure an arrangement order of one or more flow nodes, and a field, a service type, and an attribute service corresponding to each flow node.
In an optional embodiment, the determining module 402 is further configured to, for a case that the target field is multiple, sequentially obtain, according to the arrangement sequence, multiple corresponding attribute services by using the process nodes respectively corresponding to the multiple target fields.
In an optional embodiment, the determining module 402 is further configured to, in a case that any one of the attribute services obtains an execution result indicating that the execution fails, repeatedly execute the current attribute service until all of the attribute services obtain the execution result indicating that the execution succeeds or the number of times of the repetition is greater than a preset threshold.
According to the customs message generation device provided by the embodiment of the invention, the field values corresponding to the target fields can be respectively obtained from the documents to be processed through the attribute services respectively corresponding to the target fields and are filled in the customs message template, namely, the attribute services are independently executed without mutual influence, and the final message generation failure caused by the failure of the field value acquisition of a certain field can be avoided. Meanwhile, when the target field is changed, codes do not need to be rewritten, and only attribute service needs to be correspondingly obtained, so that the flexibility and maintainability are high.
Fig. 5 shows an exemplary system architecture 500 of a method or an apparatus for generating a customs message to which an embodiment of the present invention may be applied.
As shown in fig. 5, the system architecture 500 may include terminal devices 501, 502, 503, a network 504, and a server 505. The network 504 serves to provide a medium for communication links between the terminal devices 501, 502, 503 and the server 505. Network 504 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
A user may use terminal devices 501, 502, 503 to interact with a server 505 over a network 504 to receive or transmit data or the like. The terminal devices 501, 502, 503 may have various communication client applications installed thereon, such as a shopping application, a web browser application, a search application, an instant messaging tool, a mailbox client, social platform software, and the like.
The terminal devices 501, 502, 503 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 505 may be a server providing various services, such as a background management server for processing according to the to-be-processed documents sent by the user using the terminal devices 501, 502, 503. The background management server can analyze and process the received data such as the document to be processed and the like, and feed back the processing result (customs message) to the terminal equipment.
It should be noted that the method for generating a customs message provided in the embodiment of the present invention is generally executed by the server 505, and accordingly, the apparatus for generating a customs message is generally disposed in the server 505.
It should be understood that the number of terminal devices, networks, and servers in fig. 5 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 6, a block diagram of a computer system 600 suitable for use with a terminal device implementing an embodiment of the invention is shown. The terminal device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the use range of the embodiment of the present invention.
As shown in fig. 6, the computer system 600 includes a Central Processing Unit (CPU) 601 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the system 600 are also stored. The CPU 601, ROM 602, and RAM 603 are connected to each other via a bus 604. An input/output (I/O) first interface 605 is also connected to bus 604.
The following components are connected to the I/O first interface 605: an input portion 606 including a keyboard, a mouse, and the like; an output portion 607 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 608 including a hard disk and the like; and a communication section 609 including a network first interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The driver 610 is also connected to the I/O first interface 605 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 610 as necessary, so that a computer program read out therefrom is mounted in the storage section 608 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 609, and/or installed from the removable medium 611. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 601.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present invention, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor includes an acquisition module, a determination module, and a population module. The names of the modules do not form a limitation on the modules themselves in some cases, for example, the acquiring module may also be described as a module for acquiring documents to be processed and customs message templates.
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not assembled into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: acquiring a document to be processed and a customs message template; acquiring one or more target fields to be filled from the customs message template, and acquiring attribute services corresponding to the one or more target fields respectively; acquiring a field value corresponding to a target field from the document to be processed by using the attribute service; and filling the field value corresponding to the target field into the customs message template to generate a customs message.
According to the technical scheme of the embodiment of the invention, the field values corresponding to the target fields can be respectively obtained from the document to be processed through the attribute services respectively corresponding to the target fields and are filled into the customs message template, namely, the attribute services are independently executed without mutual influence, and the final message generation failure caused by the failure of the field value acquisition of a certain field can be avoided. Meanwhile, when the target field is changed, codes do not need to be rewritten, and only attribute service needs to be correspondingly obtained, so that the flexibility and maintainability are high.
The above-described embodiments should not be construed as limiting the scope of the invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method for generating a customs message is characterized by comprising the following steps:
acquiring a document to be processed and a customs message template;
acquiring one or more target fields to be filled from the customhouse message template, and acquiring attribute services corresponding to the one or more target fields respectively;
acquiring a field value corresponding to a target field from the document to be processed by using the attribute service;
and filling the field value corresponding to the target field into the customs message template to generate a customs message.
2. The method of claim 1, further comprising, before the obtaining attribute services corresponding to one or more of the target fields respectively:
configuring corresponding attribute services for one or more fields, and storing one or more attribute services into an attribute set;
the obtaining attribute services respectively corresponding to one or more of the target fields includes:
and acquiring attribute services respectively corresponding to one or more target fields from the attribute service set.
3. The method according to claim 2, wherein the obtaining one or more target fields to be filled from the customs message template and obtaining attribute services corresponding to the one or more target fields respectively comprises:
respectively acquiring one or more target fields and attribute services corresponding to the target fields by utilizing one or more process nodes in a process arrangement engine; and the process nodes correspond to the target fields one by one.
4. The method according to claim 3, wherein the obtaining attribute services corresponding to the one or more target fields respectively comprises:
determining the service type of the bill to be processed and a target attribute service set corresponding to the service type;
and acquiring attribute services respectively corresponding to one or more target fields from the target attribute service set by using one or more process nodes corresponding to the service types.
5. The method of claim 3, further comprising:
and configuring the arranging sequence of one or more process nodes, and the field, the service type and the attribute service corresponding to each process node.
6. The method of claim 5, wherein obtaining attribute services corresponding to the one or more target fields, respectively, further comprises:
and aiming at the condition that the target fields are multiple, sequentially utilizing the process nodes respectively corresponding to the target fields to acquire a plurality of corresponding attribute services according to the arrangement sequence.
7. The method of claim 6, wherein the obtaining, by the attribute service, a field value corresponding to the target field from the document to be processed comprises:
and under the condition that any one attribute service obtains an execution result indicating execution failure, repeatedly executing the current attribute service until all the attribute services obtain the execution result indicating execution success or the repetition times are greater than a preset threshold value.
8. A customs message generation apparatus, comprising:
the acquisition module is used for acquiring the document to be processed and the customs message template;
a determining module, configured to obtain one or more target fields to be filled from the customs message template, and obtain attribute services corresponding to the one or more target fields respectively; acquiring a field value corresponding to a target field from the document to be processed by using the attribute service;
and the filling module is used for filling the field value corresponding to the target field into the customs message template to generate a customs message.
9. An electronic device for generating a customs message, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-7.
10. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-7.
CN202211115414.XA 2022-09-14 2022-09-14 Method and device for generating customs message Pending CN115526587A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211115414.XA CN115526587A (en) 2022-09-14 2022-09-14 Method and device for generating customs message

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211115414.XA CN115526587A (en) 2022-09-14 2022-09-14 Method and device for generating customs message

Publications (1)

Publication Number Publication Date
CN115526587A true CN115526587A (en) 2022-12-27

Family

ID=84697636

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211115414.XA Pending CN115526587A (en) 2022-09-14 2022-09-14 Method and device for generating customs message

Country Status (1)

Country Link
CN (1) CN115526587A (en)

Similar Documents

Publication Publication Date Title
CN110472207A (en) List generation method and device
CN109901987B (en) Method and device for generating test data
CN109766127A (en) Method for updating application version information
CN111444077A (en) Method and device for generating flow node test data
CN110888639A (en) Business code compiling and packaging method and device
CN109960212A (en) Task sending method and device
CN112947919A (en) Method and device for constructing service model and processing service request
CN112817562A (en) Service processing method and device
CN110223179A (en) The data processing method of fund, device, system, medium
CN110928594A (en) Service development method and platform
CN113535220A (en) Code packet management method and device
CN113378346A (en) Method and device for model simulation
CN111382953A (en) Dynamic process generation method and device
CN115801873A (en) Service distribution method, system, electronic device and storage medium
CN110895777A (en) Method and device for processing overtime service list
CN115526587A (en) Method and device for generating customs message
CN113312900A (en) Data verification method and device
CN113011858A (en) Audit project configuration and execution method and device
CN112799797B (en) Task management method and device
CN113762910A (en) Document monitoring method and device
CN113741888A (en) Service processing method and device
CN112363716A (en) Method, system and device for dynamically assembling evaluation model
CN113253991A (en) Task visualization processing method and device, electronic equipment and storage medium
CN113448960A (en) Method and device for importing form file
CN114969059B (en) Method and device for generating order information, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination