CN109495392B - Message conversion processing method and device, electronic equipment and storage medium - Google Patents

Message conversion processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN109495392B
CN109495392B CN201811291386.0A CN201811291386A CN109495392B CN 109495392 B CN109495392 B CN 109495392B CN 201811291386 A CN201811291386 A CN 201811291386A CN 109495392 B CN109495392 B CN 109495392B
Authority
CN
China
Prior art keywords
message
partition
processed
path
path label
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811291386.0A
Other languages
Chinese (zh)
Other versions
CN109495392A (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.)
Taikang Insurance Group Co Ltd
Taikang Online Property Insurance Co Ltd
Original Assignee
Taikang Insurance Group Co Ltd
Taikang Online Property Insurance 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 Taikang Insurance Group Co Ltd, Taikang Online Property Insurance Co Ltd filed Critical Taikang Insurance Group Co Ltd
Priority to CN201811291386.0A priority Critical patent/CN109495392B/en
Publication of CN109495392A publication Critical patent/CN109495392A/en
Application granted granted Critical
Publication of CN109495392B publication Critical patent/CN109495392B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/50Routing or path finding of packets in data switching networks using label swapping, e.g. multi-protocol label switch [MPLS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/48Routing tree calculation

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)
  • Document Processing Apparatus (AREA)

Abstract

The disclosure provides a message conversion processing method and device, electronic equipment and a computer readable storage medium, and belongs to the technical field of computers and communication. The method comprises the following steps: acquiring a message to be processed; storing the message to be processed to a corresponding subarea according to the channel information of the message to be processed; splitting the message to be processed into a plurality of message data, and adding a partition path label to each message data according to the partition structure configuration rule; and converting the partition path label of each message data into a standard path label, and converting the message to be processed into a standard message according to the standard path label of each message data. The message processing method can split and convert the message to be processed, is flexible, does not need to write analysis codes specially every time, saves labor cost and improves processing efficiency.

Description

