Message inspection method and device, electronic equipment and storage medium

By decomposing the message and executing the inspection primitive, the problem that the prior art cannot self-check the correctness of the message is solved, and the effective correctness verification and quality improvement of the message is achieved.

CN119603381AActive Publication Date: 2025-03-11AGRICULTURAL BANK OF CHINA
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411688561.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-22
Publication Date
2025-03-11
Estimated Expiration
2044-11-22

AI Technical Summary

Technical Problem

The prior art cannot conduct correctness checks based on the message itself without other reference documents, resulting in the inability to detect and correct error messages in a timely manner.

Method used

By obtaining the self-test message to be tested, decompose it, extracting service information and inspection primitives, and performing inspection primitives to achieve correctness of the message.

Benefits of technology

The correctness of self-check packets is realized, and unqualified packets can be found, thereby improving the message quality and avoiding the bandwidth occupied and waste of unqualified packets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119603381A_ABST
    Figure CN119603381A_ABST
Patent Text Reader

Abstract

The invention discloses a message inspection method and device, electronic equipment and a storage medium. The method comprises the following steps: acquiring a self-checking message to be checked; the to-be-inspected self-inspection message is decomposed, decomposition information of the to-be-inspected self-inspection message is obtained, the decomposition information of the to-be-inspected self-inspection message comprises service information and an inspection primitive, and the inspection primitive refers to an inspection rule for judging the correctness of the service information; and executing the test primitive to obtain a primitive test result of the self-test message. According to the technical scheme, the correctness test of the self-test message is realized through the test primitive, so that the unqualified self-test message is found.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer software technology, and in particular to a message checking method, device, electronic equipment and storage medium. Background Art

[0002] In computer software development and testing work, messages are often used for data communication and collaboration.

[0003] Since the message may be manually edited, the editor may not know the definition rules of the message, which may cause errors in the message. When such an erroneous message is sent to the target party, the target party cannot correctly parse and use it.

[0004] In the process of implementing the present invention, it was found that there are at least the following technical problems in the prior art: the prior art solution does not extract the verification rules in the message, and therefore cannot verify the correctness of the message based on the message itself without other reference documents. Summary of the invention

[0005] The present invention provides a message checking method, device, electronic equipment and storage medium to implement correctness checking of self-checking messages.

[0006] According to one aspect of the present invention, there is provided a message checking method, comprising:

[0007] Obtain the self-inspection message to be inspected;

[0008] Decomposing the self-check message to be checked to obtain decomposition information of the self-check message to be checked, wherein the decomposition information of the self-check message to be checked includes service information and a check primitive, and the check primitive refers to a check rule for determining the correctness of the service information;

[0009] The verification primitive is executed to obtain a primitive verification result of the self-verification message.

[0010] According to another aspect of the present invention, there is provided a message checking device, comprising:

[0011] A self-check message acquisition module, used to obtain a self-check message to be checked;

[0012] a self-check message decomposition module, configured to decompose the self-check message to be checked to obtain decomposition information of the self-check message to be checked, wherein the decomposition information of the self-check message to be checked includes service information and a check primitive, and the check primitive refers to a check rule for determining the correctness of the service information;

[0013] The verification primitive execution module is used to execute the verification primitive to obtain the primitive verification result of the self-verification message.

[0014] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0015] at least one processor;

[0016] and a memory communicatively coupled to the at least one processor;

[0017] 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 so that the at least one processor can execute the message inspection method described in any embodiment of the present invention.

[0018] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the message checking method described in any embodiment of the present invention when executed.

[0019] The technical solution of the embodiment of the present invention obtains the self-check message to be checked, decomposes the self-check message to be checked, and obtains the decomposition information of the self-check message to be checked, wherein the decomposition information of the self-check message to be checked includes business information and a check primitive, and the check primitive refers to a check rule for judging the correctness of the business information, and then executes the check primitive to obtain the primitive check result of the self-check message. The above technical solution realizes the correctness check of the self-check message through the check primitive to find unqualified self-check messages.

[0020] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. 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.

[0022] Figure 1 is a flow chart of a message inspection method provided according to Embodiment 1 of the present invention;

[0023] Figure 2 is a flow chart of a message inspection method provided according to Embodiment 2 of the present invention;

[0024] Figure 3is a flow chart of a message inspection method provided according to Embodiment 3 of the present invention;

[0025] Figure 4 is a structural schematic diagram of a message inspection device provided according to Embodiment 4 of the present invention;

[0026] Figure 5 It is a structural schematic diagram of an electronic device for implementing the message checking method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0027] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices. The acquisition, storage, use, processing, etc. of data in the technical solution of this application comply with the relevant provisions of national laws and regulations.

[0029] Embodiment 1

[0030] Figure 1 This is a flow chart of a message inspection method provided in the first embodiment of the present invention. This embodiment is applicable to the case of inspecting a self-inspection message. The method can be executed by a message inspection device. The message inspection device can be implemented in the form of hardware and / or software. The message inspection device can be configured in an electronic device such as a terminal. Figure 1 As shown, the method includes:

[0031] S110: Obtain a self-inspection message to be inspected.

[0032] S120. Decompose the self-check message to be checked to obtain decomposition information of the self-check message to be checked, wherein the decomposition information of the self-check message to be checked includes service information and a check primitive, and the check primitive refers to a check rule for determining correctness of service information.

[0033] S130: Execute the verification primitive to obtain a primitive verification result of the self-verification message.

[0034] In the embodiment of the present invention, the self-check message refers to a message containing a check module for checking whether the message itself is correct, and may include a message service area, a check primitive area, and a check program area, wherein the message service area may include service information, version, and format, etc., and the service information may include but is not limited to information such as a data source identifier, a data type, a data length, and a data value. The check primitive area may include one or more check primitives, and the check primitive may be an absolute check primitive or a conditional check primitive, which is not limited here.

[0035] Exemplarily, the self-check message to be checked can be loaded into the memory, and then the self-check message to be checked can be decomposed to obtain the business information and the check primitive in the self-check message. The business information can be the identity card information, and the check primitive can be the absolute check primitive of "identity card (ID_CARD)-length-equal to-18". If the length of the identity card information is 18 bits, the primitive check result of the self-check message is qualified. If the length of the identity card information is not 18 bits, the primitive check result of the self-check message is unqualified.

[0036] In some optional embodiments, after executing the inspection primitive and obtaining the primitive inspection result of the self-inspection message, it also includes: when the primitive inspection result of the self-inspection message is unqualified, stopping the forwarding of the self-inspection message; when the primitive inspection result of the self-inspection message is qualified, continuing to forward the self-inspection message, thereby improving the message quality and avoiding the occupation and waste of bandwidth by unqualified messages.

[0037] In some optional embodiments, after the self-check message to be checked is obtained, the message format of the self-check message may be determined, and then the self-check message may be decomposed according to the message format of the self-check message.

[0038] The message format may be XML or JSON, which is not specifically limited here.

[0039] Exemplarily, if the message format of the self-check message is XML, the self-check message can be decomposed based on the XML specification. If the information decomposed during the decomposition process does not comply with the XML specification, an exception error can be reported to indicate that the message format is incorrect.

[0040] The technical solution of the embodiment of the present invention obtains the self-check message to be checked, decomposes the self-check message to be checked, and obtains the decomposition information of the self-check message to be checked, wherein the decomposition information of the self-check message to be checked includes business information and a check primitive, and the check primitive refers to a check rule for judging the correctness of the business information, and then executes the check primitive to obtain the primitive check result of the self-check message. The above technical solution realizes the correctness check of the self-check message through the check primitive to find unqualified self-check messages.

[0041] Embodiment 2

[0042] Figure 2 A flow chart of a message inspection method provided for Embodiment 2 of the present invention, the method of this embodiment can be combined with the various optional schemes in the message inspection method provided in the above embodiments. The message inspection method provided in this embodiment is further optimized. Optionally, the execution of the inspection primitive to obtain the primitive inspection result of the self-inspection message includes: obtaining the field identifier of the inspection primitive area; loading the inspection primitive corresponding to the field identifier of the inspection primitive area; inspecting the business information based on the inspection primitive corresponding to the field identifier of the inspection primitive area to obtain the primitive inspection result of the self-inspection message.

[0043] like Figure 2 As shown, the method includes:

[0044] S210: Obtain a self-inspection message to be inspected.

[0045] S220. Decompose the self-check message to be checked to obtain decomposition information of the self-check message to be checked, wherein the decomposition information of the self-check message to be checked includes service information and a check primitive, and the check primitive refers to a check rule for determining correctness of service information.

[0046] S230: Obtain the field identifier of the inspection primitive area.

[0047] S240: Load the inspection primitive corresponding to the field identifier in the inspection primitive area.

[0048] S250: Verify the service information based on the verification primitive corresponding to the field identifier in the verification primitive area to obtain a primitive verification result of the self-verification message.

[0049] In the embodiment of the present invention, the field identifier of the test primitive area refers to identification information used to identify the test primitive in the test primitive area.

[0050] Exemplarily, the field identifier of the inspection primitive area is obtained:<CHECK_A> ", load the inspection primitive corresponding to the field identifier of the inspection primitive area: "Condition / Age (AGE)-Value-Greater Than Equal-16 / Identity Card (ID_CARD)-Length-Equal-18", the inspection primitive is a conditional inspection primitive, and the business information can be identity card information. Specifically, under the condition that the age is greater than 16 years old, if the length of the identity card information is 18 bits, the primitive inspection result of the self-inspection message is qualified, if the length of the identity card information is not 18 bits, the primitive inspection result of the self-inspection message is unqualified.

