CN114240525A - Message generation method and device and server - Google Patents

Message generation method and device and server Download PDF

Info

Publication number
CN114240525A
CN114240525A CN202111571473.3A CN202111571473A CN114240525A CN 114240525 A CN114240525 A CN 114240525A CN 202111571473 A CN202111571473 A CN 202111571473A CN 114240525 A CN114240525 A CN 114240525A
Authority
CN
China
Prior art keywords
message
target
preset
data
initial
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
CN202111571473.3A
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.)
China Construction Bank Corp
Original Assignee
China Construction Bank Corp
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 China Construction Bank Corp filed Critical China Construction Bank Corp
Priority to CN202111571473.3A priority Critical patent/CN114240525A/en
Publication of CN114240525A publication Critical patent/CN114240525A/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
    • G06Q30/00Commerce
    • G06Q30/04Billing or invoicing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • 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

Abstract

The specification provides a message generation method, a message generation device and a server. Based on the method, in the technical field of data processing, a target picture containing a target bill can be obtained from a received message generation request; calling a preset image processing model, and acquiring target bill data by processing the target picture; then, based on a preset data configuration library obtained through text similarity matching in advance, combining the obtained target bill data, and automatically generating a corresponding initial message; and then, according to a preset message format rule, detecting and converting the format of the initial message to obtain a target message meeting the preset format requirement. Therefore, the target bill data related to the target message to be generated can be automatically acquired, the target message meeting the preset format requirement is efficiently generated by using the target bill data based on the preset data configuration library, the processing cost in the message generation process is reduced, and the processing efficiency is improved.

Description

