CN112784112B - Message verification method and device - Google Patents
Message verification method and device Download PDFInfo
- Publication number
- CN112784112B CN112784112B CN202110123763.5A CN202110123763A CN112784112B CN 112784112 B CN112784112 B CN 112784112B CN 202110123763 A CN202110123763 A CN 202110123763A CN 112784112 B CN112784112 B CN 112784112B
- Authority
- CN
- China
- Prior art keywords
- message
- schema file
- character string
- xml format
- standard document
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/80—Information retrieval; Database structures therefor; File system structures therefor of semi-structured data, e.g. markup language structured data such as SGML, XML or HTML
- G06F16/84—Mapping; Conversion
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/903—Querying
- G06F16/90335—Query processing
- G06F16/90344—Query processing by using string matching techniques
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/906—Clustering; Classification
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computational Linguistics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Debugging And Monitoring (AREA)
Abstract
The embodiment of the application provides a message verification method and device, wherein the method comprises the following steps: extracting key information from the message format standard document according to preset key words and key information extraction rules, and combining the extracted key information with node attribute information in an XML format message Schema file to obtain a first check character string; obtaining a second check character string according to the node information in the XML format message Schema file; performing comparison operation of the message format standard document and the XML format message Schema file according to the first check character string and the second check character string to obtain a comparison result; the method and the device can effectively improve the efficiency and the accuracy of message verification.
Description
Technical Field
The present application relates to the field of data processing, and in particular, to a method and apparatus for checking a message.
Background
Two objects of the message format verification, one is a message format standard document, the other is an XML format message Schema file (Schema format file) set compression package, each message type has a Schema format definition file, and the Schema "file" comprises Schema format files corresponding to a plurality of message types.
When the format of the message schema file in the payment system is checked, the core content check point is a message structure in the schema message file, and whether the data type of each node is consistent with the data type description in the format standard document or not.
When the data types are defined in the prior art and relate to a plurality of payment systems, each payment system corresponds to a plurality of message types, each message type corresponds to a schema file (. Xsd), it is known that the data types defined by some payment systems are different from the data type definitions in the summary of the secondary payment systems, such as the payment systems of "online payment cross-line clearing system", "mobile phone number networking checking platform", and the like, the specific data type definition ranges are also different, and on the basis of data analysis, when the data types in the message format standard are newly added and changed, the newly generated schema file needs to be manually checked again based on the message format standard, thereby reducing the checking efficiency and accuracy.
Disclosure of Invention
Aiming at the problems in the prior art, the application provides a message verification method and device, which can effectively improve the efficiency and accuracy of message verification.
In order to solve at least one of the above problems, the present application provides the following technical solutions:
in a first aspect, the present application provides a method for checking a packet, including:
extracting key information from the message format standard document according to preset key words and key information extraction rules, and combining the extracted key information with node attribute information in an XML format message Schema file to obtain a first check character string;
obtaining a second check character string according to the node information in the XML format message Schema file;
and carrying out comparison operation on the message format standard document and the XML format message Schema file according to the first check character string and the second check character string to obtain a comparison result.
Further, before extracting the key information of the standard document in the message format according to the preset key words and the key information extraction rules, the method comprises the following steps:
and determining a corresponding key information extraction rule according to the data type of the message format standard document.
Further, before obtaining the second check character string according to the node information in the XML format message Schema file, the method includes:
judging whether a digital identifier inconsistent with the node name of the corresponding message format standard document exists in the node name of the XML format message Schema file;
if yes, removing the digital identifier in the node name of the XML format message Schema file, and updating the node name of the XML format message Schema file.
Further, the combining, according to the extracted key information and the node attribute information in the XML format message Schema file, to obtain a first check string further includes:
judging whether the data type of the message format standard document is enumeration type or not;
if yes, combining the extracted key information, node attribute information and node variable information in the XML format message Schema file to obtain a first check character string.
In a second aspect, the present application provides a packet verification device, including:
the first check character string determining module is used for extracting key information from the message format standard document according to preset key words and key information extraction rules, and combining the extracted key information with node attribute information in the XML format message Schema file to obtain a first check character string;
the second check character string determining module is used for obtaining a second check character string according to the node information in the XML format message Schema file;
and the check comparison module is used for carrying out comparison operation on the message format standard document and the XML format message Schema file according to the first check character string and the second check character string to obtain a comparison result.
Further, the extraction rule determining unit is configured to determine a corresponding key information extraction rule according to the data type of the message format standard document.
Further, the method further comprises the following steps:
the digital identifier identification unit is used for judging whether a digital identifier inconsistent with the node name of the corresponding message format standard document exists in the node name of the XML format message Schema file;
and the digital identifier removing unit is used for removing the digital identifier in the node name of the XML format message Schema file and updating the node name of the XML format message Schema file if the digital identifier inconsistent with the node name of the corresponding message format standard document exists in the node name of the XML format message Schema file.
Further, the first check character string determining module includes:
an enumeration type judging unit for judging whether the data type of the message format standard document is enumeration type;
and the enumeration type character string generation unit is used for combining the extracted key information, the node attribute information and the node variable information in the XML format message Schema file to obtain a first check character string if the data type of the message format standard document is determined to be enumeration type.
In a third aspect, the present application provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the steps of the message verification method when the program is executed by the processor.
In a fourth aspect, the present application provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the message verification method.
According to the technical scheme, the message verification method and the message verification device are provided, key information extraction is carried out on a message format standard document through preset key words and key information extraction rules, a first verification character string is obtained through combination according to the extracted key information and node attribute information in an XML format message Schema file, then a second verification character string is obtained according to the node information in the XML format message Schema file, and comparison operation of the message format standard document and the XML format message Schema file is carried out through the first verification character string and the second verification character string, so that the message verification efficiency and the message verification accuracy are effectively improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a message verification method according to an embodiment of the present application;
FIG. 2 is a second flow chart of a message checking method according to an embodiment of the present application;
FIG. 3 is a third flow chart of a message checking method according to an embodiment of the present disclosure;
FIG. 4 is a diagram of one of the message check devices according to the embodiments of the present application;
FIG. 5 is a second block diagram of a message checking device according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device in an embodiment of the present application.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, based on the embodiments herein, which would be apparent to one of ordinary skill in the art without making any inventive effort, are intended to be within the scope of the present application.
In consideration of the problem that in the prior art, when a data type in a message format standard is newly added and changed, a newly generated Schema file needs to be manually checked again based on the message format standard, so that the check efficiency and the accuracy are reduced.
In order to effectively improve the efficiency and accuracy of message verification, the present application provides an embodiment of a message verification method, referring to fig. 1, the message verification method specifically includes the following contents:
step S101: and extracting key information from the message format standard document according to preset key words and key information extraction rules, and combining the extracted key information with node attribute information in the XML format message Schema file to obtain a first check character string.
It will be appreciated that when comparing a standard document in a message format with a message Schema file in an XML format (e.g., a Schema file or a Schema compressed package composed of a plurality of Schema files), data type information to be compared is typically recorded in the standard document in a form of a table in the standard document in the message format, and the following table 1 is a table example of a standard document in the message format:
table 1 forms of message Format Standard documents
Alternatively, the present application may extract key information from the standard document in the message format by presetting a key word and a key information extraction rule, for example, obtain key information of the character string type in the above table 1 by a key word "N", and arrange the obtained key information by a key information extraction rule, for example, when extracting key information of sequence numbers a to D in the above table 1 by the key word "N", arrange three sets of information of "type name", "type definition" and "attachment description" into a character string, or an object having three member variables, and store the three members in a warehouse for temporary storage.
In other embodiments of the present application, a corresponding key information extraction rule may also be determined by different data types in the message format standard document, for example, when the data type in the message format standard document is determined to be enumeration type, the determined key information is extracted, arranged and stored in a tree form, which is not specifically limited in the present application, and the key information can be flexibly and accurately extracted.
Optionally, the data in the standard document in the message format is classified and extracted through the content, and the specific classification standard may be:
the first category, variable-containing type, represents a string and/or number fixed to an N-bit length, such as: maxNText, maxNNumericText, exactNText, exactNNumericText.
The second category, date and time, indicates a fixed format.
And a third class, containing monetary symbols and amounts.
And the fourth class, wherein the data type value is a finite value domain, and can be enumerated and divided into enumerated value definition classes.
Fifth, special types expressed in regular expressions: express quantity, express interest rate, identify banking institution using BIC code, etc.
Sixth category: other classifications, such as Any, do not do the parsing process.
Optionally, the present application may combine the extracted key information with node attribute information in the XML format message Schema file to obtain a first check string, that is, the basic composition form and the basic information of the first check string are obtained by extracting the message format standard document, and the node attribute information in the corresponding XML format message Schema file is filled into the set position of the first check string, so that the complete first check string can be obtained.
Step S102: and obtaining a second check character string according to the node information in the XML format message Schema file.
Alternatively, the present application may perform format analysis on an XML format message Schema file (i.e., a Schema file), and extract each node information thereof to generate a character string, i.e., a second check character string.
Step S103: and carrying out comparison operation on the message format standard document and the XML format message Schema file according to the first check character string and the second check character string to obtain a comparison result.
Optionally, the comparing operation is, for example, whether the first check string includes the second check string, or whether the first check string is equal to the second check string, or comparing according to other manually set rules, which is not limited in this application.
As can be seen from the above description, according to the message verification method provided by the embodiment of the application, key information extraction can be performed on a message format standard document by means of preset key words and key information extraction rules, a first verification character string is obtained by combining the extracted key information with node attribute information in an XML format message Schema file, then a second verification character string is obtained according to the node information in the XML format message Schema file, and comparison operation of the message format standard document and the XML format message Schema file is performed through the first verification character string and the second verification character string, so that the efficiency and accuracy of message verification are effectively improved.
In order to flexibly and accurately extract key information from the standard document in the message format, in an embodiment of the message verification method of the present application, before the step S101, the method may further specifically include the following:
and determining a corresponding key information extraction rule according to the data type of the message format standard document.
In other embodiments of the present application, a corresponding key information extraction rule may also be determined by different data types in the message format standard document, for example, when the data type in the message format standard document is determined to be enumeration type, the determined key information is extracted, arranged and stored in a tree form, which is not specifically limited in the present application, and the key information can be flexibly and accurately extracted.
In order to improve the accuracy of the verification comparison, in an embodiment of the message verification method of the present application, referring to fig. 2, before the step S102, the following may be further specifically included:
step S201: and judging whether a digital identifier inconsistent with the node name of the corresponding message format standard document exists in the node name of the XML format message Schema file.
Step S202: if yes, removing the digital identifier in the node name of the XML format message Schema file, and updating the node name of the XML format message Schema file.
In some embodiments of the present application, the generation process of the XML format message Schema file may not be finished, so that the node name of the XML format message Schema file is default provided with the digital identifier, at this time, the present application removes the digital identifier in the node name by judging the normalization of the node name of the XML format message Schema file, or replaces the digital identifier with a set identifier, for example, an "N".
In other embodiments of the present application, the normalization determination of the node name of the XML format message Schema file is not limited to the determination of the digital identifier, and the determination of other identifiers can be performed according to a custom rule, which is not specifically limited herein, and the subsequent comparison accuracy can be ensured by preprocessing the XML format message Schema file.
In order to obtain an accurate verification string, in an embodiment of the message verification method of the present application, referring to fig. 3, the step S101 may further specifically include the following:
step S301: and judging whether the data type of the message format standard document is enumeration type or not.
Step S302: if yes, combining the extracted key information, node attribute information and node variable information in the XML format message Schema file to obtain a first check character string.
Optionally, since the enumeration type has a tree-shaped data structure, when the application determines that the data type of the message format standard document is the enumeration type, when the key information of the XML format message Schema file is extracted, the node variable information of the XML format message Schema file can be extracted together with the node attribute information, so that an accurate first check character string is obtained for the enumeration type data structure.
In order to effectively improve the efficiency and accuracy of message verification, the present application provides an embodiment of a message verification device for implementing all or part of the content of the message verification method, referring to fig. 4, the message verification device specifically includes the following contents:
the first check character string determining module 10 is configured to extract key information from the message format standard document according to a preset key word and key information extraction rule, and combine the extracted key information with node attribute information in the XML format message Schema file to obtain a first check character string.
And the second check character string determining module 20 is configured to obtain a second check character string according to the node information in the XML format message Schema file.
And the check comparison module 30 is configured to perform a comparison operation between the message format standard document and the XML format message Schema file according to the first check string and the second check string, so as to obtain a comparison result.
As can be seen from the above description, the message verification device provided in the embodiment of the present application can extract key information from a message format standard document by using a preset key word and key information extraction rule, and combine the extracted key information with node attribute information in an XML format message Schema file to obtain a first verification string, and then obtain a second verification string according to the node information in the XML format message Schema file, and perform a comparison operation between the message format standard document and the XML format message Schema file through the first verification string and the second verification string, thereby effectively improving the efficiency and accuracy of message verification.
In order to flexibly and accurately extract key information from a standard document in a message format, in an embodiment of the message verification device of the present application, the device further specifically includes the following contents:
and the extraction rule determining unit is used for determining the corresponding key information extraction rule according to the data type of the message format standard document.
In order to improve the accuracy of verification and comparison, in an embodiment of the message verification device of the present application, the message verification device further specifically includes the following:
and the digital identifier identification unit is used for judging whether the node name of the XML format message Schema file has a digital identifier inconsistent with the node name of the corresponding message format standard document.
And the digital identifier removing unit is used for removing the digital identifier in the node name of the XML format message Schema file and updating the node name of the XML format message Schema file if the digital identifier inconsistent with the node name of the corresponding message format standard document exists in the node name of the XML format message Schema file.
In order to obtain an accurate check string, in an embodiment of the message check apparatus of the present application, referring to fig. 5, the first check string determining module 10 includes:
an enumeration type judging unit 11, configured to judge whether the data type of the message format standard document is an enumeration type.
And the enumeration type character string generating unit 12 is configured to, if it is determined that the data type of the message format standard document is an enumeration type, combine the extracted key information, node attribute information and node variable information in the XML format message Schema file to obtain a first check character string.
In order to effectively improve the efficiency and accuracy of message verification from a hardware level, the application provides an embodiment of an electronic device for implementing all or part of contents in the message verification method, where the electronic device specifically includes the following contents:
a processor (processor), a memory (memory), a communication interface (Communications Interface), and a bus; the processor, the memory and the communication interface complete communication with each other through the bus; the communication interface is used for realizing information transmission between the message checking device and related equipment such as a core service system, a user terminal, a related database and the like; the logic controller may be a desktop computer, a tablet computer, a mobile terminal, etc., and the embodiment is not limited thereto. In this embodiment, the logic controller may refer to an embodiment of the message checking method and an embodiment of the message checking device in the embodiments, and the contents thereof are incorporated herein, and the repetition is omitted.
It is understood that the user terminal may include a smart phone, a tablet electronic device, a network set top box, a portable computer, a desktop computer, a Personal Digital Assistant (PDA), a vehicle-mounted device, a smart wearable device, etc. Wherein, intelligent wearing equipment can include intelligent glasses, intelligent wrist-watch, intelligent bracelet etc..
In practical applications, part of the message verification method may be executed on the electronic device side as described above, or all operations may be completed in the client device. Specifically, the selection may be made according to the processing capability of the client device, and restrictions of the use scenario of the user. The present application is not limited in this regard. If all operations are performed in the client device, the client device may further include a processor.
The client device may have a communication module (i.e. a communication unit) and may be connected to a remote server in a communication manner, so as to implement data transmission with the server. The server may include a server on the side of the task scheduling center, and in other implementations may include a server of an intermediate platform, such as a server of a third party server platform having a communication link with the task scheduling center server. The server may include a single computer device, a server cluster formed by a plurality of servers, or a server structure of a distributed device.
Fig. 6 is a schematic block diagram of a system configuration of an electronic device 9600 of an embodiment of the present application. As shown in fig. 6, the electronic device 9600 may include a central processor 9100 and a memory 9140; the memory 9140 is coupled to the central processor 9100. Notably, this fig. 6 is exemplary; other types of structures may also be used in addition to or in place of the structures to implement telecommunications functions or other functions.
In one embodiment, the message check method functions may be integrated into the CPU 9100. The central processor 9100 may be configured to perform the following control:
step S101: and extracting key information from the message format standard document according to preset key words and key information extraction rules, and combining the extracted key information with node attribute information in the XML format message Schema file to obtain a first check character string.
Step S102: and obtaining a second check character string according to the node information in the XML format message Schema file.
Step S103: and carrying out comparison operation on the message format standard document and the XML format message Schema file according to the first check character string and the second check character string to obtain a comparison result.
As can be seen from the above description, the electronic device provided in the embodiment of the present application performs key information extraction on a message format standard document by using a preset key word and key information extraction rule, and combines the extracted key information with node attribute information in an XML format message Schema file to obtain a first check character string, and then obtains a second check character string according to the node information in the XML format message Schema file, and performs a comparison operation on the message format standard document and the XML format message Schema file through the first check character string and the second check character string, thereby effectively improving the efficiency and accuracy of message check.
In another embodiment, the message verification device may be configured separately from the cpu 9100, for example, the message verification device may be configured as a chip connected to the cpu 9100, and the cpu controls the message verification device to implement the message verification method function.
As shown in fig. 6, the electronic device 9600 may further include: a communication module 9110, an input unit 9120, an audio processor 9130, a display 9160, and a power supply 9170. It is noted that the electronic device 9600 need not include all of the components shown in fig. 6; in addition, the electronic device 9600 may further include components not shown in fig. 6, and reference may be made to the related art.
As shown in fig. 6, the central processor 9100, sometimes referred to as a controller or operational control, may include a microprocessor or other processor device and/or logic device, which central processor 9100 receives inputs and controls the operation of the various components of the electronic device 9600.
The memory 9140 may be, for example, one or more of a buffer, a flash memory, a hard drive, a removable media, a volatile memory, a non-volatile memory, or other suitable device. The information about failure may be stored, and a program for executing the information may be stored. And the central processor 9100 can execute the program stored in the memory 9140 to realize information storage or processing, and the like.
The input unit 9120 provides input to the central processor 9100. The input unit 9120 is, for example, a key or a touch input device. The power supply 9170 is used to provide power to the electronic device 9600. The display 9160 is used for displaying display objects such as images and characters. The display may be, for example, but not limited to, an LCD display.
The memory 9140 may be a solid state memory such as Read Only Memory (ROM), random Access Memory (RAM), SIM card, etc. But also a memory which holds information even when powered down, can be selectively erased and provided with further data, an example of which is sometimes referred to as EPROM or the like. The memory 9140 may also be some other type of device. The memory 9140 includes a buffer memory 9141 (sometimes referred to as a buffer). The memory 9140 may include an application/function storage portion 9142, the application/function storage portion 9142 storing application programs and function programs or a flow for executing operations of the electronic device 9600 by the central processor 9100.
The memory 9140 may also include a data store 9143, the data store 9143 for storing data, such as contacts, digital data, pictures, sounds, and/or any other data used by an electronic device. The driver storage portion 9144 of the memory 9140 may include various drivers of the electronic device for communication functions and/or for performing other functions of the electronic device (e.g., messaging applications, address book applications, etc.).
The communication module 9110 is a transmitter/receiver 9110 that transmits and receives signals via an antenna 9111. A communication module (transmitter/receiver) 9110 is coupled to the central processor 9100 to provide input signals and receive output signals, as in the case of conventional mobile communication terminals.
Based on different communication technologies, a plurality of communication modules 9110, such as a cellular network module, a bluetooth module, and/or a wireless local area network module, etc., may be provided in the same electronic device. The communication module (transmitter/receiver) 9110 is also coupled to a speaker 9131 and a microphone 9132 via an audio processor 9130 to provide audio output via the speaker 9131 and to receive audio input from the microphone 9132 to implement usual telecommunications functions. The audio processor 9130 can include any suitable buffers, decoders, amplifiers and so forth. In addition, the audio processor 9130 is also coupled to the central processor 9100 so that sound can be recorded locally through the microphone 9132 and sound stored locally can be played through the speaker 9131.
The embodiments of the present application further provide a computer readable storage medium capable of implementing all the steps in the method for verifying a message in which the execution subject is a server or a client in the above embodiments, where the computer readable storage medium stores a computer program, and when the computer program is executed by a processor, the computer program implements all the steps in the method for verifying a message in which the execution subject is a server or a client in the above embodiments, for example, the processor implements the following steps when executing the computer program:
step S101: and extracting key information from the message format standard document according to preset key words and key information extraction rules, and combining the extracted key information with node attribute information in the XML format message Schema file to obtain a first check character string.
Step S102: and obtaining a second check character string according to the node information in the XML format message Schema file.
Step S103: and carrying out comparison operation on the message format standard document and the XML format message Schema file according to the first check character string and the second check character string to obtain a comparison result.
As can be seen from the foregoing description, the computer readable storage medium provided in the embodiments of the present application performs key information extraction on a message format standard document by using preset key words and key information extraction rules, and combines the extracted key information with node attribute information in an XML format message Schema file to obtain a first check character string, and then obtains a second check character string according to node information in the XML format message Schema file, and performs a comparison operation on the message format standard document and the XML format message Schema file through the first check character string and the second check character string, thereby effectively improving efficiency and accuracy of message check.
It will be apparent to those skilled in the art that embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (devices), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The principles and embodiments of the present invention have been described in detail with reference to specific examples, which are provided to facilitate understanding of the method and core ideas of the present invention; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present invention, the present description should not be construed as limiting the present invention in view of the above.
Claims (10)
1. The message verification method is characterized by comprising the following steps:
extracting key information from the message format standard document according to preset key words and key information extraction rules, and combining the extracted key information with node attribute information in an XML format message Schema file to obtain a first check character string;
obtaining a second check character string according to the node information in the XML format message Schema file;
and carrying out comparison operation on the message format standard document and the XML format message Schema file according to the first check character string and the second check character string to obtain a comparison result.
2. The method for verifying a message according to claim 1, wherein before the extracting key information from the standard document in the message format according to the preset key word and key information extracting rule, the method comprises:
and determining a corresponding key information extraction rule according to the data type of the message format standard document.
3. The method for message verification according to claim 1, wherein before the second verification string is obtained according to the node information in the XML format message Schema file, the method comprises:
judging whether a digital identifier inconsistent with the node name of the corresponding message format standard document exists in the node name of the XML format message Schema file;
if yes, removing the digital identifier in the node name of the XML format message Schema file, and updating the node name of the XML format message Schema file.
4. The method for verifying a message according to claim 1, wherein the combining according to the extracted key information and node attribute information in the XML format message Schema file to obtain a first verification string further includes:
judging whether the data type of the message format standard document is enumeration type or not;
if yes, combining the extracted key information, node attribute information and node variable information in the XML format message Schema file to obtain a first check character string.
5. A message verification device, comprising:
the first check character string determining module is used for extracting key information from the message format standard document according to preset key words and key information extraction rules, and combining the extracted key information with node attribute information in the XML format message Schema file to obtain a first check character string;
the second check character string determining module is used for obtaining a second check character string according to the node information in the XML format message Schema file;
and the check comparison module is used for carrying out comparison operation on the message format standard document and the XML format message Schema file according to the first check character string and the second check character string to obtain a comparison result.
6. The message verification device of claim 5, further comprising:
and the extraction rule determining unit is used for determining the corresponding key information extraction rule according to the data type of the message format standard document.
7. The message verification device of claim 5, further comprising:
the digital identifier identification unit is used for judging whether a digital identifier inconsistent with the node name of the corresponding message format standard document exists in the node name of the XML format message Schema file;
and the digital identifier removing unit is used for removing the digital identifier in the node name of the XML format message Schema file and updating the node name of the XML format message Schema file if the digital identifier inconsistent with the node name of the corresponding message format standard document exists in the node name of the XML format message Schema file.
8. The message verification device according to claim 5, wherein the first verification string determining module includes:
an enumeration type judging unit for judging whether the data type of the message format standard document is enumeration type;
and the enumeration type character string generation unit is used for combining the extracted key information, the node attribute information and the node variable information in the XML format message Schema file to obtain a first check character string if the data type of the message format standard document is determined to be enumeration type.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the message verification method of any one of claims 1 to 4 when the program is executed by the processor.
10. A computer readable storage medium having stored thereon a computer program, which when executed by a processor performs the steps of the message verification method of any one of claims 1 to 4.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202110123763.5A CN112784112B (en) | 2021-01-29 | 2021-01-29 | Message verification method and device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202110123763.5A CN112784112B (en) | 2021-01-29 | 2021-01-29 | Message verification method and device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN112784112A CN112784112A (en) | 2021-05-11 |
| CN112784112B true CN112784112B (en) | 2023-06-27 |
Family
ID=75759699
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202110123763.5A Active CN112784112B (en) | 2021-01-29 | 2021-01-29 | Message verification method and device |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN112784112B (en) |
Families Citing this family (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113569106B (en) * | 2021-06-16 | 2023-10-13 | 东风汽车集团股份有限公司 | CAN data identification method, device and equipment |
| CN114070761B (en) * | 2021-11-11 | 2023-09-26 | 北京轨道交通路网管理有限公司 | Protocol message detection method and device and electronic equipment |
| CN114372025B (en) * | 2021-11-26 | 2025-08-26 | 浪潮通信信息系统有限公司 | A method and device for verifying consistency of distributed edge cloud nodes |
| CN114629961A (en) * | 2022-03-17 | 2022-06-14 | 中国农业银行股份有限公司 | A kind of message format verification method and related equipment |
| CN119377173B (en) * | 2024-12-26 | 2025-03-25 | 深圳泊松软件技术有限公司 | Data storage method, device, terminal equipment and computer readable storage medium |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108959095A (en) * | 2018-07-12 | 2018-12-07 | 中国工程物理研究院计算机应用研究所 | Method based on XML Schema verifying XML document |
| CN109379326A (en) * | 2018-08-29 | 2019-02-22 | 中国建设银行股份有限公司 | XML message rule method of calibration, equipment and storage medium |
| CN110020412A (en) * | 2019-04-02 | 2019-07-16 | 中汇信息技术(上海)有限公司 | A kind of method, apparatus and electronic equipment generating IMIX standard message |
| CN110378154A (en) * | 2019-07-24 | 2019-10-25 | 秒针信息技术有限公司 | A kind of method and device of file set completeness check |
Family Cites Families (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7062507B2 (en) * | 2003-02-24 | 2006-06-13 | The Boeing Company | Indexing profile for efficient and scalable XML based publish and subscribe system |
| US7685512B2 (en) * | 2004-05-28 | 2010-03-23 | International Business Machines Corporation | Representing logical model extensions and wire format specific rendering options in XML messaging schemas |
| US20050289182A1 (en) * | 2004-06-15 | 2005-12-29 | Sand Hill Systems Inc. | Document management system with enhanced intelligent document recognition capabilities |
| US20080222517A1 (en) * | 2007-03-09 | 2008-09-11 | Task Performance Group, Inc. | Applying Patterns to XSD for Extending Functionality to Both XML and non-XML Data Data Structures |
-
2021
- 2021-01-29 CN CN202110123763.5A patent/CN112784112B/en active Active
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108959095A (en) * | 2018-07-12 | 2018-12-07 | 中国工程物理研究院计算机应用研究所 | Method based on XML Schema verifying XML document |
| CN109379326A (en) * | 2018-08-29 | 2019-02-22 | 中国建设银行股份有限公司 | XML message rule method of calibration, equipment and storage medium |
| CN110020412A (en) * | 2019-04-02 | 2019-07-16 | 中汇信息技术(上海)有限公司 | A kind of method, apparatus and electronic equipment generating IMIX standard message |
| CN110378154A (en) * | 2019-07-24 | 2019-10-25 | 秒针信息技术有限公司 | A kind of method and device of file set completeness check |
Non-Patent Citations (3)
| Title |
|---|
| Automation Method for testing XML/DB/XML Layers;Debarshi Raha et al.;《2008 International Conference on Software Testing, Verification, and Validation》;第458-464页 * |
| 一种XML报文自动处理引擎的关键技术;邓子云等;《西南科技大学学报》;第76-80、85页 * |
| 雷达情报的XML标准化描述及格式转换;冯新;夏靖波;范海宁;;火力与指挥控制(09);第147-151、155页 * |
Also Published As
| Publication number | Publication date |
|---|---|
| CN112784112A (en) | 2021-05-11 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN112784112B (en) | Message verification method and device | |
| CN106487907B (en) | Method and system for sharing promotion information | |
| CN111047430B (en) | Accounting information processing method and device | |
| CN111369247A (en) | Cross-bank transaction data processing method and device | |
| CN114153856B (en) | Host data double-writing method and device | |
| CN113110829B (en) | Multi-UI component library data processing method and device | |
| CN112463799B (en) | Data extraction method, device, equipment and storage medium | |
| CN113741860B (en) | Data processing method and device based on RPA robot | |
| CN117951547A (en) | Bid and tendered data processing method and device based on artificial intelligence | |
| CN112579773A (en) | Risk event grading method and device | |
| CN113342330B (en) | Front-end engineering generation method and device | |
| CN112492535B (en) | Short message sending method and device | |
| CN111798118B (en) | Enterprise operation risk monitoring method and device | |
| CN113553530A (en) | Information reporting dynamic page configuration method and device | |
| CN113393288A (en) | Order processing information generation method, device, equipment and computer readable medium | |
| CN113190460B (en) | Automatic test case generation method and device | |
| KR102406518B1 (en) | Apparatus for filtering received information automatically, system having the same and method thereof | |
| CN111598539B (en) | CICS online program service processing method and system based on service modeling | |
| CN108595141A (en) | Pronunciation inputting method and device, computer installation and computer readable storage medium | |
| CN109120509B (en) | Information collection method and device | |
| CN110931014A (en) | Speech recognition method and device based on regular matching rule | |
| CN111125117A (en) | Account checking processing method and device | |
| CN113688044B (en) | Automatic testing method and device based on business scene library | |
| CN115495519A (en) | Report data processing method and device | |
| CN114968917A (en) | Method and device for rapidly importing file data |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |