CN116996601A - Message format conversion method and device, electronic equipment and storage medium - Google Patents

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

Info

Publication number
CN116996601A
CN116996601A CN202310967672.9A CN202310967672A CN116996601A CN 116996601 A CN116996601 A CN 116996601A CN 202310967672 A CN202310967672 A CN 202310967672A CN 116996601 A CN116996601 A CN 116996601A
Authority
CN
China
Prior art keywords
format
message
message format
target
conversion
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.)
Pending
Application number
CN202310967672.9A
Other languages
Chinese (zh)
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.)
Bank of China Ltd
Original Assignee
Bank of China 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 Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN202310967672.9A priority Critical patent/CN116996601A/en
Publication of CN116996601A publication Critical patent/CN116996601A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/08Protocols for interworking; Protocol conversion

Abstract

The application provides a message format conversion method, a message format conversion device, electronic equipment and a storage medium, which can be used in the field of artificial intelligence. The method comprises the following steps: and acquiring a message format conversion request input by a user, wherein the message format conversion request comprises source message information and a source message format. And responding to the operation of the user in the visual interface, determining a target format conversion task, wherein the target format conversion task is used for determining a target message format to be converted in the source message format. And further, acquiring unique identification information corresponding to the target format conversion task according to the target format conversion task, determining a conversion rule of a source message format and a target message format which are preset and correspond to the unique identification information according to the unique identification information, and carrying out format conversion on the source message information according to the conversion rule to finally obtain the target message information of the target message format. The application reduces the complexity of the format conversion process and improves the conversion efficiency of the message format.

Description