Message conversion processing method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer and communication technologies, and in particular, to a method and an apparatus for message conversion processing, an electronic device, and a computer-readable storage medium.
Background
With the development of computer technology, the internet enters an 'ecological' era, and the cooperation among enterprises is more and more intimate and frequent. Among them, collaboration on data is an important business. The data cooperation at present is mainly data docking and sharing, and is mostly realized through interactive transmission of messages. Because different enterprises use different data systems and message formats, messages are diversified, and in order to make the messages available, the enterprises generally analyze and convert the messages in different channels into a format matched with an internal system of the enterprise.
Most of the existing message conversion methods are directed at messages of different channels, specially write analytic codes, and map the messages one-to-one and field-by-field. However, the process of converting the message by the method is mechanical, even if the data structure of the source message changes slightly, the code to be written and analyzed needs to be rewritten, and the whole process needs a large amount of manpower support, so that the processing efficiency is low.
It is to be noted that the information disclosed in the above background section is only for enhancement of understanding of the background of the present disclosure, and thus may include information that does not constitute prior art known to those of ordinary skill in the art.
Disclosure of Invention
The present disclosure provides a message conversion processing method and apparatus, an electronic device, and a computer-readable storage medium, so as to overcome, at least to a certain extent, the problems that the existing message conversion method is mechanical and requires a large amount of manpower.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows, or in part will be obvious from the description, or may be learned by practice of the disclosure.
According to an aspect of the present disclosure, a method for message conversion processing is provided, including: acquiring a message to be processed; storing the message to be processed to a corresponding subarea according to the channel information of the message to be processed; splitting the message to be processed into a plurality of message data, and adding a partition path label to each message data according to the partition structure configuration rule; and converting the partition path label of each message data into a standard path label, and converting the message to be processed into a standard message according to the standard path label of each message data.
In an exemplary embodiment of the present disclosure, the adding a partition path label to each packet data according to the partition structure configuration rule includes: obtaining a structure configuration rule of the partition, wherein the structure configuration rule comprises a hierarchical relationship between message header information of the partition; based on the structure configuration rule of the partition, converting the message to be processed into a data structure tree of the partition; writing each message data into a corresponding node in the data structure tree according to the header information of each message data; and adding a partition path label of each message data according to the path of the node of the data structure tree corresponding to each message data.
In an exemplary embodiment of the present disclosure, the converting the partition path label of each packet data into a standard path label includes: obtaining a path mapping rule from a cache, wherein the path mapping rule comprises a mapping relation between the partition path label and the standard path label; and converting the partition path label of each message data into a standard path label mapped by the partition path label based on the path mapping rule.
In an exemplary embodiment of the present disclosure, the method further comprises: and when the message to be processed contains unknown message data which can not be added with the partition path label, determining the partition path label and the standard path label of the unknown message data according to the input instruction of the path editing control.
In an exemplary embodiment of the present disclosure, the method further comprises: and adding the partition path label of the unknown message data and the corresponding standard path label into the path mapping rule.
In an exemplary embodiment of the present disclosure, the storing the to-be-processed packet to the corresponding partition according to the channel information of the to-be-processed packet includes: acquiring a partition mapping rule from a cache, wherein the partition mapping rule comprises a mapping relation between the channel information and the partition; and storing the message to be processed to the partition mapped by the channel information of the message to be processed based on the partition mapping rule.
In an exemplary embodiment of the present disclosure, the to-be-processed packet includes a packet in an XML format or a JSON format.
According to an aspect of the present disclosure, there is provided a packet conversion processing apparatus, including: the acquisition module is used for acquiring a message to be processed; the partitioning module is used for storing the message to be processed to a corresponding partition according to the channel information of the message to be processed; the splitting module is used for splitting the message to be processed into a plurality of message data and adding a partition path label to each message data according to the partition structure configuration rule; and the conversion module is used for converting the partition path label of each message data into a standard path label and converting the message to be processed into a standard message according to the standard path label of each message data.
According to an aspect of the present disclosure, there is provided an electronic device including: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform the method of any one of the above via execution of the executable instructions.
According to an aspect of the present disclosure, there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method of any one of the above.
Exemplary embodiments of the present disclosure have the following advantageous effects:
after the message to be processed is obtained, the message management server can store the message to be processed to the corresponding partition according to the channel information of the message, and configures to add a partition path label to each message data split from the message to be processed according to the structure of the partition; and finally, the partition path label of each message data can be converted into a standard path label, and the message to be processed is converted into a standard message according to the standard path label. On one hand, the message to be processed is converted in a splitting, path label conversion and recombination mode, and when data or header information, a data structure or a sequence are added into the message to be processed and is changed, the process can be also applied, so that the processing method is flexible, analysis codes do not need to be specially written every time, and the labor cost is saved. On the other hand, the messages to be processed are respectively stored and managed according to the source channels through the plurality of partitions, and each message data has a corresponding partition path, so that all the messages to be processed are favorably subjected to standardized management, and the processing efficiency of the whole process is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure. It is to be understood that the drawings in the following description are merely exemplary of the disclosure, and that other drawings may be derived from those drawings by one of ordinary skill in the art without the exercise of inventive faculty.
Fig. 1 schematically shows a flowchart of a message conversion processing method in the present exemplary embodiment;
fig. 2 schematically shows a sub-flowchart of a message conversion processing method in the present exemplary embodiment;
fig. 3 is a diagram schematically illustrating an architecture of a message conversion processing system according to the exemplary embodiment;
fig. 4 is a block diagram schematically illustrating a structure of a message conversion processing apparatus in the present exemplary embodiment;
fig. 5 schematically illustrates an electronic device for implementing the above method in the present exemplary embodiment;
fig. 6 schematically illustrates a computer-readable storage medium for implementing the above-described method in the present exemplary embodiment.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
The exemplary embodiment of the present disclosure provides a message conversion processing method, which can be applied to a message management server and is used for converting messages in different channels into messages in a standard format. Referring to FIG. 1, the method may include steps S11-S14:
and step S11, acquiring the message to be processed.
The message to be processed is an original message received from the outside, and usually originates from multiple channels, and has different structures and formats. For example, a management system of an insurance company generally needs to receive messages from each application channel, where the application channel may be a hospital cooperating with medical insurance business, an automobile service provider cooperating with vehicle insurance business, a financial institution cooperating with financial insurance business, and the like, and the data systems used by the application channel are different, and the structure and format of the messages used in the data interaction with the management system of the insurance company are also different, so that the messages need to be converted in the subsequent steps.
And step S12, storing the message to be processed into the corresponding subarea according to the channel information of the message to be processed.
The channel Information of the to-be-processed message may be Information for identifying the source, such as a channel name, a channel number, and a source address, and for example, when the application channel party is a Hospital cooperating with an insurance company for medical insurance services, the channel Information may be a name and a number of the Hospital, a Hospital Information System (HIS) name used by the Hospital, a HIS version, and an address of a HIS server. In this embodiment, the message management server may be specially divided into a plurality of storage partitions for storing the messages to be processed, where each partition corresponds to a message of one channel, and thus, the corresponding partition may be determined by channel information of the messages to be processed, and the messages to be processed are allocated to the partition for storage. Each partition should store messages in a format to facilitate subsequent processing uniformly for each partition.
In an exemplary embodiment, a plurality of channels with the same message format may also be associated with a partition, so that the messages sent by the channels are all stored in the partition.
Step S13, the message to be processed is split into multiple message data, and a path label is added to each message data according to the partition structure configuration rule.
When the message is split, the message can be split according to the message header information, so that the data under each message header information is one message data, and the split can be minimized by taking the discrete data as a unit, so that each discrete data is one message data.
Each partition corresponds to a format message, and a structure configuration rule corresponding to the format message may be preset in each partition, where the structure configuration rule refers to an analysis rule for a specific channel message, such as an arrangement or distribution rule of message header information and message data, a field corresponding to each message data, and a meaning of each field. Based on the structure configuration rule, a partition path label can be added to the message data according to the corresponding field of each message data. The partition path tag may be regarded as an index of the message data in the partition to which the message data belongs, for example, in a message in a key-value format, the partition path tag may be generated according to a key name of the message data, and in a message in an XML (extensible markup language) format, the partition path tag may be generated according to a start tag or an end tag of the message data.
In an exemplary embodiment, each partition may be managed by a database program, and the path of the partition where the data in the message is stored, that is, the mapping of the database address, the structural configuration rule may include a storage path rule of the message data.
Step S14, converting the partition path label of each message data into a standard path label, and converting the message to be processed into a standard message according to the standard path label of each message data.
A standard path label is a path label for a standard format message, such as a path label for a message used by an insurance company's internal systems. Because the path label has a corresponding relationship with the field (or the message header information) of the message data, the path label can be converted into a standard path label corresponding to the field of the same type based on the corresponding relationship. In this way, after the partition path labels of all the message data in the message to be processed are converted into the standard path labels, the message data may be reassembled to obtain the standardized message, and in the reassembly process, it may be necessary to perform necessary format conversion on the message data according to the data format of the standardized message, or perform appropriate adjustment on the data structure or the sequence in the message to be processed, which is not particularly limited in this embodiment.
In an exemplary embodiment, the message to be processed may include a message in an XML format or a JSON (JavaScript object notation) format; XML and JSON are common message formats, and correspondingly, the partition structure configuration rules can respectively adopt XPath (XML path language) or JSONPath (JSON path language) to analyze the message to be processed. Taking the message to be processed in the XML format as an example, the conversion process is described as follows:
suppose there is a message to be processed from channel a:
Figure GDA0002943876950000061
after receiving the message a, the channel a can be identified according to the channel information and allocated to the partition a for storage. In the partition a, the message a may be analyzed according to the configuration rule corresponding to the channel a, and the message data therein may be respectively stored in a corresponding path, for example, the message data indicating version "3.0" may be stored in a path Apath:/a/head/version, and the path may be used as a partition path label of the message data. Other message data in message a may be similarly processed.
Suppose there are more pending messages from channel B:
Figure GDA0002943876950000071
the message B may be processed by a method similar to the above method, where the message data "3.0" of the message B may be stored in the corresponding path Bpath:/B/Bhead/version of the partition B, and a corresponding partition path label is added.
If the Standardized (ST) message is as follows:
Figure GDA0002943876950000072
when converting the message data version "3.0" in the message a and the message B into the standard path label, the following path label correspondence relationship may be determined:
Apath(/A/head/version);
Bpath(/B/Bhead/request/version);
STpath(/ST/actionContext/extendInfo[@key='version']/@value);
then, the conversion of the partition path label of the version message data to the standard path label can be realized, and the format of the message data in the standard message is as follows:
<ST>
<actionContext>
<extendInfo key="version"value="3.0"/>
through similar processes, other message data can be completely converted into the format of the standardized message and recombined into the standardized message, thereby completing the conversion processing of the message to be processed.
Based on the above description, in the exemplary embodiment, after obtaining the message to be processed, the message management server may store the message to be processed in the corresponding partition according to the channel information of the message, and configure, according to the structure of the partition, to add a partition path tag to each piece of message data split from the message to be processed; and finally, the partition path label of each message data can be converted into a standard path label, and the message to be processed is converted into a standard message according to the standard path label. On one hand, the message to be processed is converted in a splitting, path label conversion and recombination mode, and when data or header information, a data structure or a sequence are added into the message to be processed and is changed, the process can be also applied, so that the processing method is flexible, analysis codes do not need to be specially written every time, and the labor cost is saved. On the other hand, the messages to be processed are respectively stored and managed according to the source channels through the plurality of partitions, and each message data has a corresponding partition path, so that all the messages to be processed are favorably subjected to standardized management, and the processing efficiency of the whole process is improved.
In an exemplary embodiment, referring to fig. 2, adding a partition path label to each message data according to the partition structure configuration rule may be implemented through steps S21 to S24:
step S21, obtaining the structure configuration rule of the partition, wherein the structure configuration rule comprises the hierarchical relationship between the message header information of the partition;
step S22, based on the structure configuration rule of the partition, converting the message to be processed into the data structure tree of the partition;
step S23, writing each message data into the corresponding node in the data structure tree according to the header information of each message data;
and step S24, adding the partition path label of each message data according to the path of the node of the data structure tree corresponding to each message data.
Because the header information in the message usually has a hierarchical relationship, the message to be processed can be converted into a data structure tree according to a structure configuration rule describing the hierarchical relationship. Each partition usually has a data structure tree in a uniform form, and taking the packet a of the channel a as an example, in the data structure tree of the partition a, a data meaning represented by each node may be defined, that is, there is a correspondence between each node and header information of the packet data. Therefore, each message data may be filled in the corresponding node, the data structure tree of the partition a may include child nodes a1, a2, A3 …, grandchild nodes a11, a12, a13 …, and the like, the grandchild nodes belong to the corresponding child nodes, and nodes of any hierarchy may be set according to actual needs. In the data structure tree, each node may be a mapping of a storage path, and has an actual attribute, so that a partition path label of packet data in the node may be generated according to the path of each node. The message to be processed is analyzed and split in a data structure tree mode, the correspondence between the message data and the storage path can be conveniently realized, the path is embodied in a node number mode, and the length of a path label can be reduced.
In an exemplary embodiment, converting the partition path label of each packet data into a standard path label may be implemented by:
obtaining a path mapping rule from a cache, wherein the path mapping rule comprises a mapping relation between each partition path label and a standard path label;
and based on the path mapping rule, converting the partition path label of each message into a standard path label mapped by the partition path label.
And subsequently, the message to be processed can be converted into a standard message according to the standard path label of each message data.
The path mapping rule is a mapping relationship between partition path labels of different partitions and between a partition path label and a standard path label, which are configured in a unified manner, for example, the path label mapping relationship between version message data of the message a, the message B and the standard message is as follows:
Apath(/A/head/version);
Bpath(/B/Bhead/request/version);
STpath(/ST/actionContext/extendInfo[@key='version']/@value);
the mapping relationship may be added to the path mapping rule, and the mapping relationships among all the path labels may form a complete path mapping rule, may be in specific forms such as a mapping table, a rule configuration file, and may be directly invoked during conversion. The path mapping rule is usually stored in a database, and when the path mapping rule needs to be called, the path mapping rule can be initialized into a cache and then searched from the cache, so that the speed of message processing can be increased.
Usually, the configuration rule of each partition is configured in advance by operation and maintenance personnel according to the message characteristics of each channel, and if the message format of a certain channel changes, for example, new data or fields, field name changes, and the like are added, the corresponding partition may not be effectively identified or analyzed, which means that a path label cannot be added to part of the message data in the message. In an exemplary embodiment, the message conversion processing method may further include the following steps:
and when the message to be processed contains unknown message data which can not be added with the path label, determining the partition path label and the standard path label of the unknown message data according to the input instruction of the path editing control.
The path editing control is a control supporting manual editing of operation and maintenance personnel, unknown message data is generally message data of which the field cannot be identified, the operation and maintenance personnel can edit the field into an existing partition path according to the characteristics of the field, or a new partition path is added to the field, and the path is a path corresponding to a partition; on the basis, the operation and maintenance personnel can also set the corresponding relation between the partition path and the standard path, so that the partition path label and the corresponding standard path label are assigned to the unknown message data.
Furthermore, the partition path label of the unknown message data edited by the path editing control and the corresponding standard path label can be added to the path mapping rule. Therefore, the learning and updating of the path mapping rule are realized, and the subsequent direct calling is facilitated.
In an exemplary embodiment, step S12 may be implemented by:
acquiring a partition mapping rule from a cache, wherein the partition mapping rule comprises a mapping relation between channel information and partitions;
and storing the message to be processed to the partition mapped by the channel information of the message to be processed based on the partition mapping rule.
The partition mapping rule refers to a mapping relationship between each channel information and each partition, and may be a one-to-one mapping, such that one channel corresponds to one partition, or a one-to-many, many-to-one, or many-to-many mapping, for example, messages of different formats of one channel correspond to different partitions, messages of multiple channels have the same format, and messages of multiple channels may correspond to one partition, or a combination of the above two cases, and the embodiment is not particularly limited thereto. The partition mapping rule can be realized in a specific form such as a partition mapping table and is usually stored in a database, and when the partition mapping rule needs to be called, the partition mapping rule can be initialized into a cache and then searched from the cache, so that the speed of message processing can be further increased.
In addition, the structure configuration rule of each partition can also be stored in the database, and when the structure configuration rule needs to be called, the structure configuration rule is initialized into the cache and then searched from the cache. The cache in the above embodiment may be a Redis cache, which is commonly used in a database, caches data in a key-value form, and has a faster query and call speed.
Fig. 3 is a diagram showing an architecture of a message conversion processing system, which can be applied to a message management server in the exemplary embodiment. As shown in fig. 3, firstly, messages of a plurality of channels are received from the outside, taking a management system of an insurance company as an example, a channel a may be a hospital, a channel B may be an automobile service provider, a channel C may be a financial institution, etc., after receiving a message, a server of the insurance management system processes the message by a partition mapping layer, and distributes the message to be processed to each partition by a partition mapping rule configured in advance, each partition may be a hard disk partition defined by the server, or a container configured by the server, etc., and the partition may also be set to be a hierarchical structure, for example, a primary container may be configured for the message of each dangerous service module, and a secondary container may be configured for the message of each format under the primary container; each partition can divide the message to be processed into a plurality of message data and store the message data into the nodes of the corresponding data structure tree according to the structure configuration rule; the path mapping layer is configured with path mapping rules, each partition can obtain the path mapping rules from the path mapping layer and convert the partition path labels of the message data into standard path labels, or the message data with the partition path labels can be sent to the path mapping layer, and the conversion from the path mapping layer to the standard path labels is completed, so that each message data can be recombined into a standard message and sent to a standard message system for subsequent use. The partition mapping layer and the path mapping layer may be specific programs or processes on the server, and the standardized messaging system may be a database inside the server or an external data system, which is not particularly limited in this embodiment.
An exemplary embodiment of the present disclosure further provides a message conversion processing apparatus, and as shown in fig. 4, the apparatus 40 may include: an obtaining module 41, configured to obtain a message to be processed; the partitioning module 42 is configured to store the to-be-processed packet into a corresponding partition according to the channel information of the to-be-processed packet; a splitting module 43, configured to split a message to be processed into multiple message data, and add a partition path label to each message data according to a structure configuration rule of the partition; the conversion module 44 is configured to convert the partition path label of each message data into a standard path label, and convert the message to be processed into a standard message according to the standard path label of each message data.
In an exemplary embodiment, the splitting module may include: a structure configuration rule obtaining unit, configured to obtain a structure configuration rule of the partition, where the structure configuration rule includes a hierarchical relationship between header information of the packet of the partition; the data structure tree conversion unit is used for converting the message to be processed into the partitioned data structure tree based on the partitioned structure configuration rule; a node data writing unit, configured to write each packet data into a corresponding node in the data structure tree according to the header information of each packet data; and the partition path label adding unit is used for adding the partition path label of each message data according to the path of the node of the data structure tree corresponding to each message data.
In an exemplary embodiment, the conversion module may be configured to obtain a path mapping rule from the cache, where the path mapping rule includes a mapping relationship between a partition path tag and a standard path tag, and convert the partition path tag of each packet data into the standard path tag mapped by the partition path tag based on the path mapping rule.
In an exemplary embodiment, the message conversion processing apparatus may further include: and the path editing module is used for determining the partition path label and the standard path label of the unknown message data according to the input instruction of the path editing control when the message to be processed contains the unknown message data which can not be added with the partition path label.
In an exemplary embodiment, the path editing module may be further configured to add the partition path label of the unknown packet data and the corresponding standard path label to the path mapping rule.
In an exemplary embodiment, the partition module may be configured to obtain a partition mapping rule from the cache, where the partition mapping rule includes a mapping relationship between the channel information and the partition, and store the to-be-processed packet to the partition to which the channel information of the to-be-processed packet is mapped based on the partition mapping rule.
In an exemplary embodiment, the message to be processed may include a message in an XML format or a JSON format.
The specific details of each module/unit have been described in detail in the embodiments of the method section, and thus are not described again.
Exemplary embodiments of the present disclosure also provide an electronic device capable of implementing the above method.
As will be appreciated by one skilled in the art, aspects of the present disclosure may be embodied as a system, method or program product. Accordingly, various aspects of the present disclosure may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system.
An electronic device 500 according to such an exemplary embodiment of the present disclosure is described below with reference to fig. 5. The electronic device 500 shown in fig. 5 is only an example and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 5, the electronic device 500 is embodied in the form of a general purpose computing device. The components of the electronic device 500 may include, but are not limited to: the at least one processing unit 510, the at least one memory unit 520, a bus 530 connecting various system components (including the memory unit 520 and the processing unit 510), and a display unit 540.
Where the storage unit stores program code, the program code may be executed by the processing unit 510 such that the processing unit 510 performs the steps according to various exemplary embodiments of the present disclosure as described in the above-mentioned "exemplary methods" section of this specification. For example, the processing unit 510 may perform steps S11 to S14 shown in fig. 1, may also perform steps S21 to S24 shown in fig. 2, and the like.
The storage unit 520 may include readable media in the form of volatile storage units, such as a random access memory unit (RAM)521 and/or a cache memory unit 522, and may further include a read only memory unit (ROM) 523.
The storage unit 520 may also include a program/utility 524 having a set (at least one) of program modules 525, such program modules 525 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 530 may be one or more of any of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 500 may also communicate with one or more external devices 700 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 500, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 500 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 5100. Also, the electronic device 500 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 560. As shown, the network adapter 560 communicates with the other modules of the electronic device 500 over the bus 530. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device 500, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the exemplary embodiments of the present disclosure.
Exemplary embodiments of the present disclosure also provide a computer-readable storage medium having stored thereon a program product capable of implementing the above-described method of the present specification. In some possible embodiments, various aspects of the disclosure may also be implemented in the form of a program product comprising program code for causing a terminal device to perform the steps according to various exemplary embodiments of the disclosure described in the above-mentioned "exemplary methods" section of this specification, when the program product is run on the terminal device.
Referring to fig. 6, a program product 600 for implementing the above method according to an exemplary embodiment of the present disclosure is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
A computer readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
Furthermore, the above-described figures are merely schematic illustrations of processes included in methods according to exemplary embodiments of the present disclosure, and are not intended to be limiting. It will be readily understood that the processes shown in the above figures are not intended to indicate or limit the chronological order of the processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, e.g., in multiple modules.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functions of two or more modules or units described above may be embodied in one module or unit according to an exemplary embodiment of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is to be limited only by the terms of the appended claims.