[0051] The technical solution of the embodiment of the present invention obtains the field identifier of the inspection primitive area, and then loads the inspection primitive corresponding to the field identifier of the inspection primitive area, and then verifies the business information based on the inspection primitive corresponding to the field identifier of the inspection primitive area, thereby realizing the correctness verification of the business information to discover unqualified self-inspection messages.

[0052] Embodiment 3

[0053] Figure 3 A flowchart of a message inspection method provided in Embodiment 3 of the present invention, the method of this embodiment can be combined with each optional scheme in the message inspection method provided in the above embodiment. The message inspection method provided in this embodiment is further optimized. Optionally, the decomposition information of the self-inspection message to be inspected also includes an inspection program, and the inspection program is used to automatically inspect the service information; accordingly, the method also includes: executing the inspection program to obtain the program inspection result of the self-inspection message.

[0054] like Figure 3 As shown, the method includes:

[0055] S310: Obtain a self-inspection message to be inspected.

[0056] S320. Decompose the self-check message to be checked to obtain decomposition information of the self-check message to be checked, wherein the decomposition information of the self-check message to be checked includes business information, a check primitive and a check program, the check primitive refers to a check rule for determining the correctness of the business information, and the check program is used to automatically check the business information.

[0057] S330: Execute the verification primitive to obtain a primitive verification result of the self-verification message.

[0058] S340: Execute the verification program to obtain a program verification result of the self-verification message.

[0059] It should be emphasized that in the prior art, the message only contains the message service area and cannot realize self-inspection of the message. The embodiment of the present invention adds a verification primitive area and / or a verification program area to the message to form a self-inspection message, which realizes self-inspection of whether the message is qualified.

[0060] In the embodiment of the present invention, the test program is located in the test program area. The test program may be a script in an interpreted language, such as a python script; the test program may also be a binary executable body obtained after compilation, such as a binary module compiled in C language.

[0061] Exemplarily, the verification program area may include a language type field, an executable execution environment matching field, and a digital signature field, wherein the language type field is used to indicate the language in which the verification program is written; the executable execution environment matching field is used to indicate whether the verification program is a script or a binary executable, as well as the hardware and software container requirements for the binary executable; the digital signature field is used to ensure the legality, security, and authentication of the verification program.

[0062] Specifically, executing the inspection program to obtain the program inspection result of the self-inspection message includes: 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.

[0063] For example, the field identifier of the inspection program area may be "<CHECK_B> ", the inspection program corresponding to the field identifier of the inspection program area may be "3f4e5f00673d35df", and "3f4e5f00673d35df" may be a binary module, which may be loaded into the computer memory and executed to obtain the program inspection result of the self-inspection message.

[0064] The technical solution of the embodiment of the present invention realizes the inspection of whether the message itself is correct by executing the inspection program, so as to judge whether to continue to forward the message according to the inspection result, thereby avoiding the sending of unqualified erroneous messages.

[0065] Embodiment 4

[0066] Figure 4 This is a schematic diagram of the structure of a message inspection device provided by Embodiment 4 of the present invention. Figure 4 As shown, the device comprises:

[0067] A self-check message acquisition module 410, used to obtain a self-check message to be checked;

[0068] A self-check message decomposition module 420 is used to decompose the self-check message to be checked to obtain decomposition information of the self-check message to be checked, wherein the decomposition information of the self-check message to be checked includes service information and a check primitive, and the check primitive refers to a check rule for determining the correctness of the service information;

[0069] The verification primitive execution module 430 is used to execute the verification primitive to obtain the primitive verification result of the self-verification message.

[0070] The technical solution of the embodiment of the present invention obtains the self-check message to be checked, decomposes the self-check message to be checked, and obtains the decomposition information of the self-check message to be checked, wherein the decomposition information of the self-check message to be checked includes business information and a check primitive, and the check primitive refers to a check rule for judging the correctness of the business information, and then executes the check primitive to obtain the primitive check result of the self-check message. The above technical solution realizes the correctness check of the self-check message through the check primitive to find unqualified self-check messages.

[0071] In some optional implementations, the self-check message acquisition module 410 is specifically used to:

[0072] Load the self-test message to be tested into the memory.

[0073] In some optional implementations, the inspection primitive execution module 430 is specifically configured to:

[0074] Get the field identifier of the inspection primitive area;

[0075] Loading the inspection primitive corresponding to the field identifier of the inspection primitive area;

