Packet inspection method and device, electronic equipment and storage medium
By performing self-checks on messages, decomposing business information, and executing check primitives, the problem of message correctness verification is solved, ensuring message quality and avoiding erroneous transmission.
Patent Information
- Application Number
- CN202411688561.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2026-02-27
- Estimated Expiration
- 2044-11-22
AI Technical Summary
The existing technology cannot verify the correctness of messages without other reference documents, which leads to the failure of sending and parsing erroneous messages.
By acquiring the message to be inspected, decomposing its business information and inspection primitives, and executing the inspection primitives to determine the correctness of the message, the process includes decomposing the self-inspection message, judging the business information, and executing the inspection procedure.
It enables self-checking of messages, detects and blocks the transmission of unqualified messages, improves message quality, and avoids bandwidth occupation and waste.
Smart Images

Figure CN119603381B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer software, and in particular to a message verification method and device, electronic equipment and storage medium. BACKGROUND
[0002] In the computer software development and testing work, messages are often used for data communication and cooperation.
[0003] Since messages can be manually edited, the editor may not know the definition rules of the message, which will cause errors in the message. When such error messages are sent to the target party, the target party cannot correctly analyze and use them.
[0004] In the process of implementing the present application, it is found that the prior art has at least the following technical problems: the prior art does not extract verification rules from messages, so it cannot verify the correctness of messages based on the messages themselves without other reference documents. SUMMARY
[0005] The present application provides a message verification method and device, electronic equipment and storage medium to verify the correctness of self-checking messages.
[0006] According to one aspect of the present application, a message verification method is provided, comprising:
[0007] obtaining a self-checking message to be verified;
[0008] decomposing the self-checking message to be verified to obtain decomposition information of the self-checking message to be verified, wherein the decomposition information of the self-checking message to be verified includes business information and a verification primitive, and the verification primitive refers to a verification rule for judging the correctness of the business information;
[0009] executing the verification primitive to obtain a primitive verification result of the self-checking message.
[0010] According to another aspect of the present application, a message verification device is provided, comprising:
[0011] a self-checking message obtaining module configured to obtain a self-checking message to be verified;
[0012] a self-checking message decomposition module configured to decompose the self-checking message to be verified to obtain decomposition information of the self-checking message to be verified, wherein the decomposition information of the self-checking message to be verified includes business information and a verification primitive, and the verification primitive refers to a verification rule for judging the correctness of the business information;
[0013] a verification primitive execution module configured to execute the verification primitive to obtain a primitive verification result of the self-checking message.
[0014] According to another aspect of the present application, there is provided an electronic device, comprising:
[0015] at least one processor;
[0016] and a memory connected to the at least one processor in communication;
[0017] wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to perform the packet inspection method according to any one of the embodiments of the present application.
[0018] According to another aspect of the present application, there is provided a computer readable storage medium storing computer instructions for enabling a processor to perform the packet inspection method according to any one of the embodiments of the present application when executed by the processor.
[0019] The technical solution of the embodiments of the present application comprises the following steps: obtaining a self-inspection packet to be inspected, decomposing the self-inspection packet to be inspected to obtain decomposition information of the self-inspection packet to be inspected, wherein the decomposition information of the self-inspection packet to be inspected comprises service information and an inspection primitive, the inspection primitive is a judgment rule for judging the correctness of the service information, and then executing the inspection primitive to obtain a primitive inspection result of the self-inspection packet. The above technical solution realizes the correctness inspection of the self-inspection packet through the inspection primitive to find unqualified self-inspection packets.
[0020] It should be understood that the content described in this part is not intended to identify key or important features of the embodiments of the present application, nor is it used to limit the scope of the present application. Other features of the present application will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0022] Figure 1 is a flowchart of a packet inspection method according to an embodiment of the present application;
[0023] Figure 2 is a flowchart of a packet inspection method according to an embodiment of the present application;
[0024] Figure 3is a flow chart of a packet inspection method according to an embodiment of the present application;
[0025] Figure 4 is a structural schematic diagram of a packet inspection device according to an embodiment of the present application;
[0026] Figure 5 is a structural schematic diagram of an electronic device implementing the packet inspection method according to an embodiment of the present application. DETAILED DESCRIPTION
[0027] In order to make the personnel in the art better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor should fall within the scope of protection of the present application.
[0028] It should be noted that the terms "first", "second", and the like in the specification and claims of the present application and the above-described drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or a chronological sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but can include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices. The acquisition, storage, use, processing and the like of data in the technical solutions of the present application all comply with the relevant provisions of national laws and regulations.
[0029] Embodiment One
[0030] Figure 1 A flow chart of a packet inspection method according to an embodiment of the present application is provided, the embodiment can be applicable to the case of inspecting a self-inspection packet, the method can be executed by a packet inspection device, the packet inspection device can be realized in the form of hardware and / or software, and the packet inspection device can be configured in an electronic device such as a terminal. As shown in the figure, the method comprises: Figure 1
[0031] S110, obtaining a self-inspection packet to be inspected.
[0032] S120, decompose the self-checking message to be checked to obtain decomposition information of the self-checking message to be checked, wherein the decomposition information of the self-checking message to be checked comprises service information and a checking primitive, and the checking primitive refers to a checking rule for judging the correctness of the service information.
[0033] S130, execute the checking primitive to obtain a primitive checking result of the self-checking message.
[0034] In the embodiment of the present application, the self-checking message refers to a message comprising a checking module for checking whether the message itself is correct, and can comprise a message service area, a checking primitive area and a checking program area, wherein the message service area can comprise service information, version and format, etc., and the service information can comprise but is not limited to data source identifier, data type, data length and data value, etc. The checking primitive area can comprise one or more checking primitives, and the checking primitive can be an absolute checking primitive or a conditional checking primitive, which is not limited herein.
[0035] For example, the self-checking message to be checked can be loaded into the memory, and then the self-checking message to be checked is decomposed to obtain the service information and the checking primitive in the self-checking message, wherein the service information can be ID card information, and the checking primitive can be an absolute checking primitive of "ID card (ID_CARD)-length-equal-to-18", if the length of the ID card information is 18 bits, the primitive checking result of the self-checking message is qualified, and if the length of the ID card information is not 18 bits, the primitive checking result of the self-checking message is unqualified.
[0036] In some optional embodiments, after the checking primitive is executed to obtain the primitive checking result of the self-checking message, it further comprises: stopping forwarding the self-checking message in the case that the primitive checking result of the self-checking message is unqualified; and continuing to forward the self-checking message in the case that the primitive checking result of the self-checking message is qualified, so as to improve the message quality and avoid the occupation and waste of bandwidth by unqualified messages.
[0037] In some optional embodiments, after the self-checking message to be checked is obtained, the message format of the self-checking message can be determined, and then the self-checking message is decomposed according to the message format of the self-checking message.
[0038] The message format can be XML or JSON format, which is not limited herein.
[0039] For example, if the message format of the self-checking message is XML, the self-checking message can be decomposed based on the specification of XML, and if the decomposed information does not conform to the specification of XML during the decomposition process, an abnormal error can be reported to prompt that the message format is incorrect.
[0040] The technical scheme of the embodiment of the present application obtains a self-checking message to be checked, decomposes the self-checking message to be checked, and obtains decomposition information of the self-checking message to be checked, wherein the decomposition information of the self-checking message to be checked comprises service information and a checking primitive, the checking primitive is a checking rule for judging the correctness of the service information, and then the checking primitive is executed to obtain a primitive checking result of the self-checking message. The above technical scheme realizes the correctness checking of the self-checking message through the checking primitive, so as to find unqualified self-checking messages.
[0041] Embodiment two
[0042] Figure 2 A flowchart of a message checking method provided by the embodiment two of the present application, the method of the embodiment can be combined with each optional scheme of the message checking method provided in the above embodiments. The message checking method provided by the embodiment is further optimized. Optionally, the execution of the checking primitive to obtain the primitive checking result of the self-checking message comprises: obtaining a field identifier of a checking primitive area; loading a checking primitive corresponding to the field identifier of the checking primitive area; and checking the service information based on the checking primitive corresponding to the field identifier of the checking primitive area to obtain the primitive checking result of the self-checking message.
[0043] As shown in Figure 2 , the method comprises:
[0044] S210, obtaining a self-checking message to be checked.
[0045] S220, decomposing the self-checking message to be checked to obtain decomposition information of the self-checking message to be checked, wherein the decomposition information of the self-checking message to be checked comprises service information and a checking primitive, and the checking primitive is a checking rule for judging the correctness of the service information.
[0046] S230, obtaining a field identifier of a checking primitive area.
[0047] S240, loading a checking primitive corresponding to the field identifier of the checking primitive area.
[0048] S250, checking the service information based on the checking primitive corresponding to the field identifier of the checking primitive area to obtain a primitive checking result of the self-checking message.
[0049] In the embodiment of the present application, the field identifier of the checking primitive area refers to identification information for identifying a checking primitive in the checking primitive area.
[0050] Exemplarily, the field identifier of the check primitive area is acquired, and the check primitive corresponding to the field identifier of the check primitive area is loaded, which is a check primitive under the condition that the age (AGE) is greater than or equal to 16 and the length of the ID card is equal to 18. The check primitive is a check primitive under the condition, and the business information can be the ID card information. Specifically, under the condition that the age is greater than 16, if the length of the ID card information is 18, the primitive check result of the self-checking message is qualified, and if the length of the ID card information is not 18, the primitive check result of the self-checking message is unqualified.
[0051] The technical scheme of the embodiment of the application acquires the field identifier of the check primitive area, then loads the check primitive corresponding to the field identifier of the check primitive area, and then checks the business information based on the check primitive corresponding to the field identifier of the check primitive area, thereby realizing the correctness check of the business information to find unqualified self-checking messages.
[0052] Embodiment three
[0053] Figure 3 A flowchart of a message check method provided by the third embodiment of the application, the method of the embodiment can be combined with each optional scheme of the message check method provided in the above embodiments. The message check method provided by the embodiment is further optimized. Optionally, the decomposition information of the self-checking message to be checked further includes a check program, and the check program is used for automatically checking the business information. Correspondingly, the method further includes: executing the check program to obtain a program check result of the self-checking message.
[0054] As shown in Figure 3 , the method includes:
[0055] S310, acquiring a self-checking message to be checked.
[0056] S320, decomposing the self-checking message to be checked to obtain decomposition information of the self-checking message to be checked, wherein the decomposition information of the self-checking message to be checked includes business information, a check primitive, and a check program, the check primitive is a check rule for judging the correctness of the business information, and the check program is used for automatically checking the business information.
[0057] S330, executing the check primitive to obtain a primitive check result of the self-checking message.
[0058] S340, executing the check program to obtain a program check result of the self-checking message.
[0059] It is emphasized that in the prior art, only the message service area is contained in the message, and the self-checking of the message cannot be realized. The self-checking message formed by adding the checking primitive area and / or the checking program area in the message according to the embodiment of the application realizes the self-checking of whether the message is qualified.
[0060] In the embodiment of the application, the checking program is located in the checking program area, and the checking program can be a script of an interpreted language, for example, a python script; or the checking program can be a binary executable obtained after being compiled, for example, a binary module of C language after being compiled.
[0061] Exemplarily, the checking program area can include a language type field, an executable environment matching field and a digital signature field, wherein the language type field is used to indicate which language the checking program is written in; the executable environment matching field is used to indicate whether the checking program is a script or a binary executable, and the hardware and software container requirements of the binary executable; and the digital signature field is used to ensure the legality, security and authentication of the checking program.
[0062] Specifically, the checking program is executed to obtain the program checking result of the self-checking message, including: obtaining the field identifier of the checking program area; loading the checking program corresponding to the field identifier of the checking program area; and executing the checking program corresponding to the field identifier of the checking program area to obtain the program checking result of the self-checking message.
[0063] Exemplarily, the field identifier of the checking program area can be "<CHECK_B>", and the checking program corresponding to the field identifier of the checking program area can be "3f4e5f00673d35df". The "3f4e5f00673d35df" can be a binary module, which can be loaded into the computer memory and executed, so as to obtain the program checking result of the self-checking message.
[0064] The technical scheme of the embodiment of the application realizes the checking of whether the message itself is correct by executing the checking program, so as to judge whether to continue the message forwarding according to the checking result, thereby avoiding sending unqualified error messages.
[0065] Embodiment Four
[0066] Figure 4 A structure diagram of a message checking device provided by the fourth embodiment of the application is shown in FIG. 4. As shown in the figure, the device includes: Figure 4
[0067] The self-checking message obtaining module 410 is configured to obtain a self-checking message to be checked.
[0068] The self-checking message decomposition module 420 is configured to decompose the self-checking message to be checked to obtain decomposition information of the self-checking message to be checked, wherein the decomposition information of the self-checking message to be checked comprises service information and a checking primitive, and the checking primitive refers to a checking rule for judging the correctness of the service information.
[0069] The checking primitive execution module 430 is configured to execute the checking primitive to obtain a primitive checking result of the self-checking message.
[0070] The technical scheme of the embodiment of the application comprises the following steps: obtaining a self-checking message to be checked, decomposing the self-checking message to be checked to obtain decomposition information of the self-checking message to be checked, wherein the decomposition information of the self-checking message to be checked comprises service information and a checking primitive, the checking primitive refers to a checking rule for judging the correctness of the service information, and then executing the checking primitive to obtain a primitive checking result of the self-checking message. The above technical scheme realizes the correctness checking of the self-checking message through the checking primitive, so as to find unqualified self-checking messages.
[0071] In some optional embodiments, the self-checking message obtaining module 410 is specifically configured to:
[0072] loading the self-checking message to be checked into a memory.
[0073] In some optional embodiments, the checking primitive execution module 430 is specifically configured to:
[0074] obtaining a field identifier of a checking primitive area;
[0075] loading a checking primitive corresponding to the field identifier of the checking primitive area;
[0076] checking the service information based on the checking primitive corresponding to the field identifier of the checking primitive area to obtain a primitive checking result of the self-checking message.
[0077] In some optional embodiments, the message checking device further comprises:
[0078] a message forwarding stopping unit configured to stop forwarding the self-checking message in a case where the primitive checking result of the self-checking message is unqualified.
[0079] In some optional embodiments, the message checking device further comprises:
[0080] a message forwarding continuing unit configured to continue forwarding the self-checking message in a case where the primitive checking result of the self-checking message is qualified.
[0081] In some optional embodiments, the decomposition information of the self-checking message to be checked further comprises a checking program, and the checking program is used for automatically checking the service information.
[0082] Correspondingly, the message checking device further comprises:
[0083] A checking program execution module, configured to execute the checking program to obtain a program checking result of the self-checking message.
[0084] In some optional embodiments, the checking program execution module is specifically configured to:
[0085] Obtain a field identifier of the checking program area;
[0086] Load a checking program corresponding to the field identifier of the checking program area;
[0087] Execute the checking program corresponding to the field identifier of the checking program area to obtain the program checking result of the self-checking message.
[0088] The message checking device provided by the embodiments of the present application can execute the message checking method provided by any of the embodiments of the present application, and has the corresponding function modules and beneficial effects of the execution method.
[0089] Embodiment five
[0090] Figure 5 A structural schematic diagram of an electronic device 10 that can be used to implement embodiments of the present application is shown. The electronic device is intended to represent various forms of digital computers, such as laptops, desktops, tablets, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular telephones, smartphones, wearable devices (e.g., headsets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not intended to limit the inventiveness in the present document as described and / or claimed.
[0091] As Figure 5As shown, the electronic device 10 includes at least one processor 11, and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., connected in communication with the at least one processor 11, wherein the memory stores a computer program executable by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or loaded from the storage unit 18 into the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An I / O interface 15 is also connected to the bus 14.
[0092] A plurality of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, a loudspeaker, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunication networks.
[0093] The processor 11 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 performs various methods and processes described above, such as a packet verification method, which includes:
[0094] Obtaining a self-verification packet to be verified;
[0095] Decomposing the self-verification packet to be verified to obtain decomposition information of the self-verification packet to be verified, wherein the decomposition information of the self-verification packet to be verified includes service information and a verification primitive, and the verification primitive refers to a verification rule for judging the correctness of the service information;
[0096] Executing the verification primitive to obtain a primitive verification result of the self-verification packet.
[0097] In some embodiments, the packet inspection method can be implemented as a computer program tangibly embodied in a computer readable storage medium, e.g., storage unit 18. In some embodiments, parts or all of the computer program can be loaded and / or installed onto electronic device 10 via, e.g., ROM 12 and / or communication unit 19. When the computer program is loaded onto RAM 13 and executed by processor 11, one or more steps of the packet inspection method described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to perform the packet inspection method by other means, e.g., with the aid of firmware.
[0098] Various implementations of the systems and techniques described above can be realized in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a complex programmable logic device (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
[0099] Computer programs used to implement the methods of the present application can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the computer program, when executed by the processor of the machine, implements the functions / acts specified in the flowcharts and / or block diagrams. The computer program can be executed entirely on a machine, partially on a machine, partially on a machine and partially on a remote machine or entirely on a remote machine or server.
[0100] In the context of the present application, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. A computer-readable storage medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium can be a machine-readable signal medium. More specific examples of a machine-readable storage medium will include one or more lines of a program of instructions in a transitory signal, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0101] To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the electronic device. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
[0102] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0103] The computing system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system, to solve the defects of large management difficulty and weak business scalability in traditional physical host and VPS service.
[0104] It should be understood that the various forms of flow shown above can be used to reorder, add or delete steps. For example, each step described in the present application can be executed in parallel, sequentially or in a different order, as long as the desired results of the technical solutions of the present application can be achieved, which is not limited herein.
[0105] The above detailed description does not constitute a limitation on the protection scope of the present application. Those skilled in the art should understand that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A message verification method, characterized in that, include: Obtain the self-test message to be tested, wherein the self-test message includes a message from the testing module that tests whether the message itself is correct, including a message service area, a testing primitive area, and a testing procedure area; The self-test message to be tested is decomposed to obtain the decomposed information of the self-test message to be tested. The decomposed information of the self-test message to be tested includes business information, test primitives and test procedures. The test primitives refer to the test rules for judging the correctness of business information, and the test procedures are used to automatically test the business information. Execute the aforementioned verification primitive to obtain the primitive verification result of the self-verification message; Execute the verification procedure to obtain the verification result of the self-verification message; The step of executing the verification primitive to obtain the primitive verification result of the self-verification message includes: Obtain the field identifier of the validation primitive region; Load the validation primitives corresponding to the field identifiers in the validation primitive area; The business information is inspected based on the inspection primitives corresponding to the field identifiers in the inspection primitive area to obtain the primitive inspection result of the self-inspection message. The execution of the verification procedure to obtain the verification result of the self-verification message includes: Retrieve the field identifiers of the inspection procedure area; Load the inspection program corresponding to the field identifier in the inspection program area; The verification procedure corresponding to the field identifier in the verification procedure area is executed to obtain the program verification result of the self-verification message.
2. The method according to claim 1, characterized in that, The process of obtaining the self-test message to be tested includes: Load the self-test message to be tested into memory.
3. The method according to claim 1, characterized in that, After executing the verification primitive and obtaining the primitive verification result of the self-verification message, the method further includes: If the primitive check result of the self-check message is unqualified, the forwarding of the self-check message shall be stopped.
4. The method according to claim 1, characterized in that, After executing the verification primitive and obtaining the primitive verification result of the self-verification message, the method further includes: If the primitive check result of the self-check message is qualified, the self-check message continues to be forwarded.
5. A message verification device, characterized in that, include: The self-test message acquisition module is used to acquire the self-test message to be tested, wherein the self-test message includes the message of the verification module for verifying whether the message itself is correct, including the message service area, the verification primitive area and the verification procedure area. The self-check message decomposition module is used to decompose the self-check message to be checked to obtain the decomposition information of the self-check message to be checked. The decomposition information of the self-check message to be checked includes business information, check primitives and check procedures. The check primitives refer to the check rules for judging the correctness of business information, and the check procedures are used to automatically check the business information. The primitive execution module is used to execute the primitive and obtain the primitive verification result of the self-verification message; The verification program execution module is used to execute the verification program and obtain the program verification result of the self-verification message; Specifically, the verification primitive execution module is used to: obtain the field identifier of the verification primitive area; load the verification primitive corresponding to the field identifier of the verification primitive area; and verify the business information based on the verification primitive corresponding to the field identifier of the verification primitive area to obtain the primitive verification result of the self-verification message. The inspection program execution module is specifically used for: obtaining the field identifier of the inspection program area; loading the inspection program corresponding to the field identifier of the inspection program area; executing the inspection program corresponding to the field identifier of the inspection program area to obtain the program inspection result of the self-inspection message.
6. An electronic device, characterized in that, The electronic device includes: At least one processor; and a memory communicatively connected to the at least one processor; The memory stores a computer program that can be executed by the at least one processor, which is then executed by the at least one processor to enable the at least one processor to perform the message verification method according to any one of claims 1-4.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the message verification method according to any one of claims 1-4.
Citation Information
Patent Citations
Message generation and verification method and device
CN112019485A