Claims (10)

1. A message conversion processing method is characterized by comprising the following steps:
acquiring a message to be processed;
storing the message to be processed to a corresponding subarea according to the channel information of the message to be processed;
splitting the message to be processed into a plurality of message data, and adding a partition path label to each message data according to the partition structure configuration rule; the structural configuration rule analyzes the message to be processed by adopting an XML path language or a JSON path language and comprises a hierarchical relation between message header information of the partitions;
and converting the partition path label of each message data into a standard path label, and converting the message to be processed into a standard message according to the standard path label of each message data.
2. The method according to claim 1, wherein the adding a partition path label to each of the packet data according to the partition structure configuration rule comprises:
acquiring a structure configuration rule of the partition;
based on the structure configuration rule of the partition, converting the message to be processed into a data structure tree of the partition;
writing each message data into a corresponding node in the data structure tree according to the header information of each message data;
and adding a partition path label of each message data according to the path of the node of the data structure tree corresponding to each message data.
3. The method of claim 1, wherein converting the partition path label of each of the packet data into a standard path label comprises:
obtaining a path mapping rule from a cache, wherein the path mapping rule comprises a mapping relation between the partition path label and the standard path label;
and converting the partition path label of each message data into a standard path label mapped by the partition path label based on the path mapping rule.
4. The method of claim 3, further comprising:
and when the message to be processed contains unknown message data which can not be added with the partition path label, determining the partition path label and the standard path label of the unknown message data according to the input instruction of the path editing control.
5. The method of claim 4, further comprising:
and adding the partition path label of the unknown message data and the corresponding standard path label into the path mapping rule.
6. The method according to claim 1, wherein the storing the to-be-processed packet to the corresponding partition according to the channel information of the to-be-processed packet comprises:
acquiring a partition mapping rule from a cache, wherein the partition mapping rule comprises a mapping relation between the channel information and the partition;
and storing the message to be processed to the partition mapped by the channel information of the message to be processed based on the partition mapping rule.
7. The method according to claim 1, wherein the message to be processed comprises a message in XML format or JSON format.
8. A message conversion processing apparatus, comprising:
the acquisition module is used for acquiring a message to be processed;
the partitioning module is used for storing the message to be processed to a corresponding partition according to the channel information of the message to be processed;
the splitting module is used for splitting the message to be processed into a plurality of message data and adding a partition path label to each message data according to the partition structure configuration rule; the structural configuration rule analyzes the message to be processed by adopting an XML path language or a JSON path language and comprises a hierarchical relation between message header information of the partitions;
and the conversion module is used for converting the partition path label of each message data into a standard path label and converting the message to be processed into a standard message according to the standard path label of each message data.
9. An electronic device, comprising:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the method of any of claims 1-7 via execution of the executable instructions.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method of any one of claims 1 to 7.
CN201811291386.0A 2018-10-31 2018-10-31 Message conversion processing method and device, electronic equipment and storage medium Active CN109495392B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811291386.0A CN109495392B (en) 2018-10-31 2018-10-31 Message conversion processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811291386.0A CN109495392B (en) 2018-10-31 2018-10-31 Message conversion processing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109495392A CN109495392A (en) 2019-03-19
CN109495392B true CN109495392B (en) 2021-05-07

