CN117194651A - Message processing method and device and electronic equipment - Google Patents
Message processing method and device and electronic equipment Download PDFInfo
- Publication number
- CN117194651A CN117194651A CN202311205012.3A CN202311205012A CN117194651A CN 117194651 A CN117194651 A CN 117194651A CN 202311205012 A CN202311205012 A CN 202311205012A CN 117194651 A CN117194651 A CN 117194651A
- Authority
- CN
- China
- Prior art keywords
- message
- processing
- database
- service
- service type
- 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
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 20
- 238000012545 processing Methods 0.000 claims abstract description 287
- 238000000034 method Methods 0.000 claims abstract description 42
- 238000013507 mapping Methods 0.000 claims description 38
- 238000004140 cleaning Methods 0.000 claims 1
- 230000005856 abnormality Effects 0.000 abstract description 7
- 230000008569 process Effects 0.000 description 12
- 238000010586 diagram Methods 0.000 description 6
- 230000006870 function Effects 0.000 description 6
- 230000004044 response Effects 0.000 description 6
- 238000004891 communication Methods 0.000 description 4
- 238000004590 computer program Methods 0.000 description 4
- 230000002159 abnormal effect Effects 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 2
- 230000000903 blocking effect Effects 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000007246 mechanism Effects 0.000 description 2
- 230000006978 adaptation Effects 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 238000013475 authorization Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 239000013589 supplement Substances 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Landscapes
- Information Transfer Between Computers (AREA)
Abstract
The application provides a message processing method, a message processing device and electronic equipment, which can be used in the technical field of message processing. The method comprises the following steps: when the message processing device receives the first message, the key elements of the first message can be extracted to inquire whether the second message with the same key elements exists in the database, and the step can check the received message again to avoid the message processing device to repeatedly execute the same service. In addition, when the second message which is the same as the key element of the first message exists in the query database, the message processing device can also determine whether to add the first message into the database according to the processing state of the second message so as to execute the service corresponding to the first message. Because whether the first message is added into the database is determined according to the processing state of the second message, when the second message is in an error state, the message processing device can execute the service corresponding to the first message, and service abnormality caused by the second message abnormality is avoided.
Description
Technical Field
The present application relates to the field of message processing technologies, and in particular, to a message processing method, a device, and an electronic device.
Background
The banking institutions can interact with messages for executing corresponding services. For example, the bank a may send an accounting message to the bank B, where the accounting message may include details of accounting, and the bank B may perform accounting operation based on the details of the accounting message when receiving the accounting message.
At present, due to network transmission or equipment blocking and the like, a banking institution receives repeated messages with the same content, so that the banking institution repeatedly executes the service.
Disclosure of Invention
The application provides a message processing method, a message processing device and electronic equipment, which are used for solving the problem of repeatedly executing a service when repeated messages are received.
In a first aspect, the present application provides a method for processing a message, where a message processing apparatus may receive a first message, and extract key elements of the first message. The message processing device may query whether a second message with the same key element exists in the database according to the key element of the first message. When a second message with the same key element exists in the database, the message processing device can determine whether to add the first message into the database according to the processing state of the second message. When the message processing device determines to add the first message to the database, the first message can be added to the database
In a second aspect, the present application provides a message processing apparatus, where the message processing apparatus may include a transceiver module and a processing module. Wherein,
and the receiving and transmitting module is used for receiving the first message.
The processing module is used for extracting key elements of the first message; inquiring whether a second message with the same key element exists in a database according to the key element of the first message; if yes, determining whether to add the first message into the database according to the processing state of the second message; if yes, adding the first message into the database.
In a third aspect, an embodiment of the present application provides an electronic device, which may include: a processor and a memory. The memory is for storing computer executable program code, the program code comprising instructions; the instructions, when executed by a processor, cause the electronic device to perform the method as in the first aspect.
In a fourth aspect, an embodiment of the present application provides an electronic device, which may be the packet processing apparatus of the second aspect. The electronic device may comprise means, modules or circuits for performing the method provided in the first aspect above.
In a fifth aspect, embodiments of the present application provide a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of the first aspect described above.
In a sixth aspect, embodiments of the present application provide a computer readable storage medium having instructions stored therein which, when run on a computer, cause the computer to perform the method of the first aspect described above.
According to the message processing method, the message processing device and the electronic equipment, when the message processing device receives the first message, the key elements of the first message can be extracted to inquire whether the second message with the same key elements exists in the database, and the step can check and repeat the received message, so that the message processing device is prevented from repeatedly executing the same service. In addition, when the second message which is the same as the key element of the first message exists in the query database, the message processing device can also determine whether to add the first message into the database according to the processing state of the second message so as to execute the service corresponding to the first message. Because whether the first message is added into the database is determined according to the processing state of the second message, when the processing state of the second message is an error state, the message processing device can also add the first message into the database, so that the message processing device can execute the service corresponding to the first message again, and the service abnormality is avoided.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
FIG. 1 is a schematic view of a scene to which embodiments of the present application are applicable;
FIG. 2 is a schematic diagram of another scenario in which an embodiment of the present application is applicable;
FIG. 3 is a flowchart illustrating an embodiment of a message processing method according to an embodiment of the present application;
FIG. 4 is a flowchart illustrating another embodiment of a message processing method according to an embodiment of the present application;
FIG. 5A is a flowchart illustrating another embodiment of a message processing method according to an embodiment of the present application;
FIG. 5B is a flowchart illustrating another embodiment of a message processing method according to an embodiment of the present application;
FIG. 6 is a schematic diagram of an interface according to an embodiment of the present application;
FIG. 7 is a schematic diagram of a message processing apparatus according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Specific embodiments of the present application have been shown by way of the above drawings and will be described in more detail below. The drawings and the written description are not intended to limit the scope of the inventive concepts in any way, but rather to illustrate the inventive concepts to those skilled in the art by reference to the specific embodiments.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the application. Rather, they are merely examples of apparatus and methods consistent with aspects of the application as detailed in the accompanying claims.
It should be noted that, the data (including, but not limited to, the message used for analysis, the stored message, etc.) related to the present application are all information and data authorized by the user or fully authorized by each party, and the collection, use and processing of the related data need to comply with the related laws and regulations and standards, and provide corresponding operation entries for the user to select authorization or rejection.
It should be noted that the method, the device and the electronic equipment for processing the message provided by the application can be used in the financial field and can also be used in any field except finance. In one embodiment, the method, the device and the electronic equipment for processing the message provided by the application can be used in the field of structured data in the field of big data, and the method, the device and the application field of the electronic equipment are not limited.
The terms used in the embodiments of the present application are defined as follows:
the message comprises the following steps: the embodiment of the application refers to a message applied to the banking field in the financial field. In some embodiments, the messages may include MT (message type) messages and MX (message exchange) messages, where MT messages are messages in a text message format, and MX messages are messages in an extensible markup language (extensible markup language, XML) format.
In some embodiments, for example, MT messages are generally defined as MTnnn. Wherein MT is a fixed description, the specific type is composed of three numbers n, the first n from left to right represents the category, and the functions of the message root are described, such as 1 represents customer remittance and check. The second n represents a packet describing the message function in a particular category, such as 1 representing check payment. The third n represents a specific function, for example 103 represents a single payment message.
It should be understood that the identification of the MT message may be used to indicate the service type and format type of the MT message. Illustratively, the identifier of the MT message, for example, MTnnn, from which the MT can determine that the format type of the message is the MT message, and from which the nnn can determine the service type of the message. The traffic types may include, but are not limited to: check-in, reconciliation, remittance, etc., to which embodiments of the application are not limited.
It should be understood that the identifier of the MX packet may be used to indicate the service type and format type of the MX packet. For example, an identifier of an MX packet, for example MXmmm, from MX in the identifier, a format type of the packet may be determined as an MX packet, and from mmm in the identifier, a service type of the packet may be determined.
At present, messages can be interacted between banking institutions so as to execute corresponding services. However, due to network transmission or equipment blocking, the banking institution receives repeated messages with the same content, which easily causes the problem that the banking institution repeatedly executes the service.
For example, the bank a sends an accounting message to the bank B, and the bank B may perform an accounting operation based on the details in the accounting message. However, due to the network problem of the bank a, the bank a may send a repeated account-entering message to the bank B, and if the bank B receives the repeated account-entering message and performs account-entering operation, account-entering errors may be caused. The a bank may use the same format type (e.g., MT or MX) to repeatedly send two accounting messages, or the a bank may use a different format type (e.g., one accounting message uses MT format and the other message uses MX format). Whether the format types of the two account entering messages are the same or not, the contents of the two account entering messages are the same, and the B bank performs account entering operation after receiving the repeated account entering messages, which can cause account entering errors.
For example, the a bank sends two messages to the B bank for indicating the posting due to the problem of the messaging settings of the a bank, for example, one of the messages (for example, MTnn 1) should be sent to the user and the other message (for example, MTnn 2) should be sent to the B bank, but because the messaging settings of the a bank are not standard, the a bank sends the two messages to the B bank for indicating the posting. Because the two messages are used for indicating to perform the accounting operation, if the B bank performs the accounting operation after receiving the two messages, accounting errors can be caused.
For example, due to processing abnormality of the B bank, the received message card cannot flow in a certain processing node, and the message abnormality and the business abnormality are caused. It should be understood that messages of different service types may be different for corresponding processing nodes, and that a message of one service type may correspond to at least one processing node. Taking an account entry message as an example, the processing nodes corresponding to the account entry message may include the following 5: determining the province to which the posting message belongs, determining whether the posting message is lending or storing, inquiring the account number and the amount, posting, and informing the user that posting is successful. In some embodiments, a processing node may be referred to as a node.
For example, due to the abnormal processing of the B bank, a large number of account entering messages are blocked on the processing node of 'query account number and amount', and the processing operations of 'account entering' and 'notifying the user of successful account entering' cannot be performed.
Therefore, how to effectively identify the repeated message, and when identifying the repeated message, determining whether to join the database for subsequent business processing is important. Accordingly, the embodiment of the application provides a message processing method, which can identify whether repeated messages exist according to key elements of the messages, and can determine whether to add a database for subsequent service processing based on the processing state of the messages when the repeated messages are identified, so that the problem of repeatedly executing the service based on the repeated messages can be solved. In addition, for the problem that the message card cannot flow in a certain processing node, a message re-entry mechanism can be set in the embodiment of the application, and the re-entry mechanism can be understood as follows: when the message card cannot flow in a certain processing node, the message can be added into the database again to execute the service again, so that the smooth operation of the service is ensured.
Before introducing the message processing method provided by the embodiment of the present application, first, a scene suitable for the message processing method provided by the embodiment of the present application is described:
Scene 1:
fig. 1 is a schematic view of a scenario in which an embodiment of the present application is applicable. Referring to fig. 1, the scenario may include a plurality of devices, where the plurality of devices includes a first device and a second device in fig. 1, and the first device and the second device are both illustrated as computers.
Illustratively, taking the banking field as an example in the financial field, there are a large number of money transfer services, securities services, draft services, etc. each day in the banking field. The first device, such as the device of the B bank, and the second device, such as the device of the a bank, such as the second device, may send a message to the first device, so that the first device executes the service corresponding to the message. In the embodiment of the present application, after receiving a message from a second device, a first device may execute the message processing method provided in the embodiment of the present application, and specifically, reference may be made to the description in the following embodiment. Similarly, the first device may also send a message to the second device, so that the second device executes the service corresponding to the message. In the embodiment of the present application, after receiving a message from a first device, a second device may execute the message processing method provided in the embodiment of the present application, and specifically, reference may be made to the description in the following embodiment.
In some embodiments, the first device and the second device may be two devices of the same bank.
Scene 2:
fig. 2 is a schematic diagram of another scenario in which an embodiment of the present application is applicable. Referring to fig. 2, for a device that receives a packet, here taking a first device as an example, the first device may include: message processing device and reentrant device.
The first device may execute the corresponding service according to the received message. However, when the message card cannot flow in a certain processing node, i.e. the message is in an abnormal state or in an error state (error), the error state is taken as an example for explanation. When the message is in an error state, the reentrant device can send the message to the message processing device, and the message processing device executes the message processing method provided by the embodiment of the application to determine whether to add the message into the database for subsequent service processing.
In some embodiments, the first device may comprise error reporting means. The re-entry device can record the processing state of the message, and when the message is in a state that one processing node cannot flow, the re-entry device can receive the error from the error reporting device, and the error reporting device is used for indicating that the message is in an error state. The re-entry device can determine that the message is in the processing node and can not flow based on the error, the repeating device can send the message to the message processing device, and the message processing device can receive the message correspondingly.
In some embodiments, the first device may not include error reporting means. The re-entry device can record the processing state of the message, and when the re-entry device determines that the message is in a processing node for a time longer than the normal processing time of the processing node, the re-entry device determines that the processing node is abnormal, namely the message is in an error state, and the message is in the processing node and cannot flow. The repeating device may send the message to the message processing device, and correspondingly, the message processing device may receive the message. It should be appreciated that the normal processing duration of each processing node may be preconfigured in the reentrant device.
To sum up, taking the first device as an example, the first device may receive a message from the second device (external), and/or the first device may receive a message from the first device (e.g., the reentrant device).
It should be understood that the method for processing a message provided in the embodiment of the present application may be applied to a message processing apparatus. In some embodiments, the message processing apparatus may be a first device, as shown in fig. 1. In some embodiments, the message processing apparatus may be an apparatus in the first device, and exemplary, the message processing apparatus may be an electronic device or a chip, a processor, etc. disposed in the electronic device, which is not described herein, and may be shown in fig. 2.
In one embodiment, the first device, the second device may be an electronic device having processing capabilities. The electronic device may be a computer, a server, a tablet computer (portable android device, PAD), a personal digital assistant (personal digital assistant, PDA), a computing device, etc., and the form of the electronic device is not particularly limited in the embodiment of the present application. In the following embodiments, a message processing apparatus is described as an execution subject.
The application provides a message processing method, which aims to solve the technical problems in the prior art.
The following describes the technical scheme of the present application and how the technical scheme of the present application solves the above technical problems in detail with specific embodiments. The following embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
Fig. 3 is a schematic flow chart of a message processing method according to an embodiment of the present application. Referring to fig. 3, the method for processing a message provided by the embodiment of the present application may include:
s301, receiving a first message.
In some embodiments, when the message processing apparatus is a first device, the message processing apparatus may receive a first message from a second device.
In some embodiments, the first apparatus may include a message processing device and a re-entry device, and the message processing device may receive the first message from the re-entry device. When the reentrant device determines that the first message is in an error state, the reentrant device can send the first message to the message processing device. The re-entry device may determine that the first message is in an error state when receiving an error from the error reporting device, where the error is used to indicate that the first message is in the error state. For example, the reentrant device may determine that the first packet is in an error state when it is determined that the duration of time that the first packet is in a processing node is greater than the normal processing duration of the processing node.
It should be understood that the second device or reentrant means for sending the first message is not shown in fig. 3.
S302, extracting key elements of the first message.
In some embodiments, key elements to be extracted of the message may be preconfigured in the message processing apparatus. By way of example, the key elements may include, for example, at least one of: service type, time, amount, transaction party account numbers, etc.
In this embodiment, the message processing apparatus may extract the key element of the first message from the first message based on the preset key element. It should be understood that the pre-configured key elements to be extracted may include names of the elements, and the key elements of the first message may include names of the elements and specific numerical values. For example, the pre-configured key elements to be extracted may be a service type, a time and an amount, and the key elements of the first message may include: business type posting, time xx year x month x day, amount xx.
In some embodiments, the key elements of the messages of different service types may be different, and the key elements of the messages of each service type may be preconfigured in the message processing apparatus. In other words, the mapping relationship between the service type and the key element may be preconfigured in the message processing apparatus. For example, for an posting message, the key elements may include: account numbers, provinces, account amounts, etc. For MT940 messages, key elements may include: account number, expiration date, expiration amount, end of period date, end of period amount, bank identifier code (bank identifier code, BIC) of the issuer, etc.
In some embodiments, for messages of the same format type, there are different messages currently belonging to the same service type, for example, MT940 and MT950, both belonging to the reconciliation service type, but MT940 is addressed to the user and MT950 is addressed to the bank. In the embodiment of the application, the messages belonging to the same service type can be used as the messages of the same service type, so that the messages of the same service type can comprise at least one message.
In some embodiments, messages with different format types, such as MX messages and MT messages, are messages with respect to the reconciliation service, and in embodiments of the present application, messages with different format types but belonging to the same service type may be collected together as a message with the same service type.
For example, the mapping relationship between the preconfigured service type and the key element in the message processing apparatus may be shown in the following table one, and it should be understood that the table is an example format for characterizing the mapping relationship, and the format of the mapping relationship between the preconfigured service type and the key element in the message processing apparatus is not limited in the embodiment of the present application:
list one
In this embodiment, the message processing apparatus may determine the key element of the first message according to the service type of the first message and based on the mapping relationship between the pre-configured service type and the key element, so as to extract the key element from the first message. The message processing device may determine the service type of the first message according to the identifier (for example, MTnnn or MXmmm) of the first message.
In some embodiments, referring to table one, key elements of a message of each service type may be preconfigured in the message processing apparatus, and identifiers of the messages corresponding to each service type may be preconfigured in the message processing apparatus, in other words, service types, identifiers of the messages, and mapping relationships of the key elements may be preconfigured in the message processing apparatus. The message processing device can determine key elements of the first message according to the identification of the first message and the mapping relation, and then extract the key elements in the first message.
In some embodiments, referring to table one, the mapping relationship between the identifier and the key element of the message may be preconfigured in the message processing apparatus. The message processing device can determine key elements of the first message according to the identification of the first message and the mapping relation, and then extract the key elements in the first message.
S303, inquiring whether a second message with the same key element exists in the database according to the key element of the first message. If yes, S304 is executed, and if no, S305 is executed.
In an embodiment of the present application, the message processing apparatus may be a first device, or the first device may include the message processing apparatus, and in some embodiments, the database may be disposed in the first device, or the database may be disposed separately from the first device. In some embodiments, the message processing apparatus may store the message in the database after receiving the message. Specifically, when the message processing device determines that the message is added to the database, the message may be stored in the database, where the message processing device determines whether the message is added to the database and may refer to the description related to the "first message".
In some embodiments, when the message processing device stores the message in the database, the message processing device may further extract key elements of the message, and store the key elements of the message and the message in the database correspondingly. The process of extracting the key element of the message by the message processing apparatus may refer to the description in S302.
After extracting the key elements of the first message, the message processing device can query whether a second message with the same key elements exists in the database. The message processing device can query in a database, and can be used as a second message, if the key elements identical to the key elements of the first message exist in the database.
S304, determining whether to add the first message into the database according to the processing state of the second message. If yes, S305 is executed, and if no, S306 is executed.
When the second message with the same key element as the first message exists in the database, the message processing device can determine that the message with the same content as the first message is received, and the message processing device can determine whether to add the first message into the database according to the processing state of the second message.
In some embodiments, after the message processing apparatus receives the message, the corresponding service may be executed according to the service type of the message. The message of one service type can correspond to at least one processing node, the message processing device executes the service corresponding to the message, which can be understood that the at least one processing node processes the message, and after all the processing nodes process the message, the message processing device can be understood that the message processing device executes the service corresponding to the message.
Taking an account entry message as an example, the processing nodes corresponding to the account entry message may include the following 5: determining the province to which the posting message belongs, determining whether the posting message is lending or storing, inquiring the account number and the amount, posting, and informing the user that posting is successful. The first processing node can determine the province of the account-entering message according to the message, the second processing node can determine whether the account-entering message is borrowed or stored according to the message, the third processing node can inquire the account number and the amount in the message, the fourth processing node can perform account-entering operation, and the fifth processing node can inform the user of successful account-entering. The manner of notification may include, but is not limited to: short message notifications, messaging notifications in banking applications, etc.
In this embodiment, in the process that the message processing device executes the service corresponding to the message, the message processing device may record the processing node corresponding to the service, so as to ensure that the progress of the service is known in real time.
In some embodiments, the message processing device executes the service corresponding to the message, which may be understood as that the message processing device is preconfigured with the processing flow of the message of each service type, and after receiving the message, the message processing device may process the message according to the processing flow of the service type of the message.
In this embodiment, in the process of executing the service corresponding to the message by the message processing apparatus, the message processing apparatus may record the processing flow corresponding to the service, so as to ensure that the progress of the service is known in real time.
In some embodiments, when the processing state of the second message is an error state, that is, the message processing apparatus has an exception in the process of executing the service corresponding to the second message, for example, the second message is stuck at one processing node, or the second message is stuck at one processing flow, and the second message cannot be circulated (that is, cannot flow to the next processing node or the processing flow). In this case, the message processing device may determine that the first message is added to the database, and after the message processing device adds the first message to the database, the service corresponding to the first message may be executed, so that even if the second message is clamped at a processing node or the second message is clamped at a processing flow, the message processing device may re-execute the service corresponding to the message (the first message) having the same element, and smooth completion of the service may be ensured.
In some embodiments, when the processing state of the second packet is that the second packet is not processed, the packet processing device may determine that the second packet is received, but the service corresponding to the second packet is not executed yet. For example, when the a bank sends the second message to the B bank, it is found that there is a partial missing content in the second message, but the partial missing content is not a key factor of the second message, in this case, the a bank may send the first message to the B bank, where the first message supplements the partial missing content, but key elements of the first message and the second message are the same.
In this case, the message processing device may determine that the first message is added to the database, and in order to avoid that the repeated message is stored in the database, the message processing device repeatedly executes the same service, and the message processing device may delete the second message existing in the database.
In some embodiments, when the processing state of the second packet is that the second packet is not processed, the packet processing device may determine that the second packet is received, but the service corresponding to the second packet is not executed yet. In this case, the message processing apparatus may determine not to add the first message to the database.
In some embodiments, the preset state may be configured in the packet processing device, when the processing state of the second packet is included in the preset state, the packet processing device may determine to add the first packet to the database, and when the processing state of the second packet is not included in the preset state, the packet processing device may determine not to add the first packet to the database.
By way of example, the preset state may include: the error state is put in storage and not processed. It should be understood that when the processing state of the second message is that the second message is not processed in the warehouse, the message processing device may determine to add the first message to the database, but may delete the second message after the message processing device adds the first message to the database.
In some embodiments, the preset states corresponding to the messages of different service types are different. For example, the preset state corresponding to the message of each service type may be configured in the message processing device according to the priority of the message. The priority of the message can represent the security level of the message, and the higher the priority is, the higher the security level of the message is, the lower the priority is, and the lower the security level of the message is. For example, for a message with high priority, the preset state may be configured as an error state. For messages with low priority, the preset state can be configured to include an error state and a binned unprocessed state.
In this embodiment, the message processing apparatus may determine the preset state corresponding to the service type of the second message according to the service type of the second message and preset states corresponding to the messages of each service type configured in advance. Furthermore, when the processing state of the second message is included in the preset state corresponding to the service type of the second message, the message processing device may determine to add the first message to the database, and when the processing state of the second message is not included in the preset state corresponding to the service type of the second message, the message processing device may determine not to add the first message to the database.
S305, adding the first message into a database.
The message processing device adds the first message into the database, which can be understood as: the message processing device stores the first message in a database.
In some embodiments, when the message processing apparatus adds the first message to the database, the key element of the first message may be stored in correspondence with the first message.
S306, adding the first message into the re-report.
The re-report table is used for temporarily storing repeated messages, and when the message processing device determines that the first message is not added into the database, the message processing device can add the first message into the re-report table.
In some embodiments, the message processing device adds the first message to the re-report, and may also output a prompt message, and/or clear the re-report once every preset time.
The prompt information is used for prompting repeated message receiving. In some embodiments, the first device may include a display device (such as a display screen), and after the message processing device adds the first message to the retransmission table, the message processing device may send an instruction to the display device, where the instruction is used to instruct the display device to output the prompt information. The display device may display the information of the received repeated message, where the information may include the identifier of the first message, the identifier of the second message, and the key element of the first message (or the key element of the second message), so that a worker may learn about the receiving condition of the message in time and take response measures.
The message processing device can also clear the re-report at intervals of preset time, so that the memory occupied by the re-report can be reduced.
In the embodiment of the application, when the message processing device receives the first message, the key elements of the first message can be extracted to inquire whether the second message with the same key elements exists in the database, and the step can check the received message again to avoid the message processing device to repeatedly execute the same service. In addition, when the second message which is the same as the key element of the first message exists in the query database, the message processing device can also determine whether to add the first message into the database according to the processing state of the second message. When the processing state of the second message is included in the preset state, the representation that the first message is added into the database does not cause the message processing device to repeatedly execute the same service, and smooth operation of the service can be ensured. In an exemplary embodiment, when the processing state of the second message is an error state, the message processing device may further add the first message to the database, so that the message processing device may re-execute the service corresponding to the first message (i.e., the service corresponding to the second message), thereby avoiding the abnormality of the service caused by the second message being blocked in one processing node.
In some embodiments, after the message processing apparatus adds the first message to the database, the message processing apparatus may further execute a corresponding service, where the service is a service corresponding to the first message.
Referring to fig. 4, a method for processing a message provided by an embodiment of the present application may include:
s401, receiving a first message.
S402, extracting key elements of the first message.
S403, inquiring whether a second message with the same key element exists in the database according to the key element of the first message. If yes, S404 is executed, and if no, S405 is executed.
S404, determining whether to add the first message into the database according to the processing state of the second message. If yes, S405 is executed, and if no, S406 is executed.
S405, adding the first message into a database.
S406, adding the first message into the re-report.
S401 to S406 may refer to the descriptions in S301 to S306.
In the embodiment of the present application, after S405, S407 may also be executed:
s407, executing corresponding service according to the service type of the first message.
Referring to the description in S304, the message of different service types may correspond to different processing nodes or processing flows, and the message processing apparatus may execute the corresponding service according to the processing node or processing flow corresponding to the service type of the first message.
In some embodiments, the message processing apparatus may execute the service corresponding to the first message according to the processing state of the second message. The message processing device can determine a processing node corresponding to the second message according to the processing state of the second message, and execute the service corresponding to the first message from the processing node corresponding to the second message. It should be understood that the service corresponding to the first message is the same as the service corresponding to the second message.
For example, the processing state of the second message is that the second message is not processed in the warehouse, which indicates that the message processing module has not executed the service corresponding to the second message, and the message processing device may re-execute the service corresponding to the first message. For example, the message processing apparatus may start from the first processing node and execute the corresponding service. In this example, the traffic corresponding to the second message may be understood as "none".
For example, the processing state of the second message is an error state, because the processing state of the second message may be recorded, the message processing apparatus may determine, according to the processing state of the second message, a processing node corresponding to the second message, and because the message processing apparatus has already performed a part of the services before the processing node, in order to reduce the workload of the message processing apparatus, the message processing apparatus may start from the processing node corresponding to the second message and execute the services corresponding to the first message.
Taking an account entry message as an example, the processing nodes corresponding to the account entry message may include the following 5: determining the province to which the posting message belongs, determining whether the posting message is lending or storing, inquiring the account number and the amount, posting, and informing the user that posting is successful. Assuming that the second message card is at the processing node of the query account number and the amount, the message processing device may start from the processing node to execute the service corresponding to the first message, for example, the message processing device may execute the service of the query account number, the amount and the account entry, and notify the user that the account entry is successful.
In the embodiment of the application, the message processing device can execute the service corresponding to the first message after adding the first message into the database. The message processing device can determine a processing node corresponding to the second message according to the processing state of the second message, and execute the service corresponding to the first message from the processing node corresponding to the second message. In the embodiment of the application, the message processing device can continue to execute the incomplete residual service according to the processing progress of the second message without repeatedly executing the completed part of service, thereby reducing the workload of the message processing device and improving the service execution efficiency.
The above embodiment teaches that the mapping relationship between the service type and the key element and the preset state can be configured in the message processing device in advance.
First, a mapping relationship between a user adjustment service type and a key element is described as an example, and it should be understood that the user may be a worker:
referring to fig. 5A, a method for processing a message provided by an embodiment of the present application may include:
s501, receiving a first request for adjusting the mapping relation, wherein the first request is used for indicating key elements for adjusting the mapping of the first service type or adding key elements for the mapping of the second service type and the second service type.
S502, in response to the first request, the mapping relation is adjusted.
For example, the first device may be configured with a front-end operation interface, and the display means may display the interface. Referring to a in fig. 6, the interface may include a first option 61 for adjusting a mapping relationship between a service type and a key element, and a second option 62 for adjusting a preset state. The user operates the first option 61, which can trigger the message processing device to adjust the mapping relationship between the service type and the key element. The user operates the second option 62 to trigger the message handling device to adjust the preset state. It should be understood that the first device is illustrated in fig. 6 as a computer.
The user operating the first option 61 may trigger the display device to display the first adjustment interface. Referring to b in fig. 6, the mapping relationship between the configured service type and the key element may be displayed on the first adjustment interface. In some embodiments, the configured traffic type may be referred to as a first traffic type. The user may operate the option 65 of the key element corresponding to the first service type, modify, delete, or add the key element corresponding to the first service type. The message processing device responds to the operation of modifying, deleting or adding the key elements corresponding to the first service type by the user, and can determine that the first request is received. And the message processing device can modify, delete or add key elements corresponding to the first service type in the mapping relation based on the first request.
In some embodiments, referring to b in fig. 6, the first adjustment interface may further include an add option 63, and the user may operate the option to input a new second service type and a key element of the second service type mapping, where the message processing apparatus may determine, in response to inputting the new second service type and the key element of the second service type mapping, that the first request is received, and may further add the new second service type and the key element of the second service type mapping to the mapping relationship based on the first request.
Referring to fig. 5B, the method for processing a message provided by the embodiment of the present application may include:
S501A, a second request to adjust the preset state is received.
S502A, responding to the second request, and adjusting the preset state.
Similar to the mapping relationship between the adjustment service type and the key element, referring to a in fig. 6, the user operates the second option 62, and may trigger the display device to display the second adjustment interface. Referring to c in fig. 6, the second adjustment interface may display configured preset states (such as error states and binned unprocessed), and an option 64 to adjust the preset states, and the user may operate the option 64, modify, delete, or add a preset state. The message processing device may determine that the second request is received in response to the user modifying, deleting, or adding the operation in the preset state. And the message processing device can modify, delete or add the preset state based on the second request so as to realize the adjustment of the preset state.
It should be understood that, when the message processing apparatus adjusts the mapping relationship between the service type and the key element and the preset state, the message processing apparatus may execute the message processing method provided by the embodiment of the present application by adopting the adjusted mapping relationship between the service type and the key element and the preset state.
Fig. 7 is a schematic structural diagram of a message processing apparatus according to an embodiment of the present application. As shown in fig. 7, the message processing apparatus 700 may include: a transceiver module 701 and a processing module 702.
The transceiver module 701 is configured to receive a first packet.
The processing module 702 is configured to extract a key element of the first message, and query whether a second message with the same key element exists in the database according to the key element of the first message. When the second message with the same key element exists in the database, determining whether to add the first message into the database according to the processing state of the second message. And when determining to add the first message into the database, adding the first message into the database.
In one possible implementation, the message processing apparatus is configured with a mapping relationship between service types and associated elements. The processing module 702 is specifically configured to determine a service type of the first message according to the identifier of the first message, and extract key elements of the first message according to the service type of the first message and the mapping relationship.
In one possible implementation, the message processing apparatus is configured with a preset state. When the processing state of the second message is included in the preset state, the processing module 702 is specifically configured to determine to add the first message to the database. When the processing state of the second message is not included in the preset state, the processing module 702 is specifically configured to determine not to add the first message to the database.
In one possible implementation, the preset state includes at least one of: an error state, a binned unprocessed state.
In one possible implementation, the processing module 702 is further configured to execute the corresponding service according to the service type of the first packet after adding the first packet to the database.
In a possible implementation manner, the processing module 702 is specifically configured to determine, according to a processing state of the second message, a processing node corresponding to the second message, and execute, according to a service type of the first message, a corresponding service from the processing node.
In a possible implementation manner, the processing module 702 is further configured to, after determining that the first packet is not added to the database, add the first packet to the duplicate report, and output a prompt message, and/or clear the duplicate report every a preset time period, where the prompt message is used to prompt the duplicate receiving packet.
In a possible implementation, the processing module 702 is further configured to add the first packet to the database when there is no second packet with the same key element in the database.
In a possible implementation manner, the transceiver module 701 is further configured to receive a first request for adjusting the mapping relationship, where the first request is used to indicate a key element for adjusting the mapping of the first service type, or to add a key element for the mapping of the second service type and the second service type.
The processing module 702 is further configured to adjust the mapping relationship in response to the first request.
In a possible implementation, the transceiver module 701 is further configured to receive a second request for adjusting the preset state.
The processing module 702 is further configured to adjust the preset state in response to the second request.
In one possible implementation, the message processing apparatus is a first device. The transceiver module 701 is specifically configured to receive a first message from a second device.
In one possible implementation, the first device includes a message processing apparatus and a reentrant apparatus. The transceiver module 701 is specifically configured to receive a first message from the reentrant device, where the first message is sent by the reentrant device when the first message is in an error state.
The message processing device provided by the embodiment of the application can execute the actions of the electronic equipment in the embodiment of the method, and the implementation principle and the technical effect are similar, and are not repeated here.
In an embodiment, the embodiment of the present application further provides an electronic device, where the electronic device may be the message processing apparatus in the foregoing embodiment or the first device including the message processing apparatus. Referring to fig. 8, the electronic device may include: a processor 801 (e.g., CPU), a memory 802. The memory 802 may include a random-access memory (RAM) and may also include a non-volatile memory (NVM), such as at least one disk memory, in which various instructions may be stored in the memory 802 for performing various processing functions and implementing method steps of the present application.
Optionally, the electronic device according to the present application may further include: a power supply 803, a communication bus 804, and a communication port 805. The communication port 805 is used to implement connection communication between the electronic device and the first device and the second device. In an embodiment of the application, memory 802 is used to store computer-executable program code, which includes instructions; when the processor 801 executes the instructions, the instructions cause the processor 801 of the electronic device to perform the actions in the above-described method embodiments, and the implementation principle and technical effects are similar, which are not described herein again.
Optionally, the electronic device according to the present application may further include: display 806, display 806 is used to display an interface of the electronic device.
It should be noted that the modules or components described in the above embodiments may be one or more integrated circuits configured to implement the above methods, for example: one or more application specific integrated circuits (application specific integrated circuit, ASIC), or one or more microprocessors (digital signal processor, DSP), or one or more field programmable gate arrays (field programmable gate array, FPGA), or the like. For another example, when a module above is implemented in the form of a processing element scheduler code, the processing element may be a general purpose processor, such as a central processing unit (central processing unit, CPU) or other processor that may invoke the program code, such as a controller. For another example, the modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions in accordance with embodiments of the present application are produced in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.) means from one website, computer, server, or data center. Computer readable storage media can be any available media that can be accessed by a computer or data storage devices, such as servers, data centers, etc., that contain an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), etc.
The term "plurality" herein refers to two or more. The term "and/or" is herein merely an association relationship describing an associated object, meaning that there may be three relationships, e.g., a and/or B, may represent: a exists alone, A and B exist together, and B exists alone. In addition, the character "/" herein generally indicates that the front and rear associated objects are an "or" relationship; in the formula, the character "/" indicates that the front and rear associated objects are a "division" relationship. In addition, it should be understood that in the description of the present application, the words "first," "second," and the like are used merely for distinguishing between the descriptions and not for indicating or implying any relative importance or order.
It will be appreciated that the various numerical numbers referred to in the embodiments of the present application are merely for ease of description and are not intended to limit the scope of the embodiments of the present application.
It should be understood that, in the embodiment of the present application, the sequence number of each process does not mean that the execution sequence of each process should be determined by the function and the internal logic, and should not limit the implementation process of the embodiment of the present application.
Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. This application is intended to cover any variations, uses, or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the application pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It is to be understood that the application is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the application is limited only by the appended claims.
Claims (10)
1. A message processing method, applied to a message processing device, the method comprising:
receiving a first message;
extracting key elements of the first message;
inquiring whether a second message with the same key element exists in a database according to the key element of the first message;
if yes, determining whether to add the first message into the database according to the processing state of the second message;
If yes, adding the first message into the database.
2. The method according to claim 1, wherein the message processing device is configured with a mapping relationship between a service type and a key element, and the extracting the key element of the first message includes:
determining the service type of the first message according to the identification of the first message;
and extracting key elements of the first message according to the service type of the first message and the mapping relation.
3. The method according to claim 1, wherein the message processing device is configured with a preset state; the determining whether to add the first message to the database according to the processing state of the second message includes:
when the processing state of the second message is contained in the preset state, determining to add the first message into the database;
and when the processing state of the second message is not contained in the preset state, determining that the first message is not added into the database.
4. A method according to any one of claims 1-3, wherein after adding the first message to the database, further comprising:
And executing corresponding service according to the service type of the first message.
5. The method of claim 4, wherein the performing the corresponding service according to the service type of the first message comprises:
determining a processing node corresponding to the second message according to the processing state of the second message;
and executing corresponding service from the processing node according to the service type of the first message.
6. The method of claim 3, wherein after the determining not to add the first message to the database, further comprising:
adding the first message into a re-report;
and outputting prompt information and/or cleaning the re-report table once every preset time, wherein the prompt information is used for prompting repeated message receiving.
7. The method according to claim 2, wherein the method further comprises:
receiving a first request for adjusting the mapping relation, wherein the first request is used for indicating key elements for adjusting mapping of a first service type or adding key elements for mapping of a second service type and the second service type;
responding to the first request, and adjusting the mapping relation;
Receiving a second request for adjusting the preset state;
and responding to the second request, and adjusting the preset state.
8. A method according to any one of claims 1-3, wherein the message processing apparatus is a first device, and the receiving the first message comprises:
receiving the first message from the second device;
or,
the first device includes the message processing apparatus and the reentrant apparatus, and the receiving the first message includes:
the message processing device receives the first message from the reentrant device, wherein the reentrant device sends the first message when the first message is in an error state.
9. An electronic device, comprising: a processor, and a memory communicatively coupled to the processor;
the memory stores computer-executable instructions;
the processor executes computer-executable instructions stored in the memory to implement the method of any one of claims 1-8.
10. A computer readable storage medium having stored therein computer executable instructions which when executed by a processor are adapted to carry out the method of any one of claims 1-8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311205012.3A CN117194651A (en) | 2023-09-18 | 2023-09-18 | Message processing method and device and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311205012.3A CN117194651A (en) | 2023-09-18 | 2023-09-18 | Message processing method and device and electronic equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117194651A true CN117194651A (en) | 2023-12-08 |
Family
ID=89004977
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311205012.3A Pending CN117194651A (en) | 2023-09-18 | 2023-09-18 | Message processing method and device and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117194651A (en) |
-
2023
- 2023-09-18 CN CN202311205012.3A patent/CN117194651A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3859644B1 (en) | Block chain-based data check system and method, computing device, and storage medium | |
US8825798B1 (en) | Business event tracking system | |
CN112288577B (en) | Transaction processing method, device, electronic equipment and medium for distributed service | |
CN112965986B (en) | Service consistency processing method, device, equipment and storage medium | |
JP7505118B2 (en) | Method and system for regulating blockchain transactions | |
CN113191881A (en) | Financial business supervision data processing method, device and system based on block chain | |
KR102680150B1 (en) | Context-based filtering within a subset of network nodes implementing the trading system | |
CN113177772A (en) | Service data processing method, device and system | |
WO2023197917A1 (en) | Payment security management method and apparatus and payment system | |
CN116993523A (en) | Configurable account checking method, device, equipment and storage medium | |
CN109120411B (en) | Asset securitization basic asset data collection method and device | |
CN117194651A (en) | Message processing method and device and electronic equipment | |
US12034861B2 (en) | Method and system of storing smart contract events | |
CN113592645B (en) | Data verification method and device | |
CN111639936B (en) | Transaction information acquisition method and device, electronic equipment and readable storage medium | |
CN116263925A (en) | Accounting method and device based on blockchain | |
US11416852B1 (en) | Systems and methods for generating and transmitting electronic transaction account information messages | |
CN112446787A (en) | Resource transfer method, device, equipment and storage medium | |
CN112650911A (en) | Service message issuing method, device, computer equipment and storage medium | |
KR20110035556A (en) | Service system and service method for offering financial information using message oriented service | |
CN116955727A (en) | Method, apparatus, device and computer readable medium for configuring parameters | |
TWM637647U (en) | Loan information notification system | |
KR20240093521A (en) | Method and system for blockchain-based transactions for atomic exchange of assets | |
CN113505077A (en) | Method, device and equipment for testing data table and storage medium | |
CN114546700A (en) | Data processing method, system and equipment for abnormal log |
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 |