Message format conversion method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of artificial intelligence, and in particular, to a method and apparatus for converting a message format, an electronic device, and a storage medium.
Background
With the rapid development of artificial intelligence technology, the formats of messages configured by different application systems are different, and when different application systems communicate, the formats of messages sent by other application systems need to be converted into message formats which can be interpreted by the current application system.
In the prior art, when converting a message format, a specific parsing program needs to be written for a source message format and a target message format to be converted respectively, then the content parsed by the source message format is assigned to the content parsed by the target message format, and finally the target message format is generated by packaging.
However, the format conversion process of the message in the prior art is complex, and the conversion efficiency is low.
Disclosure of Invention
The application provides a method, a device, electronic equipment and a storage medium for converting a message format, which are used for solving the problems of complex conversion process and low conversion efficiency of the message format in the prior art.
In a first aspect, the present application provides a method for converting a message format, including:
obtaining a message format conversion request input by a user, wherein the message format conversion request comprises source message information and a source message format;
responding to the operation of the user in a visual interface, determining a target format conversion task, wherein the target format conversion task is used for determining a target message format to be converted of the source message format;
acquiring unique identification information corresponding to the target format conversion task according to the target format conversion task;
determining a conversion rule of a source message format and a target message format which are pre-configured and correspond to the unique identification information according to the unique identification information;
and carrying out format conversion on the source message information according to the conversion rule to obtain the target message information in the target message format.
In a second aspect, the present application provides a device for converting a message format, including:
the system comprises an acquisition module, a message format conversion module and a message format conversion module, wherein the acquisition module is used for acquiring a message format conversion request input by a user, and the message format conversion request comprises source message information and a source message format;
the determining module is used for responding to the operation of the user in the visual interface, determining a target format conversion task, wherein the target format conversion task is used for determining a target message format to be converted of the source message format;
the acquisition module is further used for acquiring unique identification information corresponding to the target format conversion task according to the target format conversion task;
the determining module is further configured to determine a conversion rule of a source message format and a target message format, which are configured in advance and correspond to the unique identification information, according to the unique identification information;
and the processing module is used for carrying out format conversion on the source message information according to the conversion rule to obtain the target message information in the target message format.
In a third aspect, an electronic device, comprising: a processor, and a memory communicatively coupled to the processor;
the memory stores computer-executable instructions;
the processor executes computer-executable instructions stored in the memory to implement the method of converting a message format as described in the first aspect.
In a fourth aspect, a computer readable storage medium has stored therein computer executable instructions which, when executed by a processor, are adapted to carry out the method of converting a message format according to the first aspect.
In a fifth aspect, the application provides a computer program product comprising a computer program which, when executed by a processor, implements a method of converting a message format as described in the first aspect.
According to the method, the device, the electronic equipment and the storage medium for converting the message format, the message format conversion request input by the user is obtained, and the message format conversion request comprises the source message information and the source message format. And responding to the operation of the user in the visual interface, determining a target format conversion task, wherein the target format conversion task is used for determining a target message format to be converted in the source message format. And further, acquiring unique identification information corresponding to the target format conversion task according to the target format conversion task, determining a conversion rule of a source message format and a target message format which are preset and correspond to the unique identification information according to the unique identification information, and carrying out format conversion on the source message information according to the conversion rule to finally obtain the target message information of the target message format. The method of the application reduces the complexity of the format conversion process and improves the conversion efficiency of the message format by determining the conversion rule according to the unique identification information and converting the message format according to the conversion rule.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
Fig. 1 is a flow chart of a method for converting a message format according to an embodiment of the present application;
FIG. 2 is a flowchart of a method for obtaining target message information in a target message format according to an embodiment of the present application;
FIG. 3 is a flowchart illustrating a method for configuring conversion rules according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a message format conversion device according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Specific embodiments of the present application have been shown by way of the above drawings and will be described in more detail below. The drawings and the written description are not intended to limit the scope of the inventive concepts in any way, but rather to illustrate the inventive concepts to those skilled in the art by reference to the specific embodiments.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the application. Rather, they are merely examples of apparatus and methods consistent with aspects of the application as detailed in the accompanying claims.
In the description of the embodiments of the present application, the terms "inner", "outer", etc. refer to directions or positional relationships based on the directions or positional relationships shown in the drawings, which are merely for convenience of description, and do not indicate or imply that the apparatus or components must have a specific orientation, be constructed and operated in a specific orientation, and thus should not be construed as limiting the present application.
Furthermore, in the description of embodiments of the application, unless explicitly stated and limited otherwise, the terms "connected," "connected," and "coupled" are to be construed broadly, and may be, for example, fixedly connected, detachably connected, or integrally connected; can be mechanically or electrically connected; can be directly connected or indirectly connected through an intermediate medium, and can be the communication between the two components. The specific meaning of the above terms in the embodiments of the present application can be understood by those skilled in the art according to the specific circumstances.
It should be noted that, the user information (including but not limited to user equipment information, user personal information, etc.) and the data (including but not limited to data for analysis, stored data, presented data, etc.) related to the present application are information and data authorized by the user or fully authorized by each party, and the collection, use and processing of the related data need to comply with related laws and regulations and standards, and provide corresponding operation entries for the user to select authorization or rejection.
It should be noted that the method, the device, the electronic device and the storage medium for converting the message format of the present application can be used in the field of artificial intelligence, and can also be used in any field other than the field of artificial intelligence.
With the development of technology, in order to meet the increasing demands of each service, the number of application systems matching each service is also increasing. The message format may be configured differently for convenience of use by each application. When different application systems communicate, if the message format configured by the application system sending the message is different from the message format configured by the application system receiving the message, the message format needs to be converted.
In the prior art, when converting a message format, a specific parsing program is usually programmed for an application system sending a message and an application system receiving the message, a parsing program corresponding to the application system sending the message parses a source message to obtain a source message content, then the source message content is assigned to a target message by a parsing program corresponding to the application system receiving the message, and finally the target message after format conversion is obtained by packaging.
However, in the prior art, the mapping relation between the source message and the target message needs to be resolved clearly in the assignment process, and the data volume required to be processed in the resolution of the mapping relation is huge, so that the message format conversion process becomes complicated and complex, and the message format conversion efficiency is lower.
Therefore, in order to solve the above technical problems in the prior art, the present application provides a method, an apparatus, an electronic device, and a storage medium for converting a message format, which determine a target format conversion task by responding to an operation of a user in a visual interface, determine a corresponding pre-configured conversion rule for converting a source message format into a target message format according to unique identification information of the target format conversion task, and finally convert the source message format into the target message format according to the conversion rule, thereby obtaining target message information, so as to improve conversion efficiency of the message format.
The following describes the technical scheme of the present application and how the technical scheme of the present application solves the above technical problems in detail with specific embodiments. The following embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
Fig. 1 is a flow chart of a method for converting a message format according to an embodiment of the present application, where an execution body of the method may be a terminal with a message format conversion function, for example, may be an intelligent counter, a computer, a server, or a server cluster. The method in this embodiment may be implemented by software, hardware, or a combination of software and hardware. As shown in fig. 1, the method specifically includes the following steps:
s101, obtaining a message format conversion request input by a user, wherein the message format conversion request comprises source message information and a source message format.
In this embodiment, the execution body is exemplified by a computer in which a system or an application program usable for message format conversion is installed.
The user enters a request for message format conversion on a visual interface of the system or application available for message format conversion, and the computer can therefore obtain the request.
The message format conversion request at least comprises source message information and a source message format.
The source message format includes, but is not limited to, the following: 8583 message format, JSON message format, XML message format, KEY-VALUE message format, and len+data message format.
S102, responding to the operation of a user in a visual interface, determining a target format conversion task, wherein the target format conversion task is used for determining a target message format to be converted of a source message format.
Menu items are provided in the visual interface, and various format conversion tasks can be included in a drop-down menu of menu items.
By way of example only, and not by way of limitation,
format conversion task 1, for characterizing conversion of 8583 message format to JSON message format;
a format conversion task 2 for representing conversion of JSON message format into XML message format;
a format conversion task 3 for representing conversion of JSON message format into KEY-VALUE message format;
...
format conversion task n, for characterizing conversion of 8583 message format to KEY-VALUE message format.
It is to be understood that the above examples are illustrative only and are not to be construed as limiting the application.
The user may select a target format conversion task, for example, assume format conversion task 1, in a drop-down menu of the visual interface menu item according to the source message format and the target message format desired to be converted, so the computer may determine that the target format conversion task is format conversion task 1.
S103, acquiring unique identification information corresponding to the target format conversion task according to the target format conversion task.
In this embodiment, unique identification information is set in advance for each format conversion task, and the unique identification information may be a special symbol, a serial number, a name, a character string, or the like.
After determining the target format conversion task in step S201, the unique identification information of the target format conversion task may be determined according to the correspondence between the format conversion task and the unique identification information.
S104, according to the unique identification information, determining a conversion rule of a source message format and a target message format which are preset and correspond to the unique identification information.
In the application, the conversion rules among different message formats are established in advance, so that the corresponding conversion rules can be obtained according to the source message format and the target message format to be converted, namely, the conversion rules are in one-to-one correspondence with the unique identification information.
The process of establishing the conversion rule will be described in detail in the following embodiments, please refer to the following embodiments.
S105, carrying out format conversion on the source message information according to the conversion rule to obtain target message information in a target message format.
And (3) carrying out format conversion processing on the source message information according to the conversion rule of the source message format and the target message format corresponding to the unique identification information obtained in the step (S104), and finally obtaining the target message information in the target message format.
The target message format includes, but is not limited to, the following: 8583 message format, JSON message format, XML message format, KEY-VALUE message format, len+data message format, and the like.
In the application, the format verification can be carried out on the obtained target message information in the target message format, and if the verification is not passed, the early warning prompt information of message format conversion errors is output.
The early warning prompt information can be displayed in a text form or displayed in a broadcast form, and the like.
In the above embodiment of the present application, the source message information and the source message format are included in the message format conversion request by obtaining the message format conversion request input by the user. And responding to the operation of the user in the visual interface, determining a target format conversion task, wherein the target format conversion task is used for determining a target message format to be converted in the source message format. And further, acquiring unique identification information corresponding to the target format conversion task according to the target format conversion task, determining a conversion rule of a source message format and a target message format which are preset and correspond to the unique identification information according to the unique identification information, and carrying out format conversion on the source message information according to the conversion rule to finally obtain the target message information of the target message format. According to the embodiment, the conversion rule is determined according to the unique identification information, and the message format is converted according to the conversion rule, so that the complexity of the format conversion process is reduced, and the conversion efficiency of the message format is improved.
Further, based on the above embodiments, the following embodiments describe in detail the process of converting the format of the source message information according to the conversion rule in step S105 to obtain the target message information in the target message format.
Fig. 2 is a flow chart of a method for obtaining target message information in a target message format according to an embodiment of the present application, as shown in fig. 2, the method includes the following steps:
s201, extracting field names and value information corresponding to the field names in the source message information.
Each format message has its own composition structure, and at least the field name to be transmitted and the value information corresponding to the field name are included in the composition structure.
Therefore, the field name and the value information corresponding to the field name can be extracted from the source message information.
S202, converting the field names and the value information corresponding to the field names into the field names and the value information corresponding to the target message format according to the conversion rule.
According to a pre-configured conversion rule, format conversion can be performed on the field names and the value information corresponding to the field names in the source message information, and the field names and the value information corresponding to the target message format are converted into corresponding component structures of the target format, so that the field names and the value information corresponding to the target message format are obtained.
S203, associating the field names and the value information corresponding to the converted target message format to obtain the target message information of the target message format.
In order to make the field name and the value information after format conversion accurately correspond, the field name and the value information corresponding to the converted target message format can be associated, so that the target message information of the accurate target message format is obtained.
In the above embodiment of the present application, the field name and the value information corresponding to the field name in the source message information are extracted, and the field name and the value information corresponding to the field name are converted into the field name and the value information corresponding to the target message format according to the conversion rule, and the field name and the value information corresponding to the converted target message format are associated, so as to obtain the target message information of the target message format. The embodiment reduces the complexity of the format conversion process and improves the conversion efficiency of the message format.
Further, by the embodiment shown in fig. 3, a process of establishing a conversion rule between messages in different formats will be described. Fig. 3 is a flowchart of a method for configuring a conversion rule according to an embodiment of the present application, as shown in fig. 3, where the method includes:
s301, acquiring access interfaces of messages in different formats.
Access portals in 8583 message format, JSON message format, XML message format, KEY-VALUE message format, and len+data message format are obtained.
S302, carrying out format analysis on the messages with different formats according to the access interfaces of the messages with different formats, and determining the format structures corresponding to the messages with different formats.
According to the access interfaces of the acquired messages with different formats, the format structures corresponding to the different formats can be obtained by analyzing each format.
S303, establishing conversion rules among messages in different formats according to the format structure corresponding to the messages in each format.
One possible implementation is:
and extracting a field name and value information corresponding to the field name from the message in any format according to a format structure corresponding to the message in any format.
Based on a preset format conversion language, converting the field name and the value information corresponding to the field name into the field name and the value information corresponding to the message in the preset format, and obtaining a format structure corresponding to the message in the preset format.
The format conversion languages corresponding to the messages with different formats may be different, so that format conversion can be performed through the corresponding preset format conversion language according to the source message format and the target message format to be converted.
Based on a preset encapsulation algorithm, a conversion rule between the message in the format and the message in the preset format is established.
And packaging the source message format and the target message format to be converted into a format conversion task, so that the target format conversion task can be redetermined in a plurality of format conversion tasks conveniently.
The preset encapsulation algorithm comprises a plurality of built-in functions, and the built-in functions are used for extracting and assembling messages in different formats.
S304, setting unique identification information of the conversion rule for any conversion rule.
After different conversion rules are obtained, unique identification information is set for each conversion rule, so that the conversion rule corresponding to the unique identification information can be conveniently determined according to the unique identification information.
Wherein, the unique identification information can be special symbol, serial number, name, character string, etc.
In the above embodiment of the present application, by acquiring the access interfaces of the messages with different formats, format parsing is performed on the messages with different formats according to the access interfaces of the messages with different formats, and the format structures corresponding to the messages with different formats are determined, so that the conversion rules between the messages with different formats are established according to the format structures corresponding to the messages with each format, and unique identification information is set for each conversion rule. According to the method, the conversion rules among the messages with different formats are established, so that the format conversion of the messages is conveniently carried out according to the established conversion rules when the format conversion is carried out subsequently, and the conversion efficiency of the format of the messages is improved.
Fig. 4 is a schematic structural diagram of a message format conversion device according to an embodiment of the present application, where the device includes: an acquisition module 401, a determination module 402, and a processing module 403.
The obtaining module 401 is configured to obtain a message format conversion request input by a user, where the message format conversion request includes source message information and a source message format.
A determining module 402, configured to determine, in response to an operation of the user in the visual interface, a target format conversion task, where the target format conversion task is used to determine a target message format to be converted in the source message format.
The obtaining module 401 is further configured to obtain, according to the target format conversion task, unique identification information corresponding to the target format conversion task.
The determining module 402 is further configured to determine, according to the unique identification information, a conversion rule of a source message format and a target message format, which are configured in advance and correspond to the unique identification information.
The processing module 403 is configured to perform format conversion on the source message information according to the conversion rule, so as to obtain target message information in a target message format.
One possible implementation manner is that the processing module 403 is specifically configured to:
and extracting the field name and the value information corresponding to the field name in the source message information.
And converting the field names and the value information corresponding to the field names into the field names and the value information corresponding to the target message format according to the conversion rules.
And correlating the field names and the value information corresponding to the converted target message format to obtain the target message information of the target message format.
One possible implementation is that the processing module 403 is further configured to:
and acquiring access interfaces of messages with different formats.
And carrying out format analysis on the messages with different formats according to the access interfaces of the messages with different formats, and determining the format structures corresponding to the messages with different formats.
And establishing conversion rules among messages in different formats according to the format structure corresponding to the messages in each format.
For any conversion rule, unique identification information of the conversion rule is set.
One possible implementation manner is that the processing module 403 is specifically further configured to:
and extracting a field name and value information corresponding to the field name from the message in any format according to a format structure corresponding to the message in any format.
Based on a preset format conversion language, converting the field name and the value information corresponding to the field name into the field name and the value information corresponding to the message in the preset format, and obtaining a format structure corresponding to the message in the preset format.
Based on a preset encapsulation algorithm, a conversion rule between the message in the format and the message in the preset format is established.
One possible implementation manner is that the preset encapsulation algorithm includes a plurality of built-in functions, and the built-in functions are used for extracting and assembling messages in different formats.
One possible implementation manner is that the device further comprises a verification module, after performing format conversion on the source message information according to the conversion rule to obtain target message information in a target message format, the verification module is used for:
and performing format verification on the obtained target message information in the target message format.
If the verification is not passed, outputting early warning prompt information of message format conversion errors.
One possible implementation is that the message format includes one or more of the following: 8583 message format, JSON message format, XML message format, KEY-VALUE message format, and len+data message format.
The message format conversion device provided in this embodiment is configured to execute any of the foregoing method embodiments, and its implementation principle and technical effects are similar, and will not be described in detail.
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application, as shown in fig. 5, where the device may include: at least one processor 501 and a memory 502 communicatively coupled to the processor.
A memory 502 for storing a program. In particular, the program may include program code including computer operation/execution instructions.
The memory 502 may comprise high-speed RAM memory or may further comprise non-volatile memory (non-volatile memory), such as at least one disk memory.
The processor 501 is configured to execute computer-executable instructions stored in the memory 502 to implement the method described in any of the foregoing embodiments. The processor 501 may be a central processing unit (Central Processing Unit, abbreviated as CPU), or an application specific integrated circuit (Application Specific Integrated Circuit, abbreviated as ASIC), or one or more integrated circuits configured to implement embodiments of the present application.
Optionally, the electronic device may also include a communication interface 503. In a specific implementation, if the communication interface 503, the memory 502, and the processor 501 are implemented independently, the communication interface 503, the memory 502, and the processor 501 may be connected to each other and perform communication with each other through a bus. The bus may be an industry standard architecture (Industry Standard Architecture, abbreviated ISA) bus, an external device interconnect (Peripheral Component, abbreviated PCI) bus, or an extended industry standard architecture (Extended Industry Standard Architecture, abbreviated EISA) bus, among others. Buses may be divided into address buses, data buses, control buses, etc., but do not represent only one bus or one type of bus.
Alternatively, in a specific implementation, if the communication interface 503, the memory 502, and the processor 501 are integrated on a chip, the communication interface 503, the memory 502, and the processor 501 may complete communication through an internal interface.
The electronic device provided in this embodiment is configured to execute the foregoing method for converting a message format, and its implementation principle and technical effects are similar to those of the method embodiment, which are not described herein again.
The present application also provides a computer-readable storage medium, which may include: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, etc., and may store program codes, and specifically, the computer-readable storage medium stores thereon computer-executable instructions, which when executed by a processor, are used to implement the above-mentioned method for converting a message format.
The present application also provides a computer program product comprising a computer program stored in a readable storage medium. The computer program may be read from a readable storage medium by at least one processor of the electronic device, and execution of the program by at least one processor causes the electronic device to implement the method for converting a message format as provided in the various embodiments described above.
Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. This application is intended to cover any variations, uses, or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the application pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It is to be understood that the application is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (10)

