Message verification method and device
By classifying and predicting model processing of binary flow messages transmitted over the network and filtering invalid messages, the problem of high load pressure on the business system is solved, efficient and accurate filtering of illegal messages is achieved, and the system load is reduced.
Patent Information
- Application Number
- CN202211087710.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-07
- Publication Date
- 2024-10-11
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In data communications, after the target business system receives a large number of invalid messages, it needs to perform a series of verification screenings, resulting in excessive carrying pressure and affecting system performance.
By obtaining the binary flow messages transmitted in the network, the classification prediction model is used for binary classification processing to determine whether the messages are valid or invalid, and invalid messages are discarded to prevent them from entering the business system.
It effectively reduces the number of invalid packets and deserialization load processed by the business system, reduces system load pressure, and improves the accuracy and efficiency of illegal packet filtering through deep learning algorithms.
Smart Images

Figure CN115473856B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data communication technology, can be used in the financial field, and in particular to a message verification method and device. Background Art
[0002] The interaction between system interfaces is to achieve the purpose of information transmission through the flow of messages. After the message reaches the target business system, due to the requirements of system security and robustness, a series of checks will be performed on the message for mandatory input, business meaning, and legality. When a large number of invalid messages arrive at the target business system, the target business system will still check and screen each invalid message, greatly increasing the carrying pressure of the target business system. Summary of the invention
[0003] In view of this, the present invention provides a message verification method and device to solve at least one of the above-mentioned problems.
[0004] In order to achieve the above object, the present invention adopts the following scheme:
[0005] According to a first aspect of the present invention, a message verification method is provided, the method comprising: obtaining a binary stream message transmitted in a network before entering a business system; using the binary stream message as an input of a classification prediction model, and obtaining a binary classification output result through processing by the classification prediction model, the output result comprising a valid message or an invalid message; sending the binary stream message whose output result is a valid message to the business system, and discarding the binary stream message whose output result is an invalid message.
[0006] According to a second aspect of the present invention, a message verification device is provided, which includes: a message acquisition unit, used to acquire a binary stream message transmitted in a network before entering a business system; a model prediction unit, used to use the binary stream message as an input of a classification prediction model, and obtain a binary classification output result after processing by the classification prediction model, wherein the output result includes a valid message or an invalid message; a transmission unit, used to send a binary stream message whose output result is a valid message to the business system, and discard a binary stream message whose output result is an invalid message.
[0007] According to a third aspect of the present invention, there is provided an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.
[0008] According to a fourth aspect of the present invention, there is provided a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the above method when executed by a processor.
[0009] According to a fifth aspect of the present invention, there is provided a computer program product, comprising a computer program / instructions, wherein the computer program / instructions implement the steps of the above method when executed by a processor.
[0010] It can be seen from the above technical solution that the present application can directly judge the binary stream transmitted in the network and filter out illegal messages to reduce the load pressure of the business system. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0012] Figure 1 It is a flow chart of a message verification method provided in an embodiment of the present application;
[0013] Figure 2 A flowchart of a message verification method provided by another embodiment of the present application;
[0014] Figure 3 It is a structural schematic diagram of a message verification device provided in an embodiment of the present application;
[0015] Figure 4 is a schematic diagram of the structure of a transmission unit provided in an embodiment of the present application;
[0016] Figure 5 is a schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0017] To make the purpose, technical solution and advantages of the embodiments of the present invention more clear, the embodiments of the present invention are further described in detail below in conjunction with the accompanying drawings. Here, the exemplary embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.
[0018] like Figure 1 The figure shows a flow chart of a message verification method provided by an embodiment of the present application. This embodiment is described from the message preprocessing system side. The message preprocessing system can implement all the method steps of the message verification in this embodiment. The message preprocessing system can be used as a middleware agent and placed in front of the real business system. The method includes the following steps:
[0019] Step S101: Obtain a binary stream message transmitted in the network before entering the service system.
[0020] Binary stream message is a data format for message transmission in the network. After entering the business system, it will be deserialized to obtain object message, such as JavaScript Object Notation (JSON) message, which is a lightweight data exchange format. The JS object message obtained after deserialization is a message format that can be clearly understood by the staff, but for binary stream messages, machines can understand them, so this application implements subsequent message verification by directly obtaining binary stream messages in the network.
[0021] Step S102: taking the binary stream message as the input of the classification prediction model, and obtaining a binary classification output result after being processed by the classification prediction model, wherein the output result includes a valid message or an invalid message.
[0022] Preferably, the classification prediction model is a natural language processing model (Natural Language Processing, NLP), such as a bidirectional encoder representation model based on a transformer (Bidirectional Encoder Representations from Transformer, Bert) or a WordVec model.
[0023] Preferably, the classification prediction model is obtained based on the following training: deserializing the training message to obtain a binary stream training message, the label of the binary stream training message is a valid message or an invalid message, and using the training data set composed of the binary stream training message as input for model training to obtain a classification prediction model.
[0024] When performing a binary classification judgment, the classification prediction model can determine whether the message is an illegal message by extracting the features of the binary message and determining whether the message contains empty content or illegal characters. If it contains empty content or illegal characters, the model outputs the label of the message as an invalid message.
[0025] Preferably, the above-mentioned classification prediction model adopts a deep learning algorithm to solve the binary classification problem. The deep learning algorithm may include, for example: a neural network system based on convolution operations, an autoencoding neural network based on multi-layer neurons, or a deep belief network, etc.
[0026] Step S103: Send the binary stream message whose output result is a valid message to the business system, and discard the binary stream message whose output result is an invalid message.
[0027] Preferably, sending the binary stream message whose output result is a valid message to the business system in this step can further include: deserializing the binary stream message whose output result is a valid message to obtain a business system input message, and sending the business system input message to the business system.
[0028] It can be seen from the above technical solution that the message verification method of the present application directly judges the binary stream of the message in the network transmission and filters out the illegal messages, so the number of messages entering the business system is reduced, the number of messages that need to be deserialized is also reduced accordingly, and the business system does not need to perform additional verification on the deserialized messages, thus greatly reducing the load pressure of the business system. In addition, the introduction of deep learning methods to extract features, identify and classify binary streams of messages can complete the filtering process of illegal messages more efficiently and accurately.
[0029] like Figure 2 The figure is a flow chart of a message verification method provided by another embodiment of the present application. This embodiment describes the present application from the front-end load balancing system side. The method includes:
[0030] Step S201: Obtain a binary stream message entering the load balancing system.
[0031] Step S202: taking the binary stream message as the input of the classification prediction model, and obtaining a binary classification output result after being processed by the classification prediction model, wherein the output result includes a valid message or an invalid message.
[0032] Step S203: sending the binary stream message whose output result is a valid message to the corresponding business system through the load balancing system, and discarding the binary stream message whose output result is an invalid message.
[0033] Figure 1 The corresponding embodiment is to place the message preprocessing system as a middleware agent in front of the real business system, so as to reduce the invalid messages entering the business. The present embodiment integrates the message preprocessing system on the load balancing system side. This setting method can reduce the invalid messages entering the transmission network from the load balancing system, thereby not only reducing the number of invalid messages entering the business system, but also reducing the pressure on network transmission.
[0034] like Figure 3 What is shown is a structural schematic diagram of a message verification device provided in an embodiment of the present application, the device includes: a message acquisition unit 310, a model prediction unit 320 and a transmission unit 330, wherein the model prediction unit 320 is connected to the deserialization unit 310 and the transmission unit 330 respectively.
[0035] The message acquisition unit 310 is used to acquire the binary stream message transmitted in the network before entering the service system. In this embodiment, the binary stream message received in this step can be deserialized into a JSON message, for example.
[0036] Preferably, the message acquisition unit 310 can also be used to acquire binary flow messages entering the load balancing system.
[0037] The model prediction unit 320 is used to use the binary stream message as the input of the classification prediction model, and obtain a binary classification output result after being processed by the classification prediction model. The output result includes a valid message or an invalid message.
[0038] Preferably, the classification prediction model is a natural language processing model (Natural Language Processing, NLP), such as a bidirectional encoder representation model based on a transformer (Bidirectional Encoder Representations from Transformer, Bert) or a WordVec model.
[0039] Preferably, the classification prediction model is obtained based on the following training: deserializing the training message to obtain a binary stream training message, the label of the binary stream training message is a valid message or an invalid message, and using the training data set composed of the binary stream training message as input for model training to obtain a classification prediction model.
[0040] When performing a binary classification judgment, the classification prediction model can determine whether the message is an illegal message by extracting the features of the binary message and determining whether the message contains empty content or illegal characters. If it contains empty content or illegal characters, the model outputs the label of the message as an invalid message.
[0041] Preferably, the above-mentioned classification prediction model adopts a deep learning algorithm to solve the binary classification problem. The deep learning algorithm may include, for example: a neural network system based on convolution operations, an autoencoding neural network based on multi-layer neurons, or a deep belief network, etc.
[0042] The transmission unit 330 is used to send the binary stream message whose output result is a valid message to the service system, and discard the binary stream message whose output result is an invalid message.
[0043] When the message acquisition unit 310 acquires the binary stream message entering the load balancing system, the corresponding transmission unit 330 may be used to send the binary stream message with the output result being a valid message to the corresponding service system through the load balancing system.
[0044] Preferably, Figure 4As shown, the transmission unit 330 may include: a deserialization processing module 331, a transmission module 332 and an invalid message processing module 333, wherein the deserialization processing module 331 is used to deserialize the binary stream message whose output result is a valid message to obtain a business system input message, the transmission module 332 is used to send the business system input message to the business system, and the invalid message processing module 333 is used to discard the binary stream message of the invalid message.
[0045] It can be seen from the above technical solution that the message verification device provided by the present application directly judges the binary stream of the message in the network transmission and filters out the illegal messages. Therefore, the number of messages entering the business system is reduced, and the number of messages that need to be deserialized is also reduced accordingly. Moreover, the business system does not need to perform additional verification on the deserialized messages, thereby greatly reducing the load pressure of the business system. In addition, when the method and device of the present application are applied to the load balancing side, the network transmission pressure can also be reduced. Finally, the deep learning method is introduced to extract features, identify and classify the binary stream of the message, which can complete the filtering process of illegal messages more efficiently and accurately.
[0046] Figure 5 is a schematic diagram of an electronic device provided by an embodiment of the present invention. Figure 5 The electronic device shown is a general data processing device, which includes a general computer hardware structure, which at least includes a processor 501 and a memory 502. The processor 501 and the memory 502 are connected via a bus 503. The memory 502 is suitable for storing one or more instructions or programs executable by the processor 501. The one or more instructions or programs are executed by the processor 501 to implement the steps in the above-mentioned message verification method.
[0047] The processor 501 may be an independent microprocessor or a collection of one or more microprocessors. Thus, the processor 501 executes the commands stored in the memory 502, thereby executing the method flow of the embodiment of the present invention as described above to realize the processing of data and the control of other devices. The bus 503 connects the above-mentioned multiple components together, and at the same time connects the above-mentioned components to the display controller 504 and the display device and the input / output (I / O) device 505. The input / output (I / O) device 505 may be a mouse, a keyboard, a modem, a network interface, a touch input device, a somatosensory input device, a printer, and other devices known in the art. Typically, the input / output (I / O) device 505 is connected to the system via an input / output (I / O) controller 506.
[0048] The memory 502 may store software components such as an operating system, a communication module, an interaction module, and an application program. Each of the modules and applications described above corresponds to a set of executable program instructions that implement one or more functions and methods described in the embodiments of the invention.
[0049] An embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned message verification method are implemented.
[0050] An embodiment of the present invention further provides a computer program product, including a computer program / instruction, which implements the steps of the above-mentioned message verification method when executed by a processor.
[0051] In summary, the message verification method and device provided by the present application provided by the embodiment of the present invention directly judge the binary stream of the message in the network transmission and filter out the illegal message, so the number of messages entering the business system is reduced, the number of messages that need to be deserialized is also reduced accordingly, and the business system does not need to perform additional verification on the deserialized message, thereby greatly reducing the load pressure of the business system. In addition, when the method and device of the present application are applied to the load balancing side, the network transmission pressure can also be reduced. Finally, the deep learning method is introduced to extract features, identify and classify the binary stream of the message, which can complete the filtering process of illegal messages more efficiently and accurately.
[0052] The preferred embodiments of the present invention are described above with reference to the accompanying drawings. Many features and advantages of these embodiments are clear from this detailed description, and therefore the claims are intended to cover all such features and advantages of these embodiments that fall within their true spirit and scope. In addition, since many modifications and changes are easily conceivable to those skilled in the art, it is not intended to limit the embodiments of the present invention to the precise structure and operation illustrated and described, but all suitable modifications and equivalents falling within its scope may be covered.
[0053] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0054] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0055] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0056] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0057] The specific embodiments described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A message verification method, characterized in that: The method comprises: Obtain the binary stream message transmitted in the network before entering the business system; The binary stream message is used as an input of a classification prediction model, and is processed by the classification prediction model to obtain a binary classification output result, wherein the output result includes a valid message or an invalid message; Send the binary stream message whose output result is a valid message to the business system, and discard the binary stream message whose output result is an invalid message; Get the binary stream message before entering the load balancing system; The sending of the binary stream message whose output result is a valid message to the business system includes: sending the binary stream message whose output result is a valid message to the corresponding business system through a load balancing system.
2. The message verification method according to claim 1, characterized in that: The classification prediction model is obtained by training in the following manner: the training message is serialized to obtain a binary stream training message, the label of the binary stream training message is a valid message or an invalid message, and the training data set composed of the binary stream training message is used as input for model training to obtain a classification prediction model.
3. The message verification method according to claim 2, characterized in that: The classification prediction model uses a deep learning algorithm to solve the binary classification problem.
4. The message verification method according to claim 3, characterized in that: The deep learning algorithm includes: a neural network system based on convolution operations, an autoencoding neural network based on multi-layer neurons, or a deep belief network.
5. A message verification device, characterized in that: The device comprises: A message acquisition unit, used to acquire binary stream messages transmitted in the network before entering the business system; A model prediction unit, used to use the binary stream message as an input of a classification prediction model, and obtain a binary classification output result after being processed by the classification prediction model, wherein the output result includes a valid message or an invalid message; A transmission unit, used for sending the binary stream message whose output result is a valid message to the business system, and discarding the binary stream message whose output result is an invalid message; The message acquisition unit is also used to acquire the binary stream message before entering the load balancing system; The transmission unit sending the binary stream message whose output result is a valid message to the business system includes: sending the binary stream message whose output result is a valid message to the corresponding business system through the load balancing system.
6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
8. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
