CN113132371A - Message conversion method, device, computer readable storage medium and processor - Google Patents

Message conversion method, device, computer readable storage medium and processor Download PDF

Info

Publication number
CN113132371A
CN113132371A CN202110396826.4A CN202110396826A CN113132371A CN 113132371 A CN113132371 A CN 113132371A CN 202110396826 A CN202110396826 A CN 202110396826A CN 113132371 A CN113132371 A CN 113132371A
Authority
CN
China
Prior art keywords
message
conversion
rule
description language
source
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
CN202110396826.4A
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.)
Postal Savings Bank of China Ltd
Original Assignee
Postal Savings 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 Postal Savings Bank of China Ltd filed Critical Postal Savings Bank of China Ltd
Priority to CN202110396826.4A priority Critical patent/CN113132371A/en
Publication of CN113132371A publication Critical patent/CN113132371A/en
Pending legal-status Critical Current

Links

Images

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/08Protocols for interworking; Protocol conversion
    • 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/06Notations for structuring of protocol data, e.g. abstract syntax notation one [ASN.1]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Devices For Executing Special Programs (AREA)

Abstract

The application provides a message conversion method, a message conversion device, a computer readable storage medium and a processor. The method comprises generating a message format conversion description language; and converting the source message into a target message by adopting a message format conversion description language. By generating the message format conversion description language and then converting the source message into the target message by adopting the message format conversion description language, the scheme does not limit the specific formats of the source message and the target message, can realize the conversion between common types of messages, does not need to be repeatedly developed when the message type changes, and only needs to be dynamically configured. The timeliness and the correctness of message conversion are greatly improved. The configuration replaces the online development work, so that the transformation period and the development workload are greatly shortened, the normal operation of the service is not influenced, and the reliability of the code logic is stronger. The operation is simple, and the learning cost is low. The stability of the system is improved, the dynamic configuration is effective in real time, and the system upgrading operation is not needed.

Description