1. A method for converting a message format, comprising:
obtaining a message format conversion request input by a user, wherein the message format conversion request comprises source message information and a source message format;
responding to the operation of the user in a visual interface, determining a target format conversion task, wherein the target format conversion task is used for determining a target message format to be converted of the source message format;
acquiring unique identification information corresponding to the target format conversion task according to the target format conversion task;
determining a conversion rule of a source message format and a target message format which are pre-configured and correspond to the unique identification information according to the unique identification information;
and carrying out format conversion on the source message information according to the conversion rule to obtain the target message information in the target message format.
2. The method according to claim 1, wherein the performing format conversion on the source message information according to the conversion rule to obtain the target message information in the target message format includes:
extracting a field name in the source message information and value information corresponding to the field name;
converting the field name and the value information corresponding to the field name into the field name and the value information corresponding to the target message format according to the conversion rule;
and correlating the field names and the value information corresponding to the converted target message format to obtain the target message information of the target message format.
3. The method of claim 2, further comprising, prior to the obtaining the user-entered message format conversion request:
acquiring access interfaces of messages with different formats;
according to the access interfaces of the messages with different formats, carrying out format analysis on the messages with different formats, and determining the format structures corresponding to the messages with different formats;
according to the format structure corresponding to the messages in each format, establishing conversion rules among the messages in different formats;
for any conversion rule, unique identification information of the conversion rule is set.
4. The method of claim 3, wherein the establishing a conversion rule between messages in different formats according to the format structure corresponding to the messages in each format includes:
for a message in any format, extracting a field name and value information corresponding to the field name according to a format structure corresponding to the message in any format;
converting the field names and the value information corresponding to the field names into field names and value information corresponding to messages in a preset format based on a preset format conversion language, and obtaining a format structure corresponding to the messages in the preset format;
based on a preset encapsulation algorithm, a conversion rule between the message in the format and the message in the preset format is established.
5. The method of claim 4, wherein the preset encapsulating algorithm includes a plurality of built-in functions, and the built-in functions are used for extracting and assembling messages in different formats.
6. The method according to any one of claims 1-5, wherein after performing format conversion on the source message information according to the conversion rule to obtain the target message information in the target message format, the method further comprises:
performing format verification on the obtained target message information in the target message format;
if the verification is not passed, outputting early warning prompt information of message format conversion errors.
7. The method of claim 6, wherein the message format comprises one or more of: 8583 message format, JSON message format, XML message format, KEY-VALUE message format, and len+data message format.
8. A message format conversion apparatus, comprising:
the system comprises an acquisition module, a message format conversion module and a message format conversion module, wherein the acquisition module is used for acquiring a message format conversion request input by a user, and the message format conversion request comprises source message information and a source message format;
the determining module is used for responding to the operation of the user in the visual interface, determining a target format conversion task, wherein the target format conversion task is used for determining a target message format to be converted of the source message format;
the acquisition module is further used for acquiring unique identification information corresponding to the target format conversion task according to the target format conversion task;
the determining module is further configured to determine a conversion rule of a source message format and a target message format, which are configured in advance and correspond to the unique identification information, according to the unique identification information;
and the processing module is used for carrying out format conversion on the source message information according to the conversion rule to obtain the target message information in the target message format.
9. An electronic device, comprising: a processor, and a memory communicatively coupled to the processor;
the memory stores computer-executable instructions;
the processor executes computer-executable instructions stored in the memory to implement the method of converting a message format as claimed in any one of claims 1 to 7.
10. A computer readable storage medium having stored therein computer executable instructions which when executed by a processor are adapted to implement the method of converting a message format as claimed in any one of claims 1 to 7.
CN202310967672.9A 2023-08-02 2023-08-02 Message format conversion method and device, electronic equipment and storage medium Pending CN116996601A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310967672.9A CN116996601A (en) 2023-08-02 2023-08-02 Message format conversion method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310967672.9A CN116996601A (en) 2023-08-02 2023-08-02 Message format conversion method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116996601A true CN116996601A (en) 2023-11-03

