[go: up one dir, main page]

CN112784112A - Message checking method and device - Google Patents

Message checking method and device Download PDF

Info

Publication number
CN112784112A
CN112784112A CN202110123763.5A CN202110123763A CN112784112A CN 112784112 A CN112784112 A CN 112784112A CN 202110123763 A CN202110123763 A CN 202110123763A CN 112784112 A CN112784112 A CN 112784112A
Authority
CN
China
Prior art keywords
message
character string
schema file
standard document
format
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.)
Granted
Application number
CN202110123763.5A
Other languages
Chinese (zh)
Other versions
CN112784112B (en
Inventor
周国威
娄芳
汪双双
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yinqing Technology Co ltd
Original Assignee
Yinqing Technology Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Yinqing Technology Co ltd filed Critical Yinqing Technology Co ltd
Priority to CN202110123763.5A priority Critical patent/CN112784112B/en
Publication of CN112784112A publication Critical patent/CN112784112A/en
Application granted granted Critical
Publication of CN112784112B publication Critical patent/CN112784112B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/80Information 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/84Mapping; Conversion
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/90335Query processing
    • G06F16/90344Query processing by using string matching techniques
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/906Clustering; 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 checking method and a device, wherein the method comprises the following steps: extracting key information of the message format standard document according to preset key words and key information extraction rules, and combining the extracted key information and 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; comparing the message format standard document with 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

Message checking method and device
Technical Field
The present application relates to the field of data processing, and in particular, to a method and an apparatus for message verification.
Background
Two objects for message format check, one is a message format standard document, and the other is a message Schema file (Schema format file) set compression packet in XML format, each message type has its Schema format definition file, and the Schema file packet includes Schema format files corresponding to a plurality of message types.
When format verification is carried out on a message schema file in the payment system, the core content verification 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 is judged.
In the prior art, when data types are defined to 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 second-generation payment system overview, for example, in payment systems such as an "online payment cross-bank clearing system" and a "mobile phone number networking verification platform", the specific data type definition ranges are also different, and on the basis of the data analysis, when the data types in the message format standard are newly increased and changed, the newly generated schema file needs to be manually verified again based on the message format standard, thereby reducing the verification efficiency and accuracy.
Disclosure of Invention
Aiming at the problems in the prior art, the application provides a message checking method and a message checking device, which can effectively improve the efficiency and the accuracy of message checking.
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 of the message format standard document according to preset key words and key information extraction rules, and combining the extracted key information and 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 comparing the message format standard document with 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 includes:
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 which is 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 if so, 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 the extracted key information and the node attribute information in the XML format message Schema file to obtain the first check character string further includes:
judging whether the data type of the message format standard document is an enumeration type;
and if so, 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.
In a second aspect, the present application provides a packet checking apparatus, including:
the first check character string determining module is used for extracting key information of the message format standard document according to preset key words and key information extraction rules, and combining the extracted key information and 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 verification comparison module is used for performing comparison operation of the message format standard document and the XML format message Schema file according to the first verification character string and the second verification 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, still include:
a digital identifier identification unit, configured to determine whether a digital identifier that is inconsistent with a node name of a 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 which is 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 determination module includes:
an enumeration type judgment unit, configured to judge whether the data type of the message format standard document is an enumeration type;
and an enumeration character string generating unit, configured to, if it is determined that the data type of the message format standard document is an enumeration type, combine to obtain a first check character string according to the extracted key information, node attribute information and node variable information in the XML format message Schema file.
In a third aspect, the present application provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the message verification method when executing the program.
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 described herein.
According to the technical scheme, the method and the device for checking the message are characterized in that key information of a message format standard document is extracted through preset keywords and key information extraction rules, a first check character string is obtained through combination according to the extracted key information and node attribute information in an XML format message Schema file, a second check character string is obtained according to the node information in the XML format message Schema file, and the comparison operation of the message format standard document and the XML format message Schema file is carried out through the first check character string and the second check character string, so that the efficiency and the accuracy of message checking 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 needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flow chart of a message verification method in an embodiment of the present application;
fig. 2 is a second schematic flowchart of a message verification method according to an embodiment of the present application;
fig. 3 is a third schematic flow chart of a message verification method in the embodiment of the present application;
fig. 4 is one of the structural diagrams of the message verification apparatus in the embodiment of the present application;
fig. 5 is a second structural diagram of a message checking apparatus in the 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
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, 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 obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Considering that in the prior art, when the data type in the message format standard is newly increased or changed, the newly generated schema file needs to be manually verified again based on the message format standard, therefore, the problem of reduced checking efficiency and accuracy is caused, the application provides a message checking method and a device, extracting key information from the message format standard document by presetting key words and key information extraction rules, and combining the extracted key information and the node attribute information in the XML format message Schema file to obtain a first check character string, then obtaining a second check character string according to the node information in the XML format message Schema file, and comparing the message format standard document with the XML format message Schema file through the first check character string and the second check character string, thereby effectively improving the message check efficiency and accuracy.
In order to effectively improve the efficiency and accuracy of message verification, the present application provides an embodiment of a message verification method, and 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 and the node attribute information in the XML format message Schema file to obtain a first check character string.
It can be understood that, when the standard document in the message format is aligned with an XML-format message Schema file (for example, the Schema file or the Schema compressed packet composed of a plurality of Schema files), the data type information to be aligned is usually recorded in the standard document in the message format in a table form, where table 1 below is a table example of one standard document in the message format:
table 1 table of standard document of message format
Figure BDA0002923016670000051
Optionally, the present application may extract the key information of the message format standard document by presetting a key word and a key information extraction rule, for example, obtaining the key information of the character string type in table 1 above by using the key word "N", and arranging the obtained key information by using a key information extraction rule, for example, when extracting the key information from the serial number a to the serial number D in table 1 above by using the key word "N", arranging three groups of information, namely "type name", "type definition", and "attachment description" sequentially into a character string, or an object having three member variables, and merging the three group of information into the library for temporary storage.
In other embodiments of the present application, a corresponding key information extraction rule may also be determined according to different data types in the message format standard document, for example, when it is determined that the data type in the message format standard document is an enumerated type, the determined key information is extracted, arranged, and stored in a tree form.
Optionally, the data in the message format standard document is classified and extracted through the above contents, and the specific classification standard may be:
the first type, containing variable types, represents strings and/or numbers fixed to a length of N bits, such as: MaxnXT, MaxnNumericText, ExactNText, ExactNNumTert.
The second category, including date and time type, represents a fixed format.
And the third category comprises currency symbols and money amounts.
In the fourth category, the data type is a finite value domain, which can be enumerated and divided into enumerated value definition classes.
Fifth, a special type expressed in a regular expression: indicating quantity, indicating interest rate, identifying banking institutions by means of BIC codes, etc.
The sixth type: other classifications, such as Any, are not resolved.
Optionally, the application may combine the extracted key information and the node attribute information in the XML format message Schema file to obtain the first check character string, that is, the basic composition form and the basic information of the first check character 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 to the set position of the first check character string, so that the complete first check character 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.
Optionally, the format of the XML-format message Schema file (i.e., the Schema file) may be analyzed, and information of each node of the XML-format message Schema file is extracted to generate a character string, i.e., a second check character string.
Step S103: and comparing the message format standard document with 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 comparison operation is, for example, whether the first check character string includes the second check character string, or whether the first check character string is equal to the second check character string, or the comparison operation may be performed according to other rules set by a human, which is not specifically limited in this application.
As can be seen from the above description, the message verification method provided in this embodiment of the application may extract key information from a standard document in a message format according to preset keywords and a key information extraction rule, combine the extracted key information and node attribute information in a message Schema file in an XML format to obtain a first check character string, then obtain a second check character string according to node information in the message Schema file in the XML format, and perform a comparison operation between the standard document in the message format and the message Schema file in the XML format through the first check character string and the second check character string, thereby effectively improving efficiency and accuracy of message verification.
In order to extract the key information from the message format standard document flexibly and accurately, in an embodiment of the message verification method of the present application, before the step S101, the following contents may be further included:
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 according to different data types in the message format standard document, for example, when it is determined that the data type in the message format standard document is an enumerated type, the determined key information is extracted, arranged, and stored in a tree form.
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 contents may be further included:
step S201: and judging whether a digital identifier which is 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: and if so, 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, there may be a situation where the XML-format message Schema file has a default node name with a numeric identifier due to an incomplete generation process, and at this time, the present application removes the numeric identifier in the node name or replaces the numeric identifier with a set identifier, such as "N", through a normative judgment on the node name of the XML-format message Schema file.
In other embodiments of the present application, the normative judgment for the node name of the XML format message Schema file is not limited to the judgment of the numeric identifier, and the judgment of other identifiers may be performed according to a customized rule.
In order to obtain an accurate check character string, in an embodiment of the message check method of the present application, referring to fig. 3, the step S101 may further specifically include the following steps:
step S301: and judging whether the data type of the message format standard document is an enumeration type.
Step S302: and if so, 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.
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, and when extracting the key information of the XML format message Schema file, the application may also extract the node variable information of the XML format message Schema file in addition to the node attribute information, thereby obtaining an accurate first check character string 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 apparatus for implementing all or part of the contents of the message verification method, and with reference to fig. 4, the message verification apparatus specifically includes the following contents:
the first check character string determining module 10 is configured to perform key information extraction on the message format standard document according to preset keywords and key information extraction rules, and combine the extracted key information and 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 verification 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 verification character string and the second verification character string, so as to obtain a comparison result.
As can be seen from the above description, the message verification apparatus provided in this embodiment of the application may extract key information from a standard document in a message format according to preset keywords and key information extraction rules, combine the extracted key information and node attribute information in a message Schema file in an XML format to obtain a first check character string, then obtain a second check character string according to node information in the message Schema file in the XML format, and perform a comparison operation between the standard document in the message format and the message Schema file in the XML format through the first check character string and the second check character string, thereby effectively improving efficiency and accuracy of message verification.
In order to extract the key information from the message format standard document flexibly and accurately, an embodiment of the message verification apparatus of the present application further 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 the verification comparison, in an embodiment of the message verification apparatus of the present application, the following contents are further specifically included:
and the digital identifier identification unit is used for judging whether a digital identifier which is inconsistent with the node name of the corresponding message format standard document exists in the node names 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 which is 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 character string, in an embodiment of the message check device of the present application, referring to fig. 5, the first check character string determining module 10 includes:
an enumeration type determining unit 11, configured to determine whether the data type of the message format standard document is an enumeration type.
An enumeration type character string generating unit 12, configured to, if it is determined that the data type of the message format standard document is an enumeration type, combine to obtain a first check character string according to the extracted key information, node attribute information and node variable information in the XML format message Schema file.
In terms of hardware, in order to effectively improve the efficiency and accuracy of message verification, the present 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 mutual communication through the bus; the communication interface is used for realizing information transmission between the message checking device and relevant equipment such as a core service system, a user terminal, a relevant database and the like; the logic controller may be a desktop computer, a tablet computer, a mobile terminal, and the like, but the embodiment is not limited thereto. In this embodiment, the logic controller may be implemented with reference to the embodiment of the message verification method and the embodiment of the message verification apparatus in the embodiment, and the contents thereof are incorporated herein, and repeated descriptions are 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), an in-vehicle device, a smart wearable device, and the like. Wherein, intelligence 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. The selection may be specifically performed according to the processing capability of the client device, the limitation of the user usage scenario, and the like. This is not a limitation of the present application. The client device may further include a processor if all operations are performed in the client device.
The client device may have a communication module (i.e., a communication unit), and may be communicatively connected to a remote server to implement data transmission with the server. The server may include a server on the task scheduling center side, and in other implementation scenarios, the server may also include a server on an intermediate platform, such as a server on a third party server platform that is communicatively linked to the task scheduling center server. The server may include a single computer device, or may include a server cluster formed by a plurality of servers, or a server structure of a distributed apparatus.
Fig. 6 is a schematic block diagram of a system configuration of an electronic device 9600 according to an embodiment of the present application. As shown in fig. 6, the electronic device 9600 can 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 structure to implement telecommunications or other functions.
In one embodiment, the message verification method function may be integrated into the central processor 9100. The central processor 9100 may be configured to control as follows:
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 and the 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 comparing the message format standard document with 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, in the electronic device provided in this embodiment of the present application, the key information of the standard document in the message format is extracted through preset keywords and key information extraction rules, the extracted key information and the node attribute information in the XML format message Schema file are combined to obtain the first check character string, the second check character string is obtained according to the node information in the XML format message Schema file, and the comparison operation between the standard document in the message format and the XML format message Schema file is performed through the first check character string and the second check character string, so that the efficiency and the accuracy of message check are effectively improved.
In another embodiment, the message checking apparatus may be configured separately from the central processing unit 9100, for example, the message checking apparatus may be configured as a chip connected to the central processing unit 9100, and the message checking method function is realized by the control of the central processing unit.
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 also does not necessarily include all of the components shown in fig. 6; further, the electronic device 9600 may further include components not shown in fig. 6, which may be referred to in the art.
As shown in fig. 6, a central processor 9100, sometimes referred to as a controller or operational control, can include a microprocessor or other processor device and/or logic device, which central processor 9100 receives input and controls the operation of the various components of the electronic device 9600.
The memory 9140 can 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 relating to the failure may be stored, and a program for executing the information may be stored. And the central processing unit 9100 can execute the program stored in the memory 9140 to realize information storage or processing, or 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. Power supply 9170 is used to provide power to electronic device 9600. The display 9160 is used for displaying display objects such as images and characters. The display may be, for example, an LCD display, but is not limited thereto.
The memory 9140 can be a solid state memory, e.g., Read Only Memory (ROM), Random Access Memory (RAM), a SIM card, or the like. There may also be a memory that holds information even when power is off, can be selectively erased, and is provided with more data, an example of which is sometimes called an EPROM or the like. The memory 9140 could also be some other type of device. 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 being used for storing application programs and function programs or for executing a flow of operations of the electronic device 9600 by the central processor 9100.
The memory 9140 can also include a data store 9143, the data store 9143 being used to store 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 for the electronic device for communication functions and/or for performing other functions of the electronic device (e.g., messaging applications, contact book applications, etc.).
The communication module 9110 is a transmitter/receiver 9110 that transmits and receives signals via an antenna 9111. The communication module (transmitter/receiver) 9110 is coupled to the central processor 9100 to provide input signals and receive output signals, which may be the same as in the case of a conventional mobile communication terminal.
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, 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 receive audio input from the microphone 9132, thereby implementing ordinary telecommunications functions. The audio processor 9130 may include any suitable buffers, decoders, amplifiers and so forth. In addition, the audio processor 9130 is also coupled to the central processor 9100, thereby enabling recording locally through the microphone 9132 and enabling locally stored sounds to be played through the speaker 9131.
An embodiment of the present application further provides a computer-readable storage medium capable of implementing all steps in the message verification method with an execution subject being a server or a client in the foregoing 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 steps of the message verification method with an execution subject being a server or a client in the foregoing embodiments, for example, when the processor executes the computer program, the processor implements the following steps:
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 and the 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 comparing the message format standard document with 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, in the computer-readable storage medium provided in this embodiment of the present application, key information extraction is performed on a standard document in a message format through preset keywords and key information extraction rules, and according to the extracted key information and node attribute information in a message Schema file in an XML format, a first check character string is obtained through combination, and then a second check character string is obtained according to node information in the message Schema file in the XML format, and a comparison operation between the standard document in the message format and the message Schema file in the XML format is performed through the first check character string and the second check character string, so that efficiency and accuracy of message check are effectively improved.
As will be appreciated by one skilled in the art, 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 flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams 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 principle and the implementation mode of the invention are explained by applying specific embodiments in the invention, and the description of the embodiments is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A message checking method is characterized in that the method comprises the following steps:
extracting key information of the message format standard document according to preset key words and key information extraction rules, and combining the extracted key information and 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 comparing the message format standard document with 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 message verification method according to claim 1, before extracting the key information from the message format standard document according to the preset key words and the key information extraction 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 message verification method according to claim 1, wherein 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 which is 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 if so, 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 message verification method according to claim 1, wherein the combining, according to the extracted key information and node attribute information in the XML-format message Schema file, obtains a first verification character string, further comprising:
judging whether the data type of the message format standard document is an enumeration type;
and if so, 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.
5. A message verification apparatus, comprising:
the first check character string determining module is used for extracting key information of the message format standard document according to preset key words and key information extraction rules, and combining the extracted key information and 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 verification comparison module is used for performing comparison operation of the message format standard document and the XML format message Schema file according to the first verification character string and the second verification character string to obtain a comparison result.
6. The message checking device according to 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 checking device according to claim 5, further comprising:
a digital identifier identification unit, configured to determine whether a digital identifier that is inconsistent with a node name of a 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 which is 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 checking device according to claim 5, wherein the first check string determining module comprises:
an enumeration type judgment unit, configured to judge whether the data type of the message format standard document is an enumeration type;
and an enumeration character string generating unit, configured to, if it is determined that the data type of the message format standard document is an enumeration type, combine to obtain a first check character string according to the extracted key information, node attribute information and node variable information in the XML format message Schema file.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the steps of the message verification method according to any of claims 1 to 4 are implemented when the program is executed by the processor.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the message checking method according to any one of claims 1 to 4.
CN202110123763.5A 2021-01-29 2021-01-29 Message verification method and device Active CN112784112B (en)

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 true CN112784112A (en) 2021-05-11
CN112784112B 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)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113569106A (en) * 2021-06-16 2021-10-29 东风汽车集团股份有限公司 CAN data identification method, device and equipment
CN114070761A (en) * 2021-11-11 2022-02-18 北京轨道交通路网管理有限公司 Protocol message detection method, device and electronic equipment
CN114372025A (en) * 2021-11-26 2022-04-19 浪潮通信信息系统有限公司 Consistency checking method and device for distributed edge cloud edge nodes
CN114629961A (en) * 2022-03-17 2022-06-14 中国农业银行股份有限公司 A kind of message format verification method and related equipment
CN119377173A (en) * 2024-12-26 2025-01-28 深圳泊松软件技术有限公司 Data storage method, device, terminal equipment and computer readable storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040167864A1 (en) * 2003-02-24 2004-08-26 The Boeing Company Indexing profile for efficient and scalable XML based publish and subscribe system
US20050268223A1 (en) * 2004-05-28 2005-12-01 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
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

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040167864A1 (en) * 2003-02-24 2004-08-26 The Boeing Company Indexing profile for efficient and scalable XML based publish and subscribe system
US20050268223A1 (en) * 2004-05-28 2005-12-01 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
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)

* Cited by examiner, † Cited by third party
Title
DEBARSHI RAHA ET AL.: "Automation Method for testing XML/DB/XML Layers", 《2008 INTERNATIONAL CONFERENCE ON SOFTWARE TESTING, VERIFICATION, AND VALIDATION》, pages 458 - 464 *
冯新;夏靖波;范海宁;: "雷达情报的XML标准化描述及格式转换", 火力与指挥控制, no. 09, pages 147 - 151 *
邓子云等: "一种XML报文自动处理引擎的关键技术", 《西南科技大学学报》, pages 76 - 80 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113569106A (en) * 2021-06-16 2021-10-29 东风汽车集团股份有限公司 CAN data identification method, device and equipment
CN113569106B (en) * 2021-06-16 2023-10-13 东风汽车集团股份有限公司 CAN data identification method, device and equipment
CN114070761A (en) * 2021-11-11 2022-02-18 北京轨道交通路网管理有限公司 Protocol message detection method, device and electronic equipment
CN114070761B (en) * 2021-11-11 2023-09-26 北京轨道交通路网管理有限公司 Protocol message detection method and device and electronic equipment
CN114372025A (en) * 2021-11-26 2022-04-19 浪潮通信信息系统有限公司 Consistency checking method and device for distributed edge cloud edge nodes
CN114629961A (en) * 2022-03-17 2022-06-14 中国农业银行股份有限公司 A kind of message format verification method and related equipment
CN119377173A (en) * 2024-12-26 2025-01-28 深圳泊松软件技术有限公司 Data storage method, device, terminal equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN112784112B (en) 2023-06-27

Similar Documents

Publication Publication Date Title
CN112784112B (en) Message verification method and device
CN106487907B (en) Method and system for sharing promotion information
CN112463634B (en) Software testing method and device under micro-service architecture
CN111369247A (en) Cross-bank transaction data processing method and device
CN113157345B (en) Front-end engineering automatic starting method and device
CN113110829B (en) Multi-UI component library data processing method and device
CN110515951A (en) A BOM standardization method, system, electronic equipment and storage medium
CN114153856B (en) Host data double-writing method and device
CN112463799B (en) Data extraction method, device, equipment and storage medium
CN113342330B (en) Front-end engineering generation method and device
CN112799943A (en) Automatic testing method and device for business system
CN112579773A (en) Risk event grading method and device
CN112766827A (en) Automatic processing method and device for asset inventory data
CN113553530A (en) Information reporting dynamic page configuration method and device
CN113158635A (en) Electronic report generation method and device
CN113609017A (en) Interface test case generation method and device
CN111598539B (en) CICS online program service processing method and system based on service modeling
CN109120509B (en) Information collection method and device
CN113791984B (en) Automatic interface testing method and device
CN113190460B (en) Automatic test case generation method and device
CN115495519A (en) Report data processing method and device
CN115827833A (en) Dialog structure processing method and device, storage medium and electronic equipment
CN115422584A (en) Data deformation method and device
CN112905623B (en) A method and device for displaying business data combination
CN113157277B (en) Host file processing method and device

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