Message conversion method, device, computer readable storage medium and processor
Technical Field
The present application relates to the field of message conversion, and in particular, to a message conversion method, device, computer-readable storage medium, and processor.
Background
As an intermediate platform system requiring interfacing with a large number of systems, a large number of systems implemented by different technology stacks need to be interfaced, and when a system is accessed, a large amount of resources are consumed for implementing communication message conversion of different protocols. In the traditional mode, the conversion of the message needs to perform customized code development (for example, one set of code needs to be developed to convert the message a into the message B, and another set of code needs to be redeveloped to convert the message a into the message C), system joint debugging upgrade is on-line, and other work, so that not only precious development resources are consumed, the normal operation of the service is affected, but also timeliness and correctness are difficult to guarantee. Not only is the development on-line period long and the workload large, but also the normal operation of the service is influenced and the reliability of the code logic cannot be ensured.
Disclosure of Invention
The present application mainly aims to provide a method and an apparatus for message conversion, a computer-readable storage medium, and a processor, so as to solve the problem of low efficiency of a message conversion method in the prior art.
In order to achieve the above object, according to an aspect of the present application, there is provided a method for packet conversion, including: generating a message format conversion description language; and converting the source message into the target message by adopting the message format conversion description language.
Further, the message format conversion description language includes a conversion rule, and the generating of the message format conversion description language includes: configuring a conversion rule for converting the source message into the target message; and defining a rule index, wherein the rule index is mapped with the conversion rule one by one.
Further, the conversion rule includes a first conversion rule and a second conversion rule, and the converting the source packet into the target packet by using the packet format conversion description language includes: converting the source message into an intermediate message by adopting the first conversion rule; and converting the intermediate message into a target message by adopting the second conversion rule.
Further, converting the source packet into an intermediate packet by using the first conversion rule includes: checking the source message; and under the condition that the verification is passed, converting the source message into the intermediate message by adopting the first conversion rule.
Further, the method further comprises: and modifying the conversion rule online.
Further, the message format conversion description language includes a built-in function, and the built-in function is used for encapsulating the operation logic.
Further, the method further comprises: managing a message conversion process by adopting a double memory module, wherein the double memory module comprises a first memory segment and a second memory segment; when the system runs normally, the data in the first memory segment is used for message conversion, the second memory segment is a backup memory segment, when the system is in an upgrading state, the data in the first memory segment is still used for message conversion, and the updated conversion rule and the updated rule index are stored in the second memory segment; and after the upgrading is finished, exchanging the data in the second memory segment with the data in the first memory segment.
According to another aspect of the present application, there is provided a message conversion apparatus, including: the generating unit is used for generating a message format conversion description language; and the conversion unit is used for converting the source message into the target message by adopting the message format conversion description language.
According to yet another aspect of the present application, a computer-readable storage medium is provided, which includes a stored program, wherein when the program runs, the program controls a device in which the computer-readable storage medium is located to execute any one of the message conversion methods.
According to still another aspect of the present application, there is provided a processor configured to execute a program, where the program executes any one of the message conversion methods.
By applying the technical scheme of the application, the source message is converted into the target message by generating the message format conversion description language and then adopting the message format conversion description language, the specific formats of the source message and the target message are not limited in the scheme, the conversion between common types of messages can be realized, and when the message type changes, repeated development is not needed, and only dynamic configuration is needed. The timeliness and the correctness of message conversion are greatly improved. The configuration replaces the online development work, so that the transformation period and the development workload are greatly shortened, the normal operation of the service is not influenced, and the reliability of the code logic is stronger. The operation is simple, and the learning cost is low. The stability of the system is improved, the dynamic configuration is effective in real time, and the system upgrading operation is not needed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this application, illustrate embodiments of the application and, together with the description, serve to explain the application and are not intended to limit the application. In the drawings:
FIG. 1 is a flow diagram illustrating a method for message conversion according to an embodiment of the present application;
fig. 2 is a schematic diagram illustrating a device for message conversion according to an embodiment of the present application;
fig. 3 shows a specific message conversion schematic diagram according to an embodiment of the present application;
fig. 4 is a schematic diagram illustrating management of a packet conversion process by using dual memory modules according to an embodiment of the present application.
Detailed Description
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be used. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It will be understood that when an element such as a layer, film, region, or substrate is referred to as being "on" another element, it can be directly on the other element or intervening elements may also be present. Also, in the specification and claims, when an element is described as being "connected" to another element, the element may be "directly connected" to the other element or "connected" to the other element through a third element.
For convenience of description, some terms or expressions referred to in the embodiments of the present application are explained below:
dsl (domain specific language): i.e., domain specific languages, computer languages that specifically address a particular problem, such as SQL and regular expressions, which are well known in the art.
TDDL (transaction Definition Description language): the message format conversion description language is a field-specific language, is specially designed for processing message format conversion, has the sequence, selection and cycle structure of general languages, can be dynamically configured to take effect in real time, and supports customized development and expansion.
XMF (external Message Format): and (4) external message format.
ISO8583 message: the 8583 packet is composed of 128 field fields at most, each field has a uniform specification and has a fixed length and a variable length.
ASCII ((American Standard Code for Information exchange): American Standard Code): is a computer coding system based on Latin letters.
EBCDIC (extended Binary Coded dental exchange code): the character code table was developed by international business machines corporation (IBM) between 1963 and 64, and was arranged according to Binary Coded Decimal (BCD) of the early punch type.
Fml (field management language): is an abbreviation for field control language, is one of the TUXEDO buffer types.
According to an embodiment of the present application, a method for message conversion is provided.
Fig. 1 is a flowchart of a method for message conversion according to an embodiment of the present application. As shown in fig. 1, the method comprises the steps of:
step S101, generating a message format conversion description language;
step S102, the source message is converted into the target message by adopting the message format conversion description language.
Specifically, the message format conversion description language in the application is a domain-specific language, is specially designed for processing message format conversion, has the sequence, selection and cycle structure of a general language, can be dynamically configured to take effect in real time, and supports customized development and extension.
The message format conversion description language in the application supports common messages in the market, such as FML messages, non-delimiter fixed-length messages, delimiter messages, ISO8583 messages, JSON messages, XML messages and the like, and also supports code system conversion, such as conversion from ASCII codes to EBCDIC codes.
Specifically, the message format conversion description language in the present application utilizes C language programming, and has functions of syntax rules, language parsing, format conversion, transcoding, data type processing, and the like.
In the scheme, the message format conversion description language is generated, and then the message format conversion description language is adopted to convert the source message into the target message, the specific formats of the source message and the target message are not limited in the scheme, the conversion between common types of messages can be realized, and when the message type changes, repeated development is not needed, and only dynamic configuration is needed. The timeliness and the correctness of message conversion are greatly improved. The configuration replaces the online development work, so that the transformation period and the development workload are greatly shortened, the normal operation of the service is not influenced, and the reliability of the code logic is stronger. The operation is simple, and the learning cost is low. The stability of the system is improved, the dynamic configuration is effective in real time, and the system upgrading operation is not needed.
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowcharts, in some cases, the steps illustrated or described may be performed in an order different than presented herein.
In an embodiment of the application, the message format conversion description language includes a conversion rule, and the generating of the message format conversion description language includes: configuring a conversion rule for converting the source message into the target message; and defining a rule index, wherein the rule index and the conversion rule are mapped one by one. The required conversion rule can be found in time according to the rule index, and then the source message is converted into the target message by utilizing the conversion rule.
In an embodiment of the application, the conversion rule includes a first conversion rule and a second conversion rule, and the converting the source packet into the target packet using the packet format conversion description language includes: converting the source message into an intermediate message by adopting the first conversion rule; and converting the intermediate message into a target message by adopting the second conversion rule. Namely, an intermediate message is set as a message with a standard format, and no matter what format the source message is, a first conversion rule for converting the source message into the intermediate message is set in advance, and a second conversion rule for converting the intermediate message into the target message is also set, so that no matter what format the source message is and no matter what format the target message is, conversion of the two messages can be realized by adopting the message format conversion description language of the scheme.
In an embodiment of the application, the converting the source packet into the intermediate packet by using the first conversion rule includes: checking the source message; and under the condition that the verification is passed, converting the source message into the intermediate message by adopting the first conversion rule.
In an embodiment of the present application, the method further includes: and modifying the conversion rule online. Namely, the conversion rule can be modified and adjusted on line without restarting the application, and the stable operation of the service can be ensured. The method solves the difficult problem in the traditional mode by means of dynamic configuration, real-time effect and the like, and can complete message conversion of different protocols without upgrading and modifying the system.
In an embodiment of the present application, the message format conversion description language includes a built-in function, and the built-in function is used for encapsulating an arithmetic logic. The arithmetic logic includes some general-purpose logic (e.g., loop logic), and complex logic (nested selection logic, sequential logic, and loop logic in loop logic). By packaging the operation logic into the built-in function, the built-in function can be directly called during execution, so that the process of configuring the conversion rule is simplified, the transformation efficiency is improved, and the transformation risk can be reduced.
In an embodiment of the present application, the method further includes: managing a message conversion process by adopting a double memory module, wherein the double memory module comprises a first memory segment and a second memory segment; when the system is in normal operation, the data in the first memory segment is used for message conversion, the second memory segment is a backup memory segment, when the system is in an upgrading state, the data in the first memory segment is still used for message conversion, and the updated conversion rule and the updated rule index are stored in the second memory segment; and after the upgrading is finished, exchanging the data in the second memory segment with the data in the first memory segment. The timeliness and consistency of the conversion rule are guaranteed.
The embodiment of the present application further provides a device for message conversion, and it should be noted that the device for message conversion according to the embodiment of the present application may be used to execute the method for message conversion according to the embodiment of the present application. The following describes a message conversion apparatus provided in this embodiment.
Fig. 2 is a schematic diagram of a message conversion apparatus according to an embodiment of the present application. As shown in fig. 2, the apparatus includes:
a generating unit 10, configured to generate a message format conversion description language;
a conversion unit 20, configured to convert the source packet into the destination packet by using the above-mentioned packet format conversion description language.
Specifically, the message format conversion description language in the application is a domain-specific language, is specially designed for processing message format conversion, has the sequence, selection and cycle structure of a general language, can be dynamically configured to take effect in real time, and supports customized development and extension.
The message format conversion description language in the application supports common messages in the market, such as FML messages, non-delimiter fixed-length messages, delimiter messages, ISO8583 messages, JSON messages, XML messages and the like, and also supports code system conversion, such as conversion from ASCII codes to EBCDIC codes.
Specifically, the message format conversion description language in the present application utilizes C language programming, and has functions of syntax rules, language parsing, format conversion, transcoding, data type processing, and the like.
In the scheme, the generation unit generates the message format conversion description language, and the conversion unit converts the source message into the target message by adopting the message format conversion description language, the specific formats of the source message and the target message are not limited in the scheme, the conversion between common types of messages can be realized, and when the message type changes, repeated development is not needed, and only dynamic configuration is needed. The timeliness and the correctness of message conversion are greatly improved. The configuration replaces the online development work, so that the transformation period and the development workload are greatly shortened, the normal operation of the service is not influenced, and the reliability of the code logic is stronger. The operation is simple, and the learning cost is low. The stability of the system is improved, the dynamic configuration is effective in real time, and the system upgrading operation is not needed.
In an embodiment of the application, the message format conversion description language includes a conversion rule, and the generating unit includes: a configuration module, configured to configure a conversion rule for converting the source packet into the target packet; and the definition module is used for defining rule indexes, and the rule indexes are mapped with the conversion rules one by one. The required conversion rule can be found in time according to the rule index, and then the source message is converted into the target message by utilizing the conversion rule.
In an embodiment of the application, the conversion rule includes a first conversion rule and a second conversion rule, and the conversion unit includes: a first conversion module, configured to convert the source packet into an intermediate packet by using the first conversion rule; and the second conversion module is used for converting the intermediate state message into a target message by adopting the second conversion rule. The method is characterized in that an intermediate message is set as a message with a standard format, a first conversion rule for converting the source message into the intermediate message is set in advance no matter what format the source message is, and a second conversion rule for converting the intermediate message into the target message is also set, so that conversion of two messages can be realized no matter what format the source message is and no matter what format the target message is.
In an embodiment of the present application, the first conversion module includes a checking submodule and a conversion submodule, and the checking submodule is configured to check the source packet; the conversion submodule is configured to convert the source packet into the intermediate packet by using the first conversion rule when the check passes.
In an embodiment of the application, the apparatus further includes a modification unit, and the modification unit is configured to modify the conversion rule online. Namely, the conversion rule can be modified and adjusted on line without restarting the application, and the stable operation of the service can be ensured. The method solves the difficult problem in the traditional mode by means of dynamic configuration, real-time effect and the like, and can complete message conversion of different protocols without upgrading and modifying the system.
In an embodiment of the present application, the apparatus further includes a management unit, where the management unit is configured to manage a message conversion process by using a dual memory module, where the dual memory module includes a first memory segment and a second memory segment; when the system is in normal operation, the data in the first memory segment is used for message conversion, the second memory segment is a backup memory segment, when the system is in an upgrading state, the data in the first memory segment is still used for message conversion, and the updated conversion rule and the updated rule index are stored in the second memory segment; and after the upgrading is finished, exchanging the data in the second memory segment with the data in the first memory segment. The timeliness and consistency of the conversion rule are guaranteed.
The message conversion device comprises a processor and a memory, wherein the generation unit, the conversion unit and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can be set to be one or more than one, and the efficiency of message conversion is improved by adjusting kernel parameters.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
The embodiment of the invention provides a computer-readable storage medium, which comprises a stored program, wherein when the program runs, a device where the computer-readable storage medium is located is controlled to execute the message conversion method.
The embodiment of the invention provides a processor, which is used for running a program, wherein the message conversion method is executed when the program runs.
The embodiment of the invention provides equipment, which comprises a processor, a memory and a program which is stored on the memory and can run on the processor, wherein when the processor executes the program, at least the following steps are realized:
step S101, generating a message format conversion description language;
step S102, the source message is converted into the target message by adopting the message format conversion description language.
The device herein may be a server, a PC, a PAD, a mobile phone, etc.
The present application further provides a computer program product adapted to perform a program of initializing at least the following method steps when executed on a data processing device:
step S101, generating a message format conversion description language;
step S102, the source message is converted into the target message by adopting the message format conversion description language.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
Examples
The present embodiment relates to a specific method for message conversion. The whole process of the emerging message conversion method based on the custom language comprises two processes: the conversion rule defines the process and the message conversion executing process. The overall flow is shown in fig. 3. In the rule definition process, a configurator writes conversion codes of corresponding messages according to syntax rules of the TDDL, and because the TDDL supports common syntaxes of circulation, logic judgment and the like, the conversion rules of various scenes can be integrated into one code, and descriptions can also be written separately. The conversion rule codes can be added into the system in real time, and the system has the capability of real-time effect. When the rule code is added into the system, the rule index is defined, and the rule index and the conversion rule content are stored in the system in a one-to-one mapping mode.
After the source message enters the system, firstly, verification is carried out, after the verification is passed, the conversion rule in the system can be matched according to the rule index, the conversion rule is analyzed and executed by utilizing the self-defined language analyzer, and the source message is converted into the intermediate message in the system. After the system generates the intermediate state message, the conversion rule of the target message is found by utilizing the information of the target message, and the intermediate state message is converted into the target message through the analysis execution of the analyzer.
TDDL (message format conversion description language) is the core of a new message conversion method. TDDL is a domain specific language designed specifically for handling message format conversion. The TDDL supports common messages in the market, such as FML messages, non-delimiter fixed-length messages, delimiter messages, ISO8583 messages, JSON messages, XML messages, and the like, and supports code system conversion, such as conversion from ASCII codes to EBCDIC codes. TDDL is an interpreted language, supports the characteristics of some popular programming languages, such as logic structures of sequence, selection, circulation and the like, variable definition assignment, expression analysis and the like, supports the execution of embedded functions and encapsulates some complex and general logics into function execution in order to reduce the writing difficulty and the code quantity, greatly reduces the code complexity and is not easy to make mistakes. The message conversion example (FML message- > XML message) written by TDDL is as follows:
Figure BDA0003018874400000091
TRANTYPE=104
MAC_CREATE=
MAC_CHECK=
[TDF]
10 DO XMLINIT(web)
20 FIELD 2=SETVALUE(/web/txcodel,FML(stdmsgtype))
30 FIELD 3=SETVALUE(/web/txcode2.FML(stdprocode))
Figure BDA0003018874400000092
50 FIELD 5=SETVALUE(/web/TermID,FML(stdtermid))
60 FIELD 6=SETVALUE(/web/Amount,FML(stdtranamt))
70 FIELD 7=SETVALUE(/web/TermTrace,FML(stdtermtrc))
80 FIELD 8=SETVALUE(/web/PINData.FML(stdpindata))
90 FIELD 9=SETVALUE(/web/Track2,FML(stdtrack2))
100 FIELD 10=SETVALUE(/web/Track3,FML(stdtrack3))
110 FIELD 11=SETVALUE(/web/Date,FML(stdtrandate))
112 DO XML()
120 DO XMLFREE()
the TDDL has the characteristics of dynamic modification, online upgrade, real-time effect and the like, and supports customized development and expansion. In order to improve the analysis efficiency, the system can flush the conversion rule into the memory when starting, and directly reads and executes the conversion rule when converting the message. In the dynamic modification process, in order to ensure the consistency of the conversion result, an A/B dual-memory mode is adopted: namely, the format conversion module uses the A memory segment during upgrading, the upgrading loading module updates the B memory segment, the A/B memory segment is switched after upgrading loading is finished, and the format conversion module uses the B memory segment. The overall flow is shown in fig. 4.
From the above description, it can be seen that the above-described embodiments of the present application achieve the following technical effects:
1) according to the message conversion method, the message format conversion description language is generated, and then the message format conversion description language is adopted to convert the source message into the target message. The timeliness and the correctness of message conversion are greatly improved. The configuration replaces the online development work, so that the transformation period and the development workload are greatly shortened, the normal operation of the service is not influenced, and the reliability of the code logic is stronger. The operation is simple, and the learning cost is low. The stability of the system is improved, the dynamic configuration is effective in real time, and the system upgrading operation is not needed.
2) According to the message conversion device, the generation unit generates the message format conversion description language, the conversion unit converts the source message into the target message by adopting the message format conversion description language, the specific formats of the source message and the target message are not limited in the scheme, the conversion between common types of messages can be realized, and when the message type changes, repeated development is not needed, and only dynamic configuration is needed. The timeliness and the correctness of message conversion are greatly improved. The configuration replaces the online development work, so that the transformation period and the development workload are greatly shortened, the normal operation of the service is not influenced, and the reliability of the code logic is stronger. The operation is simple, and the learning cost is low. The stability of the system is improved, the dynamic configuration is effective in real time, and the system upgrading operation is not needed.
The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (10)