Family

ID=88522859

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310967672.9A Pending CN116996601A (en) 2023-08-02 2023-08-02 Message format conversion method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116996601A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117499504A (en) * 2023-12-29 2024-02-02 万联易达物流科技有限公司 Message format conversion method and system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117499504A (en) * 2023-12-29 2024-02-02 万联易达物流科技有限公司 Message format conversion method and system
CN117499504B (en) * 2023-12-29 2024-03-22 万联易达物流科技有限公司 Message format conversion method and system

Similar Documents

Publication Publication Date Title
CN107145784B (en) Vulnerability scanning method and device and computer readable medium
CN110647316B (en) Method and device for generating universal business object, computer equipment and storage medium
CN113364732B (en) Vehicle-mounted terminal communication protocol analysis method and device
CN116996601A (en) Message format conversion method and device, electronic equipment and storage medium
CN111290806A (en) Calling method and device of application program interface, computer equipment and storage medium
CN114090671A (en) Data import method and device, electronic equipment and storage medium
CN114416877A (en) Data processing method, device and equipment and readable storage medium
CN110502645B (en) Information query method and device
CN111464515A (en) Data conversion method, device, equipment and storage medium
CN112861033B (en) Method and device for executing service
CN116560697B (en) DBC database synchronization method, device, electronic equipment and readable storage medium
CN111351669B (en) Fault diagnosis method and device, storage medium and vehicle
CN109324838B (en) Execution method and execution device of single chip microcomputer program and terminal
CN116467372A (en) Automatic database conversion method and device, electronic equipment and storage medium
CN114756183A (en) Data printing method, device, equipment and storage medium
CN114896161A (en) File construction method and device based on artificial intelligence, computer equipment and medium
CN114663176A (en) Business operation execution method, device, equipment and computer readable storage medium
CN114942781A (en) Data format adaptation method and device for data reading
CN108882006A (en) A kind of conversion method of message format, device, storage medium and android terminal
CN109005469A (en) A kind of conversion method of message format, device, storage medium and android terminal
CN112054955B (en) Gateway-based device communication method
CN112702303A (en) Train real-time data analysis method, device, equipment and storage medium
CN117478723A (en) Data transmission method, device, equipment and storage medium
CN117349188B (en) Test case generation method and device based on large model
CN109284128A (en) Method, apparatus, storage medium and the mobile terminal of change data

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination