Message visualization processing device, method, electronic device and medium
The visual processing device enhances message visualization by configuring data dictionary and converter libraries to parse and convert messages into XML and Json formats, addressing the limitations of existing tools and improving message understanding and processing efficiency.
Patent Information
- Application Number
- CN202410672777.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-28
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2044-05-28
AI Technical Summary
Existing message visualization tools struggle with complex communication protocols like financial information protocols, lacking intuitive and multi-format output, and often result in missing message elements during system development.
A visual processing device and method that configures data dictionary and converter libraries to parse and convert messages into XML and Json formats, generating formatted texts and automatically generating message construction and parsing codes, enhancing message understanding and processing.
Enriches message visualization, making it easier for practitioners to understand complex protocols and developers to manage message elements, expanding the technology's application scenarios.
Smart Images

Figure CN118433051B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data communication, and in particular to a visual processing device, method, electronic equipment and medium for a message. Background Art
[0002] Data communication between communication systems usually uses various messages to transmit data. A message is a structured data format used to transmit data in a network. It is a data unit exchanged and transmitted in a network (i.e., a block of data to be sent by a station at one time). A message contains the complete data information to be sent, and its length is unlimited and variable. A message usually consists of two parts: a message header and a message body. The message header is usually used to indicate the control information of the message, and the message body contains the specific data content (i.e., the transmitted data). The length of the message header is usually fixed, and the length of the message body can be changed as needed. A message tail can also be set as needed to verify and terminate a message.
[0003] Different electronic communication protocols define different message formats and specifications. Messages are organized based on the protocol defined by file transfer. Taking the financial industry as an example, the IMIX protocol (i.e., the Inter-bank Market Information Exchange protocol) and the FIX protocol (i.e., the Financial Information Exchange protocol) are widely used in international and domestic interbank trading platforms for transmitting market information and reaching transactions. Since the FIX protocol is an open protocol, all international financial institutions can change or expand the protocol based on the standard according to their own business needs. Each institution will configure a set of protocol dictionaries according to its own business needs. After receiving the message, users (mainly financial practitioners) need to refer to the protocol dictionary of the institution to accurately understand the meaning of the message. The IMIX protocol is an extension of the FIX protocol in the domestic interbank market and is maintained by the foreign exchange trading center.
[0004] As an example, the IMIX message sample and the FIX message sample are as follows:
[0005] IMIX message example
[0006]
[0007] FIX message example
[0008]
[0009]
[0010] The above message information display is not intuitive enough and does not conform to human language specifications, making it difficult for users to read. Moreover, although users can understand the meaning of some message contents based on the memorized message formats and specifications (such as EUR / USD representing currency pair codes), users need to refer to relevant interface documents or data dictionaries to understand the meaning of some information, which reduces the efficiency of message reading and understanding. If the efficiency of understanding is improved by memorizing message formats and specifications, higher requirements are placed on users, increasing the memory burden of users.
[0011] Based on this, the prior art also provides some interface development kits for these protocols to provide formatted output code functions, so as to facilitate users to read and understand the messages. For example, the existing IMIX / FIX messages usually support output in the following XML format:
[0012]
[0013]
[0014] The above XML format text increases readability (more in line with human reading habits) and intuitiveness, however, the format diversity is not enough, and the text display is still not friendly enough. For example, it is difficult for users to intuitively see the name of each field, and the enumeration value can only see the number, and it is still difficult to understand the meaning of the enumeration value. Moreover, the message content provided by the original interface development kit provided by the protocol is often not rich enough to meet the user's needs for reading and understanding the message.
[0015] For texts in common formats such as XML and Json, the existing technology also provides some visualization tools to assist formatting to improve the friendliness of text reading. However, the existing visualization tools can often only perform simple scaling, line breaks and other formatted output based on the original text of XML and Json. For example, the original XML text of the message is as follows:
[0016]
[0017] The formatted output text is as follows (with line breaks):
[0018]
[0019] It can be seen that the existing message visualization can only perform relatively simple message parsing and formatting processing, and is difficult to apply to message processing in complex communication protocols (such as financial information protocols, where the protocol services are complex and diverse, and there are many message types and message fields). How to achieve multi-business message parsing and multi-format output is a technical problem that needs to be solved urgently.
[0020] On the other hand, since financial business messages usually have many message elements, system developers are prone to omission of message elements when constructing and parsing messages. Whether more support functions can be provided on the basis of formatted output to meet message processing needs is also a technical problem that needs to be solved urgently. Summary of the invention
[0021] The purpose of the present invention is to overcome the deficiencies of the prior art and provide a visual processing device, method, electronic device and medium for messages. The message visualization solution provided by the present invention configures different data dictionary libraries and converter libraries corresponding to different types of messages. By configuring the data dictionary library and the converter library, it is possible to visualize various types of messages in various data formats, and the formatted information is richer. Furthermore, a data organization method for formatting the IMIX / FIX message object of the financial business message into XML format and Json format is provided, which realizes the parsing and format conversion of various types of financial business messages, and facilitates financial technology practitioners to be familiar with, apply and consult relevant message protocols. Furthermore, on the basis of formatted presentation, a method for automatically generating message construction code and message parsing code according to the IMIX / FIX message object is also provided, which can assist developers in message processing, effectively solve the problem of missing message elements, and expand the application scenarios of message visualization technology.
[0022] To achieve the above objectives, the present invention provides the following technical solutions:
[0023] A visual processing device for a message, comprising a visual user interaction interface, and further comprising:
[0024] A collection module, used to obtain original messages;
[0025] An identification module is used to identify the message type of the original message according to the acquired original message and extract the message content;
[0026] A formatting module is used to parse and convert the message content, and generate corresponding formatted text after obtaining structured data that meets the preset format specification; wherein, different data dictionary libraries and converter libraries are configured for different types of messages, and the data dictionary library includes multiple data dictionary files to adapt to different versions of protocols under the same message type, and different versions of protocols correspond to different data dictionary files; the converter library includes multiple converters to adapt to format conversion of multiple formats, and one converter corresponds to a structured data conversion mapping rule of a preset format. The converter converts the message content according to the corresponding structured data conversion mapping rule based on the parsing result to obtain structured data that meets the preset format specification; the formatting module can obtain the corresponding data dictionary library and converter library according to the message type to which the original message belongs, and then parse and convert the message content;
[0027] The visualization module is used to obtain one or more formatted texts generated for the aforementioned original message, and display the formatted texts in a preset manner in the formatted text display bar.
[0028] Further, the collection module includes a message information collection bar displayed on the visual user interaction interface, and the original message input or imported by the user is obtained through the message information collection bar;
[0029] When the original message corresponds to multiple formatted texts, the visualization module is preset with a default format, and the formatted text of the default format is first displayed in the formatted text display bar; and a format switching trigger item is set corresponding to the formatted text display bar, and different formatted texts are switched and displayed according to the user's operation on the format switching trigger item.
[0030] Further, the identification module is configured to: identify the original message in the collection module, obtain the message header and message body information of the original message, and determine the message type according to the message header;
[0031] The identification module supports multiple types of message identification.
[0032] Further, the formatting module is configured to: for different types of messages, use different Java protocol packages to parse and obtain Java objects corresponding to the messages; the Java protocol package is configured with a data dictionary file in XML format, and when parsing the message, obtain the corresponding relationship between the tag and the domain name, the corresponding relationship between the enumeration value and the enumeration name, and the type information of the domain of each domain in the message from the data dictionary file, and then determine the corresponding domain name through the domain tag, and determine the corresponding enumeration name through the enumeration value;
[0033] For Java objects, all elements in the object and the types of the elements are recursively traversed to obtain the message structure and transaction data of the message; based on the message structure and transaction data, the converter performs data conversion according to the structured data conversion mapping rules corresponding to each format to obtain formatted text in multiple formats.
[0034] Furthermore, the message types include IMIX messages and FIX messages; for IMIX messages, the IMIX protocol package IMIXProtocol.jar provided by the foreign exchange trading center is used for message parsing; for FIX messages, the FIX protocol package is configured based on the open source QuickfixJ project and the interface guidance for message parsing provided by each trading platform, and then the message is parsed through the FIX protocol package;
[0035] For Java objects, recursively traverse all elements in the IMIX or FIX object and the types of the elements to obtain the message structure and transaction data of the message; based on the message structure and transaction data, the converter performs format conversion according to the structured data conversion mapping rules corresponding to each format to obtain formatted text in multiple formats.
[0036] Furthermore, the preset formats configured in the converter library include at least XML format and Json format;
[0037] In the XML format, each element node is the English name of the domain, the element value is the domain value in the IMIX message or FIX message, and the domain ID is configured in the attribute node Tag; for enumeration values, the enumeration name of the corresponding value in the data dictionary is used to fill in the element value, and the original enumeration value is represented by adding the Value field in the attribute Attribute;
[0038] In the Json format, the message structure is organized by the English name of the domain and the value of the domain. The value of the domain is displayed after the English name of the domain, and the English name and the value of the domain are separated by a preset separator.
[0039] Furthermore, the preset formats configured in the converter library also include Java Get code format text and Java Set code format text, wherein the Java Get code is used to construct a message, and the Java Set code is used to parse a message;
[0040] In the generated Java Get code format text, each repeating group generates a build function, which is called in the function of the upper structure; when constructing the message object, the content in the message is used as the sample value to fill in; and the value is filled in according to the type of the field. When the field type is a string, the value is filled in with double quotes; when the field type is an enumeration value, the corresponding value in the definition of the data dictionary is taken to fill in the value;
[0041] In the generated Java Set code format text, a parse function is generated for each repeating group and called in the function of the upper structure; when parsing the message object, the content in the message is displayed in the form of comments on the right side of the code; and the code is configured according to the type of the domain. When the type of the domain is a string, the getString statement code is generated, and when the type of the domain is an enumeration value or an integer, the getInt statement code is generated; when the type of the domain is a repeating group, the domains in each repeating group are looped through for parsing.
[0042] The present invention also provides a method for visual processing of a message, comprising the following steps:
[0043] Get the original message;
[0044] According to the obtained original message, the message type of the original message is identified, and the message content is extracted;
[0045] Parse and convert the message content, obtain structured data that meets the preset format specification, and then generate the corresponding formatted text; wherein, different data dictionary libraries and converter libraries are configured for different types of messages, and the data dictionary library includes multiple data dictionary files to adapt to different versions of message protocols under the same message type, and different versions of message protocols correspond to different data dictionary files; the converter library includes multiple converters to adapt to format conversion of multiple formats, and one converter corresponds to a structured data conversion mapping rule of a preset format. The converter converts the message content according to the corresponding structured data conversion mapping rule based on the parsing result to obtain structured data that meets the preset format specification; the formatting module can obtain the corresponding data dictionary library and converter library according to the message type to which the original message belongs, and then parse and convert the message content;
[0046] One or more formatted texts generated for the aforementioned original message are obtained, and are visually displayed in a preset manner in the formatted text display bar.
[0047] The present invention further provides an electronic device, comprising:
[0048] A memory storing at least one instruction;
[0049] The processor executes the instructions stored in the memory to perform the method as described above.
[0050] The present invention also provides a computer-readable storage medium storing a computer program, wherein the computer program implements the above-mentioned method when executed by a processor.
[0051] Due to the adoption of the above technical scheme, the present invention has the following advantages and positive effects compared with the prior art, as an example: the message visualization scheme provided by the present invention configures different data dictionary libraries and converter libraries corresponding to different types of messages, and realizes the visualization presentation of various types of messages in various data formats by configuring the data dictionary library and the converter library, and the formatted display information is richer.
[0052] Furthermore, a data organization method for formatting financial business message IMIX / FIX message objects into XML format and Json format is given, which realizes the parsing and format conversion of various types of financial business messages, making it easier for financial technology practitioners to become familiar with, apply and consult relevant message protocols.
[0053] Furthermore, on the basis of formatted presentation, it also provides the function of automatically generating message construction Java Get code and message parsing Java Set code according to IMIX / FIX message objects, which can assist developers in message processing, effectively solve the problem of missing message elements, and expand the application scenarios of message visualization technology. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 An information transmission diagram for visual processing of messages provided in an embodiment of the present invention.
[0055] Figure 2 This is an example diagram of a visual operation interface for a message provided in an embodiment of the present invention.
[0056] Figure 3 Defines information for the QuoteStatus fields.
[0057] Figure 4 This is an example diagram of the XML format and Json format text obtained by conversion provided in the embodiment of the present invention.
[0058] Figure 5 An example diagram of the Java Get code (constructing a message) and the Java Set code (parsing a message) obtained by conversion provided in an embodiment of the present invention.
[0059] Figure 6 A flow chart of a method for visual processing of messages provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0060] The following is a further detailed description of the visualization processing device, method, electronic device and medium of the message disclosed in the present invention in conjunction with the drawings and specific embodiments. It should be noted that the technology (including methods and devices) known to ordinary technicians in the relevant field may not be discussed in detail, but in appropriate cases, the above-mentioned known technology is considered to be part of the specification. At the same time, other examples of the exemplary embodiment may have different values. The structures, proportions, sizes, etc. illustrated in the drawings of this specification are only used to match the contents disclosed in the specification for people familiar with this technology to understand and read, and are not used to limit the limiting conditions for the implementation of the invention.
[0061] In the description of the embodiments of the present application, " / " means or, and "and / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" means: A and B exist alone, B exists alone, and A and B exist at the same time. In the description of the embodiments of the present application, "multiple" means two or more.
[0062] The technical concept and solution of the present invention are introduced below based on exemplary application scenarios.
[0063] Example
[0064] A visual processing device for messages comprises a visual user interaction interface, and the device also comprises a message collection module, an identification module, a formatting module and a visualization module.
[0065] The acquisition module is used to acquire original messages and supports multiple types of messages. In specific implementation, the acquisition module may include a message information acquisition bar displayed on the visual user interaction interface, and the original message input or imported by the user is acquired through the message information acquisition bar.
[0066] See also Figure 1 and 2 As shown, for example, rather than by way of limitation, a user may copy the original IMIX message or FIX message to be converted and paste it into the message information collection column of the user interaction interface, for example Figure 2 The Command input area in .
[0067] The identification module is used to identify the message type to which the original message belongs and extract the message content according to the acquired original message. The identification module supports multiple types of message identification.
[0068] In a specific implementation, the identification module is configured to: identify the original message in the collection module, obtain the message header and message body information of the original message, and determine the corresponding message type according to the message header.
[0069] Taking the IMIX message as an example, the IMIX message consists of three parts: the standard message header (i.e. Header), the message body (i.e. Body) and the message trailer (i.e. Trailer). The message header indicates basic control information such as the message type, message body length, sending destination, message sequence number, sending start point and sending time. The message body is also called the message body, which mainly describes the business information at the application level. Each session message or application message has a message trailer and ends with it. It can be used to separate multiple messages and includes checksums. Each component is composed of a series of "domains", each of which can contain several domains, domain blocks, components and / or repeating groups, etc. A repeating group contains multiple blocks, and a repeating group can be nested (child repeating group and parent repeating group).
[0070] In this way, the corresponding message type can be determined by identifying the fields in the message header of the original message. When the first field in the message header of the original message is 8=IMIX (indicating the message type), it means that the message is an IMIX message; when the first field in the message header of the original message is 8=FIX (indicating the message type), it means that the message is a FIX message.
[0071] The formatting module is used to parse and convert the message content, and generate corresponding formatted text after obtaining structured data that meets the preset format specifications.
[0072] The preset format may be, for example, an XML format. At this time, the formatting module can parse and convert the message content of the IMIX / FIX message, obtain structured data that conforms to the XML format specification, and then generate a corresponding XML format message (XML formatted text). The XML format message is consistent with the transaction data (or business data) recorded in the original IMIX / FIX message, but the data structure is different.
[0073] The preset format may be, for example, a Json format. At this time, the formatting module can parse and convert the message content of the IMIX / FIX message, obtain structured data that conforms to the Json format specification, and generate a corresponding Json format message (Json formatted text). The Json format message is consistent with the transaction data (or business data) recorded in the original IMIX / FIX message, but the data structure is different.
[0074] Different data dictionary libraries and converter libraries are configured corresponding to different types of messages.
[0075] The data dictionary library includes multiple data dictionary files to adapt to different versions of message protocols under the same message type (for message protocols, data dictionaries can also be called protocol dictionaries), and different versions of message protocols correspond to different data dictionary files. As an example, taking the IMIX message protocol as an example, including the IMIX10 version and the IMIX20 version, there are corresponding IMIX10 data dictionary files and IMIX20 data dictionary files respectively. For another example, the FIX protocol corresponds to the 360T version, Bloomberg version, UBS version, DB version, HSBC version, MS version, BARC version, GS version, etc. (FIX protocol is an open protocol, and each international financial institution will change or expand the protocol based on the standard protocol according to its own business needs to form its own FIX protocol version). The corresponding different versions of the FIX protocol have different data dictionary files (each institution has its own set of protocol dictionaries), see Figure 1 shown.
[0076] The converter library includes multiple converters to adapt to multiple formats, such as XML format and Json format conversion. One converter corresponds to a structured data conversion mapping rule of a preset format, which is used to convert the original IMIX / FIX message structure into a message structure of XML format and Json format. Specifically, the converter converts the message content according to the corresponding structured data conversion mapping rule based on the parsing result to obtain structured data that conforms to the preset format specification.
[0077] In this embodiment, the formatting module can obtain the corresponding data dictionary library and converter library according to the message type to which the original message belongs, and then parse and convert the message content based on multiple data dictionary files in the data dictionary library and multiple converters in the converter library to obtain a formatted text in a preset format.
[0078] In specific implementation, the formatting module is configured to: for different types of messages, use different Java protocol packages to parse and obtain the Java object corresponding to the message. The Java protocol package is configured with a data dictionary file, and the data dictionary file adopts XML format. When parsing the message, the corresponding relationship between the tag and the domain name, the corresponding relationship between the enumeration value and the enumeration name, and the type information of the domain are obtained from the data dictionary file for each domain in the message, and the corresponding domain name is determined by the domain tag, and the corresponding enumeration name is determined by the enumeration value.
[0079] By way of example and not limitation, see Figure 3 As shown in the figure, the domain definition information of QuoteStatus in the data dictionary file is given as an example. Assume that the original IMIX message content is as follows:
[0080]
[0081] The message contains the transaction data "297=16". Through the data dictionary file, we can find the corresponding domain name QuoteStatus from Tag 297 in the message and find the corresponding enumeration name NORMAL from the enumeration value 16. In this way, in the converted formatted text, the corresponding domain name is displayed for the corresponding domain Tag, and the corresponding enumeration name is displayed for the corresponding enumeration value.
[0082] For Java objects, all elements and element types in the object are recursively traversed to obtain the message structure and transaction data of the message. According to the message structure and transaction data, the converter performs data conversion according to the structured data conversion mapping rules corresponding to each format to obtain formatted text in multiple formats.
[0083] In this embodiment, the message types include IMIX messages and FIX messages. For IMIX messages, the IMIX protocol package IMIXProtocol.jar (providing a data dictionary) provided by the foreign exchange trading center can be directly used to perform message parsing. For FIX messages, the FIX protocol package can be configured based on the open source QuickfixJ project and the interface guidance for message parsing provided by each trading platform, and then the message parsing can be performed through the FIX protocol package. For example, Bloomberg's FIX protocol package quickfixj-message-fix44-bbg-1.0.5-SNAPSHOT.jar and UBS's FIX protocol package quickfixj-messages-fix43-ubs-1.0.0-SNAPSHOT.jar.
[0084] For Java objects, recursively traverse all elements and element types in IMIX and FIX objects to obtain the message structure and transaction data of the message; according to the message structure and transaction data, the converter performs format conversion according to the structured data conversion mapping rules corresponding to each format to obtain formatted text in multiple formats. For example, the converter performs data format conversion on the original message content according to the structured data conversion mapping rules corresponding to the XML format and the Json format to obtain formatted text in the XML format and the Json format.
[0085] Specifically, in the XML format, each element node is the English name of a domain, the value of the element is the domain value in the IMIX message or the FIX message, and the domain ID is configured in the attribute node Tag.
[0086] If it is an enumeration value, the corresponding value in the data dictionary is used to fill in the value of the Element, and the original enumeration value is represented by adding the Value field in the attribute. For example, the value 16 in the QuoteStatus message corresponds to the enumeration name NORMAL.
[0087] In the Json format, only the English name of the field and the value of the field are used to organize the entire message structure. For details, see Figure 4 As shown, the value of the field is displayed after the English name of the field, and the English name and the value of the field are separated by a preset separator.
[0088] The visualization module is used to obtain one or more formatted texts generated for the aforementioned original message, and display the formatted texts in a preset manner in the formatted text display bar.
[0089] When the original message corresponds to multiple formatted texts, the visualization module is preset with a default format, and the formatted text of the default format is first displayed in the formatted text display bar; and a format switching trigger item is set corresponding to the formatted text display bar, and different formatted texts are switched and displayed according to the user's operation on the format switching trigger item.
[0090] For specific implementation, please refer to Figure 1 As shown, two buttons -Display and Display+ are displayed behind the Command bar of the visual user interaction interface for users to switch the message presentation format (switch between format 1, format 2, ... format N), or, a switching shortcut key is configured for users to switch the message presentation format. For example, by configuring Ctrl+> and Ctrl+<, two shortcut keys are configured for users to switch and display texts in different formats.
[0091] In another implementation of this embodiment, the preset format configured in the converter library may also include a Java Get code format text and a Java Set code format text, wherein the Java Get code is used to construct a message, and the Java Set code is used to parse a message.
[0092] In the generated Java Get code format text, each repeating group generates a build function (a function used to create an entity object), which is called in the function of the upper structure; when constructing a message object, the content in the message is used as a sample value to fill in. In addition, the value is filled in according to the type of the field. When the field type is a string, the value is filled in with double quotes; when the field type is an enumeration value, the corresponding value in the definition of the data dictionary is taken to fill in the value.
[0093] In the generated Java Set code format text, each repeating group generates a parse function (a function used to parse a string) and is called in the function of the upper structure; when parsing a message object, the content in the message is displayed on the right side of the code in the form of comments. In addition, the code is configured according to the type of the domain. When the type of the domain is a string, the getString statement code is generated; when the type of the domain is an enumeration value or an integer, the getInt statement code is generated; when the type of the domain is a repeating group, the domains in each repeating group are looped through for parsing, see Figure 5 shown.
[0094] The above-mentioned visualization scheme provided by the present invention can present various financial business messages in various visualization modes through the data dictionary library and the converter library, and at the same time provides a method for formatting FIX / IMIX message objects into XML and Json formats, enriching the message formatting display information, and at the same time facilitating financial technology practitioners to be familiar with, apply, and consult relevant message protocols, thereby improving message processing efficiency. On the basis of formatting presentation, it also provides the function of automatically generating message construction Java Get code and message parsing Java Set code according to IMIX / FIX message objects, which can assist developers in message processing, effectively solve the problem of missing message elements, and expand the application scenarios of message visualization technology.
[0095] See also Figure 6 As shown, a method for visual processing of a message according to the present invention is provided. The method comprises the following steps:
[0096] S100: Obtain the original message.
[0097] S200, identifying the message type to which the original message belongs, and extracting the message content.
[0098] S300, message formatting processing. Parse and convert the message content, and generate the corresponding formatted text after obtaining structured data that meets the preset format specification. Wherein, different data dictionary libraries and converter libraries are configured for different types of messages, and the data dictionary library includes multiple data dictionary files to adapt to different versions of message protocols under the same message type, and different versions of message protocols correspond to different data dictionary files; the converter library includes multiple converters to adapt to format conversion of multiple formats, and one converter corresponds to a structured data conversion mapping rule of a preset format. The converter converts the message content according to the corresponding structured data conversion mapping rule based on the parsing result to obtain structured data that meets the preset format specification; the formatting module can obtain the corresponding data dictionary library and converter library according to the message type to which the original message belongs, and then parse and convert the message content.
[0099] S400, obtaining one or more formatted texts generated for the aforementioned original message, and visually displaying them in a formatted text display bar in a preset manner.
[0100] For other technical features, please refer to the description of the previous embodiment and will not be repeated here.
[0101] The present invention further provides an electronic device, comprising:
[0102] A memory storing at least one instruction;
[0103] The processor executes the instructions stored in the memory to perform the method as described above.
[0104] For other technical features, please refer to the description of the previous embodiment and will not be repeated here.
[0105] The present invention also provides a computer-readable storage medium for storing a computer program that can be executed by a processing unit, wherein the computer program implements the above-mentioned method when executed by the processing unit.
[0106] The storage medium may include any medium that can store program codes, such as a USB flash drive, a mobile hard disk, a read only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0107] For other technical features, please refer to the description of the previous embodiment and will not be repeated here.
[0108] In the above description, the disclosure of the present invention is not intended to limit itself to these aspects. Rather, within the scope of the target protection of the present disclosure, the components can be selectively and operatively combined in any number. In addition, terms such as "include", "encompass" and "have" should be interpreted as inclusive or open by default, rather than exclusive or closed, unless they are explicitly defined to the contrary. All technical, scientific or other terms are consistent with the meanings understood by those skilled in the art, unless they are defined to the contrary. Common terms found in dictionaries should not be interpreted too idealistically or too impractically in the context of relevant technical documents, unless the present disclosure explicitly defines them as such. Any changes and modifications made by a person of ordinary skill in the field of the present invention based on the above disclosure belong to the scope of protection of the claims.
Claims
1. A visual processing device for a message, comprising a visual user interaction interface, characterized in that include: A collection module, used to obtain original messages; An identification module is used to identify the original message according to the obtained original message, obtain the message header and message body information of the original message, the message body is the message body, which is used to describe the business information at the application level, determine the message type to which the original message belongs according to the message header, and extract the message content; A formatting module, used to parse and convert the message content, and generate corresponding formatted text after obtaining structured data that meets the preset format specification; wherein, different data dictionary libraries and converter libraries are configured for messages of different message types, and the data dictionary library includes multiple data dictionary files to adapt to different versions of message protocols under the same message type, and different versions of message protocols correspond to different data dictionary files; the converter library includes multiple converters to adapt to format conversion of multiple formats, and one converter corresponds to a structured data conversion mapping rule of a preset format, and the converter converts the message content according to the corresponding structured data conversion mapping rule based on the parsing result to obtain structured data that meets the preset format specification; the formatting module can obtain the corresponding data dictionary library and converter library according to the message type to which the original message belongs, and parse and convert the message content based on the multiple data dictionary files in the data dictionary library and the multiple converters in the converter library; The visualization module is used to obtain one or more formatted texts generated for the aforementioned original message, and display the formatted texts in a preset manner in the formatted text display bar.
2. The message visualization processing device according to claim 1, characterized in that: The collection module includes a message information collection bar displayed on the visual user interaction interface, and the original message input or imported by the user is obtained through the message information collection bar; When the original message corresponds to multiple formatted texts, the visualization module presets a default format, and the formatted text of the default format is first displayed in the formatted text display bar; Furthermore, a format switching trigger item is provided corresponding to the formatted text display bar, and different formatted texts are switched and displayed according to the user's operation on the format switching trigger item.
3. The message visualization processing device according to claim 1, characterized in that: The identification module supports multiple types of message identification.
4. The message visualization processing device according to claim 1, characterized in that: The formatting module is configured to: use different Java protocol packages to parse different types of messages to obtain Java objects corresponding to the messages; the Java protocol package is configured with a data dictionary file in XML format, and when parsing the message, obtain the corresponding relationship between the tag and the domain name, the corresponding relationship between the enumeration value and the enumeration name, and the type information of the domain in each domain in the message from the data dictionary file, and then determine the corresponding domain name through the domain tag, and determine the corresponding enumeration name through the enumeration value; For Java objects, all elements in the object and the types of the elements are recursively traversed to obtain the message structure and transaction data of the message; based on the message structure and transaction data, the converter performs data conversion according to the structured data conversion mapping rules corresponding to each format to obtain formatted text in multiple formats.
5. The message visualization processing device according to claim 4, characterized in that: The message types include IMIX messages and FIX messages. For IMIX messages, the IMIX protocol package IMIXProtocol.jar provided by the foreign exchange trading center is used for message parsing. For FIX messages, the FIX protocol package is configured based on the open source QuickfixJ project and the interface guidance for message parsing provided by various trading platforms, and then the message is parsed through the FIX protocol package. For Java objects, recursively traverse all elements in the IMIX or FIX object and the types of the elements to obtain the message structure and transaction data of the message; based on the message structure and transaction data, the converter performs format conversion according to the structured data conversion mapping rules corresponding to each format to obtain formatted text in multiple formats.
6. The message visualization processing device according to claim 5, characterized in that: The preset formats configured in the converter library include at least XML format and Json format; In the XML format, each element node is the English name of the domain, the element value is the domain value in the IMIX message or FIX message, and the domain ID is configured in the attribute node Tag; for enumeration values, the enumeration name of the corresponding value in the data dictionary is used to fill in the element value, and the original enumeration value is represented by adding the Value field in the attribute Attribute; In the Json format, the message structure is organized by the English name of the domain and the value of the domain. The value of the domain is displayed after the English name of the domain, and the English name and the value of the domain are separated by a preset separator.
7. The message visualization processing device according to claim 1, characterized in that: The preset formats configured in the converter library also include Java Get code format text and Java Set code format text, wherein the Java Get code is used to construct a message and the Java Set code is used to parse a message; In the generated Java Get code format text, each repeating group generates a build function, which is called in the function of the upper structure; when constructing the message object, the content in the message is used as the sample value to fill in; and the value is filled in according to the type of the field. When the field type is a string, the value is filled in with double quotes; when the field type is an enumeration value, the corresponding value in the definition of the data dictionary is taken to fill in the value; In the generated Java Set code format text, each repeating group generates a parse function, which is called in the function of the upper structure; when parsing the message object, the content in the message is displayed on the right side of the code in the form of comments; Furthermore, the code is configured according to the type of the domain. When the type of the domain is a string, the getString statement code is generated. When the type of the domain is an enumeration value or an integer, the getInt statement code is generated. When the field type is a repeating group, loop through the fields in each repeating group for parsing.
8. A method for visual processing of messages, characterized in that include: Get the original message; Identify the original message to obtain the message header and message body information of the original message, wherein the message body is the message body, which is used to describe the service information at the application layer, determine the message type to which the original message belongs according to the message header, and extract the message content; Parse and convert the message content, and generate corresponding formatted text after obtaining structured data that meets the preset format specification; wherein, different data dictionary libraries and converter libraries are configured for messages of different message types, and the data dictionary library includes multiple data dictionary files to adapt to different versions of message protocols under the same message type, and different versions of message protocols correspond to different data dictionary files; the converter library includes multiple converters to adapt to format conversion of multiple formats, and one converter corresponds to a structured data conversion mapping rule of a preset format, and the converter converts the message content according to the corresponding structured data conversion mapping rule based on the parsing result to obtain structured data that meets the preset format specification; after obtaining the corresponding data dictionary library and converter library according to the message type to which the original message belongs, parse and convert the message content based on the multiple data dictionary files in the data dictionary library and the multiple converters in the converter library; One or more formatted texts generated for the aforementioned original message are obtained, and are visually displayed in a preset manner in the formatted text display bar.
9. An electronic device, characterized in that: The electronic device comprises: A memory storing at least one instruction; A processor executes the instructions stored in the memory to perform the method according to claim 8.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to claim 8 is implemented.
Citation Information
Patent Citations
Message processing method and device, equipment and storage medium
CN113158650A
Financial message conversion method and system based on FreeMarker template engine
CN113992765A
Configuration-supporting data protocol conversion method and device and storage medium
CN116600025A
Gray box text protocol fuzz testing method and system based on field perception
CN117478566A
Method for displaying and tracking financial information exchange message
CN117591557A