Message generation method and device and server
Technical Field
The present specification belongs to the technical field of data processing, and in particular, to a message generation method, apparatus, and server.
Background
In a banking electronic business process scenario, it is often necessary to generate and send a large number of messages. However, when some types of messages are generated, the processing procedures involved are often complex and cumbersome.
For example, when a bank generates a message related to an invoice, business personnel of the bank needs to manually identify the invoice provided by a client and manually enter related invoice information; then, the invoice information is utilized to manually carry out operations such as group reporting, checking and the like so as to obtain a message meeting the specification of an electronic credit card system (electronic credit card information exchange system).
Therefore, when the message is specifically generated based on the method, a large amount of labor cost and time cost are consumed, and the processing efficiency is low; and errors are also easy to occur in the treatment process.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The present specification provides a message generation method, a message generation device, and a server, which can automatically obtain target ticket data related to a target message to be generated, and efficiently generate the target message meeting a preset format requirement by using the target ticket data based on a preset data configuration library.
An embodiment of the present specification provides a message generation method, including:
receiving a message generation request about a target message; wherein, the message generation request at least carries a target picture; the target picture comprises a target bill related to the target message;
calling a preset image processing model to process the target picture so as to obtain target bill data;
generating an initial message according to the message generation request and the target bill data based on a preset data configuration library;
detecting whether the initial message meets the preset format requirement or not according to a preset message format rule;
and under the condition that the initial message is determined not to meet the preset format requirement, carrying out format conversion on the initial message to obtain a target message meeting the preset format requirement.
In one embodiment, the target message comprises a Foetidinine message.
In one embodiment, the target ticket includes an invoice associated with a Fofiting message;
accordingly, the target ticket data includes at least one of: invoice type, invoice number, invoice code, untaxed amount and invoicing date.
In one embodiment, after acquiring the target ticket data, the method further comprises:
and according to the target picture, carrying out data verification on the acquired target bill data.
In one embodiment, the message generation request further carries a transaction step identifier and a precondition parameter.
In one embodiment, the preset data configuration library at least stores a preset message entry configuration table and a preset message entry attribute table;
correspondingly, based on a preset data configuration library, generating an initial message according to the message generation request and the target bill data, including:
determining a group report type of the target message according to the transaction step identifier and the precondition parameter;
according to the group report type, determining field data of the target message by inquiring a preset message item configuration table and a preset message item attribute table;
and generating an initial message according to the field data and the target bill data of the target message.
In one embodiment, the field data includes: the number of the columns, the value rule of the columns and the data source of the columns.
In an embodiment, the preset data configuration library further stores a preset message editing condition table.
In one embodiment, in a case where it is determined that the initial packet does not meet a preset format requirement, performing format conversion on the initial packet includes:
and according to the preset message editing condition table, carrying out format conversion on the numerical value of the column which does not accord with the preset format requirement in the initial message.
In one embodiment, the method further comprises:
receiving the updating data of the message rule;
and updating corresponding field parameters in a preset message item configuration table and/or a preset message item attribute table in a preset data configuration library according to the updating data of the message rule.
In one embodiment, the preset image processing model is obtained as follows:
acquiring a sample picture containing a sample bill;
labeling the sample picture according to a preset labeling rule to obtain a labeled sample picture;
and training an initial model by using the marked sample picture to obtain a preset image processing model.
An embodiment of the present specification further provides a packet generating apparatus, including:
the receiving module is used for receiving a message generation request related to a target message; wherein, the message generation request at least carries a target picture; the target picture comprises a target bill related to the target message;
the calling module is used for calling a preset image processing model to process the target picture so as to acquire target bill data;
the generating module is used for generating an initial message according to the message generation request and the target bill data based on a preset data configuration library;
the detection module is used for detecting whether the initial message meets the preset format requirement or not according to the preset message format rule;
and the conversion module is used for carrying out format conversion on the initial message under the condition that the initial message is determined not to meet the preset format requirement so as to obtain a target message meeting the preset format requirement.
The embodiment of the present specification further provides a server, which includes a processor and a memory for storing processor-executable instructions, where the processor executes the instructions to implement the steps of the message generation method.
Embodiments of the present specification further provide a computer-readable storage medium, on which computer instructions are stored, and when executed by a processor, the instructions implement the steps of the message generation method.
Embodiments of the present specification further provide a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the message generation method are implemented.
Based on the message generation method, the message generation device and the server provided by the specification, a target picture containing a target bill associated with a target message to be generated can be extracted from a received message generation request; and calling a preset image processing model, and automatically extracting the required target bill data by processing the target picture. And then based on a preset data configuration library which is configured in advance and at least stores a preset message item configuration table and a preset message item attribute table, combining the acquired target bill data to automatically generate a corresponding initial message. Further, according to a preset message format rule, corresponding format detection and format conversion are carried out on the generated initial message, so that a target message meeting the preset format requirement is obtained. Therefore, the target bill data related to the target message to be generated can be automatically acquired, the target message meeting the preset format requirement is efficiently generated and obtained by utilizing the target bill data based on the preset data configuration library, the processing cost in the message generation process is effectively reduced, the processing efficiency is improved, and the error in the processing process is reduced.
Drawings
In order to more clearly illustrate the embodiments of the present specification, the drawings needed to be used in the embodiments will be briefly described below, and the drawings in the following description are only some of the embodiments described in the specification, and it is obvious to those skilled in the art that other drawings can be obtained based on the drawings without any inventive work.
Fig. 1 is a schematic flowchart of a message generation method according to an embodiment of the present disclosure;
fig. 2 is a schematic diagram of an embodiment of a message generation method provided by an embodiment of the present specification, in a scenario example;
FIG. 3 is a schematic diagram of a server according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a message generation apparatus according to an embodiment of the present disclosure.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in the present specification, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only a part of the embodiments of the present specification, and not all of the embodiments. All other embodiments obtained by a person skilled in the art based on the embodiments in the present specification without any inventive step should fall within the scope of protection of the present specification.
Referring to fig. 1, an embodiment of the present disclosure provides a message generation method. The method is particularly applied to the server side. In particular implementations, the method may include the following.
S101: receiving a message generation request about a target message; wherein, the message generation request at least carries a target picture; the target picture comprises a target bill related to the target message.
S102: and calling a preset image processing model to process the target picture so as to obtain target bill data.
S103: and generating an initial message according to the message generation request and the target bill data based on a preset data configuration library.
S104: and detecting whether the initial message meets the preset format requirement or not according to a preset message format rule.
S105: and under the condition that the initial message is determined not to meet the preset format requirement, carrying out format conversion on the initial message to obtain a target message meeting the preset format requirement.
By the embodiment, the target bill data associated with the target message to be generated can be automatically extracted and obtained without depending on manual processing of service personnel, and the target message meeting the preset format requirement can be efficiently and accurately generated and obtained by automatically utilizing the obtained target bill data.
In some embodiments, the message generation method may be specifically applied to a server side. The server can be specifically understood as a background server which is arranged on one side of a banking business data processing system and can realize functions of data transmission, data processing and the like. Specifically, the server may be, for example, an electronic device having data operation, storage function and network interaction function. Alternatively, the server may be a software program running in the electronic device and providing support for data processing, storage and network interaction. In the present embodiment, the number of servers is not particularly limited. The server may specifically be one server, or may also be several servers, or a server cluster formed by several servers.
The banking data processing system is in butt joint with an electronic certificate system (electronic credit card information exchange system) of a related financial institution. In a banking business processing scene, according to a related protocol rule, a banking business data processing system needs to generate a message through a server, convert the message into a message meeting the format specification of an electronic certificate system, and then perform message transmission interaction with the electronic certificate system to complete corresponding business data processing. The electronic certificate system may specifically include a plurality of service subsystems, which are used for docking and processing different types of messages. For example, the electric license system may include a Foetidinine subsystem for interfacing with a Foetidinine message.
In some embodiments, the message generation request may be specifically generated by a demanding party (e.g., a client, or a banking staff member, etc.) who has a need to generate a message, and sent to the server through a terminal device.
The terminal device may specifically include a front-end device applied to a demander side and capable of implementing functions such as data acquisition and data transmission. Specifically, the terminal device may be, for example, an electronic device such as a desktop computer, a tablet computer, a notebook computer, and a smart phone. Alternatively, the terminal device may be a software application capable of running in the electronic device. For example, it may be some APP or the like that can only run on a mobile phone.
In some embodiments, a message may specifically be understood as a data unit that is exchanged and transmitted through a network and is a data block that needs to be sent once. The message may specifically include complete data information of a data block to be sent, and the message lengths of different messages may be different.
In some embodiments, the target packet may be specifically understood as a packet to be generated. The target message may include multiple types of messages. Specifically, the target message may include a blessing message.
The above-mentioned fugitin message may be understood to be a message related to fugitin services. The term "fugitimate" is understood to mean a banking operation in which a bank receives a real and valid payment confirmation of due from an issuing bank and purchases outstanding debt rights from a seller without recourse under the settlement of a paid letter of credit or a deferred payment letter of credit.
It is added that the receipt data of the invoice associated with the fugitin service often needs to be acquired and used in the process of generating the fugitin message.
It should be noted that the above-listed forfinit messages are only an exemplary illustration. In specific implementation, the target packet may further include other types of packets according to a specific application scenario and a processing requirement. Such as SWIFT messages, etc. The present specification is not limited to these.
In some embodiments, when a target message needs to be generated, a demander may generate and initiate a message generation request for the target message to a server through a client device. Accordingly, the server may receive the message generation request.
In some embodiments, the message generation request may carry at least a target picture. The target picture may include a target ticket associated with the target message.
In some embodiments, for certain types of messages (e.g., forfinit messages, etc.), it is often desirable in generating a message to also obtain target ticket data for target tickets related to the service associated with the message. The target bill data may be specifically understood as information data extracted from a target bill and used when generating a target message.
In some embodiments, where the target message is a fuferting message, the target ticket may specifically be an invoice associated with the fuferting message. Correspondingly, the target bill data to be acquired and used in the process of generating the target packet may specifically include one or more of the following information data: invoice type, invoice number, invoice code, untaxed amount and invoicing date.
In some embodiments, it is contemplated that some types of messages (e.g., Foetidinia messages) require the acquisition and use of target ticket data for a target ticket associated with the message during the generation phase; and some messages do not need to acquire related target bill data in addition in some cases. Therefore, before the specific implementation, the server may be configured with a preset message type identifier table in advance, where the preset message type identifier table specifically stores the message type identifier of the message for which the target ticket data needs to be acquired in the message generation stage.
Correspondingly, after receiving the message generation request, the server may first determine whether to acquire and use the related target bill data for generating the target message by querying a preset message type identifier table according to the message type identifier of the target message requested to be generated by the message generation request. If the message type identification of the target message is inquired in a preset message type table, the target bill data which needs to be acquired and used for generating the target message can be determined. Further, the server may detect whether the generation request carries a target picture including a target ticket. Under the condition that the generation request is detected not to carry the target picture, the server can return the message generation request and feed back prompt information to prompt a demand party to supplement the target picture containing the target bill in time. When detecting that the generation request carries the target picture, the subsequent data processing may be triggered.
In some embodiments, referring to fig. 2, the server may first obtain the target picture from the message generation request; and then the target picture is processed by calling a preset image processing model so as to automatically and efficiently extract and obtain the required target bill data.
The preset image processing model can be specifically understood as a pre-trained model which can recognize and extract required information data from a picture containing a bill based on an OCR recognition technology. The OCR (Optical character recognition) is specifically understood to mean a process in which an electronic device checks a character printed on paper, detects a dark or light pattern, determines the shape of the detected character, and translates the shape into a character by a character recognition method.
By the embodiment, the target bill data required by generating the target message can be automatically and efficiently acquired, and business personnel do not need to manually identify and manually input related bill data, so that the labor cost can be effectively reduced, the overall processing efficiency is improved, and errors caused by manual input can be reduced.
In some embodiments, before implementation, the preset image processing model may be trained as follows:
s1: acquiring a sample picture containing a sample bill;
s2: labeling the sample picture according to a preset labeling rule to obtain a labeled sample picture;
s3: and training an initial model by using the marked sample picture to obtain a preset image processing model.
In some embodiments, the sample picture may specifically be a photograph including a sample ticket, or may also be a screenshot including a sample ticket captured from video data.
In some embodiments, the labeling of the sample picture according to the preset labeling rule may include the following steps: marking a first image area where the sample bill is located in the sample picture by using a first identifier (such as a solid line); and marking second image areas in which specific bill data (such as invoice types, invoice numbers, invoice codes and the like) needing to be identified and acquired are respectively located in the first image areas by utilizing second identifiers (such as dotted lines) in combination with the typesetting characteristics of the sample bills, and setting corresponding data labels in the second image areas to obtain marked sample pictures.
In some embodiments, in implementation, an existing OCR recognition model may be selected as an initial model for training, so as to shorten the training time of the model and improve the training efficiency.
Through the embodiment, the preset image processing model with high accuracy and good effect can be quickly trained.
In some embodiments, after acquiring the target ticket data, when the method is implemented, the following may be further included: and according to the target picture, carrying out data verification on the acquired target bill data.
When the verification is specifically carried out, business personnel can randomly extract the extracted target bill data and carry out data verification by combining with the corresponding target picture so as to determine whether the extracted target bill data is accurate or not. And the computer and other equipment can judge whether the extracted target bill data is accurate or not by calculating the difference value between the extracted target bill data and the corresponding graph in the target picture.
And in the case that the data verification is passed and the verification of the target bill data is determined to pass, triggering subsequent data processing. On the contrary, under the condition that the target bill data is determined not to pass the verification, the preset image processing model can be called to reprocess the target picture so as to extract the target bill data again; or sending the target picture to a service person to manually extract the target bill data.
Therefore, the processing efficiency of the target bill data can be improved, the data quality of the extracted target bill data is considered, and the whole data error is reduced.
In some embodiments, before invoking the preset image processing model to process the target picture, the method may further include preprocessing the target picture. Specifically, the pretreatment may include at least one of: filtering processing, noise reduction processing, image sharpening processing, and the like. Through the preprocessing, the target picture can become clearer, so that target bill data can be accurately identified and obtained through a preset image processing model in the following process.
In some embodiments, the server also holds and manages a preset database configuration. The preset data configuration library at least stores configuration data such as a preset message entry configuration table (or called default message entry table), a preset message entry attribute table (or called default message entry attribute table), and the like. The preset message entry configuration table and the preset message entry attribute table may specifically include a plurality of configuration fields related to a group report mode of the message. Correspondingly, the group report can be completed based on the preset message item configuration table and the preset message item attribute table, and corresponding message data can be obtained.
In some embodiments, the preset data configuration library may store a plurality of groups of preset packet entry configuration tables and preset packet entry attribute tables. Each group of the preset message entry configuration table and the preset message entry attribute table corresponds to a message type identifier of one type of message. Specifically, when the target packet is a fuigian packet, the server may find out a group of preset packet entry configuration tables and preset packet entry attribute tables corresponding to the packet rational identifier of the fuigian packet by querying a preset data configuration library, and may specifically refer to table 1 (corresponding to the preset packet entry configuration table) and table 2 (corresponding to the preset packet entry attribute table), respectively.
TABLE 1
Figure BDA0003423460790000081
TABLE 2
Figure BDA0003423460790000082
In some embodiments, the preset data configuration library may further store a preset message editing condition table (or called message document editable condition table). The preset message editing condition table may specifically include a plurality of configuration fields related to format specifications of the message. Correspondingly, the format conversion of the packet obtained by the packet reporting can be performed based on the preset packet editing condition table, so that the converted packet meets the corresponding format requirement. The preset message editing condition table may refer to table 3.
TABLE 3
Figure BDA0003423460790000091
In some embodiments, the configuration data stored in the preset data configuration library (for example, a preset packet entry configuration table, a preset packet entry attribute table, a preset packet editing condition table, and the like) may be generated by text similarity matching or the like. The following takes the generation of a preset message editing condition table in a preset data configuration library as an example to specifically describe.
In specific implementation, a preset message editing condition table stored in a preset data configuration database can be generated and obtained according to the following modes: acquiring a message template; preparing basic information about a configuration table of a message template based on the message template; generating an initial configuration table according to the basic information of the configuration table; performing text similarity matching on the historical data by using the message name and the field value of the message field label in the initial configuration table to find out historical configuration information with text similarity meeting requirements, and performing information completion on the initial configuration table (for example, completing message editing condition content, message editing default effective result, message editing permission mark and the like in the configuration table); and obtaining a supplemented configuration table with rich information, namely a preset message editing condition table.
After the completed configuration table is obtained through information completion according to the above manner, the completed configuration table can be sent to an auditor so as to more accurately audit and adjust the configuration information in the completed configuration table, so that a preset message editing condition table with relatively higher accuracy can be obtained, and the table is stored in a preset data configuration library.
The message template may be provided by an electronic certificate system of the target organization.
In the above-mentioned preparation of the basic information about the configuration table of the packet template, in a specific implementation, the basic information about the configuration table of the packet template, for example, a sending packet type code, a field tag field value, a packet sequence number field value, a service packet type code, etc. in the table, may be generated by identifying a specific location identifier (for example, a line feed character, <, > etc.) in the packet template by using a pre-programmed data processing program.
In some embodiments, in the case that the data amount of the held history data is small, in a specific implementation, the history configuration information whose text similarity meets the requirement may be found according to the above manner, and the initial configuration table is completed with information, and meanwhile, the original history data may be expanded according to the found history configuration information whose text similarity meets the requirement, so as to obtain expanded history data (for example, a typical packet including a plurality of fields with higher coverage may be found to expand the configuration of the history data); and then, the message name and the field value of the message field label in the initial configuration table are utilized to continuously perform text similarity matching on the expanded historical data so as to find out relatively richer configuration information with text similarity meeting requirements, so that the initial configuration table is subjected to more comprehensive and accurate information completion to obtain a relatively more complete preset message editing condition table.
In some embodiments, further, after the preset message editing condition table is generated in the above manner and stored in the preset data configuration library, corresponding update processing may be performed according to an updated message template provided by the target mechanism.
Specifically, when performing the update processing, the updated message template may be obtained first; according to the mode of processing the message template, according to the updated message template, through corresponding processing, obtaining a second message editing condition table corresponding to the updated message template; comparing the second message editing condition table with the original preset message editing condition table stored in the data configuration library to obtain a comparison result; and finally, according to the comparison result, performing targeted modification and updating on a preset data configuration database and a preset message editing condition table.
Other data stored in the preset data configuration library can also be generated by text similarity matching with reference to the above embodiment.
It should be noted that, in specific implementation, according to specific situations, relatively simple configuration data (e.g., a preset message entry configuration table and a preset message entry attribute table) stored in a preset data configuration library may also be directly generated by manual configuration by an auditor.
In some embodiments, the message generation request may further specifically carry a transaction step identifier and a precondition parameter.
The transaction step identifier is used for representing the current transaction stage of the service associated with the target message. Taking the target message as an example of a fufiting message, the transaction step identifier may specifically include an identifier character indicating one of the following transaction stages: asset registration, asset publishing, asset element registration, and the like.
The precondition parameters are used for representing a specific service scene of a service associated with the target message, and/or selecting a set service item, a set service label and the like by a demand party.
In some embodiments, referring to fig. 2, the generating an initial packet according to the packet generation request and the target ticket data based on the preset data configuration library may include the following steps:
s1: determining a group report type of the target message according to the transaction step identifier and the precondition parameter;
s2: according to the message type, determining field data of the target message by inquiring a preset message item configuration table and a preset message item attribute table according to the group message type;
s3: and generating an initial message according to the field data and the target bill data of the target message.
In some embodiments, the field data may specifically include one or more of the following: the number of columns, the value rule of the columns, the data source of the columns and the like. It should be noted that the above listed field data is only an exemplary description. In specific implementation, the field data may further include other types of information data according to a specific application scenario and a group report type. The present specification is not limited to these.
In some embodiments, when the initial message is generated specifically, a message template including a corresponding number of columns may be constructed according to the number of columns; and extracting corresponding data values from the system database and the target bill data respectively according to the value-taking rules aiming at each column, and filling the corresponding data values into the corresponding columns to obtain initial messages.
Specifically, when a certain column is valued, for example, based on a value rule corresponding to the column, a corresponding data table is first queried from a system database according to a table name in the value rule; and extracting the data value to be filled in the column from the data table according to the row and column information in the value-taking rule table.
For another example, based on the value-taking rule corresponding to the field, the target bill data is searched, and the bill data semantically matched with the target field in the value-taking rule is found and used as the data value to be filled in the field.
Through the embodiment, the server can accurately determine the message type of the target message to be generated according to the preset data configuration library, and then automatically complete the group report to obtain the corresponding initial message.
In some embodiments, in specific implementation, a unified message generation service program may be called to configure a library based on preset data according to the above manner, and according to the message generation request and the target bill data, a group report is automatically performed to generate and obtain a corresponding initial message. Therefore, corresponding message generation service program codes do not need to be written aiming at different types of messages, and the processing cost is reduced.
In some embodiments, it is contemplated that the message requirements ultimately used to interact with the electronic certificate system are messages that satisfy pre-set format requirements based on the corresponding protocol rules. The initial message directly generated in the above manner may have a problem that the initial message does not meet the preset format requirement. Therefore, after the initial message is obtained, whether the initial message meets the preset format requirement or not can be detected according to the preset message format rule; and under the condition that the initial message is determined not to meet the preset format requirement, carrying out format conversion on the initial message to obtain a target message meeting the preset format requirement.
The preset message format rule can be specifically understood as that the server generates the message according to the format specification file of the electronic certificate system and in combination with the corresponding protocol rule.
In some embodiments, detecting whether the initial packet meets a preset format requirement may specifically include: and detecting whether the data value of the specified column filled in the initial message meets the preset format requirement or not by combining a preset message editing condition table according to a preset message format rule. For example, whether abnormal symbols such as "-" which do not meet the preset format requirement exist in the data values of the specified fields such as date, currency, amount and the like in the initial message is detected; for another example, detecting whether the alphabetic character in the data value of the designated field in the initial message is an upper case alphabetic character according to a preset format requirement; also for example, the number of the data value of the designated field, such as currency and amount, in the initial message is detected to determine whether the number is processed according to a specific pattern, and so on.
In some embodiments, when the initial packet is determined to meet the preset format requirement by detection according to the preset packet format rule, the initial packet may be directly determined as the target packet meeting the preset format requirement.
In some embodiments, when determining that the initial packet does not meet the preset format requirement, the format conversion of the initial packet may include the following steps: and according to the preset message editing condition table, carrying out format conversion on the numerical value of the column which does not accord with the preset format requirement in the initial message.
In some embodiments, when the initial message is determined to be not in accordance with the preset format requirement by detection according to the preset message format rule, a field which is not in accordance with the preset format requirement may be determined from the initial message, and marked as a field to be converted; and modifying the data value in the abnormal column according to a preset message editing condition table and a preset message format rule so as to realize format conversion of the initial message and obtain a target message meeting the preset format requirement. Wherein the modification process comprises one or more of the following: deleting abnormal symbols; converting lower case letters in the data values to upper case characters; converting the arabic numbers in the data values to traditional words, and so on.
Through the embodiment, the server can automatically convert the format of the initial message which does not accord with the preset format requirement so as to obtain the target message which accords with the preset format requirement.
In some embodiments, in specific implementation, a unified message conversion service program may be invoked to perform format conversion processing on the initial message according to the preset message format rule and the preset message editing condition table in the above manner, so as to obtain a target message meeting the preset format requirement. Therefore, corresponding message conversion service program codes do not need to be written aiming at different types of messages, and the processing cost is further reduced.
In some embodiments, after obtaining the target packet meeting the preset format requirement, when the method is implemented, the following may be further included: and sending the target message to an electronic certificate system of a target mechanism to perform corresponding service data processing. For example, the message data is stored and backed up.
In some embodiments, after the target message is obtained, the target message may be subjected to secondary verification; and under the condition that the secondary verification is passed, sending the target message to the electric certificate system of the target structure.
In some embodiments, when implemented, the method may further comprise: receiving the updating data of the message rule; and updating corresponding field parameters in a preset message item configuration table and/or a preset message item attribute table in a preset data configuration library according to the updating data of the message rule.
The update data of the message rule may be specifically data issued by the target institution or the electronic certificate system of the target institution, or data generated by the banking non-data processing system according to the relevant protocol rule.
In some embodiments, in specific implementation, the server may correspondingly adjust and update parameters of related fields in a preset message entry configuration table and/or a preset message entry attribute table in a preset data configuration according to the update data of the message rule, and may match the updated message rule without modifying a program code, and generate a target message meeting a preset format requirement based on the updated message rule.
In some embodiments, when implemented, the server may further receive error reporting information fed back by the electronic certificate system of the target institution. The electronic certificate system generates the error reporting information when detecting that a target message sent by a server of the banking business data processing system has an error or does not accord with a preset format requirement. The error reporting information also carries the serial number of the targeted target message.
The server can collect and process the error information fed back by the electric certification system of the target institution in a preset time period (for example, every 1 day); and searching and determining a target message which is judged to be wrong or not accord with a preset format requirement by the electric certification system according to the serial number carried by the error reporting information, and recording as an error message. Further, the server can classify the error message; respectively analyzing and counting error reasons of different types of error messages; according to the statistical result, respectively carrying out targeted correction on the preset message entry configuration table and/or the preset message entry attribute table corresponding to the error messages of different types so as to avoid the generation of the error messages in the following and improve the accuracy of the generated messages.
As can be seen from the above, based on the message generation method provided in the embodiments of the present specification, a target picture including a target ticket associated with a target message to be generated may be obtained from a received message generation request; and calling a preset image processing model, and automatically extracting the required related target bill data by processing the target picture. And then, based on a preset data configuration library which is configured in advance and at least stores a preset message item configuration table and a preset message item attribute table, combining the acquired target bill data to automatically generate a corresponding initial message. And then according to a preset message format rule, carrying out corresponding detection and format conversion on the initial message to obtain a target message meeting the preset format requirement. Therefore, the target bill data related to the target message to be generated can be automatically acquired, the target message meeting the preset format requirement is efficiently generated and obtained by utilizing the target bill data based on the preset data configuration library, the processing cost in the message generation process is effectively reduced, the processing efficiency is improved, and the error in the processing process is reduced.
Embodiments of the present specification further provide a server, including a processor and a memory for storing processor-executable instructions, where the processor, when implemented, may perform the following steps according to the instructions: receiving a message generation request about a target message; wherein, the message generation request at least carries a target picture; the target picture comprises a target bill related to the target message; calling a preset image processing model to process the target picture so as to obtain target bill data; generating an initial message according to the message generation request and the target bill data based on a preset data configuration library; detecting whether the initial message meets the preset format requirement or not according to a preset message format rule; and under the condition that the initial message is determined not to meet the preset format requirement, carrying out format conversion on the initial message to obtain a target message meeting the preset format requirement.
In order to more accurately complete the above instructions, referring to fig. 3, another specific server is provided in the embodiments of the present specification, wherein the server includes a network communication port 301, a processor 302, and a memory 303, and the above structures are connected by an internal cable, so that the structures may perform specific data interaction.
The network communication port 301 may be specifically configured to receive a message generation request related to a target message; wherein, the message generation request at least carries a target picture; the target picture comprises a target bill related to the target message.
The processor 302 may be specifically configured to invoke a preset image processing model to process a target picture, so as to obtain target bill data; generating an initial message according to the message generation request and the target bill data based on a preset data configuration library; the preset data configuration library at least stores a preset message item configuration table and a preset message item attribute table; detecting whether the initial message meets the preset format requirement or not according to a preset message format rule; and under the condition that the initial message is determined not to meet the preset format requirement, carrying out format conversion on the initial message to obtain a target message meeting the preset format requirement.
The memory 303 may be specifically configured to store a corresponding instruction program.
In this embodiment, the network communication port 301 may be a virtual port that is bound to different communication protocols, so that different data can be sent or received. For example, the network communication port may be a port responsible for web data communication, a port responsible for FTP data communication, or a port responsible for mail data communication. In addition, the network communication port can also be a communication interface or a communication chip of an entity. For example, it may be a wireless mobile network communication chip, such as GSM, CDMA, etc.; it can also be a Wifi chip; it may also be a bluetooth chip.
In this embodiment, the processor 302 may be implemented in any suitable manner. For example, the processor may take the form of, for example, a microprocessor or processor and a computer-readable medium that stores computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, an embedded microcontroller, and so forth. The description is not intended to be limiting.
In this embodiment, the memory 303 may include multiple layers, and in a digital system, the memory may be any memory as long as binary data can be stored; in an integrated circuit, a circuit without a physical form and with a storage function is also called a memory, such as a RAM, a FIFO and the like; in the system, the storage device in physical form is also called a memory, such as a memory bank, a TF card and the like.
An embodiment of the present specification further provides a computer storage medium based on the above message generation method, where the computer storage medium stores computer program instructions, and when the computer program instructions are executed, the following steps are implemented: receiving a message generation request about a target message; wherein, the message generation request at least carries a target picture; the target picture comprises a target bill related to the target message; calling a preset image processing model to process the target picture so as to obtain target bill data; generating an initial message according to the message generation request and the target bill data based on a preset data configuration library; detecting whether the initial message meets the preset format requirement or not according to a preset message format rule; and under the condition that the initial message is determined not to meet the preset format requirement, carrying out format conversion on the initial message to obtain a target message meeting the preset format requirement.
In this embodiment, the storage medium includes, but is not limited to, a Random Access Memory (RAM), a Read-Only Memory (ROM), a Cache (Cache), a Hard Disk Drive (HDD), or a Memory Card (Memory Card). The memory may be used to store computer program instructions. The network communication unit may be an interface for performing network connection communication, which is set in accordance with a standard prescribed by a communication protocol.
In this embodiment, the functions and effects specifically realized by the program instructions stored in the computer storage medium can be explained by comparing with other embodiments, and are not described herein again.
Embodiments of the present specification further provide a computer program product, which includes a computer program, and when the computer program is executed by a processor, the computer program implements the following steps: receiving a message generation request about a target message; wherein, the message generation request at least carries a target picture; the target picture comprises a target bill related to the target message; calling a preset image processing model to process the target picture so as to obtain target bill data; generating an initial message according to the message generation request and the target bill data based on a preset data configuration library; the preset data configuration library at least stores a preset message item configuration table and a preset message item attribute table; detecting whether the initial message meets the preset format requirement or not according to a preset message format rule; and under the condition that the initial message is determined not to meet the preset format requirement, carrying out format conversion on the initial message to obtain a target message meeting the preset format requirement.
Referring to fig. 4, in a software layer, an embodiment of the present specification further provides a packet generating device, which may specifically include the following structural modules:
the receiving module 401 may be specifically configured to receive a message generation request related to a target message; wherein, the message generation request at least carries a target picture; the target picture comprises a target bill related to the target message;
the calling module 402 may be specifically configured to call a preset image processing model to process a target picture, so as to obtain target bill data;
the generating module 403 is specifically configured to generate an initial packet according to the packet generation request and the target ticket data based on a preset data configuration library;
the detecting module 404 may be specifically configured to detect whether the initial packet meets a preset format requirement according to a preset packet format rule;
the conversion module 405 may be specifically configured to, when it is determined that the initial packet does not meet the preset format requirement, perform format conversion on the initial packet to obtain a target packet meeting the preset format requirement.
In some embodiments, the target message may specifically include a blessing message or the like.
In some embodiments, the target ticket may specifically include an invoice associated with a forfeldin message; accordingly, the target ticket data includes at least one of: invoice type, invoice number, invoice code, untaxed amount and invoicing date.
In some embodiments, the apparatus further includes a verification module configured to perform data verification on the acquired target ticket data according to the target picture after acquiring the target ticket data.
In some embodiments, the message generation request may further specifically carry a transaction step identifier, a precondition parameter, and the like.
In some embodiments, the preset data configuration library may store at least a preset packet entry configuration table and a preset packet entry attribute table.
In some embodiments, the generating module 403 may be specifically configured to determine a group report type of the target packet according to the transaction step identifier and the precondition parameter; according to the message type, determining field data of the target message by inquiring a preset message item configuration table and a preset message item attribute table according to the group message type; and generating an initial message according to the field data and the target bill data of the target message.
In some embodiments, the field data may specifically include: the number of columns, the value rule of the columns, the data source of the columns and the like.
In some embodiments, the preset data configuration library may further specifically store a preset message editing condition table.
In some embodiments, when the conversion module 405 is implemented specifically, the format conversion may be performed on the initial packet under the condition that it is determined that the initial packet does not meet the preset format requirement, and according to the preset packet editing condition table, the format conversion may be performed on the value of the field that does not meet the preset format requirement in the initial packet.
In some embodiments, the apparatus may further include an update module, configured to receive update data of the message rule; and updating corresponding field parameters in a preset message item configuration table and/or a preset message item attribute table in a preset data configuration library according to the updating data of the message rule.
In some embodiments, the apparatus may specifically include a training module, which may be configured to train a preset image processing model in the following manner: acquiring a sample picture containing a sample bill; labeling the sample picture according to a preset labeling rule to obtain a labeled sample picture; and training an initial model by using the marked sample picture to obtain a preset image processing model.
It should be noted that, the units, devices, modules, etc. illustrated in the above embodiments may be implemented by a computer chip or an entity, or implemented by a product with certain functions. For convenience of description, the above devices are described as being divided into various modules by functions, and are described separately. It is to be understood that, in implementing the present specification, functions of each module may be implemented in one or more pieces of software and/or hardware, or a module that implements the same function may be implemented by a combination of a plurality of sub-modules or sub-units, or the like. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
As can be seen from the above, based on the message generation provided in the embodiments of the present specification, the target bill data related to the target message to be generated can be automatically obtained, and based on the preset data configuration library, the target message meeting the preset format requirement is efficiently generated and obtained by using the target bill data, so that the processing cost in the message generation process is effectively reduced, the processing efficiency is improved, and the error in the processing process is reduced.
Although the present specification provides method steps as described in the examples or flowcharts, additional or fewer steps may be included based on conventional or non-inventive means. The order of steps recited in the embodiments is merely one manner of performing the steps in a multitude of orders and does not represent the only order of execution. When an apparatus or client product in practice executes, it may execute sequentially or in parallel (e.g., in a parallel processor or multithreaded processing environment, or even in a distributed data processing environment) according to the embodiments or methods shown in the figures. The terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, the presence of additional identical or equivalent elements in a process, method, article, or apparatus that comprises the recited elements is not excluded. The terms first, second, etc. are used to denote names, but not any particular order.
Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may therefore be considered as a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
This description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, classes, etc. that perform particular tasks or implement particular abstract data types. The specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
From the above description of the embodiments, it is clear to those skilled in the art that the present specification can be implemented by software plus necessary general hardware platform. With this understanding, the technical solutions in the present specification may be essentially embodied in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which may be a personal computer, a mobile terminal, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments in the present specification.
The embodiments in the present specification are described in a progressive manner, and the same or similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. The description is operational with numerous general purpose or special purpose computing system environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet-type devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like.
While the specification has been described with examples, those skilled in the art will appreciate that there are numerous variations and permutations of the specification that do not depart from the spirit of the specification, and it is intended that the appended claims include such variations and modifications that do not depart from the spirit of the specification.