1. A method for message conversion, comprising:
generating a message format conversion description language;
and converting the source message into the target message by adopting the message format conversion description language.
2. The method of claim 1, wherein the message format conversion description language includes conversion rules, and wherein generating a message format conversion description language comprises:
configuring a conversion rule for converting the source message into the target message;
and defining a rule index, wherein the rule index is mapped with the conversion rule one by one.
3. The method of claim 2, wherein the transformation rules include a first transformation rule and a second transformation rule, and wherein transforming the source packet into the destination packet using the packet format conversion description language comprises:
converting the source message into an intermediate message by adopting the first conversion rule;
and converting the intermediate message into a target message by adopting the second conversion rule.
4. The method of claim 3, wherein converting the source packet into a intermediate packet using the first conversion rule comprises:
checking the source message;
and under the condition that the verification is passed, converting the source message into the intermediate message by adopting the first conversion rule.
5. The method of claim 2, further comprising:
and modifying the conversion rule online.
6. The method of claim 1, wherein the message format conversion description language includes built-in functions for encapsulating arithmetic logic.
7. The method of claim 2, further comprising:
managing a message conversion process by adopting a double memory module, wherein the double memory module comprises a first memory segment and a second memory segment;
when the memory is normally operated, the data in the first memory segment is used for message conversion, the second memory segment is a backup memory segment,
when the mobile terminal is in an upgrading state, still using the data in the first memory segment to perform message conversion, and storing the updated conversion rule and the updated rule index in the second memory segment;
and after the upgrading is finished, exchanging the data in the second memory segment with the data in the first memory segment.
8. An apparatus for message conversion, comprising:
the generating unit is used for generating a message format conversion description language;
and the conversion unit is used for converting the source message into the target message by adopting the message format conversion description language.
9. A computer-readable storage medium, comprising a stored program, wherein the program, when executed, controls an apparatus in which the computer-readable storage medium is located to perform the message conversion method according to any one of claims 1 to 7.
10. A processor, characterized in that the processor is configured to run a program, wherein the program is configured to perform the message conversion method according to any one of claims 1 to 7 when running.
CN202110396826.4A 2021-04-13 2021-04-13 Message conversion method, device, computer readable storage medium and processor Pending CN113132371A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110396826.4A CN113132371A (en) 2021-04-13 2021-04-13 Message conversion method, device, computer readable storage medium and processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110396826.4A CN113132371A (en) 2021-04-13 2021-04-13 Message conversion method, device, computer readable storage medium and processor

