CN111861695A - Message assembling method and device - Google Patents

Message assembling method and device Download PDF

Info

Publication number
CN111861695A
CN111861695A CN202010584607.4A CN202010584607A CN111861695A CN 111861695 A CN111861695 A CN 111861695A CN 202010584607 A CN202010584607 A CN 202010584607A CN 111861695 A CN111861695 A CN 111861695A
Authority
CN
China
Prior art keywords
message
entity object
assembled
variable
variables
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
CN202010584607.4A
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.)
OneConnect Smart Technology Co Ltd
OneConnect Financial Technology Co Ltd Shanghai
Original Assignee
OneConnect Financial Technology Co Ltd Shanghai
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 OneConnect Financial Technology Co Ltd Shanghai filed Critical OneConnect Financial Technology Co Ltd Shanghai
Priority to CN202010584607.4A priority Critical patent/CN111861695A/en
Publication of CN111861695A publication Critical patent/CN111861695A/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
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/02Banking, e.g. interest calculation or account maintenance
    • 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
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Technology Law (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Development Economics (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a message assembling method and a message assembling device, relates to the technical field of block chains, and mainly aims to improve the message assembling efficiency, ensure the effectiveness of message assembling, reduce the workload of service personnel and reduce the labor cost. The method comprises the following steps: receiving an assembly request of a message to be assembled, wherein the assembly request carries transaction information corresponding to the message to be assembled; creating an entity object corresponding to the message to be assembled, and performing assignment processing on the entity object according to each transaction information; and if the assigned entity object accords with a preset message detection rule, generating the message to be assembled according to the assigned entity object. The invention is suitable for message assembly.

Description

Message assembling method and device
Technical Field
The present invention relates to the field of block chain technology, and in particular, to a method and an apparatus for packet assembling.
Background
At present, various financial institutions meeting the qualification perform related cross-border transactions through an SWIFT (Society for world Wide banking financial telecommunication Society of the same industry as banking, International) network, related information needs to be sent to corresponding receivers by using SWIFT messages, the SWIFT messages are not in simple JSON and XML formats, the messages are based on the standard MTS of FIN, the related messages are of various types, and each domain has different format standards, so that the assembly of effective SWIFT messages is very important.
The inventor of the present application finds that, usually, according to the business requirements, business personnel of a financial institution manually assembles and splices a SWIFT message. However, assembly of the SWIFT messages is complex, different message assembly methods are different, a large amount of labor cost is consumed, and meanwhile, the assembly efficiency of the SWIFT messages is low due to the artificial assembly method.
Disclosure of Invention
The invention provides a message assembling method and device, which mainly aim to improve the message assembling efficiency, ensure the effectiveness of message assembling, reduce the workload of business personnel and reduce the labor cost.
According to a first aspect of the present invention, there is provided a packet assembling method, including:
receiving an assembly request of a message to be assembled, wherein the assembly request carries transaction information corresponding to the message to be assembled;
creating an entity object corresponding to the message to be assembled, and performing assignment processing on the entity object according to each transaction information;
and if the assigned entity object accords with a preset message detection rule, generating the message to be assembled according to the assigned entity object.
According to a second aspect of the present invention, there is provided a message assembling apparatus, comprising:
the device comprises a receiving unit, a sending unit and a receiving unit, wherein the receiving unit is used for receiving an assembly request of a message to be assembled, and the assembly request carries transaction information corresponding to the message to be assembled;
the creating unit is used for creating an entity object corresponding to the message to be assembled and carrying out assignment processing on the entity object according to each transaction information;
and the generating unit is used for generating the message to be assembled according to the assigned entity object if the assigned entity object accords with a preset message detection rule.
According to a third aspect of the present invention, there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of:
receiving an assembly request of a message to be assembled, wherein the assembly request carries transaction information corresponding to the message to be assembled;
creating an entity object corresponding to the message to be assembled, and performing assignment processing on the entity object according to each transaction information;
and if the assigned entity object accords with a preset message detection rule, generating the message to be assembled according to the assigned entity object.
According to a fourth aspect of the present invention, there is provided a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the program:
receiving an assembly request of a message to be assembled, wherein the assembly request carries transaction information corresponding to the message to be assembled;
creating an entity object corresponding to the message to be assembled, and performing assignment processing on the entity object according to each transaction information;
and if the assigned entity object accords with a preset message detection rule, generating the message to be assembled according to the assigned entity object.
Compared with the current mode of manually assembling and splicing the SWIFT message, the message assembling method and the message assembling device can receive the assembling request of the message to be assembled, wherein the assembling request carries the transaction information corresponding to the message to be assembled; creating an entity object corresponding to the message to be assembled, and performing assignment processing on the entity object according to each transaction information; meanwhile, if the assigned entity object conforms to a preset message detection rule, the message to be assembled is generated according to the assigned entity object, so that the complexity of butting the SWIFT message is simplified by creating the entity object, the message can be automatically assembled according to the set rule, the message assembly efficiency is improved, the message assembly effectiveness can be ensured, the workload of service personnel is reduced, the labor cost is reduced, and the financial institution can better expand and mine cross-border services conveniently.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 shows a flow chart of a message assembling method according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating another message assembly method according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a message assembling apparatus according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of another message assembling apparatus according to an embodiment of the present invention;
fig. 5 shows a physical structure diagram of a computer device according to an embodiment of the present invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
At present, efficiency of manually assembling and splicing SWIFT messages is low, validity of the spliced messages cannot be guaranteed due to different service levels of service personnel, and meanwhile, a large amount of labor cost is consumed.
In order to solve the above problem, an embodiment of the present invention provides a packet assembling method, as shown in fig. 1, where the method includes:
101. and receiving an assembly request of the message to be assembled.
The assembling request carries transaction information corresponding to the message to be assembled, the message to be assembled is a SWIFT message which is used by a financial institution for cross-border transaction sending, the transaction information is related information which is input by a user at a user end and is used for transacting cross-border services such as remittance, transfer, settlement, consignment and the like, in order to automatically assemble the SWIFT message and improve the assembling efficiency of the message, the embodiment of the invention provides a mode for automatically assembling the message, and an execution main body of the embodiment of the invention is a device for processing the assembling request of the message to be assembled. For the embodiment of the invention, when a user needs to transact cross-border services, the user can select transacted service types and fill in related service information through an APP corresponding to a financial institution or user operating equipment, for example, the user transacts cross-border transfer and report services, the user enters an operation page transacted by the cross-border services, the user selects the transacted cross-border service type for remittance first, then inputs transaction information such as sender name, receiver account number, remittance amount and the like into the related page transacted by the cross-border services, after the user completes the transaction information and clicks a 'confirm' button, an assembly request of a message to be assembled is sent to a financial institution server, the assembly request carries the transaction information filled by the user, the server receives the message assembly request, automatically assembles an SWIFT message according to the transaction information carried by the assembly request without manually participating in assembly, the workload of service personnel is greatly reduced, and it should be noted that a specific application scenario in the embodiment of the present invention may be, but is not limited to, a SWIFT message, and may also be used for assembling other types of messages.
102. And creating an entity object corresponding to the message to be assembled, and performing assignment processing on the entity object according to each transaction information.
Wherein, the message to be assembled includes a message header and a main text area, the message header and the main text area both include a plurality of variables, the message header records the information of the sender, the message header is further divided into a basic message header, an application message header and a user message header, the above-mentioned 3 types of message headers may include variables such as a Block Identifier, an application Identifier, a Service Identifier, an LT destination Address, a line program Number (Session Number), a text serial Number (Sequence Number, ISN or OSN), and the like, and there are corresponding one or more attributes under different variables, for example, the basic message header {1: F01 c extx 7842733622 }, the basic message header includes a txsegment Identifier "1" and a plurality of attribute values under the segment Identifier, where "F" and "01" are fixed values, "twc xxxx" is xxxx "xxxxxx" and "357842" and "733622" are random codes, the basic, application and user headers may each include multiple ones of the above variables. The main text area records main transaction information, and the main text area also comprises a plurality of variables, and one or more attributes are corresponding to different variables, for example, 32A:191014HKD1331, 0' in the main text area of the MT103 message, wherein, the 32A field is a variable, and a plurality of attribute values are specifically time information "191014", currency type "HKD" and money amount "1331, 0" in the 32A field.
For the embodiment of the present invention, in order to generate a message corresponding to transaction information, an entity object corresponding to a message to be assembled needs to be constructed so as to extract attribute values corresponding to variables in the entity object, the message is spliced according to the attribute values, specifically, a user may first select a service type to be handled when the transaction information is input at a foreground, and determine category information corresponding to the message to be assembled according to the service type corresponding to the transaction information input by the user, for example, an MT103 message is used for a money transfer remittance service, an MT202 message is used for an inter-bank fund settlement service, an MT400 message is used for a receiving service, so that a message entity object of a corresponding category can be created according to the service type to be handled, since different types of messages correspond to message header types, each variable in a message header and each variable in a main text region are different, when an entity object corresponding to a message to be assembled is specifically created, determining the type of a message header in the message to be assembled, each variable contained in the message header and each variable contained in a main text area according to the category information corresponding to the message to be assembled, creating each variable object according to the determined message header and each variable in the main text area, and defining the attribute, the variable name (variable label) and the variable length corresponding to each variable.
For example, for the basic packet header, respectively creating variable objects such as a section identifier, an application identifier, a service identifier, an LT destination address, a line program number, a message serial number, and the like, and defining corresponding attributes, variable tags, variable lengths, and the like in the variable objects, for example, for the main text area, respectively creating each variable object in the main text area, defining corresponding attributes, variable tags, variable lengths, and the like of each variable, for example, creating a variable object corresponding to a variable 32A field in the main text area, defining a variable tag as 32Atag, defining each attribute including time information, currency and money amount, further, generating a main text area list according to each created variable object, the main text area list having different variable tags and corresponding variable objects defined therein, thereby being able to assemble the type information of the packet according to the determined, and creating an entity object corresponding to the message to be assembled so as to automatically generate the message according to the entity object and simultaneously facilitate the verification of the assembled message.
Further, in order to extract attribute values corresponding to messages to be assembled and splice the messages into corresponding messages, the created entity object needs to be assigned according to input information of a user, when the created entity object is specifically assigned, specific attributes in variables corresponding to each transaction information are determined according to identification information corresponding to each transaction information, for example, when the user fills in service information, the number filled in the field of "amount" is "1331, 0", when the background server receives the transaction information input by the user, the amount attribute in the variable "32A:" in the main text region corresponding to the transaction information "1331, 0" can be determined according to the identification information corresponding to the transaction information, namely, the field information "amount", so that the specific attributes in the variables corresponding to each transaction information input by the user can be determined, and corresponding variables in the created entity object are assigned according to each transaction information, further, for the remaining variables in the created entity object, the assignment may be performed according to the attribute information corresponding to the remaining variables, for example, the basic message header {1: F01 cititwtxxx 7842733622 }, where the attribute values "F" and "01" in the segment identifier variable of the message header are fixed values, so that when the segment identifier variable in the message header is assigned, the first two-bit attribute value system corresponding to the segment identifier variable may automatically write "F" and "01", thereby completing the assignment of all variables in the entity object in the manner described above.
103. And if the assigned entity object accords with a preset message detection rule, generating the message to be assembled according to the assigned entity object.
The preset message detection rule is set according to requirements on the SWIFT messages in the SWIFT organization official document, and specifically may include: for the embodiment of the present invention, after the message detection rule is set, the assigned entity object needs to be detected by using the preset message detection rule to ensure that the message generated according to the entity object is valid, specifically, whether the attribute values corresponding to different variables in the entity object meet the preset requirements or not, and whether each variable object created in the entity object is reasonable or not can be detected, for example, in the MT202 message, the variable 20 field and the 32A field in the main text area cannot coexist, and if it is detected that the variable 20 field and the 32A field simultaneously exist in the entity object corresponding to the MT202 message, and further, if the entity object corresponding to the created message to be assembled conforms to the preset message detection rule, extracting attribute values corresponding to all variables in the assigned entity object, and splicing all attribute values into the message to be assembled according to the preset message format requirement, so that the message to be assembled can be automatically generated according to the transaction information input by the user, meanwhile, the effectiveness of the message can be ensured, and the workload of service personnel is reduced.
Compared with the conventional method for assembling and splicing the SWIFT message manually, the message assembling method provided by the embodiment of the invention can receive an assembling request of the message to be assembled, wherein the assembling request carries the transaction information corresponding to the message to be assembled; creating an entity object corresponding to the message to be assembled, and performing assignment processing on the entity object according to each transaction information; meanwhile, if the assigned entity object conforms to a preset message detection rule, the message to be assembled is generated according to the assigned entity object, so that the complexity of butting the SWIFT message is simplified by creating the entity object, the message can be automatically assembled according to the set rule, the message assembly efficiency is improved, the message assembly effectiveness can be ensured, the workload of service personnel is reduced, the labor cost is reduced, and the financial institution can better expand and mine cross-border services conveniently.
Further, in order to better describe the process of assembling the message, as a refinement and extension of the foregoing embodiment, an embodiment of the present invention provides another message assembling method, as shown in fig. 2, where the method includes:
201. And receiving an assembly request of the message to be assembled.
And the assembly request carries the transaction information corresponding to the message to be assembled. For the embodiment of the invention, when the user transacts the cross-border service in the financial institution, the type of transacting the cross-border service is selected on the interface of the user operation equipment, simultaneously inputting corresponding transaction information, specifically inputting the transaction information according to corresponding format requirements, for example, the "address" field that the user is required to enter cannot exceed 15 characters per line, and if so is entered in lines, or the branch fills in transaction information such as remittance account number, remittance amount, currency and the like, when the user fills in each transaction information according to corresponding format requirements and content requirements, an assembly request of a message to be assembled is sent to the financial institution server, the assembly request comprises transaction information input by a user, so that the financial institution server can automatically generate a SWIFT message according to the transaction information input by the user and send the SWIFT message to a SWIFT organization for cross-border service handling.
202. And creating an entity object corresponding to the message to be assembled, and performing assignment processing on the entity object according to each transaction information.
For the embodiment of the present invention, in order to be able to construct entity objects corresponding to different types of messages, before the receiving an assembly request of a message to be assembled, the method further includes: defining each variable corresponding to the message headers of different types of messages and each variable corresponding to the main text areas of the different types of messages; and creating a main class object corresponding to the different types of messages according to the variables corresponding to the message headers of the different types of messages and the variables corresponding to the main text areas of the different types of messages. The messages to be assembled may be different types of messages, for example, the MT103 message is used for transfer remittance service, the MT202 message is used for inter-bank fund settlement service, the MT400 message is used for receiving service, and in order to create entity objects of different types of messages, a main type of entity objects of different types of messages needs to be created.
Specifically, for a basic message header, an application message header and a user message header, each variable object corresponding to different types of message headers is created respectively, and an attribute, a variable label and a variable length corresponding to each variable are defined, for a main text area, each variable object corresponding to different types of messages is constructed respectively, and an attribute, a variable length and a variable label corresponding to each variable are defined, and according to each variable object corresponding to the created main text area, a main text area list is generated, in which each variable label of different types of messages and a variable object corresponding thereto are defined, so that main classes corresponding to different types of messages can be created.
Further, the different types of messages correspond to a unique main class object, and in order to create an entity object corresponding to a message to be assembled, step 202 specifically includes: determining category information corresponding to the message to be assembled according to the transaction information; and creating an entity object corresponding to the message to be assembled according to the category information and the main category object. Specifically, the category information corresponding to the message to be assembled can be determined according to the type of the cross-border service selected by the user, each variable corresponding to the message to be assembled is determined according to the category information corresponding to the message to be assembled, and when the entity object corresponding to the message to be assembled is specifically created, each variable object needs to be created and a pre-created main class object is borne, so that the entity object corresponding to the message to be assembled can be created.
Further, after the entity object corresponding to the message to be assembled is created, the entity object needs to be assigned according to the transaction information, and the method specifically includes: determining variables corresponding to the transaction information in the entity object, and assigning values to the determined variables; assigning values to the remaining variables according to the attribute information corresponding to the remaining variables in the entity object; and loading each assigned variable into the entity object. Specifically, each piece of transaction information input by the user corresponds to the attributes of different variables in the entity object, the attributes of the different variables are assigned according to the transaction information input by the user, and for each remaining variable in the entity object, the variable can be assigned according to the variable attribute.
203. And if the assigned entity object accords with a preset message detection rule, extracting attribute values corresponding to all variables in the assigned entity object.
For the embodiment of the present invention, in order to ensure the validity of the assembled packet, step 203 specifically includes: judging whether each variable defined in the entity object after assignment meets a preset message detection rule or not; if the attribute values are in accordance with the preset message detection rule, judging whether the attribute values corresponding to the variables in the entity object are within a preset range; and if the current value is within the preset range, generating the message to be assembled according to the entity object after value assignment. The preset detection rules and the preset range of the attribute values can be set according to the official documents of the SWIFT organization, and the official documents of the SWIFT organization record the assembly requirements on different types of SWIFT messages, and the method specifically comprises the following steps: for the requirements of each variable in different types of messages and the range of the attribute value corresponding to each variable, further traversing each variable in the entity object after assignment, judging whether the variable meets a preset message detection rule or not, and if the variable does not meet the preset message detection rule, outputting prompt information that the message to be assembled does not meet the preset message detection rule; if the attribute values of the target variables are not in the corresponding preset range, outputting prompt information that the attribute values corresponding to the target variables are wrong; and if the SWIFT message is in the corresponding preset range, determining that the SWIFT message generated according to the entity object of the message to be assembled is valid.
Further, the message to be assembled includes a message header and a main text region, each variable includes each variable corresponding to the message header and each variable corresponding to the main text region, and in order to extract an attribute value corresponding to each variable in the entity object after assignment, the method specifically includes: determining each variable label corresponding to the message header and each variable label corresponding to the main text area; capturing attribute values corresponding to variable labels of the message header according to the variables corresponding to the message header in the entity object after traversal assignment of the variable labels corresponding to the message header; and capturing attribute values corresponding to the variable tags of the main text area according to a preset main text area list in the entity object after the variable tags corresponding to the main text area are subjected to traversal assignment, wherein the preset main text area list defines the variable tags of the main text area and the attribute values corresponding to the variable tags. Specifically, for the created entity object, each variable label corresponding to the entity object is known, the variable label specifically includes each variable label of the message header and each variable label in the subject text region, each variable in the entity object is traversed according to each variable label corresponding to the known message header, a variable attribute value corresponding to each variable label is captured, further, a subject text region list is traversed according to each variable label corresponding to the known subject text region, a variable attribute value corresponding to each variable label is captured, each variable label and a variable attribute value corresponding to each variable label are defined in the subject text region list, for example, the variable label "tag 32A" of the known subject text region is traversed according to the variable label "tag 32A", and the attribute values "191014", "HKD", and "1331, 0" corresponding to the variable in the domain are captured.
In addition, when variable attribute values corresponding to the variable tags are captured, the attribute values corresponding to the variables in the entity object are obtained by using a get ("key") function in the getter method, specifically, the variables in the entity object after assignment are captured by using the get ("key") function, wherein the "key" represents the variable tags corresponding to the variables, further, after the target variable is determined, the attribute values corresponding to the target variable are captured by using the get ("key") function, and at this time, the "key" is a specific attribute in the target variable, so that the attribute values corresponding to the variables in the message header and the attribute values corresponding to the variables in the subject text region in the entity object can be captured, and the message to be assembled is generated according to the extracted attribute values.
204. And splicing the extracted attribute values into the message to be assembled according to the preset message format requirement.
For example, the variable 50A field in the main text area may correspond to 1-4 lines of transaction information input by a user at the front end, and the splicing format of the attribute value corresponding to the variable 50A field is determined according to the format corresponding to the transaction information input by the user, for example, for the embodiment of the present invention, in order to facilitate the transmission of the SWIFT message, a text file corresponding to the SWIFT message needs to be generated, specifically, the attribute value corresponding to each variable in the extracted entity object is converted into a corresponding character string so as to facilitate the generation of the text file for transmission, and each character string is spliced according to the determined message format requirement, so that the text file for generating the message to be assembled is sent to the SWIFT organization, and after the SWIFT organization analyzes the text file, the spliced SWIFT message can be obtained, therefore, the message to be assembled can be automatically generated according to the transaction information of the user, the workload of business personnel is reduced, and the assembly efficiency of the message is improved.
Compared with the current mode of manually assembling and splicing the SWIFT message, the other message assembling method provided by the embodiment of the invention can receive an assembling request of the message to be assembled, wherein the assembling request carries the transaction information corresponding to the message to be assembled; creating an entity object corresponding to the message to be assembled, and performing assignment processing on the entity object according to each transaction information; meanwhile, if the assigned entity object conforms to a preset message detection rule, the message to be assembled is generated according to the assigned entity object, so that the complexity of butting the SWIFT message is simplified by creating the entity object, the message can be automatically assembled according to the set rule, the message assembly efficiency is improved, the message assembly effectiveness can be ensured, the workload of service personnel is reduced, the labor cost is reduced, and the financial institution can better expand and mine cross-border services conveniently.
Further, as a specific implementation of fig. 1, an embodiment of the present invention provides a packet assembling apparatus, as shown in fig. 3, where the apparatus includes: a receiving unit 31, a creating unit 32 and a generating unit 33.
The receiving unit 31 may be configured to receive an assembly request of a to-be-assembled packet, where the assembly request carries transaction information corresponding to the to-be-assembled packet. The receiving unit 31 is a main function module in the present apparatus for receiving an assembly request of a message to be assembled.
The creating unit 32 may be configured to create an entity object corresponding to the packet to be assembled, and perform assignment processing on the entity object according to the transaction information. The creating unit 32 is a main function module that creates an entity object corresponding to the message to be assembled in the device, and performs assignment processing on the entity object according to the transaction information, and is also a core module.
The generating unit 33 may be configured to generate the packet to be assembled according to the assigned entity object if the assigned entity object meets a preset packet detection rule. The generating unit 33 is a main function module, which is also a core module, in the device, if the assigned entity object meets a preset message detection rule, and generates the message to be assembled according to the assigned entity object.
For the embodiment of the present invention, as shown in fig. 4, in order to construct the entity object corresponding to the packet to be assembled, the creating unit 32 includes: a determination module 321 and a creation module 322.
The determining module 321 may be configured to determine category information corresponding to the message to be assembled according to the transaction information.
The creating module 322 may be configured to create an entity object corresponding to the packet to be assembled according to the category information and the main class object.
Further, in order to assign a value to the created entity object, the creating unit 32 includes: an assignment module 323 and a loading module 324.
The assignment module 323 may be configured to determine variables corresponding to the transaction information in the entity object, and assign values to the determined variables.
The assignment module 323 may be further configured to assign values to the remaining variables according to attribute information corresponding to the remaining variables in the entity object.
The loading module 324 may be configured to load each assigned variable into the entity object.
In a specific application scenario, in order to determine whether the assembled packet meets a preset detection rule, the generating unit 33 includes: a judging module 331 and a generating module 332.
The determining module 331 may be configured to determine whether each variable defined in the assigned entity object meets a preset message detection rule.
The determining module 331 may be further configured to determine whether the attribute value corresponding to each variable in the entity object is within a preset range if the attribute value meets the preset packet detection rule.
The generating module 332 may be configured to generate the message to be assembled according to the assigned entity object if the message is within the preset range.
Further, in order to generate a message to be assembled, the generating unit 33 further includes: an extraction module 333 and a stitching module 334.
The extracting module 333 may be configured to extract attribute values corresponding to each variable in the entity object after the value assignment.
The splicing module 334 may be configured to splice the extracted attribute values into the packet to be assembled according to a preset packet format requirement.
For the embodiment of the present invention, the message to be assembled includes a message header and a main text region, each variable includes each variable corresponding to the message header and each variable corresponding to the main text region, and the extracting module 333 includes: a determination submodule and a fetch submodule.
The determining submodule may be configured to determine each variable tag corresponding to the header and each variable tag corresponding to the main text region.
The capturing submodule may be configured to capture an attribute value corresponding to each variable label of the header according to each variable corresponding to the header in the entity object after traversal assignment of each variable label corresponding to the header.
The capturing submodule may be further configured to capture an attribute value corresponding to each variable tag of the main text area according to a preset main text area list in the entity object after each variable tag corresponding to the main text area is subjected to traversal assignment, where each variable tag of the main text area and its corresponding attribute value are defined in the preset main text area list.
Further, in order to create an entity object corresponding to the packet to be assembled, the apparatus further includes: a unit 34 is defined.
The defining unit 34 may be configured to define each variable corresponding to the header of the different types of messages and each variable corresponding to the body text area of the different types of messages.
The creating unit 32 may be further configured to create the main class object corresponding to the different types of packets according to each variable corresponding to the packet header of the different types of packets and each variable corresponding to the main context area of the different types of packets.
It should be noted that other corresponding descriptions of the functional modules related to the message assembling apparatus provided in the embodiment of the present invention may refer to the corresponding description of the method shown in fig. 1, and are not described herein again.
Based on the method shown in fig. 1, correspondingly, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the following steps: receiving an assembly request of a message to be assembled, wherein the assembly request carries transaction information corresponding to the message to be assembled; creating an entity object corresponding to the message to be assembled, and performing assignment processing on the entity object according to each transaction information; and if the assigned entity object accords with a preset message detection rule, generating the message to be assembled according to the assigned entity object.
Based on the above embodiments of the method shown in fig. 1 and the apparatus shown in fig. 3, an embodiment of the present invention further provides an entity structure diagram of a computer device, as shown in fig. 5, where the computer device includes: a processor 41, a memory 42, and a computer program stored on the memory 42 and executable on the processor, wherein the memory 42 and the processor 41 are both arranged on a bus 43 such that when the processor 41 executes the program, the following steps are performed: receiving an assembly request of a message to be assembled, wherein the assembly request carries transaction information corresponding to the message to be assembled; creating an entity object corresponding to the message to be assembled, and performing assignment processing on the entity object according to each transaction information; and if the assigned entity object accords with a preset message detection rule, generating the message to be assembled according to the assigned entity object.
By the technical scheme, the method and the device can receive the assembly request of the message to be assembled, wherein the assembly request carries the transaction information corresponding to the message to be assembled; creating an entity object corresponding to the message to be assembled, and performing assignment processing on the entity object according to each transaction information; meanwhile, if the assigned entity object conforms to a preset message detection rule, the message to be assembled is generated according to the assigned entity object, so that the complexity of butting the SWIFT message is simplified by creating the entity object, the message can be automatically assembled according to the set rule, the message assembly efficiency is improved, the message assembly effectiveness can be ensured, the workload of service personnel is reduced, the labor cost is reduced, and the financial institution can better expand and mine cross-border services conveniently.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or 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 assembling a packet, comprising:
Receiving an assembly request of a message to be assembled, wherein the assembly request carries transaction information corresponding to the message to be assembled;
creating an entity object corresponding to the message to be assembled, and performing assignment processing on the entity object according to each transaction information;
and if the assigned entity object accords with a preset message detection rule, generating the message to be assembled according to the assigned entity object.
2. The method according to claim 1, wherein different types of packets correspond to a unique main class object, and the creating an entity object corresponding to the packet to be assembled comprises:
determining category information corresponding to the message to be assembled according to the transaction information;
and creating an entity object corresponding to the message to be assembled according to the category information and the main category object.
3. The method according to claim 1, wherein the assigning the entity object according to the transaction information comprises:
determining variables corresponding to the transaction information in the entity object, and assigning values to the determined variables;
assigning values to the remaining variables according to the attribute information corresponding to the remaining variables in the entity object;
And loading each assigned variable into the entity object.
4. The method according to claim 1, wherein if the assigned entity object meets a preset message assembly rule, generating the message to be assembled according to the assigned entity object comprises:
judging whether each variable defined in the entity object after assignment meets a preset message detection rule or not;
if the attribute values are in accordance with the preset message detection rule, judging whether the attribute values corresponding to the variables in the entity object are within a preset range;
and if the current value is within the preset range, generating the message to be assembled according to the entity object after value assignment.
5. The method according to claim 1, wherein the generating the packet to be assembled according to the assigned entity object comprises:
extracting attribute values corresponding to all variables in the entity object after assignment;
and splicing the extracted attribute values into the message to be assembled according to the preset message format requirement.
6. The method according to claim 5, wherein the message to be assembled includes a message header and a main text region, the variables include variables corresponding to the message header and variables corresponding to the main text region, and the extracting attribute values corresponding to the variables in the assigned entity object includes:
Determining each variable label corresponding to the message header and each variable label corresponding to the main text area;
capturing attribute values corresponding to variable labels of the message header according to the variables corresponding to the message header in the entity object after traversal assignment of the variable labels corresponding to the message header;
and capturing attribute values corresponding to the variable tags of the main text area according to a preset main text area list in the entity object after the variable tags corresponding to the main text area are subjected to traversal assignment, wherein the preset main text area list defines the variable tags of the main text area and the attribute values corresponding to the variable tags.
7. The method according to any of claims 1-6, wherein prior to said receiving an assembly request for a message to be assembled, the method further comprises:
defining each variable corresponding to the message headers of different types of messages and each variable corresponding to the main text areas of the different types of messages;
and creating a main class object corresponding to the different types of messages according to the variables corresponding to the message headers of the different types of messages and the variables corresponding to the main text areas of the different types of messages.
8. A message assembling apparatus, comprising:
The device comprises a receiving unit, a sending unit and a receiving unit, wherein the receiving unit is used for receiving an assembly request of a message to be assembled, and the assembly request carries transaction information corresponding to the message to be assembled;
the creating unit is used for creating an entity object corresponding to the message to be assembled and carrying out assignment processing on the entity object according to each transaction information;
and the generating unit is used for generating the message to be assembled according to the assigned entity object if the assigned entity object accords with a preset message detection rule.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
10. A computer arrangement comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the computer program realizes the steps of the method of any one of claims 1 to 7 when executed by the processor.
CN202010584607.4A 2020-06-24 2020-06-24 Message assembling method and device Pending CN111861695A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010584607.4A CN111861695A (en) 2020-06-24 2020-06-24 Message assembling method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010584607.4A CN111861695A (en) 2020-06-24 2020-06-24 Message assembling method and device

Publications (1)

Publication Number Publication Date
CN111861695A true CN111861695A (en) 2020-10-30

Family

ID=72988502

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010584607.4A Pending CN111861695A (en) 2020-06-24 2020-06-24 Message assembling method and device

Country Status (1)

Country Link
CN (1) CN111861695A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113872963A (en) * 2021-09-26 2021-12-31 中水北方勘测设计研究有限责任公司 Message protocol rapid analysis method and system based on free label splicing technology
CN114448719A (en) * 2022-03-08 2022-05-06 中国工商银行股份有限公司 Message interaction method, device and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107103462A (en) * 2017-04-14 2017-08-29 中国工商银行股份有限公司 A kind for the treatment of method and apparatus of the cross-border remittance snapshot data of bank
CN108881193A (en) * 2018-06-04 2018-11-23 中国建设银行股份有限公司 A kind of message forming method and device
CN111260351A (en) * 2020-01-13 2020-06-09 中国建设银行股份有限公司 Remittance processing method, device, equipment and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107103462A (en) * 2017-04-14 2017-08-29 中国工商银行股份有限公司 A kind for the treatment of method and apparatus of the cross-border remittance snapshot data of bank
CN108881193A (en) * 2018-06-04 2018-11-23 中国建设银行股份有限公司 A kind of message forming method and device
CN111260351A (en) * 2020-01-13 2020-06-09 中国建设银行股份有限公司 Remittance processing method, device, equipment and storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113872963A (en) * 2021-09-26 2021-12-31 中水北方勘测设计研究有限责任公司 Message protocol rapid analysis method and system based on free label splicing technology
CN113872963B (en) * 2021-09-26 2023-09-29 中水北方勘测设计研究有限责任公司 Method and system for rapidly analyzing message protocol based on free label splicing technology
CN114448719A (en) * 2022-03-08 2022-05-06 中国工商银行股份有限公司 Message interaction method, device and system
CN114448719B (en) * 2022-03-08 2024-04-05 中国工商银行股份有限公司 Message interaction method, device and system

Similar Documents

Publication Publication Date Title
CN107103462B (en) Method and device for processing snapshot data of cross-border remittance of bank
CN108334387B (en) Dynamic interface rendering method and device
CN110363665B (en) Credit right data processing method, device, equipment and medium
CN110765102B (en) Service data processing method and device, computer equipment and storage medium
US11734667B2 (en) Resource allocation method and device, and electronic payment method
CN111861695A (en) Message assembling method and device
CN107920094A (en) Data capture method, device, server and the network equipment
CN111684481A (en) Aggregated payment method and related equipment
CN110175833B (en) Computer device, method, system and medium for binding bank card information
CN114500690A (en) Interface data processing method and device, electronic equipment and storage medium
CN106992940B (en) Message processing method, device, system and terminal
CN112348326A (en) Bank business processing method and system
CN112613877A (en) Intelligent contract triggering method and device applied to block chain network and related equipment
CN112288577A (en) Transaction processing method and device for distributed service, electronic equipment and medium
CN114979264A (en) Financial level message processing method and device
CN110910106B (en) Cash management message processing method and system
CN111241180A (en) Information processing method, device, equipment and storage medium
CN113688418A (en) Engineering order settlement method and system based on block chain data storage
CN109829708B (en) Transaction processing system
CN104079632A (en) Third-party service processing method and device
CN108769028B (en) Method and device for assembling message
CN109120509B (en) Information collection method and device
CN113822670A (en) Payment message conversion method and device and electronic equipment
CN113836145B (en) Method, device, electronic equipment and computer readable storage medium for requesting data
CN114866628A (en) Message processing method, device, 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