Claims (15)

1. A message generation method is characterized by comprising the following steps:
receiving a message generation request about a target message; wherein, the message generation request at least carries a target picture; the target picture comprises a target bill related to the target message;
calling a preset image processing model to process the target picture so as to obtain target bill data;
generating an initial message according to the message generation request and the target bill data based on a preset data configuration library;
detecting whether the initial message meets the preset format requirement or not according to a preset message format rule;
and under the condition that the initial message is determined not to meet the preset format requirement, carrying out format conversion on the initial message to obtain a target message meeting the preset format requirement.
2. The method of claim 1, wherein the target message comprises a Foetidinine message.
3. The method of claim 2, wherein the target instrument comprises an invoice associated with a fufitinib message;
accordingly, the target ticket data includes at least one of: invoice type, invoice number, invoice code, untaxed amount and invoicing date.
4. The method of claim 2, wherein after acquiring the target ticket data, the method further comprises:
and according to the target picture, carrying out data verification on the acquired target bill data.
5. The method according to claim 2, wherein the message generation request further carries a transaction step identifier and a precondition parameter.
6. The method according to claim 5, wherein the predetermined data configuration library stores at least a predetermined packet entry configuration table and a predetermined packet entry attribute table;
correspondingly, based on a preset data configuration library, generating an initial message according to the message generation request and the target bill data, including:
determining a group report type of the target message according to the transaction step identifier and the precondition parameter;
according to the group report type, determining field data of the target message by inquiring a preset message item configuration table and a preset message item attribute table;
and generating an initial message according to the field data and the target bill data of the target message.
7. The method of claim 6, wherein the field data comprises: the number of the columns, the value rule of the columns and the data source of the columns.
8. The method according to claim 6, wherein the predetermined data configuration library further stores a predetermined message editing condition table.
9. The method of claim 8, wherein converting the format of the initial packet comprises:
and according to the preset message editing condition table, carrying out format conversion on the numerical value of the column which does not accord with the preset format requirement in the initial message.
10. The method of claim 1, further comprising:
receiving the updating data of the message rule;
and updating corresponding field parameters in a preset message item configuration table and/or a preset message item attribute table in a preset data configuration library according to the updating data of the message rule.
11. The method according to claim 1, characterized in that the preset image processing model is obtained in the following way:
acquiring a sample picture containing a sample bill;
labeling the sample picture according to a preset labeling rule to obtain a labeled sample picture;
and training an initial model by using the marked sample picture to obtain a preset image processing model.
12. A message generating apparatus, comprising:
the receiving module is used for receiving a message generation request related to a target message; wherein, the message generation request at least carries a target picture; the target picture comprises a target bill related to the target message;
the calling module is used for calling a preset image processing model to process the target picture so as to acquire target bill data;
the generating module is used for generating an initial message according to the message generation request and the target bill data based on a preset data configuration library;
the detection module is used for detecting whether the initial message meets the preset format requirement or not according to the preset message format rule;
and the conversion module is used for carrying out format conversion on the initial message under the condition that the initial message is determined not to meet the preset format requirement so as to obtain a target message meeting the preset format requirement.
13. A server comprising a processor and a memory for storing processor-executable instructions which, when executed by the processor, implement the steps of the method of any one of claims 1 to 11.
14. A computer-readable storage medium having stored thereon computer instructions which, when executed by a processor, carry out the steps of the method of any one of claims 1 to 11.
15. A computer program product comprising a computer program which, when executed by a processor, carries out the steps of the method according to any one of claims 1 to 11.
CN202111571473.3A 2021-12-21 2021-12-21 Message generation method and device and server Pending CN114240525A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111571473.3A CN114240525A (en) 2021-12-21 2021-12-21 Message generation method and device and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111571473.3A CN114240525A (en) 2021-12-21 2021-12-21 Message generation method and device and server