Publications (1)

Publication Number Publication Date
CN113132371A true CN113132371A (en) 2021-07-16

Family

ID=76776651

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110396826.4A Pending CN113132371A (en) 2021-04-13 2021-04-13 Message conversion method, device, computer readable storage medium and processor

Country Status (1)

Country Link
CN (1) CN113132371A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114070886A (en) * 2021-11-17 2022-02-18 深圳壹账通智能科技有限公司 Message conversion method, device, equipment and medium
CN114363412A (en) * 2022-01-07 2022-04-15 中国工商银行股份有限公司 Message data processing method and device, computer equipment and storage medium
CN115118792A (en) * 2022-06-27 2022-09-27 中国银行股份有限公司 Message interface format conversion method, device and system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1908934A (en) * 2006-08-02 2007-02-07 华为技术有限公司 Online updating control method and device of embedded database
CN111447257A (en) * 2020-03-09 2020-07-24 中国建设银行股份有限公司 Message conversion method and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1908934A (en) * 2006-08-02 2007-02-07 华为技术有限公司 Online updating control method and device of embedded database
CN111447257A (en) * 2020-03-09 2020-07-24 中国建设银行股份有限公司 Message conversion method and device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114070886A (en) * 2021-11-17 2022-02-18 深圳壹账通智能科技有限公司 Message conversion method, device, equipment and medium
CN114363412A (en) * 2022-01-07 2022-04-15 中国工商银行股份有限公司 Message data processing method and device, computer equipment and storage medium
CN114363412B (en) * 2022-01-07 2024-06-11 中国工商银行股份有限公司 Message data processing method, device, computer equipment and storage medium
CN115118792A (en) * 2022-06-27 2022-09-27 中国银行股份有限公司 Message interface format conversion method, device and system