Family

ID=65691945

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811291386.0A Active CN109495392B (en) 2018-10-31 2018-10-31 Message conversion processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109495392B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110955714B (en) * 2019-12-03 2023-05-02 中国银行股份有限公司 Method and device for converting unstructured text into structured text
CN112099679B (en) * 2020-08-30 2023-09-19 浪潮金融信息技术有限公司 TTU function packaging method based on software configuration
CN112822190B (en) * 2021-01-05 2023-07-14 银清科技有限公司 Message maintenance method and device
CN112817919B (en) * 2021-01-27 2024-05-17 中国银联股份有限公司 Data merging method, device and computer readable storage medium
CN113111223B (en) * 2021-04-26 2023-10-13 银清科技有限公司 Method and device for generating XML string by message
CN114095432B (en) * 2021-12-22 2024-03-19 上海理想信息产业(集团)有限公司 Method, system and storage medium for scheduling application flow partition
CN114697390B (en) * 2022-03-31 2023-12-08 中国工商银行股份有限公司 XML message processing method and device, storage medium and electronic equipment
CN114844957B (en) * 2022-04-27 2024-03-08 工银科技有限公司 Link message conversion method, device, equipment, storage medium and program product
CN114844795A (en) * 2022-04-27 2022-08-02 工银科技有限公司 End-to-end link monitoring method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101464866A (en) * 2007-12-19 2009-06-24 新奥特(北京)视频技术有限公司 System for implementing catalogue information format conversion based on XML
CN101615174A (en) * 2008-06-24 2009-12-30 北京信息科技大学 Conversion method based on the documents in various formats of XML
CN103593457A (en) * 2013-11-22 2014-02-19 方正国际软件有限公司 Method for converting document format
CN104657459A (en) * 2015-02-09 2015-05-27 中国科学院信息工程研究所 Massive data storage method based on file granularity
WO2016054818A1 (en) * 2014-10-11 2016-04-14 华为技术有限公司 Method and device for data processing

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI390443B (en) * 2009-08-04 2013-03-21 Univ Nat Taiwan Science Tech Streaming query system and method for extensible markup language

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101464866A (en) * 2007-12-19 2009-06-24 新奥特(北京)视频技术有限公司 System for implementing catalogue information format conversion based on XML
CN101615174A (en) * 2008-06-24 2009-12-30 北京信息科技大学 Conversion method based on the documents in various formats of XML
CN103593457A (en) * 2013-11-22 2014-02-19 方正国际软件有限公司 Method for converting document format
WO2016054818A1 (en) * 2014-10-11 2016-04-14 华为技术有限公司 Method and device for data processing
CN104657459A (en) * 2015-02-09 2015-05-27 中国科学院信息工程研究所 Massive data storage method based on file granularity

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
XML数据库节点存储的路径索引技术研究;韦旻辰;《中国优秀硕士学位论文全文数据库》;20140615;全文 *
一种异构数据描述与转换框架的研究与实现;杨阳;《中国优秀硕士学位论文全文数据库》;20141115;全文 *