Publications (1)

Publication Number Publication Date
CN114240525A true CN114240525A (en) 2022-03-25

Family

ID=80760298

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111571473.3A Pending CN114240525A (en) 2021-12-21 2021-12-21 Message generation method and device and server

Country Status (1)

Country Link
CN (1) CN114240525A (en)

Similar Documents

Publication Publication Date Title
CN109887153B (en) Finance and tax processing method and system
US20230377032A1 (en) System and method for processing transaction records for users
CN111275037B (en) Bill identification method and device
CN103488923B (en) A kind of electric endorsement method, Apparatus and system
CN107862425B (en) Wind control data acquisition method, device and system and readable storage medium
JP2016048444A (en) Document identification program, document identification device, document identification system, and document identification method
CN112115107A (en) Contract text automatic generation method and device
CN109214362B (en) Document processing method and related equipment
CN114445079A (en) Document processing method, device, equipment and storage medium
CN114218110A (en) Account checking test method and device for financial data, computer equipment and storage medium
CN109669954A (en) Acquisition methods, equipment, storage medium and the device of contract dataset
CN111984734A (en) Data processing method, device and equipment based on block chain and storage medium
CN111462388A (en) Bill inspection method and device, terminal equipment and storage medium
CN110874379A (en) Data transfer method and device
US20150227787A1 (en) Photograph billpay tagging
CN114240525A (en) Message generation method and device and server
US20170185832A1 (en) System and method for verifying extraction of multiple document images from an electronic document
CN113902573A (en) Method and device for processing claim settlement data, storage medium and terminal
CN113537964A (en) Application form processing method, device, storage medium and device
CN112766254A (en) Automatic testing method and device for voucher information input
CN111340517A (en) Method, system and related equipment for rapidly inquiring authenticity of invoice
JP4516376B2 (en) Form processing system
US9213970B1 (en) Processing of co-mingled paper correspondence
CN115718816A (en) File image processing method and device and server
CN115034876A (en) Loan information auditing method and device based on OCR (optical character recognition) technology and computer equipment

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