Similar Documents

Publication Publication Date Title
CN113132371A (en) Message conversion method, device, computer readable storage medium and processor
CN109308224B (en) Cross-platform data communication and cross-platform data processing method, device and system
CN109002362B (en) Service method, device and system and electronic equipment
CN111290778B (en) AI model packaging method, platform and electronic equipment
US20160124914A1 (en) Page Processing for Mobile App
TW202001548A (en) Method and apparatus for developing application program
CN111158690B (en) Desktop application framework, construction method, desktop application running method and storage medium
CN103281311A (en) Internet of Things protocol analysis method adopting Protobuf description
CN111176626A (en) Cross-programming-language code calling method and device, medium and equipment
CN112235357B (en) Cross-platform application development system
CN110580174B (en) Application component generation method, server and terminal
CN113031932B (en) Project development method, apparatus, electronic device and storage medium
CN110187986B (en) Command management method, system, device and computer readable storage medium
CN101202736B (en) Method for realizing encoding-decoding in communication network
CN103095726A (en) Processing method and device of protocol interpreter
WO2024130997A1 (en) Node configuration method and apparatus, and device, non-volatile readable storage medium and server
CN108804100B (en) Method and device for creating interface element, storage medium and mobile terminal
CN110097464B (en) Intelligent contract generation method and device, electronic equipment and storage medium
CN111736844B (en) Database cloud service standard interface and implementation method
CN111796727A (en) Interface data processing method and device
US20170131980A1 (en) Model driven architecture for network management and configuration
CN109388406A (en) Convert method and device, the storage medium, electronic device of java code
US10929121B2 (en) Method, device and related system for dynamically repairing application
CN112765252B (en) Data transmission method, client, terminal, server and storage medium
CN114938397A (en) Kaitai-based high-efficiency protocol unpacking and packing method, system and readable 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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210716