A method and device for automatically checking business messages
By extracting and parsing the service element data in the service message, forming structured data and performing verification, the problem of being unable to process complex messages in the existing technology is solved, and automatic verification of service messages is realized, reducing manual verification costs and improving efficiency.
Patent Information
- Application Number
- CN202110863715.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-29
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2041-07-29
AI Technical Summary
The prior art is difficult to deal with business messages with uncertain element path levels and disordered content, resulting in high manual verification costs and low development and testing efficiency.
By extracting the business element data in the service message, analyzing and forming structured data, and performing item-by-item verification and verification of the service message is achieved.
It overcomes the shortcomings of independent objects, fixed locations and simple element paths in traditional message processing, and realizes automatic verification based on message specifications, frees up manual verification costs, and improves development and testing efficiency.
Smart Images

Figure CN113537819B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of Internet finance, and in particular to a method and device for automatically verifying business messages. Background Art
[0002] Prior art "System and method for automated processing of vouchers": A system and method for automated processing of vouchers, which records the following contents: The system includes: a voucher definition module obtains voucher layout information and corresponding cutting area definition parameters; the cutting area definition parameters include cutting area parameters, semantic recognition methods of each area, and the comparison relationship between each area and the transaction field; the voucher acceptance module receives paper vouchers and obtains corresponding voucher electronic image data based on the paper vouchers; obtains the layout type of the voucher electronic image through an image recognition model, matches the layout type with the voucher layout information, and obtains the cutting area definition parameters corresponding to the voucher layout information based on the matching results; the processing module cuts the voucher electronic image data according to the cutting area parameters to obtain fragmented images; identifies the fragmented images separately through the semantic recognition methods of each area to obtain business elements; calls the preset business rules to splice the business elements according to the comparison relationship between each area and the transaction field, obtains the verification file and submits it to the predetermined system for processing. Most of the existing technologies are paper vouchers on traditional bank counters, which have clear and standardized formats and can intuitively define modules without defining complex element paths. This type of message processing objects are individually independent, fixed in position, and have simple element paths. They are not suitable for messages with uncertain element path hierarchies and disordered content. Summary of the invention
[0003] Aiming at the problem that most of the existing technologies are paper vouchers on traditional bank counters, which have clear and standardized formats and can intuitively define modules without defining complex element paths. Such message processing objects are individually independent, fixed in position, and simple in element paths, and are not suitable for messages with uncertain element path levels and disordered contents, the present invention provides a method and device for automatic verification of business messages, which extracts element data of multiple business elements corresponding to each message body, and then parses the element data to form structured data, and then checks the structured data item by item in combination with a preset structured data table. The present invention overcomes the shortcomings of the prior art that objects are individually independent, fixed in position, and simple in element paths, and provides a method for automatic verification of business messages based on message specifications, converts message specifications into structured data of indefinite length paths, and automatically verifies them with assembled disordered business messages developed by banks, thereby releasing manual verification costs and improving development and testing efficiency.
[0004] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0005] A first aspect of the present invention provides a method for automatically verifying a service message, comprising:
[0006] Obtaining the service message image to be verified;
[0007] Parsing the business message image to extract element data of multiple business elements corresponding to each message body;
[0008] Based on preset definition rules, the element data is parsed to form structured data;
[0009] The structured data is checked item by item in combination with a preset structured data table to obtain a verification result of the business report.
[0010] In a preferred embodiment, the business elements include: message type, field label, field level path, required items, value range, and whether to reference a component;
[0011] The parsing of the business message image to extract element data of a plurality of business elements corresponding to each message body includes:
[0012] The business message image is processed by OCR image recognition technology to obtain the message type, field label, field level path, required items and value range, and whether a component is referenced.
[0013] In a preferred embodiment, the message body includes a message header, a message body and a common component, and the parsing of the business message image to extract element data of multiple business elements corresponding to each message body includes:
[0014] Identify the message header, message body and common components of the service message image;
[0015] Defining and parsing the service elements of the message header and the message body according to a first definition rule to obtain first structured data;
[0016] Defining and parsing the common component according to a second definition rule to obtain second structured data;
[0017] If the data corresponding to the business element of whether the component is referenced in the message header and the message body is yes, the hierarchical paths of all fields under the referenced component in the first structured data are sunk one level, and the hierarchical paths of the first structured data are concatenated to form a complete path to form the third structured data;
[0018] The third structured data is used to replace the data of the referenced component in the first structured data to generate final structured data.
[0019] In a preferred embodiment, the structured data is checked item by item in combination with a preset structured data table to obtain a verification result of the business report, including:
[0020] Parse the message type, field label, field level path, whether it is a value, and data corresponding to the message field value according to the standard definition rules for the preset structured data table, and form the comparison structured data;
[0021] Each item of the control structured data and the final structured data is compared one by one to check whether the tag name is correct, whether the path level is correct, whether the required item is a value, and whether the field value is within the value range, so as to obtain the verification result of the business report.
[0022] In a preferred embodiment, it also includes:
[0023] Output the verification result, and locate the error problem based on the verification result;
[0024] Generate error description information based on the error problem and the corresponding message type.
[0025] A second aspect of the present invention provides a service message automatic verification device, including:
[0026] An acquisition module is used to acquire the service message image to be verified;
[0027] An element parsing module, parsing the business message image, and extracting element data of multiple business elements corresponding to each message body;
[0028] A structured data generation module, which parses the element data based on preset definition rules to form structured data;
[0029] The verification module verifies the structured data item by item in combination with a preset structured data table to obtain a verification result of the business report.
[0030] In a preferred embodiment, the business elements include: message type, field label, field level path, required items, value range, and whether to reference a component;
[0031] The element parsing module is specifically used to process the business message image through OCR image recognition technology to obtain the message type, field label, field level path, required items and value range, and whether to reference a component.
[0032] In a preferred embodiment, the message body includes a message header, a message body and a common component, and the element parsing module specifically includes:
[0033] An identification unit, which identifies a message header, a message body, and a common component of the service message image;
[0034] A first structured data generating unit defines and parses the service elements of the message header and the message body according to a first definition rule to obtain first structured data;
[0035] A second structured data generating unit defines and parses the common component according to a second definition rule to obtain second structured data;
[0036] The third structured data generating unit, if the data corresponding to the business element of whether the component is referenced in the message header and the message body is yes, sinks the hierarchical path of all fields under the referenced component in the first structured data by one level, splices the hierarchical path of the first structured data to form a complete path, and constitutes the third structured data;
[0037] The replacement unit replaces the data of the referenced component in the first structured data with the third structured data to generate final structured data.
[0038] In a preferred embodiment, the verification module includes:
[0039] The reference structured data generation unit parses the message type, field label, field level path, whether it is a value, and data corresponding to the message field value according to the standard definition rules for the preset structured data table, and forms reference structured data;
[0040] The comparison unit compares each item of the comparison structured data and the final structured data one by one to check whether the tag name is correct, whether the path level is correct, whether the required item is a value, and whether the field value is within the value range, so as to obtain the verification result of the business report.
[0041] In a preferred embodiment, it also includes:
[0042] A positioning module outputs the verification result and locates the error problem based on the verification result;
[0043] The error description information generating module generates error description information according to the error problem and the corresponding message type.
[0044] In a third aspect, the present invention provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the automatic verification method for business messages when executing the program.
[0045] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which implements the method for automatic verification of business messages when executed by a processor.
[0046] It can be seen from the above technical scheme that the present invention provides a method and device for automatic verification of business messages, which first obtains a business message image to be verified; then parses the business message image to extract element data of multiple business elements corresponding to each message body; finally, based on a preset definition rule, the element data is parsed to form a structured data table. It can be seen that the present invention extracts element data of multiple business elements corresponding to each message body, and then parses the element data to form structured data, and then checks the structured data item by item in combination with a preset structured data table. The present invention overcomes the shortcomings of the prior art that individual objects are independent, positions are fixed, and element paths are simple, and provides a method for automatic verification of business messages based on message specifications, which converts message specifications into structured data of indefinite-length paths, and automatically verifies them with the assembled disordered business messages developed by banks, thereby releasing the cost of manual verification. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0048] Figure 1 It is one of the steps in the specific example in the embodiment of the present invention.
[0049] Figure 2 This is the second step in the specific example of the embodiment of the present invention.
[0050] Figure 3 This is the third step in the specific example of the embodiment of the present invention.
[0051] Figure 4 This is step 4 in the specific example of the embodiment of the present invention.
[0052] Figure 5 It is a flow chart of a method for automatically verifying service messages in an embodiment of the present invention.
[0053] Figure 6 It is a schematic diagram of the structure of the automatic verification device for business messages in an embodiment of the present invention.
[0054] Figure 7 It is a schematic diagram of the structure of an electronic device in an embodiment of the present invention. DETAILED DESCRIPTION
[0055] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0056] It should be noted that the method and device for automatic verification of business messages disclosed in the present invention can be used in the financial field, and can also be used in any field other than the financial field. The application field of the method and device for automatic verification of business messages disclosed in the present invention is not limited.
[0057] In the prior art, the patent "System and Method for Automated Processing of Vouchers" is a system and method for automated processing of vouchers, the system comprising: a voucher definition module obtains voucher layout information and corresponding cutting area definition parameters; the cutting area definition parameters include cutting area parameters, semantic recognition methods of each area, and the comparison relationship between each area and the transaction field; the voucher acceptance module receives the paper voucher and obtains the corresponding voucher electronic image data according to the paper voucher; the layout type of the voucher electronic image is obtained through the image recognition model, the layout type is matched with the voucher layout information, and the cutting area definition parameters corresponding to the voucher layout information are obtained according to the matching result; the processing module cuts the voucher electronic image data according to the cutting area parameters to obtain fragmented images; the fragmented images are respectively identified by the semantic recognition method of each area to obtain business elements; the preset business rules are called according to the comparison relationship between each area and the transaction field to splice the business elements, and the verification file is obtained and submitted to the predetermined system for processing.
[0058] It can be seen that the existing technology is aimed at paper vouchers on traditional bank counters, which have clear and standardized formats and can intuitively define modules without defining complex element paths. The processing objects of this invention are independent, fixed in position, and simple in element paths. It is not suitable for messages with uncertain element path levels and disordered content.
[0059] The present invention provides a method and device for automatic verification of business messages, which extracts element data of multiple business elements corresponding to each message body, and then parses the element data to form structured data, and then checks the structured data item by item in combination with a preset structured data table. The present invention overcomes the shortcomings of the prior art that individual objects are independent, positions are fixed, and element paths are simple, and provides a method for automatic verification of business messages based on message specifications, converts message specifications into structured data of indefinite-length paths, and automatically verifies them with assembled disordered business messages developed by banks, thereby reducing the cost of manual verification.
[0060] It is understandable that the service message automatic verification device of the present invention can be a server or a mobile terminal, for example, it can include a smart phone, a tablet electronic device, a portable computer, a desktop computer, a personal digital assistant (PDA), a smart wearable device, etc. Among them, the smart wearable device can include smart glasses, smart watches, smart bracelets, etc.
[0061] The above-mentioned business message automatic verification device has a communication module, which can be connected to the message terminal or the message server for communication, and realize data transmission with the message terminal or the message server.
[0062] The above-mentioned business message automatic verification device can communicate with the message terminal or message server using any suitable network protocol, including network protocols that have not been developed on the date of submission of the present invention. The network protocol may include, for example, TCP / IP protocol, UDP / IP protocol, HTTP protocol, HTTPS protocol, etc. Of course, the network protocol may also include, for example, RPC protocol (Remote Procedure Call Protocol) and REST protocol (Representational State Transfer) used on top of the above-mentioned protocols.
[0063] The present invention provides a method and device for automatic verification of business messages, which extracts element data of multiple business elements corresponding to each message body, and then parses the element data to form structured data, and then checks the structured data item by item in combination with a preset structured data table. The present invention overcomes the shortcomings of the prior art that individual objects are independent, positions are fixed, and element paths are simple, and provides a method for automatic verification of business messages based on message specifications, converts message specifications into structured data of indefinite-length paths, and automatically verifies them with assembled disordered business messages developed by banks, thereby reducing the cost of manual verification.
[0064] The details are described through the following multiple embodiments and application examples.
[0065] In order to solve the problem that most of the existing technologies are paper vouchers on traditional bank counters, which have clear and standardized formats, can intuitively define modules, and do not need to define complex element paths. Such message processing objects are independent, fixed in position, and simple in element paths, and are not suitable for messages with uncertain element path levels and disordered contents, the present invention provides an embodiment of a business message automatic verification method, see Figure 5 , specifically including the following contents:
[0066] Step S101: Acquire a service message image to be verified.
[0067] Business message images can be obtained by scanning, photographing, etc. In order to improve the clarity of the image, a color scanner is used to scan the message specifications to form image data.
[0068] Step S102: parsing the business message image, and extracting element data of multiple business elements corresponding to each message body.
[0069] Step S103: Based on preset definition rules, the element data is parsed to form structured data.
[0070] Step S104: The structured data is checked item by item in combination with a preset structured data table to obtain a verification result of the business report.
[0071] It can be seen from the above technical scheme that the present invention provides a method for automatic verification of business messages, which extracts element data of multiple business elements corresponding to each message body, and then parses the element data to form structured data, and then checks and verifies the structured data item by item in combination with a preset structured data table. The present invention overcomes the shortcomings of the prior art that individual objects are independent, positions are fixed, and element paths are simple, and provides a method for automatic verification of business messages based on message specifications, which converts message specifications into structured data of indefinite-length paths, and automatically verifies them with the assembled disordered business messages developed by the bank, thereby reducing manual verification costs and improving development and testing efficiency.
[0072] In some embodiments, the business elements include: message type, field label, field level path, required items, value range, and whether to reference a component;
[0073] The parsing of the business message image to extract element data of a plurality of business elements corresponding to each message body includes:
[0074] The business message image is processed by OCR image recognition technology to obtain the message type, field label, field level path, required items and value range, and whether a component is referenced.
[0075] In some embodiments, the message body includes a message header, a message body, and a common component, and the parsing of the business message image to extract element data of multiple business elements corresponding to each message body includes:
[0076] Identify the message header, message body and common components of the service message image;
[0077] Defining and parsing the service elements of the message header and the message body according to a first definition rule to obtain first structured data;
[0078] Defining and parsing the common component according to a second definition rule to obtain second structured data;
[0079] If the data corresponding to the business element of whether the component is referenced in the message header and the message body is yes, the hierarchical paths of all fields under the referenced component in the first structured data are sunk one level, and the hierarchical paths of the first structured data are concatenated to form a complete path to form the third structured data;
[0080] The third structured data is used to replace the data of the referenced component in the first structured data to generate final structured data.
[0081] Specifically, OCR image recognition technology is used to pre-process image data and extract all business elements.
[0082] Identify the message header and message body, define and parse them: message type, field label, field level path, whether it is required, value range, whether to reference components and other information, to form the first structured data, namely structured data A.
[0083] Identify common components, define and parse them: component type, field label, field hierarchy path, whether it is required, value range and other information to form the second structured data, namely structured data B.
[0084] For data in A that indicates whether a component is referenced, the hierarchical paths of all fields under the corresponding component in data B are sunk down one level, and the hierarchical paths of data A are concatenated to form a complete path, forming the third structured data, namely structured data C.
[0085] Finally, data C replaces the data of the referenced components in data A to form a complete and final structured data.
[0086] In this embodiment, the structured data is checked item by item in combination with a preset structured data table to obtain a verification result of the business report, including:
[0087] Parse the message type, field label, field level path, whether it is a value, and data corresponding to the message field value according to the standard definition rules for the preset structured data table, and form the comparison structured data;
[0088] Each item of the control structured data and the final structured data is compared one by one to check whether the tag name is correct, whether the path level is correct, whether the required item is a value, and whether the field value is within the value range, so as to obtain the verification result of the business report.
[0089] Specifically, the corresponding business message can be automatically queried from the system background; then the message is used as input to parse the message type, field label, field level path, whether it is a value, and message field value to form a comparative structured data, namely, structured data D.
[0090] Then check the structured data D and A item by item: check whether the tag name is correct, whether the path level is correct, whether the required items are values, whether the field value is within the value range, and other information.
[0091] In some embodiments of the present invention, it further includes:
[0092] Output the verification result, and locate the error problem based on the verification result;
[0093] Generate error description information based on the error problem and the corresponding message type.
[0094] Specifically, the verification results can be output, inconsistent content can be marked in red font, the problem can be located and the corresponding error description information can be given, and manual confirmation can be performed to improve verification efficiency.
[0095] The present invention is described in detail below with reference to specific examples.
[0096] The method will be described in detail below.
[0097] (a) If Figure 1 , converting message specifications into high-definition images.
[0098] (ii) Figure 2 , through OCR image recognition technology, the image data is pre-processed and some texts are extracted to form structured data.
[0099] (Part) of the message structured data standardA is as follows in Table 1:
[0100] Table 1-Message structured data table
[0101]
[0102] (III) Figure 3 , obtain the business messages developed by our bank from the system, then parse the business messages and extract structured data from them.
[0103] (Part) of the business message structured data messageB is as follows in Table 2:
[0104] Table 2-Business message structured data table
[0105]
[0106] (IV) Figure 4 , check the structured data
[0107] Check the structured data standardA and messageA item by item according to the following rules:
[0108] 1) Use “message path” as the data set flag.
[0109] 2) Check whether the "message path" of the standardA set is consistent with the "message path" of the messageA set.
[0110] 3) Check whether the "Is it required" of the standardA set is consistent with the "Is it a value" of the messageA set.
[0111] 4) Check whether the "length" of the standardA set is greater than or equal to the "length" of the messageA set.
[0112] 5) Check whether the corresponding "field value" of messageA set is within the fixed value range for records whose "fixed value" of standardA set is not empty.
[0113] 6) Check whether the corresponding "field value" of messageA set is within the value range for the records whose "fixed value" of standardA set is empty, where the x character set refers to: English letters, numbers and special characters.,-_() / =+? ! &*;@#:%[]\n\r\t(space).
[0114] 7) Check whether the "field value" format of the corresponding messageA set is correct for the records whose "special format" of the standardA set is not empty.
[0115] 8) Check whether the "whether Chinese is supported" of the standardA set is consistent with the "whether Chinese is included" of the messageA set.
[0116] (V) Output the verification results, mark the abnormal records in red, and manually confirm the records that failed the verification. For example, after automatic verification, the following 4 prompts are output, and the cause of the problem is that the InstdPty node in the path is wrong, and the correct one should be the InstdAgt node.
[0117] 1) The "message path" / Document / ElcsFreeFrmt / GrpHdr / InstdAgt / MmbId of the standardA set does not correspond to the "message path" of the messageA set.
[0118] 2) The "message path" / Document / ElcsFreeFrmt / GrpHdr / InstdPty / MmbId of the messageA set does not correspond to the "message path" of the standardA set.
[0119] 3) The "message path" / Document / ElcsFreeFrmt / GrpHdr / InstdAgt / BrnchId / Id of the standardA set does not correspond to the "message path" of the messageA set.
[0120] 4) The "message path" / Document / ElcsFreeFrmt / GrpHdr / InstdPty / BrnchId / Id of the messageA set has no corresponding "message path" of the standardA set.
[0121] In order to solve the problem that most of the existing technologies are paper vouchers on traditional bank counters, which have clear and standardized formats, can intuitively define modules, and do not need to define complex element paths. Such message processing objects are independent, fixed in position, and simple in element paths, and are not suitable for messages with uncertain element path levels and disordered contents, in one or more embodiments of the present invention, the present invention provides a business message automatic verification method and device, such as Figure 6 As shown, including:
[0122] An acquisition module 11 is used to acquire a service message image to be verified;
[0123] An element parsing module 12 is configured to parse the business message image and extract element data of a plurality of business elements corresponding to each message body;
[0124] The structured data generating module 13 parses the element data based on preset definition rules to form structured data;
[0125] The verification module 14 verifies the structured data item by item in combination with a preset structured data table to obtain a verification result of the business report.
[0126] It can be seen from the above technical scheme that the present invention provides a method and device for automatic verification of business messages. The device extracts element data of multiple business elements corresponding to each message body, and then parses the element data to form structured data. Thereafter, the structured data is checked item by item in combination with a preset structured data table. The present invention overcomes the shortcomings of the prior art that individual objects are independent, positions are fixed, and element paths are simple, and provides a method for automatic verification of business messages based on message specifications, which converts message specifications into structured data of indefinite-length paths, and automatically verifies them with the assembled disordered business messages developed by the bank, thereby reducing manual verification costs and improving development and testing efficiency.
[0127] In a preferred embodiment, the business elements include: message type, field label, field level path, required items, value range, and whether to reference a component;
[0128] The element parsing module is specifically used to process the business message image through OCR image recognition technology to obtain the message type, field label, field level path, required items and value range, and whether to reference a component.
[0129] In a preferred embodiment, the message body includes a message header, a message body and a common component, and the element parsing module specifically includes:
[0130] An identification unit, which identifies a message header, a message body, and a common component of the service message image;
[0131] A first structured data generating unit defines and parses the service elements of the message header and the message body according to a first definition rule to obtain first structured data;
[0132] A second structured data generating unit defines and parses the common component according to a second definition rule to obtain second structured data;
[0133] The third structured data generating unit, if the data corresponding to the business element of whether the component is referenced in the message header and the message body is yes, sinks the hierarchical path of all fields under the referenced component in the first structured data by one level, splices the hierarchical path of the first structured data to form a complete path, and constitutes the third structured data;
[0134] The replacement unit replaces the data of the referenced component in the first structured data with the third structured data to generate final structured data.
[0135] In a preferred embodiment, the verification module includes:
[0136] The reference structured data generation unit parses the message type, field label, field level path, whether it is a value, and data corresponding to the message field value according to the standard definition rules for the preset structured data table, and forms reference structured data;
[0137] The comparison unit compares each item of the comparison structured data and the final structured data one by one to check whether the tag name is correct, whether the path level is correct, whether the required item is a value, and whether the field value is within the value range, so as to obtain the verification result of the business report.
[0138] In a preferred embodiment, it also includes:
[0139] A positioning module outputs the verification result and locates the error problem based on the verification result;
[0140] The error description information generating module generates error description information according to the error problem and the corresponding message type.
[0141] From the hardware level, in order to solve the problem that most of the existing technologies are paper vouchers on traditional bank counters, with clear and standardized formats, intuitive module definition, no need to define complex element paths, such message processing objects are independent, fixed in position, simple in element paths, and not suitable for messages with uncertain element path levels and disordered contents, the present invention provides an embodiment of an electronic device for implementing all or part of the content in the automatic verification method of business messages, and the electronic device specifically includes the following contents:
[0142] Figure 7 FIG. 9 is a schematic block diagram of the device structure of the electronic device 9600 according to an embodiment of the present invention. Figure 7 As shown, the electronic device 9600 may include a central processor 9100 and a memory 9140; the memory 9140 is coupled to the central processor 9100. It is worth noting that Figure 7 is exemplary; other types of structures may also be used to supplement or replace this structure to implement telecommunication functions or other functions.
[0143] In one embodiment, the service message automatic verification method function may be integrated into a central processing unit. The central processing unit may be configured to perform the following control:
[0144] Step S101: Acquire a service message image to be verified.
[0145] Step S102: parsing the business message image, and extracting element data of multiple business elements corresponding to each message body.
[0146] Step S103: Based on preset definition rules, the element data is parsed to form structured data.
[0147] Step S104: The structured data is checked item by item in combination with a preset structured data table to obtain a verification result of the business report.
[0148] It can be seen from the above technical scheme that an electronic device provided by the present invention extracts element data of multiple business elements corresponding to each message body, and then parses the element data to form structured data, and then checks and verifies the structured data item by item in combination with a preset structured data table. The present invention overcomes the shortcomings of the prior art that individual objects are independent, positions are fixed, and element paths are simple, and provides a method for automatic verification of business messages based on message specifications, which converts message specifications into structured data with indefinite length paths, and automatically verifies them with the assembled disordered business messages developed by the bank, thereby reducing manual verification costs and improving development and testing efficiency.
[0149] In another embodiment, the server may be configured separately from the central processor 9100. For example, the server may be a chip connected to the central processor 9100, and the function of the automatic verification method for business messages may be implemented through the control of the central processor.
[0150] like Figure 7 As shown, the electronic device 9600 may also include: a communication module 9110, an input unit 9120, an audio processor 9130, a display 9160, and a power supply 9170. It is worth noting that the electronic device 9600 does not necessarily have to include Figure 7 In addition, the electronic device 9600 may also include Figure 7 For components not shown, reference may be made to the prior art.
[0151] like Figure 7 As shown, the central processing unit 9100 is sometimes also referred to as a controller or an operation control, and may include a microprocessor or other processor device and / or logic device, which receives input and controls the operation of various components of the electronic device 9600.
[0152] The memory 9140 may be, for example, one or more of a cache, a flash memory, a hard drive, a removable medium, a volatile memory, a non-volatile memory or other suitable devices. The above-mentioned information related to the failure may be stored, and a program for executing the relevant information may also be stored. The CPU 9100 may execute the program stored in the memory 9140 to implement information storage or processing, etc.
[0153] The input unit 9120 provides input to the central processing unit 9100. The input unit 9120 is, for example, a key or a touch input device. The power supply 9170 is used to provide power to the electronic device 9600. The display 9160 is used to display display objects such as images and texts. The display may be, for example, an LCD display, but is not limited thereto.
[0154] The memory 9140 may be a solid-state memory, such as a read-only memory (ROM), a random access memory (RAM), a SIM card, etc. It may also be a memory that saves information even when the power is off, can be selectively erased, and is provided with more data, examples of which are sometimes referred to as EPROMs, etc. The memory 9140 may also be some other type of device. The memory 9140 includes a buffer memory 9141 (sometimes referred to as a buffer). The memory 9140 may include an application / function storage unit 9142, which is used to store application programs and function programs or processes for executing the operation of the electronic device 9600 through the central processor 9100.
[0155] The memory 9140 may also include a data storage unit 9143 for storing data, such as contacts, digital data, pictures, sounds, and / or any other data used by the electronic device. The driver storage unit 9144 of the memory 9140 may include various drivers for communication functions of the electronic device and / or for executing other functions of the electronic device (such as messaging applications, address book applications, etc.).
[0156] The communication module 9110 is a transmitter / receiver 9110 that sends and receives signals via an antenna 9111. The communication module (transmitter / receiver) 9110 is coupled to the central processor 9100 to provide input signals and receive output signals, which may be the same as the case of a conventional mobile communication terminal.
[0157] Based on different communication technologies, multiple communication modules 9110 may be provided in the same electronic device, such as a cellular network module, a Bluetooth module and / or a wireless LAN module, etc. The communication module (transmitter / receiver) 9110 is also coupled to a speaker 9131 and a microphone 9132 via an audio processor 9130 to provide an audio output via the speaker 9131 and receive an audio input from the microphone 9132, thereby realizing a common telecommunication function. The audio processor 9130 may include any suitable buffer, decoder, amplifier, etc. In addition, the audio processor 9130 is also coupled to the central processor 9100, so that recording can be performed on the local machine through the microphone 9132, and the sound stored on the local machine can be played through the speaker 9131.
[0158] An embodiment of the present invention also provides a computer-readable storage medium capable of implementing all the steps in the automatic verification method for service messages in the above embodiment. A computer program is stored on the computer-readable storage medium. When the computer program is executed by a processor, all the steps of the automatic verification method for service messages in the above embodiment are implemented, and the execution subject is a server or a client. For example, when the processor executes the computer program, the following steps are implemented:
[0159] Step S101: Acquire a service message image to be verified.
[0160] Step S102: parsing the business message image, and extracting element data of multiple business elements corresponding to each message body.
[0161] Step S103: Based on preset definition rules, the element data is parsed to form structured data.
[0162] Step S104: The structured data is checked item by item in combination with a preset structured data table to obtain a verification result of the business report.
[0163] It can be seen from the above technical solution that the computer storage medium provided by the present invention extracts the element data of multiple business elements corresponding to each message body, and then parses the element data to form structured data, and then checks and verifies the structured data item by item in combination with a preset structured data table. The present invention overcomes the shortcomings of the prior art that individual objects are independent, positions are fixed, and element paths are simple, and provides a method for automatically verifying business messages based on message specifications, converts message specifications into structured data with indefinite length paths, and automatically verifies them with the assembled disordered business messages developed by the bank, thereby reducing manual verification costs and improving development and testing efficiency.
[0164] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0165] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (apparatus), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0166] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0167] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0168] The present invention uses specific embodiments to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A method for automatically checking a service message, characterized in that: include: Obtaining the service message image to be verified; Parsing the business message image to extract element data of multiple business elements corresponding to each message body; Based on preset definition rules, the element data is parsed to form structured data; The structured data is checked item by item in combination with a preset structured data table to obtain a verification result of the business report; The business elements include: message type, field label, field level path, required items, value range, and whether to reference a component; The parsing of the business message image to extract element data of a plurality of business elements corresponding to each message body includes: The business message image is processed by OCR image recognition technology to obtain the message type, field label, field level path, required items and value range, and whether a component is referenced.
2. The automatic verification method for business messages according to claim 1, characterized in that: The message body includes a message header, a message body and a common component, and the parsing of the business message image to extract element data of multiple business elements corresponding to each message body includes: Identify the message header, message body and common components of the service message image; Defining and parsing the service elements of the message header and the message body according to a first definition rule to obtain first structured data; Defining and parsing the common component according to a second definition rule to obtain second structured data; If the data corresponding to the business element of whether the component is referenced in the message header and the message body is yes, the hierarchical path of all fields under the referenced component in the first structured data is sunk one level, and the hierarchical path of the first structured data is concatenated to form a complete path to form the third structured data; The third structured data is used to replace the data of the referenced component in the first structured data to generate final structured data.
3. The automatic verification method for business messages according to claim 1, characterized in that: The structured data is checked item by item in combination with the preset structured data table to obtain the verification results of the business report, including: Parse the message type, field label, field level path, whether it is a value, and data corresponding to the message field value according to the standard definition rules for the preset structured data table, and form the comparison structured data; Each item of the control structured data and the final structured data is compared one by one to check whether the tag name is correct, whether the path level is correct, whether the required item is a value, and whether the field value is within the value range, so as to obtain the verification result of the business report.
4. The automatic verification method for business messages according to claim 1, characterized in that: Also includes: Output the verification result, and locate the error problem based on the verification result; Generate error description information based on the error problem and the corresponding message type.
5. A service message automatic verification device, characterized in that: include: An acquisition module is used to acquire the service message image to be verified; An element parsing module, parsing the business message image, and extracting element data of multiple business elements corresponding to each message body; A structured data generation module, which parses the element data based on preset definition rules to form structured data; A verification module, combining a preset structured data table to verify the structured data item by item, and obtains a verification result of the business report; The business elements include: message type, field label, field level path, required items, value range, and whether to reference a component; The element parsing module is specifically used to process the business message image through OCR image recognition technology to obtain the message type, field label, field level path, required items and value range, and whether to reference a component.
6. The automatic verification device for business messages according to claim 5, characterized in that: The message body includes a message header, a message body and common components, and the element parsing module specifically includes: An identification unit, which identifies a message header, a message body, and a common component of the service message image; A first structured data generating unit defines and parses the service elements of the message header and the message body according to a first definition rule to obtain first structured data; A second structured data generating unit defines and parses the common component according to a second definition rule to obtain second structured data; The third structured data generating unit, if the data corresponding to the business element of whether the component is referenced in the message header and the message body is yes, sinks the hierarchical path of all fields under the referenced component in the first structured data by one level, splices the hierarchical path of the first structured data to form a complete path, and constitutes the third structured data; The replacement unit replaces the data of the referenced component in the first structured data with the third structured data to generate final structured data.
7. The automatic verification device for business messages according to claim 5, characterized in that: The verification module comprises: The reference structured data generation unit parses the message type, field label, field level path, whether it is a value, and data corresponding to the message field value according to the standard definition rules for the preset structured data table, and forms reference structured data; The comparison unit compares each item of the comparison structured data and the final structured data one by one to check whether the tag name is correct, whether the path level is correct, whether the required item is a value, and whether the field value is within the value range, so as to obtain the verification result of the business report.
8. The automatic verification device for business messages according to claim 5, characterized in that: Also includes: A positioning module outputs the verification result and locates the error problem based on the verification result; The error description information generating module generates error description information according to the error problem and the corresponding message type.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 4 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Message checking method and device, computer equipment and storage medium
CN109474578A