[0076] The service information is checked based on the check primitive corresponding to the field identifier in the check primitive area to obtain a primitive check result of the self-check message.

[0077] In some optional implementations, the message checking device further includes:

[0078] The message forwarding stopping unit is used to stop forwarding the self-check message when the primitive check result of the self-check message is unqualified.

[0079] In some optional implementations, the message checking device further includes:

[0080] The message continuing forwarding unit is used to continue forwarding the self-check message when the primitive check result of the self-check message is qualified.

[0081] In some optional implementations, the decomposition information of the self-verification message to be verified further includes a verification program, and the verification program is used to automatically verify the service information;

[0082] Correspondingly, the message checking device further includes:

[0083] The verification program execution module is used to execute the verification program to obtain the program verification result of the self-verification message.

[0084] In some optional implementations, the inspection program execution module is specifically used to:

[0085] Get the field ID of the inspection program area;

[0086] Loading the inspection program corresponding to the field identifier of the inspection program area;

[0087] The inspection program corresponding to the field identifier of the inspection program area is executed to obtain a program inspection result of the self-inspection message.

[0088] The message inspection device provided in the embodiment of the present invention can execute the message inspection method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0089] Embodiment 5

[0090] Figure 5 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0091] like Figure 5As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to 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. The I / O interface 15 is also connected to the bus 14.

[0092] A number 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, speakers, etc.; a storage unit 18, such as a 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 may be a variety of general and / or special 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 artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The processor 11 performs the various methods and processes described above, such as a message inspection method, which includes:

[0094] Obtain the self-inspection message to be inspected;

[0095] Decomposing the self-check message to be checked to obtain decomposition information of the self-check message to be checked, wherein the decomposition information of the self-check message to be checked includes service information and a check primitive, and the check primitive refers to a check rule for determining the correctness of the service information;

[0096] The verification primitive is executed to obtain a primitive verification result of the self-verification message.

[0097] In some embodiments, the message inspection method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the message inspection method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the message inspection method in any other appropriate manner (e.g., by means of firmware).

[0098] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0099] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0100] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0101] To provide interaction with a user, the systems and techniques described herein may 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 trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0102] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may 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] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may 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 difficult management and weak business scalability in traditional physical hosts and VPS services.

[0104] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0105] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A message inspection method, characterized in that: include: Obtain the self-inspection message to be inspected; Decomposing the self-check message to be checked to obtain decomposition information of the self-check message to be checked, wherein the decomposition information of the self-check message to be checked includes service information and a check primitive, and the check primitive refers to a check rule for determining the correctness of the service information; The verification primitive is executed to obtain a primitive verification result of the self-verification message.

2. The method according to claim 1, characterized in that The step of obtaining the self-check message to be checked includes: Load the self-test message to be tested into the memory.

3. The method according to claim 1, characterized in that The executing the verification primitive to obtain the primitive verification result of the self-verification message includes: Get the field identifier of the inspection primitive area; Loading the inspection primitive corresponding to the field identifier of the inspection primitive area; The service information is checked based on the check primitive corresponding to the field identifier in the check primitive area to obtain a primitive check result of the self-check message.

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: When the primitive check result of the self-check message is unqualified, forwarding of the self-check message is stopped.

5. 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: When the primitive check result of the self-check message is qualified, the self-check message continues to be forwarded.

6. The method according to claim 1, characterized in that The decomposition information of the self-checking message to be checked also includes a checking program, and the checking program is used to automatically check the service information; Accordingly, the method further includes: The verification program is executed to obtain a program verification result of the self-verification message.

7. The method according to claim 6, characterized in that The executing the inspection program to obtain the program inspection result of the self-inspection message includes: Get the field ID of the inspection program area; Loading the inspection program corresponding to the field identifier of the inspection program area; The inspection program corresponding to the field identifier of the inspection program area is executed to obtain a program inspection result of the self-inspection message.

8. A message inspection device, characterized in that: include: A self-check message acquisition module, used to obtain a self-check message to be checked; a self-check message decomposition module, configured to decompose the self-check message to be checked to obtain decomposition information of the self-check message to be checked, wherein the decomposition information of the self-check message to be checked includes service information and a check primitive, and the check primitive refers to a check rule for determining the correctness of the service information; The verification primitive execution module is used to execute the verification primitive to obtain the primitive verification result of the self-verification message.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively coupled to the at least one processor; 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 so that the at least one processor can execute the message inspection method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the message checking method according to any one of claims 1 to 7 when executed.

Citation Information

Patent Citations

  • Parameter verification method and device and network management server

    CN107579836A

  • Method and device for verifying interface packet

    CN109510824A

  • Message generation and verification method and device

    CN112019485A

  • Service message automatic verification method and device

    CN113537819A

  • Message verification method, device, equipment and medium

    CN115391087A