Also Published As

Publication number Publication date
CN109495392A (en) 2019-03-19

Similar Documents

Publication Publication Date Title
CN109495392B (en) Message conversion processing method and device, electronic equipment and storage medium
US11238099B2 (en) Method and device for obtaining answer, and computer device
CN111339186B (en) Workflow engine data synchronization method, device, medium and electronic equipment
CN112711581B (en) Medical data checking method and device, electronic equipment and storage medium
CN111026931B (en) Data query method, device, equipment and medium
CN110554875B (en) Code conversion method and device, electronic equipment and storage medium
CN111813804B (en) Data query method and device, electronic equipment and storage medium
CN110134702A (en) Data flow joining method, device, equipment and storage medium
US10402380B1 (en) Interactive user interface for schema transformation
CN113641700A (en) Data processing method and device based on Spring boot frame
US11252257B2 (en) Dynamic rest access
CN114816420A (en) Data processing method and device
CN113419740A (en) Program data stream analysis method and device, electronic device and readable storage medium
CN112417016A (en) Data exchange method, system, equipment and storage medium
CN116955314A (en) Unified maintenance management and control method, device, equipment and storage medium for database
WO2024001240A1 (en) Task integration method and apparatus for multiple technology stacks
CN116991929A (en) Micro-service system based on big hospital data
CN113760961A (en) Data query method and device
CN116010461A (en) Data blood relationship analysis method and device, storage medium and electronic equipment
CN115292313A (en) Pseudo-column implementation method and device, electronic equipment and storage medium
CN115344614A (en) Data processing method and device, storage medium and electronic equipment
CN114547106A (en) Data query method and device, storage medium and computer system
CN113515285B (en) Method and device for generating real-time calculation logic data
CN111046020B (en) Information processing method and device, storage medium and electronic equipment
CN114219643A (en) Transaction calling method, device, equipment and storage medium

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